This commit is contained in:
libccy 2018-02-09 13:08:56 +08:00
parent 15d9ae15cb
commit ad36d4551f
3 changed files with 33 additions and 9 deletions

View File

@ -364,8 +364,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target.changeHujia(); target.changeHujia();
target.draw(); target.draw();
'step 1' 'step 1'
if(player.countCards('he')){ if(target.countCards('he')){
player.chooseToDiscard('he',true); target.chooseToDiscard('he',true);
} }
}, },
ai:{ ai:{

View File

@ -6040,17 +6040,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.delayx(0.5); game.delayx(0.5);
'step 3' 'step 3'
trigger.trigger('useCard'); trigger.trigger('useCard');
trigger.insertAfter(lib.skill.huanjue.draw,{player:trigger.player});
},
draw:function(){
player.draw();
}, },
ai:{ ai:{
expose:0.2, expose:0.2,
threaten:function(player,target){ threaten:function(player,target){
if(target.storage.counttrigger&&target.storage.counttrigger.huanjue) return 1.8; if(target.storage.counttrigger&&target.storage.counttrigger.huanjue) return 1.8;
return 0.6; return 0.6;
},
effect:{
target:function(player,target){
if(player!=target&&_status.currentPhase==target) return 0;
}
} }
} }
}, },
@ -7997,7 +7996,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yindan:'引弹', yindan:'引弹',
yindan_info:'出牌阶段限一次,你可以弃置一张黑桃牌并流失一点体力,然后获得两张炸弹机器人', yindan_info:'出牌阶段限一次,你可以弃置一张黑桃牌并流失一点体力,然后获得两张炸弹机器人',
huanjue:'幻觉', huanjue:'幻觉',
huanjue_info:'每名角色的回合限一次,当你使用卡牌指定其他角色为惟一目标,或当其他角色使用卡牌指定你为惟一目标时,你可以从三张随机亮出的牌中选择一张代替此牌', huanjue_info:'每名角色的回合限一次,当你使用卡牌指定其他角色为惟一目标,或当其他角色使用卡牌指定你为惟一目标时,你可以从三张随机亮出的牌中选择一张代替此牌,然后该牌的使用者在结算后摸一张牌',
yinzong:'影踪', yinzong:'影踪',
yinzong_info:'锁定技,每当你失去装备区内牌,你获得潜行直到下一回合开始', yinzong_info:'锁定技,每当你失去装备区内牌,你获得潜行直到下一回合开始',
tansuo:'探索', tansuo:'探索',

View File

@ -9,6 +9,7 @@
event:{ event:{
finished:true, finished:true,
next:[], next:[],
after:[]
}, },
ai:{}, ai:{},
lastdragchange:[], lastdragchange:[],
@ -20432,7 +20433,16 @@
return this._rand; return this._rand;
}, },
insert:function(func,map){ insert:function(func,map){
var next=game.createEvent(this.name+'Inserted',false); var next=game.createEvent(this.name+'Inserted',false,this);
next.setContent(func);
for(var i in map){
next.set(i,map[i]);
}
return next;
},
insertAfter:function(func,map){
var next=game.createEvent(this.name+'Inserted',false,{next:[]});
this.after.push(next);
next.setContent(func); next.setContent(func);
for(var i in map){ for(var i in map){
next.set(i,map[i]); next.set(i,map[i]);
@ -22529,6 +22539,7 @@
_status.event={ _status.event={
finished:true, finished:true,
next:[], next:[],
after:[]
}; };
_status.paused=false; _status.paused=false;
game.createEvent('game',false).setContent(lib.init.startOnline); game.createEvent('game',false).setContent(lib.init.startOnline);
@ -22743,6 +22754,7 @@
_status.event={ _status.event={
finished:true, finished:true,
next:[], next:[],
after:[]
}; };
_status.paused=false; _status.paused=false;
_status.dying=get.parsedResult(state.dying)||[]; _status.dying=get.parsedResult(state.dying)||[];
@ -25930,6 +25942,7 @@
step:0, step:0,
finished:false, finished:false,
next:[], next:[],
after:[],
custom:{ custom:{
add:{}, add:{},
replace:{} replace:{}
@ -26991,6 +27004,17 @@
event.trigger(event.name+'After'); event.trigger(event.name+'After');
event._triggered++; event._triggered++;
} }
else if(event.after&&event.after.length){
var next=event.after.shift();
if(next.player&&next.player.skipList.contains(next.name)){
event.trigger(next.name+'Skipped');
next.player.skipList.remove(next.name);
}
else{
next.parent=event;
_status.event=next;
}
}
else{ else{
if(event.parent){ if(event.parent){
if(event.result){ if(event.result){
@ -27856,6 +27880,7 @@
_status.event={ _status.event={
finished:true, finished:true,
next:[], next:[],
after:[]
}; };
_status.paused=false; _status.paused=false;