diff --git a/character/extra.js b/character/extra.js index e35f67d4bd..61cc31fe8d 100755 --- a/character/extra.js +++ b/character/extra.js @@ -590,8 +590,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'orange', filter:function(event,player){ - return true; - //return player.getStorage('dctuoyu').length==3; + return player.getStorage('dctuoyu').length==3; }, content:function(){ 'step 0' diff --git a/character/mobile.js b/character/mobile.js index ea965f89eb..facdb4b6a5 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -14881,7 +14881,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhaotongzhaoguang:"手杀赵统赵广", zhaotongzhaoguang_prefix:'手杀', re_liru:'手杀李儒', - re_liru_prefix:'李儒', + re_liru_prefix:'手杀', re_chenqun:'手杀陈群', re_chenqun_prefix:'手杀', old_yuanshu:'手杀袁术', diff --git a/game/asset.js b/game/asset.js index 7e02a273f0..c765531392 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.10.2.1', + 'v1.10.3.1', /*audio start*/ 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', @@ -724,6 +724,7 @@ window.noname_asset_list=[ 'audio/die/re_taishici.mp3', 'audio/die/re_taoqian.mp3', 'audio/die/re_weiyan.mp3', + 'audio/die/re_wenpin.mp3', 'audio/die/re_wuguotai.mp3', 'audio/die/re_wuyi.mp3', 'audio/die/re_xiahoudun.mp3', @@ -753,6 +754,7 @@ window.noname_asset_list=[ 'audio/die/re_zhaoyun.mp3', 'audio/die/re_zhenji.mp3', 'audio/die/re_zhonghui.mp3', + 'audio/die/re_zhongyao.mp3', 'audio/die/re_zhoucang.mp3', 'audio/die/re_zhouyu.mp3', 'audio/die/re_zhugeliang.mp3', @@ -2679,6 +2681,8 @@ window.noname_asset_list=[ 'audio/skill/huoji2.mp3', 'audio/skill/huomo_huzhao1.mp3', 'audio/skill/huomo_huzhao2.mp3', + 'audio/skill/huomo_re_zhongyao1.mp3', + 'audio/skill/huomo_re_zhongyao2.mp3', 'audio/skill/huomo1.mp3', 'audio/skill/huomo2.mp3', 'audio/skill/huoshou1_re_menghuo1.mp3', @@ -5734,6 +5738,8 @@ window.noname_asset_list=[ 'audio/skill/zhenshan2.mp3', 'audio/skill/zhente1.mp3', 'audio/skill/zhente2.mp3', + 'audio/skill/zhenwei_re_wenpin1.mp3', + 'audio/skill/zhenwei_re_wenpin2.mp3', 'audio/skill/zhenwei1.mp3', 'audio/skill/zhenwei2.mp3', 'audio/skill/zhiba2_re_sunben1.mp3', @@ -5888,6 +5894,8 @@ window.noname_asset_list=[ 'audio/skill/zuixiang.mp3', 'audio/skill/zunwei1.mp3', 'audio/skill/zunwei2.mp3', + 'audio/skill/zuoding_re_zhongyao1.mp3', + 'audio/skill/zuoding_re_zhongyao2.mp3', 'audio/skill/zuoding1.mp3', 'audio/skill/zuoding2.mp3', 'audio/skill/zuoxing1.mp3', diff --git a/game/game.js b/game/game.js index eec0df4066..583cc86ae3 100644 --- a/game/game.js +++ b/game/game.js @@ -26111,60 +26111,72 @@ return list; }, addSkillTrigger:function(skill,hidden,triggeronly){ - let skills=game.expandSkills([skill]); - for(let skill of skills){ - let info=lib.skill[skill]; - if(!info){ - console.trace(`Cannot find skill: ${skill}\nPlease check if game.expandSkills is overwritten`); - continue; + var info=lib.skill[skill]; + if(!info) return; + if(typeof info.group=='string'){ + this.addSkillTrigger(info.group,hidden); + } + else if(Array.isArray(info.group)){ + for(var i=0;i{ + finishSkill:(i,sub)=>{ const mode=get.mode(),info=lib.skill[i],iInfo=`${i}_info`; if(info.alter){ lib.translate[`${iInfo}_origin`]=lib.translate[iInfo]; @@ -40293,25 +40315,14 @@ }); } if(info.inherit){ - var inheritHistory=[]; - while(true){ - if(!info.inherit) break; - if(inheritHistory.includes(info.inherit)){ - console.trace(`Inherit Error: ${info.inherit} in ${i}'s inherit forms a deadlock`); - break; - } - inheritHistory.push(info.inherit); - - const inheritInfo=lib.skill[info.inherit]; - if(inheritInfo) Object.keys(inheritInfo).forEach(value=>{ - if(info[value]!=undefined) return; - if(value=='audio'&&(typeof info[value]=='number'||typeof info[value]=='boolean')) info[value]=info.inherit; - else info[value]=inheritInfo[value]; - }); - if(lib.translate[i]==undefined) lib.translate[i]=lib.translate[info.inherit]; - if(lib.translate[`${i}_info`]==undefined) lib.translate[`${i}_info`]=lib.translate[`${info.inherit}_info`]; - if(!inheritInfo||!inheritInfo.inherit) info.inherit=void 0; - } + const skill=lib.skill[info.inherit]; + if(skill) Object.keys(skill).forEach(value=>{ + if(info[value]!=undefined) return; + if(value=='audio'&&(typeof info[value]=='number'||typeof info[value]=='boolean')) info[value]=info.inherit; + else info[value]=skill[value]; + }); + if(lib.translate[i]==undefined) lib.translate[i]=lib.translate[info.inherit]; + if(lib.translate[iInfo]==undefined) lib.translate[iInfo]=lib.translate[`${info.inherit}_info`]; } if(info.limited){ if(info.mark===undefined) info.mark=true; @@ -40320,26 +40331,16 @@ if(info.skillAnimation===undefined) info.skillAnimation=true; if(info.init===undefined) info.init=(player,skill)=>player.storage[skill]=false; } - if(info.subSkill){ - let subSkillHistory=Array.isArray(history)?history:[]; - for(let value in info.subSkill){ - if(subSkillHistory.includes(value)){ - console.trace(`SubSkill Error: ${value} in ${i} forms a deadlock`); - continue; - } - let history=subSkillHistory.slice(0); - history.push(value); - - const iValue=`${i}_${value}`; - lib.skill[iValue]=info.subSkill[value]; - lib.skill[iValue].sub=true; - if(info.subSkill[value].name) lib.translate[iValue]=info.subSkill[value].name; - else lib.translate[iValue]=lib.translate[iValue]||lib.translate[i]; - if(info.subSkill[value].description) lib.translate[`${iValue}_info`]=info.subSkill[value].description; - if(info.subSkill[value].marktext) lib.translate[`${iValue}_bg`]=info.subSkill[value].marktext; - game.finishSkill(iValue,history); - } - } + if(info.subSkill&&!sub) Object.keys(info.subSkill).forEach(value=>{ + const iValue=`${i}_${value}`; + lib.skill[iValue]=info.subSkill[value]; + lib.skill[iValue].sub=true; + if(info.subSkill[value].name) lib.translate[iValue]=info.subSkill[value].name; + else lib.translate[iValue]=lib.translate[iValue]||lib.translate[i]; + if(info.subSkill[value].description) lib.translate[`${iValue}_info`]=info.subSkill[value].description; + if(info.subSkill[value].marktext) lib.translate[`${iValue}_bg`]=info.subSkill[value].marktext; + game.finishSkill(iValue,true); + }); if(info.round){ const k=`${i}_roundcount`; if(typeof info.group=='string') info.group=[info.group,k]; @@ -41237,25 +41238,15 @@ if(!player.storage.skill_blocker||!player.storage.skill_blocker.length) return out; return out.filter(value=>exclude&&exclude.includes(value)||!get.is.blocked(value,player)); }, - expandSkills:(skill,oldHistory)=>{ - let history=[]; - if(oldHistory) history.addArray(oldHistory); - if(Array.isArray(skill)){ - return skill.reduce((previous,current)=>previous.addArray(game.expandSkills(current,history)),[]); - } - - let info=get.info(skill); - if(!info){ - console.trace(`Cannot find skill: ${skill}`); - return history; - } - history.add(skill); - if(info.group){ - let group=Array.isArray(info.group)?info.group:[info.group]; - history.addArray(game.expandSkills([].addArray(group.filter(skill=>!history.includes(skill))),history)); + expandSkills:skills=>skills.addArray(skills.reduce((previousValue,currentValue)=>{ + const info=get.info(currentValue); + if(info){ + if(Array.isArray(info.group)) previousValue.push(...info.group); + else if(info.group) previousValue.push(info.group); } - return history; - }, + else console.log(currentValue); + return previousValue; + },[])), css:style=>Object.keys(style).forEach(value=>{ let uiStyle=ui.style[value]; if(!uiStyle){ diff --git a/game/update.js b/game/update.js index b3da5bebb8..7e651b1014 100644 --- a/game/update.js +++ b/game/update.js @@ -1,6 +1,6 @@ window.noname_update={ - version:'1.10.3', - update:'1.10.2.1', + version:'1.10.3.1', + update:'1.10.3', changeLog:[ '整合@nonameShijian @PZ157 @MDYY1 @mengxinzxz @lieren2023 @Lucilor @kuangshen04 @BauxiteAI @copcap @Tipx-L @xiaoas @Rintim @universe-st的Pull Request', '新机制:武将名称前缀的高亮显示', @@ -9,51 +9,8 @@ window.noname_update={ '其他AI优化与bug修复', ], files:[ - 'card/extra.js', - 'card/guozhan.js', - 'card/standard.js', - 'card/yingbian.js', - 'character/clan.js', - 'character/collab.js', - 'character/ddd.js', - 'character/diy.js', 'character/extra.js', - 'character/gwent.js', - 'character/hearth.js', - 'character/huicui.js', - 'character/jsrg.js', 'character/mobile.js', - 'character/offline.js', - 'character/old.js', - 'character/refresh.js', - 'character/sb.js', - 'character/shenhua.js', - 'character/shiji.js', - 'character/sp.js', - 'character/sp2.js', - 'character/standard.js', - 'character/tw.js', - 'character/xianding.js', - 'character/xinghuoliaoyuan.js', - 'character/yijiang.js', - 'character/yingbian.js', - 'font/motoyamaru.woff2', - 'font/suits.woff2', - 'game/codemirror.js', - 'game/config.js', - 'game/core-js-bundle.js', 'game/game.js', - 'game/path.js', - 'game/pinyinjs.js', - 'layout/default/codemirror.css', - 'layout/default/layout.css', - 'layout/default/menu.css', - 'layout/mobile/layout.css', - 'layout/mode/stone.css', - 'layout/newlayout/global.css', - 'mode/boss.js', - 'mode/brawl.js', - 'mode/guozhan.js', - 'mode/identity.js', ] };