From b8b2d0f22b30b78218457061a508f70278237acd Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 20 Sep 2016 13:06:35 +0800 Subject: [PATCH] prompt --- card/guozhan.js | 2 +- card/sp.js | 2 +- card/standard.js | 6 +-- card/swd.js | 22 ++++---- card/yunchou.js | 2 +- character/boss.js | 44 ++++++++-------- character/diy.js | 4 +- character/extra.js | 5 +- character/gujian.js | 22 ++++---- character/hearth.js | 34 ++++++------- character/jiange.js | 13 +++-- character/ow.js | 29 ++++------- character/refresh.js | 12 ++--- character/shenhua.js | 24 ++++----- character/sp.js | 92 ++++++++++++++++++---------------- character/standard.js | 8 +-- character/swd.js | 114 +++++++++++++++++------------------------- character/xiake.js | 5 +- character/xianjian.js | 35 ++++++------- character/yijiang.js | 87 +++++++++++++++----------------- character/yxs.js | 34 ++----------- game/game.js | 15 ++++-- mode/chess.js | 4 +- 23 files changed, 278 insertions(+), 337 deletions(-) diff --git a/card/guozhan.js b/card/guozhan.js index 6e57d250e..a1db6e162 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -851,7 +851,7 @@ card.guozhan={ var player=_status.event.player; return ai.get.damageEffect(target,player,player); }, - prompt:'是否发动【三尖两刃刀】?' + prompt:get.prompt('sanjian') }).set('damaged',damaged); "step 1" if(result.bool){ diff --git a/card/sp.js b/card/sp.js index b78d1937d..7bfe2292b 100644 --- a/card/sp.js +++ b/card/sp.js @@ -217,7 +217,7 @@ card.sp={ }, content:function(){ 'step 0' - var next=player.chooseToUse('是否发动【银月枪】?',{name:'sha'}); + var next=player.chooseToUse(get.prompt('yinyueqiang'),{name:'sha'}); next.logSkill='yinyueqiang'; next.noButton=true; 'step 1' diff --git a/card/standard.js b/card/standard.js index 810677b54..a00802a61 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1254,7 +1254,7 @@ card.standard={ }, content:function(){ "step 0" - player.choosePlayerCard('是否发动【寒冰剑】?','he',trigger.target,Math.min(2,trigger.target.num('he')),function(button){ + player.choosePlayerCard(get.prompt('hanbing'),'he',trigger.target,Math.min(2,trigger.target.num('he')),function(button){ var trigger=_status.event.getTrigger(); var player=_status.event.player; var eff=ai.get.damageEffect(trigger.target,player,player); @@ -1365,7 +1365,7 @@ card.standard={ },player); event.jiu=true; } - player.chooseToUse('是否发动青龙偃月刀?',{name:'sha'},trigger.target,-1).logSkill='qinglong_skill'; + player.chooseToUse(get.prompt('qinglong'),{name:'sha'},trigger.target,-1).logSkill='qinglong_skill'; "step 1" if(result.bool); else if(event.jiu){ @@ -1404,7 +1404,7 @@ card.standard={ }, content:function(){ "step 0" - var next=player.chooseToDiscard('是否发动贯石斧?',2,'he',function(card){ + var next=player.chooseToDiscard(get.prompt('guanshi'),2,'he',function(card){ return _status.event.player.get('e',{subtype:'equip1'}).contains(card)==false; }); next.logSkill='guanshi_skill'; diff --git a/card/swd.js b/card/swd.js index 0063a5399..1511f58f4 100644 --- a/card/swd.js +++ b/card/swd.js @@ -1669,7 +1669,7 @@ card.swd={ }, content:function(){ "step 0" - player.chooseTarget([1,1],'是否发动【白兽之琥】?',function(card,player,target){ + player.chooseTarget([1,1],get.prompt('baishouzhihu'),function(card,player,target){ if(player==target) return false; return target.num('he')>0; }).ai=function(target){ @@ -1735,7 +1735,7 @@ card.swd={ }, content:function(){ 'step 0' - player.chooseTarget([1,3],'是否发动【苍螭之璧】?').ai=function(target){ + player.chooseTarget([1,3],get.prompt('cangchizhibi')).ai=function(target){ var att=ai.get.attitude(player,target); if(target.isLinked()){ return att; @@ -1757,7 +1757,7 @@ card.swd={ direct:true, content:function(){ 'step 0' - player.chooseTarget('是否发动【灵枢】?').ai=function(target){ + player.chooseTarget(get.prompt('cangchizhibi_duanzao')).ai=function(target){ var att=ai.get.attitude(player,target); if(target.isLinked()){ return att; @@ -1791,7 +1791,7 @@ card.swd={ }, content:function(){ 'step 0' - var next=player.chooseToDiscard('he',{color:'black'},'是否发动【玄甲】?'); + var next=player.chooseToDiscard('he',{color:'black'},get.prompt('huanglinzhicong_duanzao')); next.ai=function(card){ return 8-ai.get.value(card); }; @@ -1822,7 +1822,7 @@ card.swd={ }, content:function(){ 'step 0' - var next=player.chooseToDiscard('he',{color:'red'},'是否发动【寒晶】?'); + var next=player.chooseToDiscard('he',{color:'red'},get.prompt('xuanwuzhihuang_duanzao')); next.ai=function(card){ return 8-ai.get.value(card); }; @@ -1867,7 +1867,7 @@ card.swd={ ai2:function(target){ return ai.get.damageEffect(target,player,player,'fire'); }, - prompt:'是否发动【炽翎】?' + prompt:get.prompt('zhuquezhizhang_duanzao') }); "step 1" if(result.bool){ @@ -1901,7 +1901,7 @@ card.swd={ direct:true, content:function(){ "step 0" - player.chooseTarget([1,1],'是否发动【风牙】?',function(card,player,target){ + player.chooseTarget([1,1],get.prompt('baishouzhihu_duanzao'),function(card,player,target){ if(player==target) return false; return target.num('he')>0; }).ai=function(target){ @@ -2089,7 +2089,7 @@ card.swd={ ai2:function(target){ return -ai.get.attitude(player,target); }, - prompt:'是否发动【东皇钟】?' + prompt:get.prompt('donghuangzhong') }); 'step 1' if(result.bool){ @@ -2815,7 +2815,7 @@ card.swd={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【冰冻】?',function(card,player,target){ + player.chooseTarget(get.prompt('hslingjian_jinjilengdong_duanzao'),function(card,player,target){ return player!=target&&!target.isTurnedOver(); }).ai=function(target){ return Math.max(0,-ai.get.attitude(player,target)-2); @@ -2837,7 +2837,7 @@ card.swd={ }, content:function(){ 'step 0' - player.chooseTarget('是否发动【隐力】?',function(card,player,target){ + player.chooseTarget(get.prompt('hslingjian_yinmilichang_duanzao'),function(card,player,target){ return target!=player&&!target.hasSkill('hslingjian_yinshen'); }).ai=function(target){ var att=ai.get.attitude(player,target); @@ -3409,7 +3409,7 @@ card.swd={ return event.nature&&event.player&&event.player.isAlive(); }, content:function(){ - player.gainPlayerCard('是否对'+get.translation(trigger.player)+'发动【青龙灵珠】?',trigger.player,function(button){ + player.gainPlayerCard(get.prompt('qinglonglingzhu',trigger.player),trigger.player,function(button){ if(ai.get.attitude(player,trigger.player)<=0){ return ai.get.buttonValue(button); } diff --git a/card/yunchou.js b/card/yunchou.js index c6d420bee..4be9a1dbd 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -719,7 +719,7 @@ card.yunchou={ return false; }, content:function(){ - player.chooseToUse('是否对'+get.translation(trigger.player)+'使用趁火打劫?',function(card,player){ + player.chooseToUse(get.prompt('chenhuodajie',trigger.player),function(card,player){ if(card.name!='chenhuodajie') return false; var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.get('s')); if(mod!='unchanged') return mod; diff --git a/character/boss.js b/character/boss.js index 641b4194f..3879fa3af 100644 --- a/character/boss.js +++ b/character/boss.js @@ -69,7 +69,7 @@ character.boss={ content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+',是否发动【天道】?','he').ai=function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('tiandao'),'he').ai=function(card){ var trigger=_status.event.parent._trigger; var player=_status.event.player; var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]); @@ -911,9 +911,7 @@ character.boss={ filter:function(event,player){ return event.player.isEnemyOf(player)&&event.card.name=='wuxie'; }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【精妙】?'; - }, + logTarget:'player', check:function(event,player){ return ai.get.attitude(player,event.player)<0; }, @@ -1173,9 +1171,7 @@ character.boss={ } return event.num>0&&event.player!=player&&event.player.hp=player.hp; }).ai=function(target){ return ai.get.damageEffect(target,player,player,'fire'); @@ -1776,7 +1772,7 @@ character.boss={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【鬼火】?',function(card,player,target){ + player.chooseTarget(get.prompt('boss_guihuo'),function(card,player,target){ return player!=target; }).ai=function(target){ return ai.get.damageEffect(target,player,player,'fire'); @@ -1793,7 +1789,7 @@ character.boss={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【落雷】?',function(card,player,target){ + player.chooseTarget(get.prompt('boss_luolei'),function(card,player,target){ return player!=target; }).ai=function(target){ return ai.get.damageEffect(target,player,player,'thunder'); @@ -1851,7 +1847,7 @@ character.boss={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【地动】?',function(card,player,target){ + player.chooseTarget(get.prompt('boss_didong'),function(card,player,target){ return target.isEnemyOf(player); }).ai=function(target){ var att=ai.get.attitude(player,target); @@ -1947,7 +1943,7 @@ character.boss={ direct:true, content:function(){ "step 0"; - player.chooseTarget('是否发动雷击?').ai=function(target){ + player.chooseTarget(get.prompt('boss_leiji')).ai=function(target){ return ai.get.damageEffect(target,player,player,'thunder'); }; "step 1" @@ -2243,7 +2239,7 @@ character.boss={ unique:true, content:function(){ "step 0" - player.chooseTarget('是否发动【亟电】?',function(card,player,target){ + player.chooseTarget(get.prompt('jidian'),function(card,player,target){ return get.distance(trigger.player,target)<=1&&trigger.player!=target; }).ai=function(target){ return ai.get.damageEffect(target,player,player,'thunder')+0.1; @@ -2296,7 +2292,7 @@ character.boss={ if(target.disabledSkills.boss_hujia) return Math.max(1,10-target.maxHp); return 1/target.maxHp; }, - prompt:'是否发动【胡笳】?' + prompt:get.prompt('boss_hujia') }); "step 1" if(result.bool){ @@ -2525,7 +2521,7 @@ character.boss={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【天陨】?',function(card,player,target){ + player.chooseTarget(get.prompt('boss_tianyun'),function(card,player,target){ return target.isEnemyOf(player); }).ai=function(target){ if(player.hp<=1) return 0; @@ -2634,7 +2630,7 @@ character.boss={ content:function(){ "step 0" var noneed=(trigger.card.name=='tao'&&trigger.targets[0]==player&&player.hp==player.maxHp-1); - player.chooseTarget('是否发动【栖梧】?',function(card,player,target){ + player.chooseTarget(get.prompt('boss_qiwu'),function(card,player,target){ return target.hp0) return 8-ai.get.value(card); @@ -365,7 +365,7 @@ character.diy={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【烧营】?',function(card,player,target){ + player.chooseTarget(get.prompt('shaoying'),function(card,player,target){ return get.distance(trigger.player,target)<=1&&trigger.player!=target; }).ai=function(target){ return ai.get.damageEffect(target,player,player,'fire'); diff --git a/character/extra.js b/character/extra.js index 2ae699667..a7fe326d9 100644 --- a/character/extra.js +++ b/character/extra.js @@ -54,10 +54,9 @@ character.extra={ } } } - var prompt='是否发动【琴音】(剩余'+get.cnNumber(event.count)+'次)'; + var prompt=get.prompt('qinyin')+'(剩余'+get.cnNumber(event.count)+'次)'; player.chooseControl('失去体力','回复体力','cancel', - ui.create.dialog('是否发动【琴音】?','hidden')).ai=function(){ - // console.log(lose,recover); + ui.create.dialog(get.prompt('qinyin'),'hidden')).ai=function(){ if(lose>recover&&lose>0) return 0; if(lose0) return 1; return 2; diff --git a/character/gujian.js b/character/gujian.js index af1cf6a05..14da27d1c 100644 --- a/character/gujian.js +++ b/character/gujian.js @@ -126,9 +126,7 @@ character.gujian={ return ai.get.attitude(player,event.player)<0&& ((player.num('h')>player.hp&&player.num('h','lebu')==0)||get.distance(player,event.player)>1); }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【魅影】?' - }, + logTarget:'player', content:function(){ "step 0" player.line(trigger.player,'green'); @@ -161,7 +159,7 @@ character.gujian={ }, content:function(){ "step 0" - var next=player.chooseToDiscard('是否发动【戏蝶】?',[1,Math.min(3,player.num('h')-player.hp)]); + var next=player.chooseToDiscard(get.prompt('xidie'),[1,Math.min(3,player.num('h')-player.hp)]); next.ai=function(card){ return 6-ai.get.value(card); } @@ -243,12 +241,12 @@ character.gujian={ return event.source&&ai.get.attitude(player,event.source)<0; }, filter:function(event,player){ - return player.num('h',{color:'red'})>1||player.num('h',{color:'black'})>1; + return event.source&&event.source.isAlive()&&player.num('h',{color:'red'})>1||player.num('h',{color:'black'})>1; }, direct:true, content:function(){ "step 0" - player.chooseToDiscard('是否发动伏魔?',2,function(card){ + player.chooseToDiscard(get.prompt('fumo',trigger.source),2,function(card){ if(ui.selected.cards.length){ return get.color(card)==get.color(ui.selected.cards[0]); } @@ -275,7 +273,7 @@ character.gujian={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【梵音】?',function(card,player,target){ + player.chooseTarget(get.prompt('fanyin'),function(card,player,target){ if(player==target) return false; if(target.isLinked()) return true; if(target.isTurnedOver()) return true; @@ -421,8 +419,8 @@ character.gujian={ priority:-5, content:function(){ "step 0" - var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'发动【晴岚】?','he'); - next.logSkill='qinglan'; + var next=player.chooseToDiscard(get.prompt('qinglan',trigger.player),'he'); + next.logSkill=['qinglan',trigger.player]; next.ai=function(card){ if(trigger.num>1||!trigger.source){ if(ai.get.attitude(player,trigger.player)>0){ @@ -503,7 +501,7 @@ character.gujian={ ai2:function(target){ return ai.get.damageEffect(target,player,player,'fire'); }, - prompt:'是否发动【血戮】?' + prompt:get.prompt('xuelu') }); "step 1" if(result.bool){ @@ -684,7 +682,7 @@ character.gujian={ for(var i=0;i1&&target.hp<=1){ att+=2; @@ -2096,7 +2096,7 @@ character.hearth={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【灵咒】?').ai=function(target){ + player.chooseTarget(get.prompt('lingzhou')).ai=function(target){ var num=ai.get.attitude(player,target); if(num>0){ if(target==player){ @@ -2165,7 +2165,7 @@ character.hearth={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【魔箭】?',function(card,player,target){ + player.chooseTarget(get.prompt('xmojian'),function(card,player,target){ return lib.filter.targetEnabled({name:'sha'},player,target); }).ai=function(target){ return ai.get.effect(target,{name:'sha'},player); @@ -2529,7 +2529,7 @@ character.hearth={ else if(player.num('h','shan')&&player.num('h','wuxie')){ check=false; } - player.chooseTarget('是否发动【窥心】?',function(card,player,target){ + player.chooseTarget(get.prompt('kuixin'),function(card,player,target){ return target!=player&&Math.abs(target.num('h')-nh)<=nm; }).ai=function(target){ if(!check) return 0; @@ -2574,9 +2574,6 @@ character.hearth={ return event.card&&get.type(event.card)=='trick'&& event.player.isAlive()&&!event.player.isTurnedOver(); }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【冰霜】?'; - }, check:function(event,player){ if(event.player.isTurnedOver()){ return ai.get.attitude(player,event.player)>0; @@ -2622,15 +2619,12 @@ character.hearth={ filter:function(event,player){ return !player.hasSkill('shengyan2')&&event.player.hp0; }, content:function(){ trigger.player.recover(); - player.line(trigger.player,'green'); player.addTempSkill('shengyan2','phaseAfter'); }, ai:{ @@ -2835,7 +2829,7 @@ character.hearth={ }, content:function(){ 'step 0' - player.chooseTarget('是否发动【视界】',function(card,player,target){ + player.chooseTarget(get.prompt('shijie'),function(card,player,target){ return player!=target&&target.num('h')>0; }).ai=function(target){ return 11-ai.get.attitude(player,target); @@ -2972,7 +2966,7 @@ character.hearth={ 'step 0' var eff=ai.get.effect(trigger.targets[0],trigger.card,trigger.player,player); var att=ai.get.attitude(player,trigger.player); - player.chooseCard('是否发动【变形】?',function(card){ + player.chooseCard(get.prompt('bianxing'),function(card){ if(card.name!=trigger.card.name){ if(get.type(card)=='basic'&&get.info(card).enable){ return true; @@ -3209,7 +3203,7 @@ character.hearth={ }, prompt:function(event,player){ var target=(player==event.player)?event.source:event.player; - return '是否对'+get.translation(target)+'发动【魔影】?'; + return get.prompt('moying',target); }, content:function(){ "step 0" @@ -3426,7 +3420,7 @@ character.hearth={ direct:true, content:function(){ "step 0" - var next=player.chooseToDiscard('是否发动【激活】?'); + var next=player.chooseToDiscard(get.prompt('jihuo')); next.ai=ai.get.unuseful2; next.logSkill='jihuo'; "step 1" @@ -3461,7 +3455,7 @@ character.hearth={ }, content:function(){ "step 0"; - player.chooseTarget('是否发动【震击】?').ai=function(target){ + player.chooseTarget(get.prompt('tzhenji')).ai=function(target){ var bool=ai.get.attitude(player,target)>0; return ai.get.damageEffect(target,player,player,'thunder')-(bool?1:0); }; @@ -3499,7 +3493,7 @@ character.hearth={ direct:true, content:function(){ "step 0"; - player.chooseTarget('是否发动【震击】?').ai=function(target){ + player.chooseTarget(get.prompt('tzhenji_old')).ai=function(target){ return ai.get.damageEffect(target,player,player,'thunder')-1; }; "step 1" diff --git a/character/jiange.js b/character/jiange.js index a2918b6d4..8b000e4fc 100644 --- a/character/jiange.js +++ b/character/jiange.js @@ -32,7 +32,7 @@ character.jiange={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【控魂】?',function(card,player,target){ + player.chooseTarget(get.prompt('konghun'),function(card,player,target){ return player!=target; },[1,Math.min(4,Math.floor((game.players.length-1)/2))]).ai=function(target){ return ai.get.damageEffect(target,player,player,'thunder')+1; @@ -116,7 +116,7 @@ character.jiange={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【惑敌】?',function(card,player,target){ + player.chooseTarget(get.prompt('huodi'),function(card,player,target){ return target.num('he')&&player!=target; }).ai=function(target){ return -ai.get.attitude(player,target); @@ -234,7 +234,7 @@ character.jiange={ content:function(){ "step 0" game.delay(0.5); - player.chooseTarget('是否发动【绝尘】?',function(card,player,target){ + player.chooseTarget(get.prompt('juechen'),function(card,player,target){ return player!=target&&!trigger.targets.contains(target)&&target.num('he')>0; }).ai=function(target){ return -ai.get.attitude(player,target); @@ -387,8 +387,7 @@ character.jiange={ }, content:function(){ "step 0" - player.choosePlayerCard(trigger.player,'是否发动【精妙】弃置'+ - get.translation(trigger.player)+'一张牌?','he'); + player.choosePlayerCard(trigger.player,get.prompt('jingmiao',trigger.player),'he'); "step 1" if(result.bool){ player.logSkill('jingmiao',trigger.player); @@ -473,7 +472,7 @@ character.jiange={ num++; } } - player.chooseTarget('是否发动【天狱】?',[1,num],function(card,player,target){ + player.chooseTarget(get.prompt('tianyu'),[1,num],function(card,player,target){ return !target.isLinked()&&player!=target; }).ai=function(target){ return -ai.get.attitude(player,target); @@ -516,7 +515,7 @@ character.jiange={ num++; } } - player.chooseTarget('是否发动【激阵】?',[1,2],function(card,player,target){ + player.chooseTarget(get.prompt('jizhen'),[1,2],function(card,player,target){ return target.hp0; }, @@ -1086,7 +1084,7 @@ character.ow={ if(Math.random()<0.5) goon=true; } if(Math.random()<0.3) goon2=true; - player.chooseToDiscard([1,player.num('h')],'he','是否对'+get.translation(trigger.player)+'发动【冰墙】?').set('logSkill',['bingqiang',trigger.player]).ai=function(card){ + player.chooseToDiscard([1,player.num('h')],'he',get.prompt('bingqiang',trigger.player)).set('logSkill',['bingqiang',trigger.player]).ai=function(card){ if(ui.selected.cards.length) return 0; if(goon) return 6-ai.get.value(card); if(goon2) return 4-ai.get.value(card); @@ -1201,9 +1199,7 @@ character.ow={ if(event.player.hp==1) return att>0; return att<=0; }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【霜枪】?'; - }, + logTarget:'player', filter:function(event,player){ return !event.player.isTurnedOver()&&event.num>0; }, @@ -1451,7 +1447,7 @@ character.ow={ content:function(){ "step 0" var dis=trigger.target.num('h','shan')||trigger.target.num('e','bagua')||trigger.target.num('h')>2; - var next=player.chooseToDiscard('是否发动【霰弹】?'); + var next=player.chooseToDiscard(get.prompt('xiandan')); next.ai=function(card){ if(dis) return 7-ai.get.value(card); return 0; @@ -1503,7 +1499,7 @@ character.ow={ direct:true, content:function(){ 'step 0' - player.discardPlayerCard('是否发动【目镜】?',trigger.target).logSkill=['mujing']; + player.discardPlayerCard(get.prompt('mujing'),trigger.target).logSkill=['mujing']; 'step 1' if(result.bool&&player.num('h')<=trigger.target.num('h')){ player.draw(); @@ -1958,7 +1954,7 @@ character.ow={ content:function(){ 'step 0' var next=player.chooseCardTarget({ - prompt:'是否发动【移魂】?', + prompt:get.prompt('yihun'), position:'he', filterCard:{suit:'spade'}, ai1:function(card){ @@ -2085,7 +2081,7 @@ character.ow={ targets.push(game.players[i]); } } - player.chooseToDiscard('是否发动【飞弹】?').set('ai',function(card){ + player.chooseToDiscard(get.prompt('feidan')).set('ai',function(card){ if(eff>0) return 7-ai.get.value(card); return 0; }).set('logSkill',['feidan',targets]); @@ -2117,7 +2113,7 @@ character.ow={ content:function(){ 'step 0' var num=1+player.storage.yuedong_num; - player.chooseTarget('是否发动【乐动】?',[1,num],function(card,player,target){ + player.chooseTarget(get.prompt('yuedong'),[1,num],function(card,player,target){ if(player.storage.yuedong_recover){ return target.hpplayer.hp&&player.num('h','lebu')==0)||get.distance(player,event.player)>1); }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【闪现】?' - }, + logTarget:'player', content:function(){ "step 0" player.draw(false); player.$draw(); - player.line(trigger.player,'green'); "step 1" player.storage.shanxian_h=player.get('h'); player.storage.shanxian_e=player.get('e'); diff --git a/character/refresh.js b/character/refresh.js index 9cd5e10e0..21824dc67 100644 --- a/character/refresh.js +++ b/character/refresh.js @@ -206,7 +206,7 @@ character.refresh={ trigger.player.chooseTarget(function(card,player,target){ var evt=_status.event.getParent(); return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; - },'是否发动【利驭】?').set('ai',function(target){ + },get.prompt('liyu')).set('ai',function(target){ var evt=_status.event.getParent(); return ai.get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; }); @@ -267,7 +267,7 @@ character.refresh={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动突袭?',[1,2],function(card,player,target){ + player.chooseTarget(get.prompt('retuxi'),[1,2],function(card,player,target){ return target.num('h')>0&&player!=target&&target.num('h')>=player.num('h'); },function(target){ var att=ai.get.attitude(_status.event.player,target); @@ -299,7 +299,7 @@ character.refresh={ content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+',是否发动【'+get.skillTranslation('reguicai',player)+'】?','he').set('ai',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he').set('ai',function(card){ var trigger=_status.event.getTrigger(); var player=_status.event.player; var judging=_status.event.judging; @@ -363,7 +363,7 @@ character.refresh={ return; } event.num--; - player.choosePlayerCard('是否对'+get.translation(trigger.source)+'发动【'+get.skillTranslation('refankui',player)+'】?',trigger.source,ai.get.buttonValue,'he'); + player.choosePlayerCard(get.prompt('refankui',trigger.source),trigger.source,ai.get.buttonValue,'he'); "step 2" if(result.bool){ player.logSkill('refankui',trigger.source); @@ -1251,7 +1251,7 @@ character.refresh={ !lib.filter.autoRespondSha.call({player:player}); }, content:function(){ - player.chooseToUse({name:'sha'},'诛害:是否对'+get.translation(trigger.player)+'使用一张杀', + player.chooseToUse({name:'sha'},'诛害:是否对'+get.translation(trigger.player)+'使用一张杀?', trigger.player).set('logSkill','zhuhai'); } }, @@ -1552,7 +1552,7 @@ character.refresh={ zhuhai:'诛害', qianxin:'潜心', jianyan:'荐言', - reguicai:'新鬼才', + reguicai:'鬼才', xunxun:'恂恂', wangxi:'忘隙', reguose:'国色', diff --git a/character/shenhua.js b/character/shenhua.js index 3362767df..271c04de5 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -168,7 +168,7 @@ character.shenhua={ content:function(){ "step 0" var fang=player.hp>=2&&player.num('h')<=player.hp+1; - player.chooseTarget('是否发动【放权】?',function(card,player,target){ + player.chooseTarget(get.prompt('fangquan'),function(card,player,target){ return target!=player; }).set('ai',function(target){ if(!_status.event.fang) return -1; @@ -928,7 +928,7 @@ character.shenhua={ }, content:function(){ "step 0" - var next=player.chooseToDiscard('he','是否发动【悲歌】?'); + var next=player.chooseToDiscard('he',get.prompt('beige')); next.set('ai',ai.get.unuseful2); next.set('logSkill','beige'); "step 1" @@ -1427,7 +1427,7 @@ character.shenhua={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【放逐】?',function(card,player,target){ + player.chooseTarget(get.prompt('fangzhu'),function(card,player,target){ return player!=target }).ai=function(target){ var player=_status.event.player; @@ -1511,7 +1511,7 @@ character.shenhua={ if(event.list.length){ var current=event.list.shift(); event.current=current; - player.chooseBool('是否对'+get.translation(current)+'发动【颂威】?').set('choice',ai.get.attitude(player,current)>0); + player.chooseBool(get.prompt('songwei',current)).set('choice',ai.get.attitude(player,current)>0); } else{ event.finish(); @@ -1742,7 +1742,7 @@ character.shenhua={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【英魂】?',function(card,player,target){ + player.chooseTarget(get.prompt('yinghun'),function(card,player,target){ return player!=target; }).set('ai',function(target){ var player=_status.event.player; @@ -1912,7 +1912,7 @@ character.shenhua={ if(event.list.length){ var current=event.list.shift(); event.current=current; - player.chooseBool('是否对'+get.translation(current)+'发动【暴虐】?').set('choice',ai.get.attitude(player,current)>0); + player.chooseBool(get.prompt('baonue',current)).set('choice',ai.get.attitude(player,current)>0); } else{ event.finish(); @@ -2277,7 +2277,7 @@ character.shenhua={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【节命】?',[1,trigger.num],function(card,player,target){ + player.chooseTarget(get.prompt('jieming'),[1,trigger.num],function(card,player,target){ return target.num('h')2; - player.chooseTarget('是否发动【神速】?',function(card,player,target){ + player.chooseTarget(get.prompt('shensu'),function(card,player,target){ if(player==target) return false; return player.canUse({name:'sha'},target); }).ai=function(target){ @@ -2702,7 +2702,7 @@ character.shenhua={ player.addSkill('shensu3'); var check=player.num('h')<=player.hp; player.chooseCardTarget({ - prompt:'是否发动【神速】?', + prompt:get.prompt('shensu'), filterCard:function(card){ return get.type(card)=='equip' }, @@ -2950,7 +2950,7 @@ character.shenhua={ direct:true, content:function(){ "step 0"; - player.chooseTarget('是否发动【雷击】?').ai=function(target){ + player.chooseTarget(get.prompt('leiji')).ai=function(target){ if(target.hasSkill('hongyan')) return 0; return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); }; @@ -3004,7 +3004,7 @@ character.shenhua={ content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+',是否发动【鬼道】?','he',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'he',function(card){ return get.color(card)=='black'; }).set('ai',function(card){ var trigger=_status.event.getTrigger(); diff --git a/character/sp.js b/character/sp.js index b07bbeeb0..4c2be996e 100644 --- a/character/sp.js +++ b/character/sp.js @@ -93,6 +93,17 @@ character.sp={ hanba:['swd_muyun'], }, skill:{ + tuifeng:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return player.num('h')>0; + }, + content:function(){ + 'step 0' + player.chooseCard(get.prompt('tuifeng')) + } + }, weidi:{ trigger:{global:['gameStart','zhuUpdate']}, forced:true, @@ -200,7 +211,7 @@ character.sp={ direct:true, content:function(){ 'step 0' - player.chooseTarget('是否发动【拥嫡】?',function(card,player,target){ + player.chooseTarget(get.prompt('yongdi'),function(card,player,target){ return target.sex=='male'&&target!=player; }).set('ai',function(target){ if(!_status.event.goon) return 0; @@ -279,7 +290,7 @@ character.sp={ event.num1=event.card1.number; event.num2=event.card2.number; if(player.hasSkill('jici')&&event.num1<=player.storage.gushe){ - player.chooseBool('是否发动【激词】?'); + player.chooseBool(get.prompt('jici')); } else{ event.goto(2); @@ -438,7 +449,7 @@ character.sp={ list3.push(['锦囊','',lib.inpile[i]]); } } - player.chooseButton(['是否发动【设伏】?',[list1.concat(list2).concat(list3),'vcard']]).set('filterButton',function(button){ + player.chooseButton([get.prompt('shefu'),[list1.concat(list2).concat(list3),'vcard']]).set('filterButton',function(button){ var player=_status.event.player; if(player.storage.shefu2&&player.storage.shefu2.contains(button.link[2])) return false; return true; @@ -614,7 +625,7 @@ character.sp={ else{ event.draw=true; event.num=Math.min(num2,5)-num1; - player.chooseBool('是否发动【贲育】?'); + player.chooseBool(get.prompt('fenyu')); } "step 1" if(result.bool){ @@ -811,7 +822,7 @@ character.sp={ }, content:function(){ 'step 0' - player.chooseTarget('是否发动【奇制】?',function(card,player,target){ + player.chooseTarget(get.prompt('qizhi'),function(card,player,target){ return !_status.event.getTrigger().targets.contains(target)&&target.num('he')>0; }).set('ai',function(target){ var player=_status.event.player; @@ -996,7 +1007,7 @@ character.sp={ }, content:function(){ 'step 0' - player.chooseToDiscard('是否发动【机巧】?',[1,player.num('he',{type:'equip'})],'he',function(card){ + player.chooseToDiscard(get.prompt('jiqiao'),[1,player.num('he',{type:'equip'})],'he',function(card){ return get.type(card)=='equip'; }).set('ai',function(card){ if(card.name=='bagua') return 10; @@ -1173,7 +1184,7 @@ character.sp={ save=true; } } - var next=player.chooseToDiscard('he','是否发动【镇卫】?'); + var next=player.chooseToDiscard('he',get.prompt('zhenwei')); next.logSkill=['zhenwei',trigger.target]; next.set('ai',function(card){ if(_status.event.aisave){ @@ -1413,12 +1424,12 @@ character.sp={ content:function(){ 'step 0' if(player.storage.yinling.length>3){ - player.chooseButton(3,['是否发动【军威】?','hidden',player.storage.yinling]).set('ai',function(button){ + player.chooseButton(3,[get.prompt('junwei'),'hidden',player.storage.yinling]).set('ai',function(button){ return 1; }); } else{ - player.chooseBool().set('createDialog',['是否发动【军威】?','hidden',player.storage.yinling]).set('dialogselectx',true); + player.chooseBool().set('createDialog',[get.prompt('junwei'),'hidden',player.storage.yinling]).set('dialogselectx',true); event.cards=player.storage.yinling.slice(0); } 'step 1' @@ -1684,7 +1695,7 @@ character.sp={ }, content:function(){ "step 0" - var next=player.chooseToDiscard('是否发动【安娴】?'); + var next=player.chooseToDiscard(get.prompt('anxian')); next.set('ai',function(card){ var player=_status.event.player; var trigger=_status.event.getTrigger(); @@ -1837,7 +1848,7 @@ character.sp={ } return -1; }, - prompt:'是否发动【流离】?' + prompt:get.prompt('liuli') }); "step 1" if(result.bool){ @@ -1932,7 +1943,7 @@ character.sp={ }, content:function(){ 'step 0' - player.chooseCard('是否发动【星舞】?',function(card){ + player.chooseCard(get.prompt('xingwu'),function(card){ return _status.event.player.storage.xingwu_color.contains(get.color(card)); }).set('ai',function(card){ var player=_status.event.player; @@ -2016,7 +2027,7 @@ character.sp={ marktext:'兵', content:function(){ "step 0" - player.chooseCard([1,player.num('he')-player.num('he',{type:'basic'})],'he','是否发动【引兵】?',function(card){ + player.chooseCard([1,player.num('he')-player.num('he',{type:'basic'})],'he',get.prompt('yinbing'),function(card){ return get.type(card)!='basic'; }).set('ai',function(card){ return 6-ai.get.value(card); @@ -2089,7 +2100,7 @@ character.sp={ audio:2, content:function(){ 'step 0' - player.chooseTarget('是否发动【绝地】?',function(card,player,target){ + player.chooseTarget(get.prompt('juedi'),function(card,player,target){ return player.hp>=target.hp; }).set('ai',function(target){ var player=_status.event.player; @@ -2138,9 +2149,7 @@ character.sp={ filter:function(event,player){ return event.player!=player&&get.distance(event.player,player,'attack')>1; }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【魅步】?' - }, + logTarget:'player', check:function(event,player){ if(ai.get.attitude(player,event.player)>=0) return false; var e2=player.get('e','2'); @@ -2152,7 +2161,6 @@ character.sp={ }, content:function(){ var target=trigger.player; - player.line(target,'green'); target.addTempSkill('meibu_viewas','phaseAfter'); target.addTempSkill('meibu_range','phaseAfter'); target.storage.meibu=player; @@ -2499,7 +2507,7 @@ character.sp={ content:function(){ 'step 0' var goon=(ai.get.attitude(player,trigger.player)>0); - player.chooseCardButton('是否对'+get.translation(trigger.player)+'发动【输粮】?',player.storage.tunchu).set('ai',function(){ + player.chooseCardButton(get.prompt('shuliang',trigger.player),player.storage.tunchu).set('ai',function(){ if(_status.event.goon) return 1; return 0; }).set('goon',goon); @@ -2531,7 +2539,7 @@ character.sp={ content:function(){ 'step 0' var goon=(ai.get.attitude(player,trigger.player)<0); - var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'发动【竭缘】?',{color:'black'}); + var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player),{color:'black'}); next.set('ai',function(card){ if(_status.event.goon){ return 8-ai.get.value(card); @@ -2645,7 +2653,7 @@ character.sp={ "step 0" player.addSkill('qingyi3'); var check= player.num('h')>2; - player.chooseTarget('是否发动【轻逸】?',function(card,player,target){ + player.chooseTarget(get.prompt('qingyi'),function(card,player,target){ if(player==target) return false; return player.canUse({name:'sha'},target); }).ai=function(target){ @@ -2674,7 +2682,7 @@ character.sp={ player.addSkill('qingyi3'); var check=player.num('h')<=player.hp; player.chooseCardTarget({ - prompt:'是否发动【轻逸】?', + prompt:get.prompt('qingyi'), filterCard:function(card){ return get.type(card)=='equip' }, @@ -2849,7 +2857,7 @@ character.sp={ direct:true, content:function(){ 'step 0' - player.chooseTarget('是否发动【陈情】?',function(card,player,target){ + player.chooseTarget(get.prompt('chenqing'),function(card,player,target){ return target!=player&&target!=_status.event.getTrigger().player; }).set('ai',function(target){ var player=_status.event.player; @@ -3140,7 +3148,7 @@ character.sp={ "step 0" var list=player.storage.yishe; player.chooseButton([get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+get.translation(trigger.player.judging[0])+ - ',是否发动【米道】?',list,'hidden'],function(button){ + ','+get.prompt('midao'),list,'hidden'],function(button){ var card=button.link; var trigger=_status.event.getTrigger(); var player=_status.event.player; @@ -3201,7 +3209,7 @@ character.sp={ content:function(){ 'step 0' player.addTempSkill('fengpo3','phaseAfter'); - player.chooseControl('draw_card','加伤害','cancel').set('prompt','是否发动【凤魄】?'); + player.chooseControl('draw_card','加伤害','cancel').set('prompt',get.prompt('fengpo')); 'step 1' if(result.control&&result.control!='cancel'){ player.logSkill('fengpo'); @@ -3335,7 +3343,7 @@ character.sp={ return ai.get.attitude(player,event.source)>0&&ai.get.attitude(player,event.player)<0; }, prompt:function(event){ - return get.translation(event.source)+'即将对'+get.translation(event.player)+'造成伤害,是否发动【辅祭】?'; + return get.translation(event.source)+'即将对'+get.translation(event.player)+'造成伤害,'+get.prompt('fuji'); }, content:function(){ "step 0" @@ -3445,7 +3453,7 @@ character.sp={ if(!player.storage.kunfen){ event.skillHidden=true; } - player.chooseBool('是否发动【困奋】?').set('ai',function(){ + player.chooseBool(get.prompt('kunfen')).set('ai',function(){ var player=_status.event.player; if(player.hp>3) return true; if(player.hp==3&&player.num('h')<3) return true; @@ -3508,7 +3516,7 @@ character.sp={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【刺槐】?',function(card,player,target){ + player.chooseTarget(get.prompt('cihuai'),function(card,player,target){ return player.canUse({name:'sha'},target); }).set('ai',function(target){ var player=_status.event.player; @@ -3658,7 +3666,7 @@ character.sp={ return _status.event.maxval-ai.get.value(card); }); next.set('maxval',maxval); - next.set('dialog',['是否发动【'+get.translation(event.name)+'】?','hidden',cards]) + next.set('dialog',[get.prompt(event.name),'hidden',cards]) next.logSkill=event.name; event.cards=cards; } @@ -3851,7 +3859,7 @@ character.sp={ content:function(){ "step 0" var att=ai.get.attitude(player,trigger.target); - player.choosePlayerCard('是否发动【猛进】?','he',trigger.target).ai=function(button){ + player.choosePlayerCard(get.prompt('spmengjin',trigger.target),'he',trigger.target).ai=function(button){ var val=ai.get.buttonValue(button); if(att>0) return -val; return val; @@ -3891,7 +3899,7 @@ character.sp={ var player=_status.event.player; return ai.get.effect(target,trigger.card,player,player); }, - prompt:'是否发动【奋迅】?' + prompt:get.prompt('fenxun') }); "step 1" if(result.bool){ @@ -4205,7 +4213,7 @@ character.sp={ }, content:function(){ "step 0" - var next=player.chooseToDiscard('是否发动【名士】?',{color:'black'}); + var next=player.chooseToDiscard(get.prompt('mingshi'),{color:'black'}); next.set('ai',function(card){ return 9-ai.get.value(card); }); @@ -4236,7 +4244,7 @@ character.sp={ "step 0" if(trigger.delay==false) game.delay(); "step 1" - player.chooseTarget('是否发动【礼让】?',function(card,player,target){ + player.chooseTarget(get.prompt('lirang'),function(card,player,target){ return player!=target }).set('ai',function(target){ var att=ai.get.attitude(_status.event.player,target); @@ -4415,7 +4423,7 @@ character.sp={ else if(trigger.player.canUse('sha',player)&&!player.num('h','shan')&&trigger.player.num('h')>=3){ nono=true; } - var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'发动【鸩毒】?'); + var next=player.chooseToDiscard(get.prompt('zhendu',trigger.player)); next.set('ai',function(card){ if(_status.event.nono) return -1; return 7-ai.get.useful(card); @@ -4770,7 +4778,7 @@ character.sp={ if(ai.get.damageEffect(trigger.player,player,player)<=0){ nono=true; } - var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'发动【骁果】?',{type:'basic'}); + var next=player.chooseToDiscard(get.prompt('xiaoguo',trigger.player),{type:'basic'}); next.set('ai',function(card){ if(_status.event.nono) return 0; return 8-ai.get.useful(card); @@ -4879,7 +4887,7 @@ character.sp={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【死谏】?',function(card,player,target){ + player.chooseTarget(get.prompt('sijian'),function(card,player,target){ return player!=target&&target.num('he')>0; }).set('ai',function(target){ return -ai.get.attitude(_status.event.player,target); @@ -5070,7 +5078,7 @@ character.sp={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【淑慎】?',function(card,player,target){ + player.chooseTarget(get.prompt('shushen'),function(card,player,target){ return target!=player; }).set('ai',function(target){ return ai.get.attitude(_status.event.player,target); @@ -5345,7 +5353,7 @@ character.sp={ } check=(num>=2); } - player.chooseTarget('是否发动【弘援】?',[1,2],function(card,player,target){ + player.chooseTarget(get.prompt('hongyuan'),[1,2],function(card,player,target){ return player!=target; }, function(target){ @@ -5595,7 +5603,7 @@ character.sp={ var num=target.hasSkillTag('maixie')?2:0; return -ai.get.attitude(_status.event.player,target)-num; }, - prompt:'是否发动笔伐?' + prompt:get.prompt('bifa') }); "step 1" if(result.bool){ @@ -5867,7 +5875,7 @@ character.sp={ ai2:function(target){ return ai.get.attitude(_status.event.player,target)-3; }, - prompt:'是否发动援护?' + prompt:get.prompt('yuanhu') }); "step 1" if(result.bool){ @@ -5941,7 +5949,7 @@ character.sp={ return b.hp-a.hp; }); if(players[0].hp>players[1].hp&&players[0]!=player){ - players[0].chooseBool('是否发动天命?'); + players[0].chooseBool(get.prompt('tianming')); event.player=players[0]; } else{ @@ -6171,7 +6179,7 @@ character.sp={ content:function(){ "step 0" var check=(player.hp==1||(player.hp==2&&player.num('h')<=1)); - player.chooseTarget('是否发动【随仁】?').set('ai',function(target){ + player.chooseTarget(get.prompt('suiren')).set('ai',function(target){ if(!_status.event.check) return 0; return ai.get.attitude(_status.event.player,target); }).set('check',check); diff --git a/character/standard.js b/character/standard.js index 35a176109..f53d54aeb 100644 --- a/character/standard.js +++ b/character/standard.js @@ -128,7 +128,7 @@ character.standard={ }, content:function(){ "step 0" - player.choosePlayerCard('是否对'+get.translation(trigger.source)+'发动【反馈】?',trigger.source,ai.get.buttonValue,'he'); + player.choosePlayerCard(get.prompt('fankui',trigger.source),trigger.source,ai.get.buttonValue,'he'); "step 1" if(result.bool){ player.logSkill('fankui',trigger.source); @@ -157,7 +157,7 @@ character.standard={ content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+',是否发动【鬼才】?').set('ai',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('guicai')).set('ai',function(card){ var trigger=_status.event.getTrigger(); var player=_status.event.player; var judging=_status.event.judging; @@ -258,7 +258,7 @@ character.standard={ } } check=(num>=2); - player.chooseTarget('是否发动【突袭】?',[1,2],function(card,player,target){ + player.chooseTarget(get.prompt('tuxi'),[1,2],function(card,player,target){ return target.num('h')>0&&player!=target; },function(target){ if(!_status.event.aicheck) return 0; @@ -1271,7 +1271,7 @@ character.standard={ } return -1; }, - prompt:'是否发动【流离】?' + prompt:get.prompt('liuli') }); "step 1" if(result.bool){ diff --git a/character/swd.js b/character/swd.js index 7dca5be80..0dba9408f 100644 --- a/character/swd.js +++ b/character/swd.js @@ -219,16 +219,20 @@ character.swd={ fengze:{ enable:'phaseUse', filterCard:true, - selectCard:2, + selectCard:1, position:'he', + usable:1, viewAs:{name:'taoyuan'}, filter:function(event,player){ - return player.num('he',{color:'black'})>=2; + return player.num('he',{color:'black'})>0; }, audio:true, - prompt:'将两张黑色牌当作桃园结义使用', + prompt:'将一张黑色牌当作桃园结义使用', check:function(card){ - return 6-ai.get.useful(card) + return 7-ai.get.useful(card) + }, + ai:{ + threaten:1.5 } }, zaowu:{ @@ -772,7 +776,7 @@ character.swd={ content:function(){ "step 0" game.delay(0.5); - player.chooseTarget('是否发动【浴尘】?',function(card,player,target){ + player.chooseTarget(get.prompt('yuchen'),function(card,player,target){ return player!=target&&target.num('he')>0; }).ai=function(target){ return -ai.get.attitude(player,target); @@ -834,7 +838,7 @@ character.swd={ trigger.player.num('h')>2; var next=player.chooseToDiscard(function(card){ return get.type(card)!='basic'; - },'是否对'+get.translation(trigger.player)+'发动【入梦】?','he'); + },get.prompt('rumeng',trigger.player),'he'); next.logSkill=['rumeng',trigger.player]; next.ai=function(card){ if(yep){ @@ -870,7 +874,7 @@ character.swd={ }, content:function(){ "step 0" - var next=player.chooseToDiscard('he','是否发动【连打】?'); + var next=player.chooseToDiscard('he',get.prompt('lianda')); next.ai=function(card){ if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){ return 7-ai.get.value(card); @@ -894,7 +898,7 @@ character.swd={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【回气】?',function(card,player,target){ + player.chooseTarget(get.prompt('huiqi'),function(card,player,target){ return player!=target; }).ai=function(target){ var att=ai.get.attitude(player,target); @@ -1011,7 +1015,7 @@ character.swd={ } } } - var next=player.chooseToDiscard('he','是否发动【镇卫】?'); + var next=player.chooseToDiscard('he',get.prompt('hzhenwei')); next.logSkill=['hzhenwei',trigger.target]; next.ai=function(card){ if(save){ @@ -1069,7 +1073,7 @@ character.swd={ } event.cards=cards; game.delay(0.5); - player.chooseTarget('是否发动【镇威】?',function(card,player,target){ + player.chooseTarget(get.prompt('fzhenwei'),function(card,player,target){ return target!=trigger.player; }).ai=function(target){ var att=ai.get.attitude(player,target); @@ -1120,7 +1124,7 @@ character.swd={ ai2:function(target){ return ai.get.damageEffect(target,player,player); }, - prompt:'是否发动【伤袭】?' + prompt:get.prompt('shangxi') }); "step 1" if(result.bool){ @@ -1141,7 +1145,7 @@ character.swd={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【覆岩】?',function(card,player,target){ + player.chooseTarget(get.prompt('fuyan'),function(card,player,target){ return !target.hujia; }).ai=function(target){ if(ai.get.attitude(player,target)<=0) return 0; @@ -1343,7 +1347,7 @@ character.swd={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【凌仙】?',function(card,player,target){ + player.chooseTarget(get.prompt('lingxian'),function(card,player,target){ return get.distance(player,target,'attack')>1&&player!=target; }).ai=function(target){ var att=ai.get.attitude(player,target); @@ -1597,7 +1601,7 @@ character.swd={ } return ai.get.attitude(player,target); }, - prompt:'是否发动【护天】?' + prompt:get.prompt('hutian') }); "step 1" if(result.bool){ @@ -1693,7 +1697,7 @@ character.swd={ "step 0" if(player.num('he')){ player.chooseCardTarget({ - prompt:'是否发动【幻形】?', + prompt:get.prompt('huanxing'), filterCard:true, position:'he', filterTarget:function(card,player,target){ @@ -1799,7 +1803,7 @@ character.swd={ content:function(){ "step 0" var att=ai.get.attitude(player,trigger.player); - var next=player.chooseToDiscard('he','是否发动【碎岩】?'); + var next=player.chooseToDiscard('he',get.prompt('suiyan')); next.ai=function(card){ if(att<0) return 7-ai.get.value(card); return -1; @@ -1848,7 +1852,7 @@ character.swd={ ai2:function(target){ return ai.get.damageEffect(target,player,player); }, - prompt:'是否发动【凝霰】?' + prompt:get.prompt('ningxian') }); "step 1" if(result.bool){ @@ -2489,7 +2493,7 @@ character.swd={ ai2:function(target){ return ai.get.damageEffect(target,player,player); }, - prompt:'是否发动【荡平】?' + prompt:get.prompt('dangping') }); "step 1" if(result.bool){ @@ -2685,27 +2689,11 @@ character.swd={ }, mufeng2:{}, jiying:{ - // trigger:{player:'respond'}, - // filter:function(event,player){ - // return event.card.name=='shan'&& - // player.num('h','sha')>0&&_status.currentPhase!=player; - // }, - // direct:true, - // content:function(){ - // player.chooseToUse('是否发动【疾鹰】?',{name:'sha'}); - // }, mod:{ targetInRange:function(card){ if(card.name=='sha') return true; } }, - // ai:{ - // effect:{ - // target:function(card,player,target,current){ - // if(get.tag(card,'respondShan')&&target.num('h')) return 0.8; - // } - // } - // } }, minjing:{ trigger:{player:'damageBegin'}, @@ -2731,12 +2719,9 @@ character.swd={ filter:function(event,player){ return event.player!=player&&!player.hasSkill('touxi2')&&event.player.isAlive(); }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【偷袭】?'; - }, + logTarget:'player', content:function(){ "step 0" - player.line(trigger.player,'thunder'); player.judge(function(card){ if(get.color(card)=='black') return 1; return -1; @@ -2744,7 +2729,6 @@ character.swd={ "step 1" if(result.bool){ trigger.player.damage('thunder'); - // player.draw(); player.addSkill('touxi2'); event.finish(); } @@ -3030,7 +3014,7 @@ character.swd={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【忘尘】?').ai=function(target){ + player.chooseTarget(get.prompt('wangchen')).ai=function(target){ return ai.get.attitude(player,target)*(target.isTurnedOver()?1:-1); } "step 1" @@ -3148,7 +3132,7 @@ character.swd={ player.chooseTarget(function(card,player,target){ if(player==target) return false; return true; - },'是否发动附身?').ai=function(){ + },get.prompt('fushen')).ai=function(){ return -1;//1+Math.random(); } "step 1" @@ -3329,7 +3313,7 @@ character.swd={ }, content:function(){ "step 0" - player.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀',trigger.player).logSkill='rexue'; + player.chooseToUse({name:'sha'},'热血:是否对'+get.translation(trigger.player)+'使用一张杀',trigger.player).logSkill='rexue'; "step 1" if(result.bool){ player.draw(); @@ -3420,7 +3404,7 @@ character.swd={ "step 0" var att=ai.get.attitude(player,trigger.player); var nh=player.num('h'); - var next=player.chooseToDiscard('是否发动苏生?'); + var next=player.chooseToDiscard(get.prompt('susheng',trigger.player)); next.logSkill='susheng'; next.ai=function(card){ if(att>3||(att>1&&nh>2)){ @@ -3839,7 +3823,7 @@ character.swd={ "step 1" var suit=get.suit(trigger.cards); event.suit=suit; - player.chooseCard('he','是否发动【燎原】?',{suit:suit}).ai=function(card){ + player.chooseCard('he',get.prompt('liaoyuan'),{suit:suit}).ai=function(card){ if(ai.get.attitude(player,trigger.target)>=0) return 0; if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){ return 7-ai.get.value(card); @@ -3939,7 +3923,7 @@ character.swd={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【锻星】?',function(card,player,target){ + player.chooseTarget(get.prompt('duanxing'),function(card,player,target){ return lib.filter.targetEnabled({name:'sha'},player,target); }).ai=function(target){ return ai.get.effect(target,{name:'sha'},player); @@ -4011,7 +3995,7 @@ character.swd={ }, content:function(){ "step 0" - player.chooseTarget([1,1],'是否发动【魅惑】',function(card,player,target){ + player.chooseTarget([1,1],get.prompt('meihuo'),function(card,player,target){ if(player==target) return false; return target.num('he')>0; }).ai=function(target){ @@ -4232,7 +4216,7 @@ character.swd={ direct:true, content:function(){ "step 0" - var next=player.chooseToDiscard('he','是否发动【唤魂】?',function(card){ + var next=player.chooseToDiscard('he',get.prompt('huanhun'),function(card){ return get.color(card)=='red'; }); next.logSkill=['huanhun',trigger.player]; @@ -4319,9 +4303,7 @@ character.swd={ check:function(event,player){ return ai.get.attitude(player,event.player)>0; }, - prompt:function(event){ - return '是否对'+get.translation(event.player)+'发动【引月】?' - }, + logTarget:'player', content:function(){ "step 0" if(trigger.player!=player&&trigger.player.num('h')>=player.num('h')){ @@ -4698,7 +4680,7 @@ character.swd={ ai2:function(target){ return ai.get.effect(target,{name:'sha'},player); }, - prompt:'是否发动【化剑】?' + prompt:get.prompt('huajian') }); "step 1" if(result.bool){ @@ -4721,7 +4703,7 @@ character.swd={ }, direct:true, content:function(){ - player.discardPlayerCard(trigger.player,'e','是否发动【破浪】?').logSkill='polang'; + player.discardPlayerCard(trigger.player,'e',get.prompt('polang',trigger.player)).logSkill='polang'; }, ai:{ expose:0.3 @@ -4740,7 +4722,7 @@ character.swd={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【亟空】?',function(card,player,target){ + player.chooseTarget(get.prompt('jikong'),function(card,player,target){ return lib.filter.targetEnabled({name:'sha',nature:'thunder'},player,target); }).ai=function(target){ return ai.get.effect(target,{name:'sha',nature:'thunder'},player); @@ -4768,7 +4750,7 @@ character.swd={ "step 0" game.delay(0.5); player.chooseCardTarget({ - prompt:'是否发动【挟雷】?', + prompt:get.prompt('xielei'), filterCard:true, position:'he', filterTarget:function(card,player,target){ @@ -5253,7 +5235,7 @@ character.swd={ }, content:function(){ 'step 0' - player.chooseToDiscard('he','是否发动【天书】?').ai=function(card){ + player.chooseToDiscard('he',get.prompt('tianshu')).ai=function(card){ if(get.position(card)=='h') return 5-ai.get.useful(card); return 4-ai.get.value(card); }.logSkill='tianshu'; @@ -5549,7 +5531,7 @@ character.swd={ priority:-9, content:function(){ "step 0" - player.chooseTarget('是否发动【天书】?',lib.skill.tianshu.filterTarget).ai=function(target){ + player.chooseTarget(get.prompt('tianshu'),lib.skill.tianshu.filterTarget).ai=function(target){ if(target.maxHp<5) return Math.random()*(5-target.maxHp); return -1; }; @@ -5968,7 +5950,7 @@ character.swd={ choice.push('cancel'); if(choice.length>1){ if(event.isMine()){ - event.dialog=ui.create.dialog('是否发动【谐率】?'); + event.dialog=ui.create.dialog(get.prompt('xielv')); } player.chooseControl(choice).ai=function(){ if(choice.contains('recover_hp')) return 'recover_hp'; @@ -6258,7 +6240,7 @@ character.swd={ list=list.concat(game.players[i].get('j')); } var dialog=ui.create.dialog(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+get.translation(trigger.player.judging[0])+ - ',是否发动【天轮】?',list,'hidden'); + ','+get.prompt('tianlun'),list,'hidden'); player.chooseButton(dialog,function(button){ var card=button.link; var trigger=_status.event.parent._trigger; @@ -6348,9 +6330,7 @@ character.swd={ }, lanzhi_old:{ trigger:{source:'damageBefore'}, - prompt:function(event){ - return '是否对'+get.translation(event.player)+'发动【兰芷】?'; - }, + logTarget:'player', check:function(event,player){ if(player.hp==1&&event.player.hp>1) return true; var eff=ai.get.damageEffect(event.player,player,player); @@ -6382,7 +6362,7 @@ character.swd={ list.push(game.players[i]); } } - return '是否对'+get.translation(list)+'发动【兰芷】?'; + return get.prompt('lanzhi',list); }, check:function(event,player){ var list=[]; @@ -7415,7 +7395,7 @@ character.swd={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【幻灵】?',function(card,player,target){ + player.chooseTarget(get.prompt('huanling'),function(card,player,target){ return player!=target; }).ai=function(target){ var att=ai.get.attitude(player,target); @@ -7484,7 +7464,7 @@ character.swd={ "step 0" var check=player.num('h')<=player.hp+(player.hp>2?2:1); player.chooseCardTarget({ - prompt:'是否发动【疾风】?', + prompt:get.prompt('ljifeng'), filterCard:true, filterTarget:function(card,player,target){ if(player==target) return false; @@ -7518,7 +7498,7 @@ character.swd={ "step 0" player.chooseTarget(function(card,player,target){ return player.canUse(trigger.card,target); - },'是否发动【翔龙】?').ai=function(target){ + },get.prompt('lxianglong')).ai=function(target){ return ai.get.effect(target,trigger.card,player); } "step 1" @@ -7594,7 +7574,7 @@ character.swd={ content:function(){ "step 0" var dis=trigger.target.num('h','shan')||trigger.target.num('e','bagua')||trigger.target.num('h')>2; - var next=player.chooseToDiscard('是否发动【狩猎】?'); + var next=player.chooseToDiscard(get.prompt('shoulie',trigger.target)); next.ai=function(card){ if(dis) return 7-ai.get.value(card); return 0; @@ -7823,7 +7803,7 @@ character.swd={ swd_xiyan:'犀衍', fengze:'风泽', - fengze_info:'出牌阶段,你可以将两张黑色牌当作桃园结义使用', + fengze_info:'出牌阶段限一次,你可以将一张黑色牌当作桃园结义使用', lingyue:'凌月', lingyue_info:'每当你使用一张杀,你可以令目标弃置一张牌', jinlin:'金鳞', diff --git a/character/xiake.js b/character/xiake.js index f1ca57cbf..37ccda59f 100644 --- a/character/xiake.js +++ b/character/xiake.js @@ -13,9 +13,7 @@ character.xiake={ filter:function(event,player){ return event.parent.name!='lingfeng'&&event.player.isAlive(); }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【凌锋】?'; - }, + logTarget:'player', check:function(event,player){ if(ai.get.damageEffect(event.player,player,player)>0&& ai.get.attitude(player,event.player)<0){ @@ -25,7 +23,6 @@ character.xiake={ }, content:function(){ game.delay(); - player.line(trigger.player,'green'); player.loseHp(); trigger.player.damage(); } diff --git a/character/xianjian.js b/character/xianjian.js index dcc14bf8e..52f49364a 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -130,7 +130,7 @@ character.xianjian={ content:function(){ "step 0" var goon=(ai.get.damageEffect(player,trigger.player,player)<=0); - player.chooseCard('是否发动【障目】?',{name:'shan'}).ai=function(){ + player.chooseCard(get.prompt('zhangmu'),{name:'shan'}).ai=function(){ return goon?1:0; } "step 1" @@ -190,7 +190,7 @@ character.xianjian={ player.storage.leiyu.splice(i--,1); } } - return '是否对'+get.translation(player.storage.leiyu)+'发动【雷狱】?' + return get.prompt('leiyu',player.storage.leiyu); }, filter:function(event,player){ if(player.storage.leiyu){ @@ -272,7 +272,7 @@ character.xianjian={ var target=event.targets[0]; if(player.canUse('sha',target.next,false)) targets.push(target.next); if(player.canUse('sha',target.previous,false)) targets.push(target.previous); - return '是否对'+get.translation(targets)+'发动【飞爪】?' + return get.prompt('feizhua',targets); }, check:function(event,player){ var target=event.targets[0]; @@ -526,11 +526,8 @@ character.xianjian={ check:function(event,player){ return ai.get.attitude(player,event.player)>0; }, - prompt:function(event){ - return '是否对'+get.translation(event.player)+'发动【飞絮】?' - }, + logTarget:'player', content:function(){ - player.line(trigger.player,'green'); trigger.player.draw(); }, ai:{ @@ -811,7 +808,7 @@ character.xianjian={ for(var i=0;i2?1:0; } "step 1" @@ -928,7 +925,8 @@ character.xianjian={ targets.push(game.players[i]); } } - var next=player.chooseToDiscard('是否对'+get.translation(targets)+'发动【忘忧】?','he'); + event.targets=targets; + var next=player.chooseToDiscard(get.prompt('wangyou',targets),'he'); next.logSkill=['wangyou',event.targets]; next.ai=function(card){ if(num<=0) return 0; @@ -938,7 +936,6 @@ character.xianjian={ default:return 8-ai.get.value(card); } } - event.targets=targets; "step 1" if(result.bool){ event.targets.sort(lib.sort.seat); @@ -974,7 +971,7 @@ character.xianjian={ unique:true, content:function(){ "step 0" - player.chooseTarget('是否发动【长念】?',function(card,player,target){ + player.chooseTarget(get.prompt('changnian'),function(card,player,target){ return player!=target; }).ai=function(target){ return ai.get.attitude(player,target); @@ -1100,7 +1097,7 @@ character.xianjian={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【毒刺】?',function(card,player,target){ + player.chooseTarget(get.prompt('duci'),function(card,player,target){ return player!=target&&get.distance(player,target)<=1; }).ai=function(target){ return ai.get.damageEffect(target,player,player); @@ -1220,7 +1217,7 @@ character.xianjian={ }, content:function(){ "step 0" - player.chooseTarget([1,trigger.cards.length],'是否发动【气剑】?',function(card,player,target){ + player.chooseTarget([1,trigger.cards.length],get.prompt('qijian'),function(card,player,target){ return player.canUse({name:'sha'},target,false); }).ai=function(target){ return ai.get.effect(target,{name:'sha'},player); @@ -1281,7 +1278,7 @@ character.xianjian={ } } if(num){ - var next=player.chooseToDiscard(num,'是否发动【千方】?','he'); + var next=player.chooseToDiscard(num,get.prompt('qianfang'),'he'); next.ai=function(card){ if(ainum>=0){ switch(num){ @@ -1296,7 +1293,7 @@ character.xianjian={ event.logged=true; } else{ - player.chooseBool('是否发动【千方】?').ai=function(){ + player.chooseBool(get.prompt('qianfang')).ai=function(){ return ainum>=0; } } @@ -1336,7 +1333,7 @@ character.xianjian={ direct:true, content:function(){ "step 0" - player.discardPlayerCard(trigger.player,'he','是否发动【破云】',[1,2]).logSkill=['poyun',trigger.player]; + player.discardPlayerCard(trigger.player,'he',get.prompt('poyun'),[1,2]).logSkill=['poyun',trigger.player]; "step 1" if(result.bool){ player.storage.xuanning--; @@ -1582,7 +1579,7 @@ character.xianjian={ content:function(){ "step 0" var noneed=(trigger.card.name=='tao'&&trigger.targets[0]==player&&player.hp==player.maxHp-1); - player.chooseTarget('是否发动【润心】?',function(card,player,target){ + player.chooseTarget(get.prompt('runxin'),function(card,player,target){ return target.hp0; }).set('ai',function(target){ @@ -562,7 +563,7 @@ character.yijiang={ controls.push('recover_hp'); } controls.push('cancel'); - player.chooseControl(controls).set('prompt','是否发动【瑰藻】?').set('ai',function(event,player){ + player.chooseControl(controls).set('prompt',get.prompt('guizao')).set('ai',function(event,player){ if(player.hp0) return 1; return 0; }).set('att',att); @@ -1708,7 +1709,7 @@ character.yijiang={ } 'step 1' if(event.cards.length){ - player.chooseTarget('是否发动【慎断】?',function(card,player,target){ + player.chooseTarget(get.prompt('shenduan'),function(card,player,target){ return player.canUse({name:'bingliang'},target,false); }).set('ai',function(target){ var player=_status.event.player; @@ -1760,7 +1761,7 @@ character.yijiang={ var att=ai.get.attitude(player,trigger.player); var nh=trigger.player.num('h'); var eff=ai.get.effect(trigger.player,{name:'sha'},player,player); - player.chooseCardButton('是否对'+get.translation(trigger.player)+'发动【勇略】?',trigger.player.get('j')).set('ai',function(button){ + player.chooseCardButton(get.prompt('yonglve',trigger.player),trigger.player.get('j')).set('ai',function(button){ var name=button.link.viewAs||button.link.name; var att=_status.event.att; var nh=_status.event.nh; @@ -2078,7 +2079,7 @@ character.yijiang={ } } } - var next=player.chooseToDiscard('是否发动【龙吟】?','he'); + var next=player.chooseToDiscard(get.prompt('longyin'),'he'); next.logSkill=['longyin',trigger.player]; next.set('ai',function(card){ if(_status.event.go){ @@ -2286,7 +2287,7 @@ character.yijiang={ content:function(){ 'step 0' var nh=player.num('h'); - player.chooseTarget('是否发动【邀名】?',function(card,player,target){ + player.chooseTarget(get.prompt('yaoming'),function(card,player,target){ return _status.event.nh!=target.num('h'); }).set('ai',function(target){ var att=ai.get.attitude(_status.event.player,target); @@ -2386,7 +2387,7 @@ character.yijiang={ if(!player.hasSkill('yanzhu')){ num=player.maxHp; } - player.chooseTarget([1,num],'是否发动【兴学】?').set('ai',function(target){ + player.chooseTarget([1,num],get.prompt('xingxue')).set('ai',function(target){ var att=ai.get.attitude(_status.event.player,target); if(target.num('he')) return att; return att/10; @@ -2773,7 +2774,7 @@ character.yijiang={ } } } - var next=player.chooseToDiscard('是否发动【勤王】?','he'); + var next=player.chooseToDiscard(get.prompt('qinwang'),'he'); next.set('ai',function(card){ if(_status.event.yep) return 5-ai.get.value(card); return 0; @@ -2922,7 +2923,7 @@ character.yijiang={ direct:true, content:function(){ 'step 0' - player.chooseTarget('是否发动【佐定】?',function(card,player,target){ + player.chooseTarget(get.prompt('zuoding'),function(card,player,target){ return _status.event.getTrigger().targets.contains(target); }).set('ai',function(target){ return ai.get.attitude(_status.event.player,target); @@ -2968,7 +2969,7 @@ character.yijiang={ direct:true, content:function(){ "step 0" - player.chooseCard('是否发动【活墨】?','he',function(card){ + player.chooseCard(get.prompt('huomo'),'he',function(card){ return get.type(card)!='basic'&&get.color(card)=='black'; }).set('ai',function(card){ if(!_status.event.player.num('h','shan')){ @@ -3426,7 +3427,7 @@ character.yijiang={ content:function(){ 'step 0' var go=Math.random()<0.5; - player.chooseTarget('是否发动【明鉴】?',function(card,player,target){ + player.chooseTarget(get.prompt('mingjian'),function(card,player,target){ return player!=target }).ai=function(target){ var att=ai.get.attitude(player,target); @@ -3475,7 +3476,7 @@ character.yijiang={ direct:true, content:function(){ 'step 0' - player.chooseTarget('是否发动【恢拓】?').set('ai',function(target){ + player.chooseTarget(get.prompt('huituo')).set('ai',function(target){ var player=_status.event.player; if(ai.get.attitude(player,target)>0){ return ai.get.recoverEffect(target,player,player)+1; @@ -3523,7 +3524,7 @@ character.yijiang={ audio:2, content:function(){ 'step 0' - var next=player.chooseToDiscard('he','是否发动【夺刀】?'); + var next=player.chooseToDiscard('he',get.prompt('duodao')); next.logSkill=['duodao',trigger.source]; next.set('ai',function(card){ if(ai.get.attitude(_status.event.player,_status.event.getTrigger().source)<0){ @@ -3563,7 +3564,7 @@ character.yijiang={ content:function(){ 'step 0' player.choosePlayerCard(trigger.target,'he', - [1,Math.min(trigger.target.num('he'),trigger.target.hp)],'是否发动【破军】?'); + [1,Math.min(trigger.target.num('he'),trigger.target.hp)],get.prompt('pojun',trigger.target)); 'step 1' if(result.bool&&result.links.length){ player.logSkill('xinpojun'); @@ -3668,7 +3669,7 @@ character.yijiang={ }, content:function(){ 'step 0' - player.chooseTarget('是否发动【燕语】?',function(card,player,target){ + player.chooseTarget(get.prompt('yanyu'),function(card,player,target){ return target.sex=='male'&&target!=player; }).set('ai',function(target){ return ai.get.attitude(_status.event.player,target); @@ -3689,7 +3690,7 @@ character.yijiang={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【诱敌】?',function(card,player,target){ + player.chooseTarget(get.prompt('youdi'),function(card,player,target){ return player!=target; }).set('ai',function(target){ if(target.num('he')==0) return 0; @@ -3832,7 +3833,7 @@ character.yijiang={ position:'he', content:function(){ "step 0" - player.chooseTarget('是否发动【灭计】?',function(card,player,target){ + player.chooseTarget(get.prompt('mieji'),function(card,player,target){ var trigger=_status.event.getTrigger(); return lib.filter.filterTarget(trigger.card,player,target)&&target!=trigger.targets[0]; }).set('ai',function(target){ @@ -4143,7 +4144,7 @@ character.yijiang={ }, content:function(){ "step 0" - player.chooseTarget('是否发动【巧说】?',function(card,player,target){ + player.chooseTarget(get.prompt('qiaoshui'),function(card,player,target){ return player!=target&&target.num('h')>0; }).set('ai',function(target){ return -ai.get.attitude(_status.event.player,target)/target.num('h'); @@ -4299,9 +4300,7 @@ character.yijiang={ filter:function(event,player){ return event.player!=player; }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【献图】?' - }, + logTarget:'player', check:function(event,player){ if(ai.get.attitude(player,event.player)<5) return false; if(player.maxHp-player.hp>=2) return false; @@ -4366,7 +4365,7 @@ character.yijiang={ }, content:function(){ 'step 0' - player.chooseTarget('是否发动【强识】?',function(card,player,target){ + player.chooseTarget(get.prompt('qiangzhi'),function(card,player,target){ return target!=player&&target.num('h')>0; }).set('ai',function(){ return Math.random(); @@ -4522,7 +4521,7 @@ character.yijiang={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【谮毁】?',function(card,player,target){ + player.chooseTarget(get.prompt('chanhui'),function(card,player,target){ if(player==target) return false; var trigger=_status.event.getTrigger(); return player.canUse(trigger.card,target)&&trigger.targets.contains(target)==false; @@ -4831,9 +4830,7 @@ character.yijiang={ } return false; }, - prompt:function(event){ - return '是否对'+get.translation(event.player)+'发动【惴恐】?'; - }, + logTarget:'player', filter:function(event,player){ return player.hp0&&event.player.num('h')>0; @@ -4854,7 +4851,7 @@ character.yijiang={ priority:11, content:function(){ "step 0" - player.chooseTarget('是否发动【求援】?',function(card,player,target){ + player.chooseTarget(get.prompt('qiuyuan'),function(card,player,target){ return target!=player&&_status.event.getTrigger().player.canUse('sha',target,false); }).set('ai',function(target){ var trigger=_status.event.getTrigger(); @@ -4962,7 +4959,7 @@ character.yijiang={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【追忆】?',function(card,player,target){ + player.chooseTarget(get.prompt('zhuiyi'),function(card,player,target){ return player!=target&&_status.event.source!=target; }).set('ai',function(target){ var num=ai.get.attitude(_status.event.player,target); @@ -5143,7 +5140,7 @@ character.yijiang={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【眩惑】',function(card,player,target){ + player.chooseTarget(get.prompt('xinxuanhuo'),function(card,player,target){ return player!=target; }).set('ai',function(target){ var att=ai.get.attitude(_status.event.player,target); @@ -5264,7 +5261,7 @@ character.yijiang={ direct:true, content:function(){ "step 0" - player.chooseTarget('是否发动【直言】?').set('ai',function(target){ + player.chooseTarget(get.prompt('zhiyan')).set('ai',function(target){ return ai.get.attitude(_status.event.player,target); }); "step 1" @@ -5490,7 +5487,7 @@ character.yijiang={ return att; }, position:'he', - prompt:'是否发动【'+get.skillTranslation('xinjujian',player)+'】?' + prompt:get.prompt('xinjujian') }); "step 1" if(result.bool){ @@ -6511,7 +6508,7 @@ character.yijiang={ check=true; } } - player.choosePlayerCard(trigger.player,'是否对'+get.translation(trigger.player)+'发动【补益】?','h').set('ai',function(button){ + player.choosePlayerCard(trigger.player,get.prompt('buyi',trigger.player),'h').set('ai',function(button){ if(!_status.event.check) return 0; if(_status.event.target.isUnderControl(true,_status.event.player)){ if(get.type(card)!='basic'){ @@ -6673,7 +6670,7 @@ character.yijiang={ direct:true, content:function(){ "step 0" - var next=player.chooseToDiscard('是否发动【仁心】?',{type:'equip'},'he'); + var next=player.chooseToDiscard(get.prompt('renxin',trigger.player),{type:'equip'},'he'); next.logSkill=['renxin',trigger.player]; next.set('ai',function(card){ var player=_status.event.player; @@ -6706,7 +6703,7 @@ character.yijiang={ }, content:function(){ "step 0" - var next=player.chooseToDiscard('是否发动御策?'); + var next=player.chooseToDiscard(get.prompt('yuce')); next.logSkill='yuce'; next.set('ai',function(card){ return 7-ai.get.value(card); @@ -6763,7 +6760,7 @@ character.yijiang={ forceunique:true, content:function(){ "step 0" - player.chooseTarget('是否发动陷嗣?',[1,2],function(card,player,target){ + player.chooseTarget(get.prompt('xiansi'),[1,2],function(card,player,target){ return target.num('he')>0; },function(target){ return -ai.get.attitude(_status.event.player,target); @@ -6957,7 +6954,7 @@ character.yijiang={ content:function(){ "step 0" var att=ai.get.attitude(player,trigger.source); - player.choosePlayerCard('e','是否发动【争功】?',trigger.source).ai=function(button){ + player.choosePlayerCard('e',get.prompt('zzhenggong'),trigger.source).ai=function(button){ if(att<=0){ return ai.get.equipValue(button.link); } @@ -6984,9 +6981,7 @@ character.yijiang={ if(att>0&&event.player.num('j','lebu')&&event.player.num('h')>event.player.hp+1) return true; return false; }, - prompt:function(event,player){ - return '是否对'+get.translation(event.player)+'发动【权计】?'; - }, + logTarget:'player', filter:function(event,player){ return event.player!=player&&event.player.num('h')>0&&player.num('h')>0; }, @@ -7113,7 +7108,7 @@ character.yijiang={ direct:true, content:function(){ "step 0" - var next=player.chooseCardButton('是否发动【排异】?',player.storage.zyexin); + var next=player.chooseCardButton(get.prompt('zpaiyi'),player.storage.zyexin); next.filterButton=function(button){ var type=get.type(button.link); if(type=='delay'||type=='equip') return true; diff --git a/character/yxs.js b/character/yxs.js index 3b00035fc..0a1cac07f 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -605,7 +605,7 @@ character.yxs={ content:function(){ 'step 0' player.chooseCardTarget({ - prompt:'是否发动【铁腕】?', + prompt:get.prompt('tiewan'), filterCard:{color:'red'}, position:'he', filterTarget:function(card,player,target){ @@ -684,7 +684,7 @@ character.yxs={ "step 0" if(trigger.delay==false) game.delay(); "step 1" - player.chooseTarget('是否发动【仗义】?',function(card,player,target){ + player.chooseTarget(get.prompt('lzhangyi'),function(card,player,target){ return player!=target }).set('du',(trigger.cards.length==1&&trigger.cards[0].name=='du')).ai=function(target){ var att=ai.get.attitude(_status.event.player,target); @@ -726,7 +726,7 @@ character.yxs={ "step 0" if(player.num('he')){ player.chooseCardTarget({ - prompt:'是否发动【易装】?', + prompt:get.prompt('yizhuang'), filterCard:true, position:'he', filterTarget:function(card,player,target){ @@ -1227,7 +1227,7 @@ character.yxs={ content:function(){ "step 0" if(event.isMine()){ - event.dialog=ui.create.dialog('是否发动【蛇噬】?'); + event.dialog=ui.create.dialog(get.prompt('sheshi')); } if(ui.cardPile.childNodes.length<4){ var discardcards=get.cards(4); @@ -1541,30 +1541,6 @@ character.yxs={ } }, nvquan3:{ - // trigger:{target:'useCardToBegin'}, - // filter:function(event){ - // return event.player.sex=='male'&&(event.card.name=='sha'||event.card.name=='juedou'); - // }, - // check:function(event,player){ - // return ai.get.attitude(player,event.player)<=0; - // }, - // direct:true, - // content:function(){ - // "step 0" - // var bool=(ai.get.attitude(player,trigger.player)<=0); - // player.choosePlayerCard(trigger.player,'是否发动【女权】?','he').ai=function(button){ - // if(bool){ - // return ai.get.buttonValue(button); - // } - // else{ - // return 0; - // } - // } - // "step 1" - // if(result.bool){ - // trigger.player.discard(result.links); - // } - // } mod:{ targetEnabled:function(card,player,target){ if(card.name=='juedou'&&player.sex=='male'){ @@ -1841,7 +1817,7 @@ character.yxs={ "step 0" var val=ai.get.value(trigger.card); var suit=get.suit(trigger.card); - var next=player.chooseToDiscard('he','逐鹿:是否发动弃置一张'+get.translation(suit)+ + var next=player.chooseToDiscard('he','逐鹿:是否弃置一张'+get.translation(suit)+ '牌并获得'+get.translation(trigger.card)+'?',{suit:suit}); next.ai=function(card){ return val-ai.get.value(card); diff --git a/game/game.js b/game/game.js index ce2cb3a31..912ed2e35 100644 --- a/game/game.js +++ b/game/game.js @@ -5375,13 +5375,13 @@ if(info.prompt) str=info.prompt; else{ if(typeof info.logTarget=='string'){ - str='是否对'+get.translation(trigger[info.logTarget])+'发动【'+get.skillTranslation(event.skill,player)+'】?'; + str=get.prompt(event.skill,trigger[info.logTarget],player); } else if(typeof info.logTarget=='function'){ - str='是否对'+get.translation(info.logTarget(trigger,player))+'发动【'+get.skillTranslation(event.skill,player)+'】?'; + str=get.prompt(event.skill,info.logTarget(trigger,player),player); } else{ - str='是否发动【'+get.skillTranslation(event.skill,player)+'】?'; + str=get.prompt(event.skill,null,player); } } if(typeof str=='function'){str=str(trigger,player)} @@ -30748,6 +30748,15 @@ return false; }, }, + prompt:function(skill,target,player){ + player=player||_status.event.player; + if(target){ + return '是否对'+get.translation(target)+'发动【'+get.skillTranslation(skill,player)+'】?'; + } + else{ + return '是否发动【'+get.skillTranslation(skill,player)+'】?'; + } + }, url:function(tag){ if(lib.config.debug){ switch(tag){ diff --git a/mode/chess.js b/mode/chess.js index 430ddf65f..d815ebb1b 100644 --- a/mode/chess.js +++ b/mode/chess.js @@ -4658,7 +4658,7 @@ mode.chess={ }, content:function(){ "step 0" - player.chooseToMove(2,'是否发动【翩仪】?'); + player.chooseToMove(2,get.prompt('pianyi')); "step 1" if(result.bool){ player.logSkill('pianyi'); @@ -4673,7 +4673,7 @@ mode.chess={ }, content:function(){ "step 0" - player.chooseToMove(get.cardCount('sha',player),'是否发动【移动射击】?'); + player.chooseToMove(get.cardCount('sha',player),get.prompt('lingdong')); "step 1" if(result.bool){ player.logSkill('lingdong');