loseAsync / insert_card

This commit is contained in:
Spmario233 2021-03-08 19:10:12 +08:00
parent 1e50271fac
commit 6c0aab6e54
14 changed files with 4375 additions and 1196 deletions

View File

@ -1719,7 +1719,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ryoichi_baoyi:{ ryoichi_baoyi:{
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['gainAfter','equipAfter','addJudgeAfter'], global:['gainAfter','equipAfter','addJudgeAfter','loseAsyncAfter'],
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target!=player&&(target.sex=='female'||target.sex=='male'&&target.countCards('hej')>0); return target!=player&&(target.sex=='female'||target.sex=='male'&&target.countCards('hej')>0);
@ -2535,7 +2535,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
misuzu_zhongxing:{ misuzu_zhongxing:{
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -2569,7 +2569,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
kamome_yangfan:{ kamome_yangfan:{
trigger:{ trigger:{
player:['loseAfter','enterGame'], player:['loseAfter','enterGame'],
global:['equipAfter','addJudgeAfter','gameDrawAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gameDrawAfter','gainAfter','loseAsyncAfter'],
}, },
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
@ -3279,11 +3279,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
'step 0' 'step 0'
if(trigger.delay==false) game.delay();
'step 1'
var cards=trigger.cards.filter(function(card){ var cards=trigger.cards.filter(function(card){
return get.position(card,true)=='d'&&get.type(card,false)=='equip'; return get.position(card,true)=='d'&&get.type(card,false)=='equip';
}); });
player.chooseButton([get.prompt('kyoko_juwu'),cards],[1,cards.length]).set('ai',function(){return 1}); player.chooseButton([get.prompt('kyoko_juwu'),cards],[1,cards.length]).set('ai',function(){return 1});
'step 1' 'step 2'
if(result.bool){ if(result.bool){
player.gain(result.links,'gain2','log'); player.gain(result.links,'gain2','log');
player.logSkill('kyoko_juwu'); player.logSkill('kyoko_juwu');

File diff suppressed because it is too large Load Diff

View File

@ -261,6 +261,7 @@ window.noname_character_rank={
'key_hiroto', 'key_hiroto',
'key_nao', 'key_nao',
'mini_zhugeliang', 'mini_zhugeliang',
'mini_lvmeng',
], ],
am:[ am:[
'diy_caiwenji', 'diy_caiwenji',
@ -1089,6 +1090,7 @@ window.noname_character_rank={
'ns_zhangwei', 'ns_zhangwei',
'ol_yuanshao', 'ol_yuanshao',
'guozhao', 'guozhao',
'mini_lvmeng',
'key_yuri', 'key_yuri',
'key_yuzuru', 'key_yuzuru',
'sp_key_kanade', 'sp_key_kanade',

View File

@ -693,7 +693,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname:['boss_lvbu3','re_heqi','xin_lingtong'], audioname:['boss_lvbu3','re_heqi','xin_lingtong'],
trigger:{ trigger:{
player:['loseAfter','phaseDiscardEnd'], player:['loseAfter','phaseDiscardEnd'],
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -871,6 +871,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
discard:false, discard:false,
delay:false, delay:false,
loseTo:'cardPile',
insert:true,
visible:true,
check:function(card){ check:function(card){
return 8-get.value(card); return 8-get.value(card);
}, },
@ -878,10 +881,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0' 'step 0'
player.showCards(cards); player.showCards(cards);
'step 1' 'step 1'
cards[0].fix();
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
game.updateRoundNumber();
'step 2'
if(!target.countCards('he',function(card){ if(!target.countCards('he',function(card){
if(get.type2(card)=='trick') return true; if(get.type2(card)=='trick') return true;
return lib.filter.cardDiscardable(card,target,'remieji'); return lib.filter.cardDiscardable(card,target,'remieji');
@ -890,7 +889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(get.type2(card)=='trick') return true; if(get.type2(card)=='trick') return true;
return lib.filter.cardDiscardable(card,player,'remieji'); return lib.filter.cardDiscardable(card,player,'remieji');
}).set('prompt','选择交给'+get.translation(player)+'一张锦囊牌,或依次弃置两张非锦囊牌。'); }).set('prompt','选择交给'+get.translation(player)+'一张锦囊牌,或依次弃置两张非锦囊牌。');
'step 3' 'step 2'
if(result.cards&&result.cards.length){ if(result.cards&&result.cards.length){
if(get.type2(result.cards[0])=='trick'){ if(get.type2(result.cards[0])=='trick'){
player.gain(result.cards,target,'giveAuto'); player.gain(result.cards,target,'giveAuto');
@ -899,7 +898,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else target.discard(result.cards); else target.discard(result.cards);
} }
else event.finish(); else event.finish();
'step 4' 'step 3'
if(target.countCards('he',function(card){ if(target.countCards('he',function(card){
return get.type2(card)!='trick'; return get.type2(card)!='trick';
})) target.chooseToDiscard('he',true,function(card){ })) target.chooseToDiscard('he',true,function(card){
@ -929,7 +928,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2' 'step 2'
if(result&&result.cards){ if(result&&result.cards){
event.card=result.cards[0]; event.card=result.cards[0];
player.lose(result.cards,ui.special); player.lose(result.cards,ui.cardPile,'insert');
game.log(player,'将',(get.position(event.card)=='h'?'一张牌':event.card),'置于牌堆顶'); game.log(player,'将',(get.position(event.card)=='h'?'一张牌':event.card),'置于牌堆顶');
game.broadcastAll(function(player){ game.broadcastAll(function(player){
var cardx=ui.create.card(); var cardx=ui.create.card();
@ -939,10 +938,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},player); },player);
} }
else event.finish(); else event.finish();
'step 3'
card.fix();
ui.cardPile.insertBefore(card,ui.cardPile.firstChild);
game.updateRoundNumber();
}, },
ai:{ ai:{
order:1, order:1,
@ -2092,7 +2087,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname:['boss_lvbu3','re_heqi','re_lingtong'], audioname:['boss_lvbu3','re_heqi','re_lingtong'],
trigger:{ trigger:{
player:['loseAfter','phaseDiscardEnd'], player:['loseAfter','phaseDiscardEnd'],
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -4615,7 +4610,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
order:8.5, order:8.5,
result:{ result:{
target:function (player,target){ target:function (player,target){
if(!player.countCards('he',{type:'equip'})){ if(!ui.selected.cards.length){
if(player.hp<2) return 0; if(player.hp<2) return 0;
if(target.hp>=player.hp) return 0; if(target.hp>=player.hp) return 0;
} }
@ -6732,7 +6727,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -7721,14 +7716,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
retuntian:{ retuntian:{
audio:2, audio:2,
trigger:{player:'loseEnd'}, trigger:{
player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
if(player==_status.currentPhase) return false; if(player==_status.currentPhase) return false;
for(var i=0;i<event.cards.length;i++){ if(event.name=='gain'&&event.player==player) return false;
if(event.cards[i].original&&event.cards[i].original!='j') return true; var evt=event.getl(player);
} return evt&&evt.cards2&&evt.cards2.length>0;
return false;
}, },
content:function(){ content:function(){
player.judge(function(card){ player.judge(function(card){

View File

@ -3202,7 +3202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname:['gz_dengai'], audioname:['gz_dengai'],
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
@ -5410,13 +5410,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
order:8, order:8,
result:{ result:{
player:function(player,target){ player:function(player,target){
if(player.getEquip(1)) return 0; if(ui.selected.cards.length) return 0;
if(player.hp>=target.hp) return -0.9; if(player.hp>=target.hp) return -0.9;
if(player.hp<=2) return -10; if(player.hp<=2) return -10;
return -2; return -2;
}, },
target:function(player,target){ target:function(player,target){
if(!player.getEquip(1)){ if(!ui.selected.cards.length){
if(player.hp<2) return 0; if(player.hp<2) return 0;
if(player.hp==2&&target.hp>=2) return 0; if(player.hp==2&&target.hp>=2) return 0;
if(target.hp>player.hp) return 0; if(target.hp>player.hp) return 0;
@ -5476,7 +5476,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
order:8.5, order:8.5,
result:{ result:{
target:function(player,target){ target:function(player,target){
if(player.hasSkill('xinqiangxi2')||!player.countCards('he',{type:'equip'})){ if(!ui.selected.cards.length){
if(player.hp<2) return 0; if(player.hp<2) return 0;
if(target.hp>=player.hp) return 0; if(target.hp>=player.hp) return 0;
} }

View File

@ -6589,7 +6589,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{ trigger:{
player:['loseAfter','gainAfter'], player:['loseAfter','gainAfter'],
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -11770,7 +11770,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
shoucheng:{ shoucheng:{
trigger:{ trigger:{
global:['equipAfter','addJudgeAfter','loseAfter','gainAfter'], global:['equipAfter','addJudgeAfter','loseAfter','gainAfter','loseAsyncAfter'],
}, },
audio:2, audio:2,
direct:true, direct:true,
@ -12133,7 +12133,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sijian:{ sijian:{
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
audio:2, audio:2,
@ -12212,7 +12212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{global:'phaseJieshuBegin'}, trigger:{global:'phaseJieshuBegin'},
filter:function(event,player){ filter:function(event,player){
return event.player.countCards('h')<=1; return event.player.countCards('h')<=1&&player.hasSkill('junbing');
}, },
direct:true, direct:true,
checkx:function(target,player){ checkx:function(target,player){
@ -12230,7 +12230,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 0" "step 0"
event.target=player; event.target=player;
event.player=trigger.player; event.player=trigger.player;
event.player.chooseBool('是否对'+get.translation(event.target)+'发动【郡兵】?',event.player==event.target?'摸一张牌':'摸一张牌,将所有手牌交给该角色,然后该角色交给你等量的手牌').set('choice',lib.skill.junbing.checkx(event.target,event.player)); var prompt;
if(player==event.player) prompt='是否发动【郡兵】摸一张牌?';
else prompt=('###是否对'+get.translation(event.target)+'发动【郡兵】?###'+(event.player==event.target?'摸一张牌':'摸一张牌,将所有手牌交给该角色,然后该角色交给你等量的手牌'));
event.player.chooseBool(prompt).set('choice',lib.skill.junbing.checkx(event.target,event.player));
"step 1" "step 1"
if(!result.bool){event.finish();return} if(!result.bool){event.finish();return}
target.logSkill('junbing',player); target.logSkill('junbing',player);

View File

@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'sp2', name:'sp2',
connect:true, connect:true,
character:{ character:{
shibao:['male','jin',4,['shibao_skill'],['unseen']],
jin_zhangchunhua:['female','jin',3,['huishi','qingleng','xuanmu'],['hiddenSkill']], jin_zhangchunhua:['female','jin',3,['huishi','qingleng','xuanmu'],['hiddenSkill']],
jin_simayi:['male','jin',3,['buchen','smyyingshi','xiongzhi','quanbian'],['hiddenSkill']], jin_simayi:['male','jin',3,['buchen','smyyingshi','xiongzhi','quanbian'],['hiddenSkill']],
jin_wangyuanji:['female','jin',3,['shiren','yanxi'],['hiddenSkill']], jin_wangyuanji:['female','jin',3,['shiren','yanxi'],['hiddenSkill']],
@ -83,7 +84,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
characterSort:{ characterSort:{
sp2:{ sp2:{
sp_yingbian:['jin_zhangchunhua','jin_simayi','jin_wangyuanji','jin_simazhao','jin_xiahouhui','jin_simashi','duyu','zhanghuyuechen'], sp_yingbian:['jin_zhangchunhua','jin_simayi','jin_wangyuanji','jin_simazhao','jin_xiahouhui','jin_simashi','duyu','zhanghuyuechen','shibao'],
sp_whlw:["xurong","lijue","zhangji","fanchou","guosi"], sp_whlw:["xurong","lijue","zhangji","fanchou","guosi"],
sp_zlzy:["zhangqiying","lvkai","zhanggong","weiwenzhugezhi","beimihu"], sp_zlzy:["zhangqiying","lvkai","zhanggong","weiwenzhugezhi","beimihu"],
sp_longzhou:["xf_tangzi","xf_huangquan","xf_sufei","sp_liuqi"], sp_longzhou:["xf_tangzi","xf_huangquan","xf_sufei","sp_liuqi"],
@ -102,6 +103,136 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
skill:{ skill:{
shibao_skill:{
locked:false,
onremove:function(player){
player.removeSkill('shibao_skill_count');
player.removeGaintag('shibao_skill');
},
mod:{
targetInRange:function(card,player,target){
if(!card.cards||get.type(card)!='basic') return;
for(var i of card.cards){
if(i.hasGaintag('shibao_skill')) return (game.online?player==_status.currentPhase:player.isPhaseUsing());
}
},
cardUsable:function(card,player,target){
if(!card.cards||get.type(card)!='basic'||!(game.online?player==_status.currentPhase:player.isPhaseUsing())) return;
for(var i of card.cards){
if(i.hasGaintag('shibao_skill')) return Infinity;
}
},
aiOrder:function(player,card,num){
if(get.itemtype(card)=='card'&&card.hasGaintag('shibao_skill')&&get.type(card)=='basic') return num-0.1;
},
},
trigger:{player:'useCard2'},
direct:true,
filterx:function(event,player){
if(!player.isPhaseUsing()) return false;
return player.getHistory('lose',function(evt){
if(evt.getParent()!=event) return false;
for(var i in evt.gaintag_map){
if(evt.gaintag_map[i].contains('shibao_skill')) return true;
}
return false;
}).length>0;
},
filter:function(event,player){
if(!lib.skill.shibao_skill.filterx(event,player)) return false;
if(get.type(event.card)!='trick') return false;
if(event.targets&&event.targets.length>0) return true;
var info=get.info(event.card);
if(info.allowMultiple==false) return false;
if(event.targets&&!info.multitarget){
if(game.hasPlayer(function(current){
return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current);
})){
return true;
}
}
return false;
},
content:function(){
'step 0'
var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标'
player.chooseTarget(get.prompt('shibao_skill'),function(card,player,target){
var player=_status.event.player;
if(_status.event.targets.contains(target)) return true;
return lib.filter.targetEnabled2(_status.event.card,player,target)&&lib.filter.targetInRange(_status.event.card,player,target);
}).set('prompt2',prompt2).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1);
}).set('targets',trigger.targets).set('card',trigger.card);
'step 1'
if(result.bool){
if(!event.isMine()) game.delayx();
event.targets=result.targets;
}
else{
event.finish();
}
'step 2'
if(event.targets){
player.logSkill('shibao_skill',event.targets);
if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets);
else trigger.targets.addArray(event.targets);
}
},
group:['shibao_skill_equip','shibao_skill_silent'],
subSkill:{
equip:{
trigger:{player:'useCard'},
filter:function(event,player){
return get.type(event.card)=='equip'&&lib.skill.shibao_skill.filterx(event,player);
},
forced:true,
locked:false,
content:function(){
player.draw();
},
},
silent:{
trigger:{
player:['enterGame','useCard1'],
global:'gameDrawAfter',
},
silent:true,
firstDo:true,
filter:function(event,player){
if(event.name=='useCard') return get.type(event.card)=='basic'&&lib.skill.shibao_skill.filterx(event,player)&&event.addCount!==false;
return true;
},
content:function(){
if(trigger.name=='useCard'){
trigger.addCount=false;
var stat=player.getStat();
if(stat&&stat.card&&stat.card[trigger.card.name]) stat.card[trigger.card.name]--;
}
else{
player.addSkill('shibao_skill_count');
player.addGaintag(player.getCards('h'),'shibao_skill');
}
},
},
},
},
shibao_skill_count:{
trigger:{
player:'gainBegin',
global:'roundStart',
},
silent:true,
filter:function(event,player){
if(event.name=='gain') return event.getParent(2).name!='shibao_skill_equip';
return game.roundNumber>1;
},
content:function(){
if(trigger.name=='gain') trigger.gaintag.add('shibao_skill');
else player.removeGaintag('shibao_skill');
},
},
pianchong:{ pianchong:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin1'}, trigger:{player:'phaseDrawBegin1'},
@ -152,7 +283,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'pianchong', audio:'pianchong',
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
forced:true, forced:true,
charlotte:true, charlotte:true,
@ -782,7 +913,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
global:'zhaoran3', global:'zhaoran3',
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
forced:true, forced:true,
charlotte:true, charlotte:true,
@ -3017,11 +3148,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
discard:false, discard:false,
prepare:'throw', prepare:'throw',
loseTo:'cardPile',
visible:true,
insert:true,
content:function(){ content:function(){
"step 0" game.log(player,'将',cards,'置于牌堆顶');
cards[0].fix();
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
game.updateRoundNumber();
player.useCard({name:'sha',isCard:true},false,targets).card.cxliushi=true; player.useCard({name:'sha',isCard:true},false,targets).card.cxliushi=true;
}, },
group:'cxliushi_damage', group:'cxliushi_damage',
@ -3197,7 +3328,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -7811,28 +7942,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.set('qianxinNum',num3); event.set('qianxinNum',num3);
} }
}, },
filter:function (event,player){ filter:function(event,player){
return event.qianxinNum&&event.qianxinNum>0; return event.qianxinNum&&event.qianxinNum>0;
}, },
filterTarget:function (card,player,target){ filterTarget:function(card,player,target){
return target!=player; return target!=player;
}, },
filterCard:true, filterCard:true,
selectCard:function (){ selectCard:function(){
var num1=game.players.length-1; var num1=game.players.length-1;
var num2=_status.event.qianxinNum; var num2=_status.event.qianxinNum;
return [1,Math.floor(num2/num1)]; return [1,Math.floor(num2/num1)];
}, },
discard:false, discard:false,
check:function (){ check:function(){
return -1; return -1;
}, },
delay:false, delay:false,
content:function (){ lose:false,
prompt:function(){
return '选择一名角色并将任意张手牌置于处理区,然后将这些牌放置于牌堆中'+get.cnNumber(game.players.length)+'倍数的位置(先选择的牌在上)';
},
content:function(){
'step 0' 'step 0'
player.lose(cards,ui.ordering).noOrdering=true;
player.$throw(cards.length); player.$throw(cards.length);
player.storage.xinfu_qianxin=cards.slice(0); player.storage.xinfu_qianxin=cards.slice(0);
player.storage.xinfu_qianxin2=target; player.storage.xinfu_qianxin2=target;
'step 1'
event.cards.reverse();
var num1=game.players.length; var num1=game.players.length;
var num2=ui.cardPile.childElementCount; var num2=ui.cardPile.childElementCount;
for(var i=0;i<event.cards.length;i++){ for(var i=0;i<event.cards.length;i++){
@ -7847,6 +7985,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
game.updateRoundNumber(); game.updateRoundNumber();
game.log(player,'把',get.cnNumber(cards.length),'张牌放在了牌堆里'); game.log(player,'把',get.cnNumber(cards.length),'张牌放在了牌堆里');
game.delayx();
}, },
ai:{ ai:{
order:1, order:1,
@ -8395,6 +8534,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
duyu:'杜预222年285年字元凯京兆郡杜陵县今陕西西安中国魏晋时期军事家、经学家、律学家曹魏散骑常侍杜恕之子。杜预初仕曹魏任尚书郎后成为权臣司马昭的幕僚封丰乐亭侯。西晋建立后历任河南尹、安西军司、秦州刺史、度支尚书等职。咸宁四年278年接替羊祜出任镇南大将军镇守荆州。他积极备战支持晋武帝司马炎对孙吴作战并在咸宁五年279年成为晋灭吴之战的统帅之一。战后因功进封当阳县侯仍镇荆州。太康五年285年杜预被征入朝拜司隶校尉途中于邓县逝世终年六十三岁。获赠征南大将军、开府仪同三司谥号为成。杜预耽思经籍博学多通多有建树时誉为“杜武库”。著有《春秋左氏传集解》及《春秋释例》等。为明朝之前唯一一个同时进入文庙和武庙之人。', duyu:'杜预222年285年字元凯京兆郡杜陵县今陕西西安中国魏晋时期军事家、经学家、律学家曹魏散骑常侍杜恕之子。杜预初仕曹魏任尚书郎后成为权臣司马昭的幕僚封丰乐亭侯。西晋建立后历任河南尹、安西军司、秦州刺史、度支尚书等职。咸宁四年278年接替羊祜出任镇南大将军镇守荆州。他积极备战支持晋武帝司马炎对孙吴作战并在咸宁五年279年成为晋灭吴之战的统帅之一。战后因功进封当阳县侯仍镇荆州。太康五年285年杜预被征入朝拜司隶校尉途中于邓县逝世终年六十三岁。获赠征南大将军、开府仪同三司谥号为成。杜预耽思经籍博学多通多有建树时誉为“杜武库”。著有《春秋左氏传集解》及《春秋释例》等。为明朝之前唯一一个同时进入文庙和武庙之人。',
xiahouhui:'夏侯徽211年234年字媛容沛国谯县今安徽亳州司马师第一任妻子。征南大将军夏侯尚之女母德阳乡主为大司马曹真之妹。夏侯徽与司马师之间生有五个女儿。夏侯徽很有见识器度每当司马师有什么想法时都由她从旁策划协助。当时司马师之父司马懿位居上将重位而他的儿子们都有雄才大略。夏侯徽深知司马师绝非曹魏忠臣而司马师对出身曹魏家族的夏侯徽也非常顾忌。青龙二年234年正逢“大疫”、“大病”之年夏侯徽被司马师毒杀时年二十四岁死后葬于峻平陵。西晋建国后追谥夏侯徽为景怀皇后。', xiahouhui:'夏侯徽211年234年字媛容沛国谯县今安徽亳州司马师第一任妻子。征南大将军夏侯尚之女母德阳乡主为大司马曹真之妹。夏侯徽与司马师之间生有五个女儿。夏侯徽很有见识器度每当司马师有什么想法时都由她从旁策划协助。当时司马师之父司马懿位居上将重位而他的儿子们都有雄才大略。夏侯徽深知司马师绝非曹魏忠臣而司马师对出身曹魏家族的夏侯徽也非常顾忌。青龙二年234年正逢“大疫”、“大病”之年夏侯徽被司马师毒杀时年二十四岁死后葬于峻平陵。西晋建国后追谥夏侯徽为景怀皇后。',
guozhao:'郭照,电视剧《军师联盟》中的女主角之一,由唐艺昕饰演。原型为文德皇后郭氏(字女王),魏国皇后,张春华的义妹,深爱曹丕,替甄宓抚育曹叡,因甄宓之死被曹叡记恨,曹丕死后,成为皇太后,被曹叡逼上死路。自尽身亡。', guozhao:'郭照,电视剧《军师联盟》中的女主角之一,由唐艺昕饰演。原型为文德皇后郭氏(字女王),魏国皇后,张春华的义妹,深爱曹丕,替甄宓抚育曹叡,因甄宓之死被曹叡记恨,曹丕死后,成为皇太后,被曹叡逼上死路。自尽身亡。',
shibao:'石苞273年字仲容渤海南皮今河北省南皮县人。三国时曹魏至西晋重要将领西晋开国功臣。西晋建立后历任大司马、侍中、司徒等职封乐陵郡公卒后谥号为“武”。',
}, },
characterTitle:{ characterTitle:{
wulan:'#b对决限定武将', wulan:'#b对决限定武将',
@ -8499,7 +8639,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_zhenxing":"镇行", "xinfu_zhenxing":"镇行",
"xinfu_zhenxing_info":"结束阶段开始时或当你受到伤害后,你可以观看牌堆顶的至多三张牌,然后你获得其中与其余牌花色均不相同的一张牌。", "xinfu_zhenxing_info":"结束阶段开始时或当你受到伤害后,你可以观看牌堆顶的至多三张牌,然后你获得其中与其余牌花色均不相同的一张牌。",
"xinfu_qianxin":"遣信", "xinfu_qianxin":"遣信",
"xinfu_qianxin_info":"出牌阶段限一次,若牌堆中没有“信”,你可以选择一名角色并将任意张手牌放置于牌堆中X倍数的位置X为存活人数称为“信”。该角色的弃牌阶段开始时若其手牌区内有于本回合内获得过的“信”其选择一项令你将手牌摸至四张本回合手牌上限-2。", "xinfu_qianxin_info":"出牌阶段限一次,若牌堆中没有“信”,你可以选择一名角色并将任意张手牌置于处理区,然后将这些牌放置于牌堆中X倍数的位置X为存活人数称为“信”。该角色的弃牌阶段开始时若其手牌区内有于本回合内获得过的“信”其选择一项令你将手牌摸至四张本回合手牌上限-2。",
"qianxin_effect":"遣信", "qianxin_effect":"遣信",
"qianxin_effect_info":"", "qianxin_effect_info":"",
"xinfu_qianxin2":"遣信", "xinfu_qianxin2":"遣信",
@ -8936,6 +9076,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zunwei:'尊位', zunwei:'尊位',
zunwei_backup:'尊位', zunwei_backup:'尊位',
zunwei_info:"出牌阶段限一次你可选择本局游戏内未选择过的一项①若你已受伤则你可以选择一名体力值大于你的其他角色你将体力值回复至XX为你的体力上限与其体力值中的较小值②选择一名手牌数大于你的其他角色你将手牌数摸至与其相同至多摸五张③选择一名装备区内牌数大于你的其他角色。你令X=1。若你装备区内的('equip'+X)栏为空,则你使用牌堆中的一张副类别为('equip'+X)且能对自己使用的装备牌。你令X+1。若X不大于5且你装备区内的牌数仍小于目标角色则你重复此流程。", zunwei_info:"出牌阶段限一次你可选择本局游戏内未选择过的一项①若你已受伤则你可以选择一名体力值大于你的其他角色你将体力值回复至XX为你的体力上限与其体力值中的较小值②选择一名手牌数大于你的其他角色你将手牌数摸至与其相同至多摸五张③选择一名装备区内牌数大于你的其他角色。你令X=1。若你装备区内的('equip'+X)栏为空,则你使用牌堆中的一张副类别为('equip'+X)且能对自己使用的装备牌。你令X+1。若X不大于5且你装备区内的牌数仍小于目标角色则你重复此流程。",
shibao:'石苞',
shibao_skill:'石苞1',
shibao_skill_info:'出牌阶段你使用本轮获得的牌时以此技能获得的牌除外根据类型执行以下效果1.基本牌不计入次数且无距离限制2.锦囊牌,此牌目标+1或-13.装备牌摸1张牌。',
sp_yingbian:'文德武备', sp_yingbian:'文德武备',
sp_whlw:"文和乱武", sp_whlw:"文和乱武",

View File

@ -2086,7 +2086,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
@ -2117,7 +2117,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname:['sp_sunshangxiang','re_sunshangxiang'], audioname:['sp_sunshangxiang','re_sunshangxiang'],
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){

View File

@ -441,7 +441,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'qinguo_use', audio:'qinguo_use',
trigger:{ trigger:{
player:'loseAfter', player:'loseAfter',
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
prompt:'是否发动【勤国】回复1点体力', prompt:'是否发动【勤国】回复1点体力',
filter:function (event,player){ filter:function (event,player){
@ -479,20 +479,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return false; return false;
}, },
callback:function(){ callback:function(){
game.cardsGotoSpecial(card); game.cardsGotoSpecial(card);
player.storage.xinfu_jijun.push(card); player.storage.xinfu_jijun.push(card);
var node=event.judgeResult.node; var node=event.judgeResult.node;
node.moveDelete(player); node.moveDelete(player);
game.broadcast(function(cardid,player){ game.broadcast(function(cardid,player){
var node=lib.cardOL[cardid]; var node=lib.cardOL[cardid];
if(node){ if(node){
node.moveDelete(player); node.moveDelete(player);
} }
},node.cardid,player); },node.cardid,player);
game.addVideo('gain2',player,get.cardsInfo([node])); game.addVideo('gain2',player,get.cardsInfo([node]));
player.markSkill('xinfu_jijun'); player.markSkill('xinfu_jijun');
game.addVideo('storage',player,['xinfu_jijun',get.cardsInfo(player.storage.xinfu_jijun),'cards']); game.addVideo('storage',player,['xinfu_jijun',get.cardsInfo(player.storage.xinfu_jijun),'cards']);
//event.trigger("addCardToStorage"); //event.trigger("addCardToStorage");
}, },
content:function (){ content:function (){
player.judge(function(card){ player.judge(function(card){
@ -581,7 +581,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"phaseJieshuBegin", player:"phaseJieshuBegin",
}, },
filter:function (event,player){ filter:function (event,player){
return player.countCards('he')&&player.storage.xinfu_jijun.length; return player.storage.xinfu_jijun&&player.storage.xinfu_jijun.length&&player.countCards('he');
}, },
direct:true, direct:true,
skillAnimation:true, skillAnimation:true,

View File

@ -289,7 +289,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'shangshi', audio:'shangshi',
trigger:{ trigger:{
player:['loseAfter','changeHp','gainMaxHpAfter','loseMaxHpAfter'], player:['loseAfter','changeHp','gainMaxHpAfter','loseMaxHpAfter'],
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
frequent:true, frequent:true,
prompt:function(event,player){ prompt:function(event,player){
@ -2289,17 +2289,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 3" "step 3"
if(event.card){ if(event.card){
player.logSkill('jianzheng',trigger.player); player.logSkill('jianzheng',trigger.player);
player.lose(event.card,ui.special,'visible'); player.lose(event.card,ui.cardPile,'visible','insert');
player.$throw(event.card,1000); player.$throw(event.card,1000);
}
"step 4"
if(event.card){
event.card.fix();
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
game.updateRoundNumber();
game.log(player,'将',card,'置于牌堆顶'); game.log(player,'将',card,'置于牌堆顶');
} }
"step 5" "step 4"
if(get.color(trigger.card)!='black'){ if(get.color(trigger.card)!='black'){
trigger.getParent().targets.push(player); trigger.getParent().targets.push(player);
trigger.player.line(player); trigger.player.line(player);
@ -3130,6 +3124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var list=game.filterPlayer(function(current){ var list=game.filterPlayer(function(current){
return current.hasSkill('wengua'); return current.hasSkill('wengua');
}); });
if(list.length==1&&list[0]==player) return '将一张牌置于牌堆顶或是牌堆底';
var str='将一张牌交给'+get.translation(list); var str='将一张牌交给'+get.translation(list);
if(list.length>1) str+='中的一人'; if(list.length>1) str+='中的一人';
return str; return str;
@ -3192,22 +3187,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 4" "step 4"
event.index=result.index; event.index=result.index;
if(event.index==0||event.index==1){ if(event.index==0||event.index==1){
event.target.lose(event.card,ui.special); var next=event.target.lose(event.card,ui.cardPile);
game.broadcastAll(function(player){ if(event.index==0) next.insert_card=true;
game.broadcastAll(function(player){
var cardx=ui.create.card(); var cardx=ui.create.card();
cardx.classList.add('infohidden'); cardx.classList.add('infohidden');
cardx.classList.add('infoflip'); cardx.classList.add('infoflip');
player.$throw(cardx,1000,'nobroadcast'); player.$throw(cardx,1000,'nobroadcast');
},event.target); },event.target);
} }
else event.finish(); else event.finish();
"step 5" "step 5"
game.delay(); game.delay();
"step 6" "step 6"
event.card.fix();
if(event.index==1){ if(event.index==1){
game.log(event.target,'将获得的牌置于牌堆底'); game.log(event.target,'将获得的牌置于牌堆底');
ui.cardPile.appendChild(event.card);
if(ui.cardPile.childElementCount==1||player==event.target){ if(ui.cardPile.childElementCount==1||player==event.target){
player.draw(); player.draw();
} }
@ -3217,7 +3211,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
else if(event.index==0){ else if(event.index==0){
game.log(player,'将获得的牌置于牌堆顶'); game.log(player,'将获得的牌置于牌堆顶');
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
if(ui.cardPile.childElementCount==1||player==event.target){ if(ui.cardPile.childElementCount==1||player==event.target){
player.draw('bottom'); player.draw('bottom');
} }
@ -4931,16 +4924,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
check:function(card){ check:function(card){
return 8-get.value(card); return 8-get.value(card);
}, },
loseTo:'cardPile',
insert:true,
visible:true,
content:function(){ content:function(){
'step 0' 'step 0'
player.showCards(cards); player.showCards(cards);
'step 1' 'step 1'
cards[0].fix();
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
game.updateRoundNumber();
'step 2'
target.chooseToDiscard('he',true).set('prompt','请弃置一张锦囊牌,或依次弃置两张非锦囊牌。'); target.chooseToDiscard('he',true).set('prompt','请弃置一张锦囊牌,或依次弃置两张非锦囊牌。');
'step 3' 'step 2'
if((!result.cards||get.type(result.cards[0],'trick',result.cards[0].original=='h'?target:false)!='trick')&&target.countCards('he',function(card){ if((!result.cards||get.type(result.cards[0],'trick',result.cards[0].original=='h'?target:false)!='trick')&&target.countCards('he',function(card){
return get.type(card,'trick')!='trick'; return get.type(card,'trick')!='trick';
})){ })){
@ -6523,7 +6515,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 5' 'step 5'
if(result&&result.cards){ if(result&&result.cards){
event.card=result.cards[0]; event.card=result.cards[0];
target.lose(result.cards,ui.special); target.lose(result.cards,ui.cardPile,'insert');
game.log(target,'将',(get.position(event.card)=='h'?'一张牌':event.card),'置于牌堆顶'); game.log(target,'将',(get.position(event.card)=='h'?'一张牌':event.card),'置于牌堆顶');
game.broadcastAll(function(player){ game.broadcastAll(function(player){
var cardx=ui.create.card(); var cardx=ui.create.card();
@ -6532,15 +6524,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.$throw(cardx,1000,'nobroadcast'); player.$throw(cardx,1000,'nobroadcast');
},target); },target);
} }
else{
event.card=null;
}
'step 6'
if(event.card){
event.card.fix();
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
game.delay();
}
event.goto(3); event.goto(3);
}, },
}, },
@ -6625,7 +6608,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 4' 'step 4'
if(result&&result.cards){ if(result&&result.cards){
event.card=result.cards[0]; event.card=result.cards[0];
event.current.lose(result.cards,ui.special); event.current.lose(result.cards,ui.cardPile,'visible','insert');
game.broadcastAll(function(player){ game.broadcastAll(function(player){
var cardx=ui.create.card(); var cardx=ui.create.card();
cardx.classList.add('infohidden'); cardx.classList.add('infohidden');
@ -6638,11 +6621,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
'step 5' 'step 5'
if(event.current==game.me) game.delay(0.5); if(event.current==game.me) game.delay(0.5);
'step 6'
if(event.card){
event.card.fix();
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
}
event.goto(2); event.goto(2);
} }
}, },
@ -7212,13 +7190,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.log(player,'将',card,'置于牌堆顶'); game.log(player,'将',card,'置于牌堆顶');
event.result.card={name:event.result.card.name,nature:event.result.card.nature}; event.result.card={name:event.result.card.name,nature:event.result.card.nature};
event.result.cards=[]; event.result.cards=[];
player.lose(card,ui.special,'visible'); player.lose(card,ui.cardPile,'visible','insert');
'step 1' 'step 1'
game.delay(); game.delay();
'step 2'
event.card.fix();
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
game.updateRoundNumber();
}, },
} }
}, },
@ -10870,7 +10844,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname:['boss_lvbu3','re_heqi'], audioname:['boss_lvbu3','re_heqi'],
trigger:{ trigger:{
player:['loseAfter','phaseDiscardEnd'], player:['loseAfter','phaseDiscardEnd'],
global:['equipAfter','addJudgeAfter','gainAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter'],
}, },
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){

View File

@ -3746,6 +3746,7 @@ window.noname_asset_list=[
'image/character/xin_fuhuanghou.jpg', 'image/character/xin_fuhuanghou.jpg',
'image/character/xin_guohuai.jpg', 'image/character/xin_guohuai.jpg',
'image/character/xin_panzhangmazhong.jpg', 'image/character/xin_panzhangmazhong.jpg',
'image/character/mini_lvmeng.jpg',
'image/character/baiwuchang.jpg', 'image/character/baiwuchang.jpg',
'image/character/baosanniang.jpg', 'image/character/baosanniang.jpg',

View File

@ -12081,6 +12081,13 @@
} }
if(event.dialog&&event.dialog.close) event.dialog.close(); if(event.dialog&&event.dialog.close) event.dialog.close();
}, },
chooseToCompareLose:function(){
for(var i=0;i<event.lose_list.length;i++){
var next=event.lose_list[i][0].lose(event.lose_list[i][1],ui.ordering);
next.relatedEvent=event.getParent();
next.getlx=false;
}
},
chooseToCompareMultiple:function(){ chooseToCompareMultiple:function(){
"step 0" "step 0"
if(player.countCards('h')==0){ if(player.countCards('h')==0){
@ -12119,17 +12126,19 @@
} }
"step 2" "step 2"
var cards=[]; var cards=[];
var lose_list=[];
if(event.fixedResult&&event.fixedResult[player.playerid]){ if(event.fixedResult&&event.fixedResult[player.playerid]){
event.list.unshift(player); event.list.unshift(player);
result.unshift({bool:true,cards:[event.fixedResult[player.playerid]]}); result.unshift({bool:true,cards:[event.fixedResult[player.playerid]]});
lose_list.push([player,[event.fixedResult[player.playerid]]]);
} }
else{ else{
if(result[0].skill&&lib.skill[result[0].skill]&&lib.skill[result[0].skill].onCompare){ if(result[0].skill&&lib.skill[result[0].skill]&&lib.skill[result[0].skill].onCompare){
player.logSkill(result[0].skill); player.logSkill(result[0].skill);
result[0].cards=lib.skill[result[0].skill].onCompare(player) result[0].cards=lib.skill[result[0].skill].onCompare(player)
} }
else lose_list.push([player,result[0].cards]);
}; };
player.lose(result[0].cards,ui.ordering);
for(var j=0;j<targets.length;j++){ for(var j=0;j<targets.length;j++){
if(event.list.contains(targets[j])){ if(event.list.contains(targets[j])){
var i=event.list.indexOf(targets[j]); var i=event.list.indexOf(targets[j]);
@ -12137,14 +12146,19 @@
event.list[i].logSkill(result[i].skill); event.list[i].logSkill(result[i].skill);
result[i].cards=lib.skill[result[i].skill].onCompare(event.list[i]); result[i].cards=lib.skill[result[i].skill].onCompare(event.list[i]);
} }
event.list[i].lose(result[i].cards,ui.ordering); else lose_list.push([targets[j],result[i].cards]);
cards.push(result[i].cards[0]); cards.push(result[i].cards[0]);
} }
else if(event.fixedResult&&event.fixedResult[targets[j].playerid]){ else if(event.fixedResult&&event.fixedResult[targets[j].playerid]){
targets[j].lose(event.fixedResult[targets[j].playerid],ui.ordering);
cards.push(event.fixedResult[targets[j].playerid]); cards.push(event.fixedResult[targets[j].playerid]);
lose_list.push([targets[j],[event.fixedResult[targets[j].playerid]]]);
} }
} }
if(lose_list.length){
game.loseAsync({
lose_list:lose_list,
}).setContent('chooseToCompareLose');
}
event.cardlist=cards; event.cardlist=cards;
event.cards=cards; event.cards=cards;
event.card1=result[0].cards[0]; event.card1=result[0].cards[0];
@ -12231,6 +12245,7 @@
return; return;
} }
game.log(player,'对',target,'发起拼点'); game.log(player,'对',target,'发起拼点');
event.lose_list=[];
"step 1" "step 1"
var sendback=function(){ var sendback=function(){
if(_status.event!=event){ if(_status.event!=event){
@ -12239,7 +12254,10 @@
}; };
} }
}; };
if(event.fixedResult&&event.fixedResult[player.playerid]) event.card1=event.fixedResult[player.playerid]; if(event.fixedResult&&event.fixedResult[player.playerid]){
event.card1=event.fixedResult[player.playerid];
event.lose_list.push([player,event.card1]);
}
else if(player.isOnline()){ else if(player.isOnline()){
player.wait(sendback); player.wait(sendback);
event.ol=true; event.ol=true;
@ -12252,7 +12270,10 @@
event.localPlayer=true; event.localPlayer=true;
player.chooseCard('请选择拼点牌',true).set('type','compare').set('glow_result',true).ai=event.ai; player.chooseCard('请选择拼点牌',true).set('type','compare').set('glow_result',true).ai=event.ai;
} }
if(event.fixedResult&&event.fixedResult[target.playerid]) event.card2=event.fixedResult[target.playerid]; if(event.fixedResult&&event.fixedResult[target.playerid]){
event.card2=event.fixedResult[target.playerid];
event.lose_list.push([target,event.card2]);
}
else if(target.isOnline()){ else if(target.isOnline()){
target.wait(sendback); target.wait(sendback);
event.ol=true; event.ol=true;
@ -12270,6 +12291,7 @@
result.cards=lib.skill[result.skill].onCompare(player); result.cards=lib.skill[result.skill].onCompare(player);
player.logSkill(result.skill); player.logSkill(result.skill);
} }
else event.lose_list.push([player,result.cards[0]]);
event.card1=result.cards[0]; event.card1=result.cards[0];
} }
if(event.localTarget){ if(event.localTarget){
@ -12281,6 +12303,7 @@
target.logSkill(result.skill); target.logSkill(result.skill);
result.cards=lib.skill[result.skill].onCompare(target); result.cards=lib.skill[result.skill].onCompare(target);
} }
else event.lose_list.push([target,result.cards[0]]);
event.card2=result.cards[0]; event.card2=result.cards[0];
} }
if(!event.resultOL&&event.ol){ if(!event.resultOL&&event.ol){
@ -12293,13 +12316,15 @@
player.logSkill(event.resultOL[player.playerid].skill); player.logSkill(event.resultOL[player.playerid].skill);
event.resultOL[player.playerid].cards=lib.skill[event.resultOL[player.playerid].skill].onCompare(player); event.resultOL[player.playerid].cards=lib.skill[event.resultOL[player.playerid].skill].onCompare(player);
} }
event.card1=event.resultOL[player.playerid].cards[0] else event.lose_list.push([player,event.resultOL[player.playerid].cards[0]]);
event.card1=event.resultOL[player.playerid].cards[0];
}; };
if(!event.card2){ if(!event.card2){
if(event.resultOL[target.playerid].skill&&lib.skill[event.resultOL[target.playerid].skill]&&lib.skill[event.resultOL[target.playerid].skill].onCompare){ if(event.resultOL[target.playerid].skill&&lib.skill[event.resultOL[target.playerid].skill]&&lib.skill[event.resultOL[target.playerid].skill].onCompare){
target.logSkill(event.resultOL[target.playerid].skill); target.logSkill(event.resultOL[target.playerid].skill);
event.resultOL[target.playerid].cards=lib.skill[event.resultOL[target.playerid].skill].onCompare(player); event.resultOL[target.playerid].cards=lib.skill[event.resultOL[target.playerid].skill].onCompare(player);
} }
else event.lose_list.push([target,event.resultOL[target.playerid].cards[0]]);
event.card2=event.resultOL[target.playerid].cards[0]; event.card2=event.resultOL[target.playerid].cards[0];
} }
if(!event.card1||!event.card2){ if(!event.card1||!event.card2){
@ -12317,8 +12342,11 @@
event.addToAI=true; event.addToAI=true;
} }
} }
player.lose(event.card1,ui.ordering); if(event.lose_list.length){
target.lose(event.card2,ui.ordering); game.loseAsync({
lose_list:event.lose_list,
}).setContent('chooseToCompareLose');
}
"step 5" "step 5"
game.broadcast(function(){ game.broadcast(function(){
ui.arena.classList.add('thrownhighlight'); ui.arena.classList.add('thrownhighlight');
@ -14272,6 +14300,7 @@
var losecard=player.lose(cards,ui.special); var losecard=player.lose(cards,ui.special);
if(info.visible) losecard.visible=true; if(info.visible) losecard.visible=true;
if(info.loseTo) losecard.position=ui[info.loseTo]; if(info.loseTo) losecard.position=ui[info.loseTo];
if(info.insert) losecard.insert=true;
if(losecard.position==ui.special&&info.toStorage) losecard.toStorage=true; if(losecard.position==ui.special&&info.toStorage) losecard.toStorage=true;
} }
} }
@ -14602,31 +14631,42 @@
'step 0' 'step 0'
event.cards1=event.cards1||player.getCards('h'); event.cards1=event.cards1||player.getCards('h');
event.cards2=event.cards2||target.getCards('h'); event.cards2=event.cards2||target.getCards('h');
game.loseAsync({
player:player,
target:target,
cards1:event.cards1,
cards2:event.cards2,
}).setContent('swapHandcardsx');
'step 1'
player.gain(event.cards2);
target.gain(event.cards1);
},
swapHandcardsx:function(){
'step 0'
player.$giveAuto(event.cards1,target); player.$giveAuto(event.cards1,target);
target.$giveAuto(event.cards2,player); target.$giveAuto(event.cards2,player);
'step 1' 'step 1'
event.cards=event.cards1; event.cards=event.cards1;
var next=player.lose(event.cards,ui.ordering); var next=player.lose(event.cards,ui.ordering).getlx=false;
next.relatedEvent=event.getParent();
if(player==game.me){ if(player==game.me){
event.delayed=true; event.delayed=true;
} }
else{ else{
next.delay=false; next.delay=false;
} }
'step 1' 'step 2'
event.cards=event.cards2; event.cards=event.cards2;
var next=target.lose(event.cards,ui.ordering); var next=target.lose(event.cards,ui.ordering).getlx=false;
next.relatedEvent=event.getParent();
if(target==game.me){ if(target==game.me){
event.delayed=true; event.delayed=true;
} }
else{ else{
next.delay=false; next.delay=false;
} }
'step 2'
if(!event.delayed) game.delay();
'step 3' 'step 3'
player.gain(event.cards2); if(!event.delayed) game.delay();
target.gain(event.cards1);
}, },
gainMultiple:function(){ gainMultiple:function(){
'step 0' 'step 0'
@ -14808,6 +14848,7 @@
"step 0" "step 0"
var evt=event.getParent(); var evt=event.getParent();
if(evt.name!='discard'&&event.type!='discard') return; if(evt.name!='discard'&&event.type!='discard') return;
if(evt.delay===false) event.delay=false;
if(evt.animate!=false){ if(evt.animate!=false){
evt.discardid=lib.status.videoId++; evt.discardid=lib.status.videoId++;
game.broadcastAll(function(player,cards,id){ game.broadcastAll(function(player,cards,id){
@ -14848,6 +14889,7 @@
"step 1" "step 1"
event.gaintag_map={}; event.gaintag_map={};
var hs=[],es=[],js=[]; var hs=[],es=[],js=[];
if(event.insert_card&&event.position==ui.cardPile) event.cards.reverse();
var hej=player.getCards('hej'); var hej=player.getCards('hej');
event.stockcards=cards.slice(0); event.stockcards=cards.slice(0);
for(var i=0;i<cards.length;i++){ for(var i=0;i<cards.length;i++){
@ -14858,25 +14900,7 @@
cards[i].style.transform+=' scale(0.2)'; cards[i].style.transform+=' scale(0.2)';
cards[i].classList.remove('glow'); cards[i].classList.remove('glow');
cards[i].recheck(); cards[i].recheck();
var info=lib.card[cards[i].name];
if(info.destroy||cards[i]._destroy){
cards[i].delete();
cards[i].destroyed=info.destroy||cards[i]._destroy;
}
else if(event.position){
if(_status.discarded){
if(event.position==ui.discardPile){
_status.discarded.add(cards[i]);
}
else{
_status.discarded.remove(cards[i]);
}
}
cards[i].goto(event.position);
}
else{
cards[i].delete();
}
if(!hej.contains(cards[i])){ if(!hej.contains(cards[i])){
cards.splice(i--,1); cards.splice(i--,1);
} }
@ -14897,13 +14921,42 @@
cards[i].original=null; cards[i].original=null;
} }
} }
var info=lib.card[cards[i].name];
if(info.destroy||cards[i]._destroy){
cards[i].delete();
cards[i].destroyed=info.destroy||cards[i]._destroy;
}
else if(event.position){
if(_status.discarded){
if(event.position==ui.discardPile){
_status.discarded.add(cards[i]);
}
else{
_status.discarded.remove(cards[i]);
}
}
if(event.insert_card){
event.position.insertBefore(cards[i],event.position.firstChild);
cards[i].fix();
}
else if(event.position==ui.cardPile){
event.position.appendChild(cards[i]);
cards[i].fix();
}
else cards[i].goto(event.position);
}
else{
cards[i].remove();
}
} }
if(player==game.me) ui.updatehl(); if(player==game.me) ui.updatehl();
ui.updatej(player); ui.updatej(player);
game.broadcast(function(player,cards,num){ game.broadcast(function(player,cards,num){
for(var i=0;i<cards.length;i++){ for(var i=0;i<cards.length;i++){
cards[i].classList.remove('glow'); cards[i].classList.remove('glow');
cards[i].delete(); cards[i].fix();
cards[i].remove();
} }
if(player==game.me){ if(player==game.me){
ui.updatehl(); ui.updatehl();
@ -14919,7 +14972,7 @@
game.addVideo('loseAfter',player); game.addVideo('loseAfter',player);
event.num=0; event.num=0;
if(event.position==ui.ordering){ if(event.position==ui.ordering){
var evt=event.getParent(); var evt=event.relatedEvent||event.getParent();
if(!evt.orderingCards) evt.orderingCards=[]; if(!evt.orderingCards) evt.orderingCards=[];
if(!event.noOrdering&&!event.cardsOrdered){ if(!event.noOrdering&&!event.cardsOrdered){
event.cardsOrdered=true; event.cardsOrdered=true;
@ -14929,6 +14982,9 @@
} }
if(!event.noOrdering) evt.orderingCards.addArray(cards); if(!event.noOrdering) evt.orderingCards.addArray(cards);
} }
else if(event.position==ui.cardPile){
game.updateRoundNumber();
}
event.hs=hs; event.hs=hs;
event.es=es; event.es=es;
event.js=js; event.js=js;
@ -19352,6 +19408,9 @@
else if(arguments[i]=='visible'){ else if(arguments[i]=='visible'){
next.visible=true; next.visible=true;
} }
else if(arguments[i]=='insert'){
next.insert_card=true;
}
} }
if(next.cards){ if(next.cards){
var hej=this.getCards('hej'); var hej=this.getCards('hej');
@ -27225,6 +27284,34 @@
], ],
}; };
var game={ var game={
loseAsync:function(arg){
var next=game.createEvent('loseAsync');
next.getl=function(player){
var that=this;
var map={
player:player,
hs:[],
es:[],
js:[],
cards:[],
cards2:[],
};
player.getHistory('lose',function(evt){
if(evt.parent==that){
map.hs.addArray(evt.hs);
map.es.addArray(evt.es);
map.js.addArray(evt.js);
map.cards.addArray(evt.cards);
map.cards2.addArray(evt.cards2);
}
});
if(map.cards.length>0) return map;
};
if(arg&&get.is.object(arg)){
for(var i in arg) next[i]=arg[i];
}
return next;
},
getRarity:function(name){ getRarity:function(name){
var rank=lib.rank.rarity; var rank=lib.rank.rarity;
if(rank.legend.contains(name)) return 'legend'; if(rank.legend.contains(name)) return 'legend';
@ -29633,7 +29720,7 @@
for(var i=0;i<l1.length;i++){ for(var i=0;i<l1.length;i++){
for(var j=0;j<l2.length;j++){ for(var j=0;j<l2.length;j++){
if(l2[j].suit==l1[i][0]&&l2[j].number==l1[i][1]&&l2[j].name==l1[i][2]){ if(l2[j].suit==l1[i][0]&&l2[j].number==l1[i][1]&&l2[j].name==l1[i][2]){
l2[j].delete(); l2[j].remove();
l2.splice(j--,1); l2.splice(j--,1);
break; break;
} }
@ -44448,8 +44535,8 @@
} }
str+=(button.info[i].hour-12)+'点'; str+=(button.info[i].hour-12)+'点';
} }
//ui.create.div('','创建者:'+(button.info[i].nickname),eventnode); ui.create.div('','创建者:'+(button.info[i].nickname),eventnode);
ui.create.div('','创建者:'+(button.info[i].nickname)+'<br>ID'+button.info[i].creator,eventnode); //ui.create.div('','创建者:'+(button.info[i].nickname)+'<br>ID'+button.info[i].creator,eventnode);
ui.create.div('','已有'+(button.info[i].members.length)+'人加入',eventnode); ui.create.div('','已有'+(button.info[i].members.length)+'人加入',eventnode);
ui.create.div('','时间:'+str,eventnode); ui.create.div('','时间:'+str,eventnode);
if(button.info[i].members.contains(game.onlineKey)){ if(button.info[i].members.contains(game.onlineKey)){
@ -49909,7 +49996,7 @@
if(!lib.card[obj.name]) return; if(!lib.card[obj.name]) return;
return lib.card[obj.name].subtype; return lib.card[obj.name].subtype;
}, },
equiptype:function(card){ equiptype:function(card,player){
var subtype=get.subtype(card,player); var subtype=get.subtype(card,player);
if(subtype.indexOf('equip')==0) return parseInt(subtype[5]); if(subtype.indexOf('equip')==0) return parseInt(subtype[5]);
return 0; return 0;
@ -51063,7 +51150,7 @@
td.innerHTML=node.countCards('h'); td.innerHTML=node.countCards('h');
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML=node.stat.length-1; td.innerHTML=node.phaseNumber;
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td'); td=document.createElement('td');

View File

@ -1,9 +1,9 @@
window.noname_update={ window.noname_update={
version:'1.9.108.5.1', version:'1.9.108.6',
update:'1.9.108.5', update:'1.9.108.5.1',
changeLog:[ changeLog:[
'卢植、辛宪英技能调整', '微信小程序版神吕蒙',
'应变牌堆加入木牛流马', 'loseAsync式多人同步失去牌',
'bug修复', 'bug修复',
], ],
files:[ files:[
@ -17,26 +17,26 @@ window.noname_update={
//'card/standard.js', //'card/standard.js',
//'card/swd.js', //'card/swd.js',
//'card/yunchou.js', //'card/yunchou.js',
'card/yingbian.js', //'card/yingbian.js',
//'card/zhenfa.js', //'card/zhenfa.js',
//'card/zhulu.js', //'card/zhulu.js',
'character/diy.js', 'character/diy.js',
//'character/extra.js', 'character/extra.js',
//'character/hearth.js', //'character/hearth.js',
//'character/gujian.js', //'character/gujian.js',
//'character/gwent.js', //'character/gwent.js',
//'character/hearth.js', //'character/hearth.js',
'character/mobile.js', //'character/mobile.js',
//'character/mtg.js', //'character/mtg.js',
'character/old.js', //'character/old.js',
//'character/ow.js', //'character/ow.js',
'character/rank.js', 'character/rank.js',
//'character/refresh.js', 'character/refresh.js',
'character/shenhua.js', 'character/shenhua.js',
'character/sp.js', 'character/sp.js',
'character/sp2.js', 'character/sp2.js',
//'character/tw.js', //'character/tw.js',
//'character/standard.js', 'character/standard.js',
//'character/swd.js', //'character/swd.js',
//'character/xianjian.js', //'character/xianjian.js',
//'character/xinghuoliaoyuan.js', //'character/xinghuoliaoyuan.js',

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB