This commit is contained in:
parent
673d4d903d
commit
3674a5f162
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:'结束阶段,你可以任意张牌并获得等量的护甲,这些护甲将在你的下个准备阶段消失',
|
||||
|
|
31
game/game.js
31
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;i<cards.length;i++){
|
||||
cards[i].goto(ui.discardPile);
|
||||
|
@ -12169,7 +12181,7 @@
|
|||
return next;
|
||||
},
|
||||
dying:function(reason){
|
||||
if(this.nodying) return;
|
||||
if(this.nodying||this.hp>0||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.hp<this.maxHp;
|
||||
},
|
||||
|
@ -16612,20 +16627,19 @@
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
if(event.player.hp>0) 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)+'濒死,是否帮助?<br><div class="text center" style="margin-top:10px">当前体力:'+trigger.player.hp+'</div>';
|
||||
_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
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
|
|
@ -5389,7 +5389,7 @@ mode.stone={
|
|||
return target==player;
|
||||
},
|
||||
content:function(){
|
||||
if(target==_status.dying){
|
||||
if(target.isDying()){
|
||||
target.recover();
|
||||
}
|
||||
else{
|
||||
|
|
Loading…
Reference in New Issue