From cce2bf7fbf4a0efbeb0843d3ca20946d1b6b43d8 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Fri, 6 Dec 2019 23:40:06 +0800 Subject: [PATCH] v1.9.95.9.2 --- character/hearth.js | 1 + character/old.js | 3 ++- character/shenhua.js | 19 ++++++++++--------- character/sp.js | 1 + character/standard.js | 27 ++++++++++++++++++++++----- character/swd.js | 3 ++- character/xianjian.js | 5 ++++- character/yijiang.js | 8 +++++++- 8 files changed, 49 insertions(+), 18 deletions(-) diff --git a/character/hearth.js b/character/hearth.js index cb416c45e..a7d117b5c 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -7720,6 +7720,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ + respondShan:true, effect:{ target:function(card){ if(get.tag(card,'respondShan')) return 0.4; diff --git a/character/old.js b/character/old.js index 1d0676c87..ee3323465 100755 --- a/character/old.js +++ b/character/old.js @@ -142,7 +142,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return '将一张手牌当'+get.translation(links[0][2])+'使用'; }, }, - ai:{save:true,respondShan:true}, + ai:{save:true,respondShan:true,respondSha:true}, }, "old_guhuo_guess":{ audio:'guhuo_guess', @@ -655,6 +655,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, save:true, respondSha:true, + respondShan:true, skillTagFilter:function(player,tag,arg){ if(player.hasSkill('zhenshan2')) return false; var nh=player.countCards('h'); diff --git a/character/shenhua.js b/character/shenhua.js index a3f66ed6c..7fd2cc11e 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -200,7 +200,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num>player.countCards('h')) num=player.countCards('h'); player.chooseCard('h',[1,num],'请选择需要替换“荣”的手牌').set('ai',function(card){ return 5-get.value(card); - }); + }).set('promptx',[player.storage.drlt_zhengrong]); 'step 1' if(result.bool){ event.cards=result.cards; @@ -1478,6 +1478,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ player.storage.nzry_chenglve1=result.cards; + player.syncStorage('nzry_chenglve1'); player.addTempSkill('nzry_chenglve1',{player:'phaseAfter'}); }; }, @@ -1514,7 +1515,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ effect:{ target:function(card,player,target){ if(get.type(card)=='equip'&&!player.storage.nzry_shicai.contains('equip')&&get.equipResult(player,target,card.name)<=0) return [1,3]; - if(card.name=='shandian'&&!player.storage.nzry_shicai.contains('trick')) return [1,3]; }, }, threaten:2.4, @@ -1534,10 +1534,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, prompt2:"当你使用牌指定目标时,若此牌与你本回合使用的牌类型均不同(包括装备牌),则你可以将此牌置于牌堆顶,然后摸一张牌", trigger:{ - player:['useCard','useCardAfter'], + player:['useCardAfter'], + target:'useCardToTargeted', }, filter:function (event,player,name){ - if(name=='useCard'&&!['equip','delay'].contains(get.type(event.card))) return false; + if(name=='useCardToTargeted'&&('equip'!=get.type(event.card)||event.player!=player)) return false; if(name=='useCardAfter'&&['equip','delay'].contains(get.type(event.card))) return false; return event.cards.filterInD().length>0&&player.storage.nzry_shicai!=undefined&&!player.storage.nzry_shicai.contains(get.type(event.card,'trick')); }, @@ -1545,7 +1546,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(get.type(event.card)=='equip'){ return get.equipResult(player,player,event.card.name)<=0; } - return event.card.name!='lebu'&&event.card.name!='bingliang'; + return true; }, content:function(){ "step 0" @@ -1560,9 +1561,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.updateRoundNumber(); player.draw(); "step 1" - if(event.triggername=='useCard'&&['equip','delay'].contains(get.type(trigger.card))){ - trigger.cancel(); - game.broadcastAll(ui.clear); + if(event.triggername=='useCardToTargeted'){ + trigger.getParent().excluded.push(player); } }, }, @@ -1827,7 +1827,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ '2':{ audio:2, trigger:{ - player:'damageAfter', + player:'damageEnd', }, filter:function (event,player){ return player.countCards('he')>0&&event.source&&event.source!=player&&player.storage.nzry_shenshi==true; @@ -4638,6 +4638,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return true; }, ai:{ + respondShan:true, effect:{ target:function(card,player,target){ if(player==target&&get.subtype(card)=='equip2'){ diff --git a/character/sp.js b/character/sp.js index fae6cd4a8..61d3e36df 100755 --- a/character/sp.js +++ b/character/sp.js @@ -11923,6 +11923,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:11, respondShan:true, + respondSha:true, save:true, result:{ player:function(player){ diff --git a/character/standard.js b/character/standard.js index 37917804f..3e701cf34 100755 --- a/character/standard.js +++ b/character/standard.js @@ -95,7 +95,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['re_caocao'], unique:true, zhuSkill:true, - trigger:{player:['chooseToRespondBegin','chooseToUseBefore']}, + trigger:{player:['chooseToRespondBefore','chooseToUseBefore']}, filter:function(event,player){ if(event.responded) return false; if(player.storage.hujiaing) return false; @@ -134,7 +134,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.hujiaing=false; if(result.bool){ event.finish(); - trigger.result=result; + trigger.result={bool:true,card:{name:'shan'}}; trigger.responded=true; trigger.animate=false; if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ @@ -147,6 +147,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.goto(0); } }, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(player.storage.hujiaing) return false; + if(!player.hasZhuSkill('hujia')) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'; + }); + }, + }, }, jianxiong:{ audio:2, @@ -787,8 +797,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.bool){ event.finish(); - if(result.cards&&result.cards.length==1&&result.cards[0].name=='sha'){ - player.useCard(result.cards[0],target).animate=false; + if(result.cards&&result.cards.length){ + player.useCard({name:'sha'},result.cards,target).animate=false; } else{ player.useCard({name:'sha'},target).animate=false; @@ -804,6 +814,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ + respondSha:true, + skillTagFilter:function(player){ + if(!player.hasZhuSkill('jijiang')) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, result:{ target:function(player,target){ if(player.hasSkill('jijiang3')) return 0; @@ -2503,7 +2520,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinguanxing_info:'准备阶段,你可以观看牌堆顶的x张牌,并将其以任意顺序置于牌堆项或牌堆底,x为存活角色个数且不超过5', xinguanxing_info_alter:'准备阶段,你可以观看牌堆顶的5张牌(存活角色小于4时改为3张),并将其以任意顺序置于牌堆项或牌堆底,如果你把观星的牌都放在牌堆底,你可以在结束阶段再进行1次观星', kongcheng_info:'锁定技,当你没有手牌时,你不能成为【杀】或【决斗】的目标。', - longdan_info:'你可以将【杀】当做【闪】,或将【闪】当做【闪】使用或打出', + longdan_info:'你可以将【杀】当做【闪】,或将【闪】当做【杀】使用或打出', mashu_info:'锁定技,你计算与其他角色的距离时-1。', mashu2_info:'锁定技,你计算与其他角色的距离时-1。', feiying_info:'锁定技,其他角色计算与你的距离时+1', diff --git a/character/swd.js b/character/swd.js index d6bb88e14..784e38012 100644 --- a/character/swd.js +++ b/character/swd.js @@ -1377,6 +1377,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger.result={bool:true,card:{name:'shan'}} }, ai:{ + respondShan:true, target:function(card,player,target,current){ if(!player.isLinked()&¤t<0) return 1.5; if(!target.hasFriend()) return; @@ -2361,7 +2362,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num==0) return false; return num%2==1; }, - prompt:'将一张手牌当作杀打出', + prompt:'将一张手牌当作杀使用或打出', check:function(card){return 6-get.value(card)} }, yaotong2:{ diff --git a/character/xianjian.js b/character/xianjian.js index a2df535b4..31a25ac87 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -2388,6 +2388,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ + respondShan:true, effect:{ target:function(card,player,target,effect){ if(get.tag(card,'respondShan')&&effect<0){ @@ -3716,7 +3717,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var max=Math.min(ui.cardPile.childNodes.length,lib.skill.longxi.max); for(var i=0;i