diff --git a/card/extra.js b/card/extra.js index 680d84a13..7d1ab7dcf 100644 --- a/card/extra.js +++ b/card/extra.js @@ -20,7 +20,7 @@ card.extra={ return target==player; }, content:function(){ - if(target==_status.event.getParent(2).dying||target==_status.dying){ + if(target.isDying()){ target.recover(); if(_status.currentPhase==target){ target.getStat().card.jiu--; @@ -71,7 +71,7 @@ card.extra={ }, result:{ target:function(player,target){ - if(target&&target.hp<=0) return 2; + if(target&&target.isDying()) return 2; if(lib.config.mode=='stone'&&!player.isMin()){ if(player.getActCount()+1>=player.actcount) return 0; } diff --git a/card/sp.js b/card/sp.js index cc07bc787..435145916 100644 --- a/card/sp.js +++ b/card/sp.js @@ -487,7 +487,7 @@ card.sp={ order:4, result:{ player:function(player){ - if(_status.dying) return ai.get.attitude(player,_status.dying); + if(_status.event.dying) return ai.get.attitude(player,_status.event.dying); return 1; } }, diff --git a/card/swd.js b/card/swd.js index a70ff579a..53aa445ff 100644 --- a/card/swd.js +++ b/card/swd.js @@ -1538,7 +1538,7 @@ card.swd={ }, content:function(){ "step 0" - if(target==_status.event.getParent(2).dying||target==_status.dying) target.recover(); + if(target.isDying()) target.recover(); else{ target.addTempSkill('tianxianjiu',['phaseAfter','shaAfter']); if(cards&&cards.length){ @@ -1574,7 +1574,7 @@ card.swd={ }, result:{ target:function(player,target){ - if(target&&target==_status.dying) return 2; + if(target&&target.isDying()) return 2; if(lib.config.mode=='stone'&&!player.isMin()){ if(player.getActCount()+1>=player.actcount) return false; } diff --git a/character/diy.js b/character/diy.js index 0c406d622..fda0e906e 100644 --- a/character/diy.js +++ b/character/diy.js @@ -795,7 +795,7 @@ character.diy={ }, filter:function(event,player){ if(event.type!='dying') return false; - if(player!=_status.dying) return false; + if(player!=event.dying) return false; if(player.storage.guihan) return false; return true; }, diff --git a/character/hearth.js b/character/hearth.js index 248756f81..a2da0c02f 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -3494,7 +3494,7 @@ character.hearth={ }, filter:function(event,player){ if(event.type!='dying') return false; - if(player!=_status.dying) return false; + if(player!=event.dying) return false; if(player.storage.chongsheng<=0) return false; return true; }, diff --git a/character/sp.js b/character/sp.js index c34ed0fb2..adc8e0621 100644 --- a/character/sp.js +++ b/character/sp.js @@ -7218,7 +7218,7 @@ character.sp={ result:{ player:function(player){ if(player.tempSkills.aocai4) return 0; - if(_status.dying) return ai.get.attitude(player,_status.dying); + if(_status.event.dying) return ai.get.attitude(player,_status.event.dying); return 1; } } diff --git a/character/swd.js b/character/swd.js index 37780ec04..66387ba28 100644 --- a/character/swd.js +++ b/character/swd.js @@ -2240,6 +2240,7 @@ character.swd={ var num=target.maxHp-target.hp; if(get.is.altered('shouyin')) num=Math.min(2,num); target.recover(num); + player.line(target,'green'); } event.redo(); } @@ -2253,7 +2254,7 @@ character.swd={ save:true, result:{ player:function(player){ - if(_status.dying!=player&&ai.get.attitude(player,_status.dying)<=0){ + if(_status.event.dying!=player&&ai.get.attitude(player,_status.event.dying)<=0){ return 0; } var num=0; @@ -2831,7 +2832,7 @@ character.swd={ result:{ player:function(player){ if(player.tempSkills.jilve3) return 0; - if(_status.dying) return ai.get.attitude(player,_status.dying); + if(_status.event.dying) return ai.get.attitude(player,_status.event.dying); return 1; } }, @@ -5055,40 +5056,6 @@ character.swd={ } }, }, - yuhuo:{ - enable:'chooseToUse', - filter:function(event,player){ - if(event.type!='dying') return false; - if(player!=_status.dying) return false; - if(player.storage.yuhuo) return false; - return true; - }, - content:function(){ - player.maxHp--; - player.hp=player.maxHp; - player.discard(player.get('hej')); - if(player.isLinked()) player.link(); - if(player.isTurnedOver()) player.turnOver(); - player.storage.yuhuo=true; - // player.addSkill('guanhong'); - // player.addSkill('yishan2'); - player.update(); - }, - ai:{ - result:{ - player:10 - }, - threaten:function(player,target){ - if(!target.storage.yuhuo) return 0.8; - } - }, - init:function(player){ - player.storage.yuhuo=false; - }, - intro:{ - content:'limited' - } - }, yishan:{ group:'yishan2', trigger:{player:'damageEnd'}, @@ -9208,7 +9175,6 @@ character.swd={ susheng:'苏生', shengshou:'圣手', huanjian:'幻箭', - yuhuo:'浴火', huanjian_info:'出牌阶段,你可以将一张黑色牌当作冰魄针使用', shengshou_info:'你可以将一张黑色手牌当作草药使用', susheng_info:'在任意一名角色即将死亡时,你可以弃置一张手牌防止其死亡,并将其体力回复至1,每回合限发动一次', @@ -9245,7 +9211,6 @@ character.swd={ poxing_info:'锁定技,每当你即将造成伤害,若目标的体力值大于你,你令伤害+1', liaoyuan_info:'每当你使用一张杀指定目标后,你可以弃置任意张与此杀花色相同的牌,若如此做,目标需额外打出等量的闪,每少打出一张闪,此杀的伤害+1', liaoyuan_info_alter:'每当你使用一张杀指定目标后,你可以弃置一张与此杀花色相同的牌,若如此做,目标需额外打出一张闪,若目标没打出闪,此杀的伤害+1', - yuhuo_info:'限定技,濒死阶段,你可以重置角色牌,减少一点体力上限,然后将体力回复至体力上限', yishan_info:'每当你受到一次伤害,你可以重新获得最近失去的两张牌', huanhun_info:'当一名角色进入濒死状态时,你可以弃置一张红色牌并令其进行一次判定,若结果为红色,其回复一点体力', daixing_info:'结束阶段,你可以任意张牌并获得等量的护甲,这些护甲将在你的下个准备阶段消失', diff --git a/game/game.js b/game/game.js index 89ab7dad7..3a6b29410 100644 --- a/game/game.js +++ b/game/game.js @@ -15,6 +15,7 @@ skillaudio:[], dieClose:[], dragline:[], + dying:[] }; var lib={ configprefix:'noname_0.9_', @@ -9714,11 +9715,21 @@ }, dying:function(){ "step 0" - _status.dying=player; + if(player.isDying()||player.hp>0){ + event.finish(); + return; + } + _status.dying.unshift(player); + game.broadcast(function(list){ + _status.dying=list; + },_status.dying); event.trigger('dying'); game.log(player,'濒死') "step 1" - if(_status.dying==player) delete _status.dying; + _status.dying.remove(player); + game.broadcast(function(list){ + _status.dying=list; + },_status.dying); if(player.hp<=0&&!player.nodying) player.die(event.reason); }, die:function(){ @@ -9780,6 +9791,7 @@ player.next.previous=player.previous; game.players.remove(player); game.dead.push(player); + _status.dying.remove(player); for(var i=0;i0||this.isDying()) return; var next=game.createEvent('dying'); next.player=this; next.reason=reason; @@ -13495,6 +13507,9 @@ isDead:function(){ return this.classList.contains('dead'); }, + isDying:function(){ + return _status.dying.contains(this)&&this.hp<=0&&this.isAlive(); + }, isDamaged:function(){ return this.hp0) return false; - if(event.source&&event.source!=player) return false; + if(!event.player.isDying()) return false; + if(event.source&&event.source.isIn()&&event.source!=player) return false; return true; }, content:function(){ "step 0" - event.dying=_status.dying; + event.dying=trigger.player; if(!event.acted) event.acted=[]; "step 1" if(trigger.player.isDead()){ event.finish(); return; } - _status.dying=event.dying; event.acted.push(player); // else if(trigger.source&&trigger.source.isDead()){ // trigger.start=game.findNext(trigger.source); @@ -16634,7 +16648,6 @@ // trigger.start=trigger.source||trigger.player; // } var str=get.translation(trigger.player.name)+'濒死,是否帮助?
当前体力:'+trigger.player.hp+'
'; - _status.dying=event.dying; if(lib.config.tao_enemy&&event.dying.side!=player.side&&lib.config.mode!='identity'&&lib.config.mode!='guozhan'){ event._result={bool:false} } @@ -17460,6 +17473,7 @@ next:[], }; _status.paused=false; + _status.dying=get.parsedResult(state.dying)||[]; if(game.updateState){ game.updateState(state2); @@ -35588,6 +35602,7 @@ number:ui.arena.dataset.number, players:{}, mode:_status.mode, + dying:_status.dying, servermode:window.isNonameServer, roomId:game.roomId }; diff --git a/mode/boss.js b/mode/boss.js index 4700222bd..29b9b1a23 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -2874,7 +2874,7 @@ mode.boss={ }, filter:function(event,player){ if(event.type!='dying') return false; - if(player!=_status.dying) return false; + if(!player.isDying()) return false; if(player.storage.boss_guihan) return false; return true; }, diff --git a/mode/stone.js b/mode/stone.js index 7672472ec..45b5622a6 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -5389,7 +5389,7 @@ mode.stone={ return target==player; }, content:function(){ - if(target==_status.dying){ + if(target.isDying()){ target.recover(); } else{