From dded772ae2fd8004ec69fa4051f95470d3a59d78 Mon Sep 17 00:00:00 2001 From: libccy Date: Fri, 15 Sep 2017 16:16:22 +0800 Subject: [PATCH] cancel --- character/yxs.js | 12 ++++-------- game/game.js | 9 +++------ mode/boss.js | 36 ++++++++++++------------------------ mode/guozhan.js | 15 +++++---------- mode/stone.js | 12 ++++-------- mode/versus.js | 12 ++++-------- 6 files changed, 32 insertions(+), 64 deletions(-) diff --git a/character/yxs.js b/character/yxs.js index 599c5450f..c3a30e534 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -1155,8 +1155,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageBefore'}, forced:true, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); player.loseHp(); }, ai:{ @@ -1254,8 +1253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ game.log(player,'发动了察觉,',trigger.card,'对',trigger.target,'失效') - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ @@ -1792,8 +1790,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return suits.length>=2; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); player.addSkill('nichang2'); } }, @@ -2314,8 +2311,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ next.logSkill=['feigong',trigger.player]; "step 1" if(result.bool){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); } }, ai:{ diff --git a/game/game.js b/game/game.js index 51132550d..2d4dc02f8 100644 --- a/game/game.js +++ b/game/game.js @@ -20471,8 +20471,7 @@ game.log(player,'获得了','【免疫】'); }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ nofire:true, @@ -20523,8 +20522,7 @@ return player.hp>=player.maxHp; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, }, _turnover:{ @@ -20537,8 +20535,7 @@ // game.players[i].in(); // } if(player.isTurnedOver()){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); player.turnOver(); player.phaseSkipped=true; } diff --git a/mode/boss.js b/mode/boss.js index 9025f232e..61233884c 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -1773,8 +1773,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return _status.currentPhase==player; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); } }, out:{ @@ -1835,8 +1834,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDiscardBefore'}, forced:true, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, group:'boss_tanyu_hp', subSkill:{ @@ -1894,8 +1892,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return !player.isTurnedOver(); }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); game.log(player,'取消了翻面'); }, } @@ -2008,8 +2005,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return true; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ @@ -2402,8 +2398,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return !player.isTurnedOver(); }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); game.log(player,'取消了翻面'); }, ai:{ @@ -3427,8 +3422,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ node.classList.add('thrownhighlight'); ui.arena.classList.add('thrownhighlight'); if(card){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); trigger.result={ card:card, judge:trigger.judge(card), @@ -3864,8 +3858,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return false; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); } }, end:{ @@ -4296,8 +4289,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return lib.skill.tengjia1.filter(event,player); }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ @@ -4552,8 +4544,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDrawBefore'}, forced:true, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ noh:true, @@ -4844,8 +4835,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return false; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); } }, huanhua3:{ @@ -5008,8 +4998,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return event.nature=='fire'; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); player.recover(); }, ai:{ @@ -5356,8 +5345,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ forced:true, priority:10, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); player.loseHp(); }, audio:2, diff --git a/mode/guozhan.js b/mode/guozhan.js index 106ce88a3..b394a7be2 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -427,8 +427,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.$throw(card,1000); player.updateMarks('huangjintianbingfu'); player.syncStorage('huangjintianbingfu'); - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); player.logSkill('hongfa'); game.delay(); } @@ -726,8 +725,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); trigger.card.fix(); player.showCards(get.translation(player)+'发动了【章武】',[trigger.card]); var owner=get.owner(trigger.card); @@ -1349,8 +1347,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return get.type(event.card,'trick')=='trick'&&get.color(event.card)=='black'; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ @@ -1372,8 +1369,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return event.card.name=='shunshou'||event.card.name=='lebu'; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ @@ -1395,8 +1391,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return player.countCards('h')==0&&(event.card.name=='sha'||event.card.name=='juedou'); }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ diff --git a/mode/stone.js b/mode/stone.js index 231f06d56..b52ab7b56 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -6129,8 +6129,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ @@ -7197,8 +7196,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ unique:true, popup:false, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ threaten:0.1 @@ -7210,8 +7208,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ unique:true, popup:false, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ @@ -8453,8 +8450,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ effect:{ diff --git a/mode/versus.js b/mode/versus.js index 9cc9ad49b..e590c8a70 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -3920,8 +3920,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return bool&&num>=3; }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); game.log(player,'跳过了判定阶段'); } }, @@ -4776,8 +4775,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ content:'已获得大雾标记' }, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ nofire:true, @@ -4839,8 +4837,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDrawBefore'}, content:function(){ "step 0" - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); event.cards=get.cards(2); player.showCards(event.cards); "step 1" @@ -4873,8 +4870,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, forced:true, content:function(){ - trigger.untrigger(); - trigger.finish(); + trigger.cancel(); }, ai:{ nofire:true,