This commit is contained in:
parent
7d5ee9619e
commit
1ff223bc03
|
@ -1576,24 +1576,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'shaMiss'},
|
||||
silent:true,
|
||||
onremove:true,
|
||||
init:function(player){
|
||||
if(!player.storage.fangtian_guozhan_trigger){
|
||||
player.storage.fangtian_guozhan_trigger=[];
|
||||
}
|
||||
},
|
||||
content:function(){
|
||||
player.storage.fangtian_guozhan_trigger.add(trigger.card);
|
||||
},
|
||||
group:['fangtian_guozhan_cancel','fangtian_guozhan_remove']
|
||||
},
|
||||
fangtian_guozhan_cancel:{
|
||||
trigger:{player:'shaBefore'},
|
||||
silent:true,
|
||||
filter:function(event,player){
|
||||
return player.storage.fangtian_guozhan_trigger&&player.storage.fangtian_guozhan_trigger.contains(event.card);
|
||||
},
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
trigger.getParent().excluded.addArray(trigger.getParent().targets);
|
||||
}
|
||||
},
|
||||
fangtian_guozhan_remove:{
|
||||
|
@ -1806,6 +1790,25 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
next.nouse=true;
|
||||
}
|
||||
};
|
||||
event.settle=function(){
|
||||
if(!event.state){
|
||||
if(event.triggername=='phaseJudge'){
|
||||
trigger.untrigger();
|
||||
trigger.cancelled=true;
|
||||
}
|
||||
else{
|
||||
trigger.cancel();
|
||||
if(get.mode()=='guozhan'&&get.itemtype(event.statecard)=='card'&&event.statecard.hasTag('guo')){
|
||||
if(trigger.target.identity!='ye'&&trigger.target.identity!='unknown'){
|
||||
trigger.getParent().excluded.addArray(game.filterPlayer(function(current){
|
||||
return current.identity==trigger.target.identity;
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
event.finish();
|
||||
};
|
||||
'step 1'
|
||||
var list=game.filterPlayer(function(current){
|
||||
if(event.triggername=='phaseJudge'){
|
||||
|
@ -1825,16 +1828,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
'step 2'
|
||||
if(event.list.length==0){
|
||||
event.finish();
|
||||
if(!event.state){
|
||||
if(event.triggername=='phaseJudge'){
|
||||
trigger.untrigger();
|
||||
trigger.cancelled=true;
|
||||
}
|
||||
else{
|
||||
trigger.cancel();
|
||||
}
|
||||
}
|
||||
event.settle();
|
||||
}
|
||||
else if(_status.connectMode&&(event.list[0].isOnline()||event.list[0]==game.me)){
|
||||
event.goto(4);
|
||||
|
@ -1930,6 +1924,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
'step 9'
|
||||
if(event.wuxieresult){
|
||||
if(result=='wuxied'){
|
||||
if(!event.statecard){
|
||||
if(event.wuxieresult2&&event.wuxieresult2.used){
|
||||
event.statecard=event.wuxieresult2.used;
|
||||
}
|
||||
else{
|
||||
event.statecard=true;
|
||||
}
|
||||
}
|
||||
event.state=!event.state;
|
||||
}
|
||||
event.goto(1);
|
||||
|
@ -1938,15 +1940,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
event.goto(2);
|
||||
}
|
||||
else{
|
||||
if(!event.state){
|
||||
if(event.triggername=='phaseJudge'){
|
||||
trigger.untrigger();
|
||||
trigger.cancelled=true;
|
||||
}
|
||||
else{
|
||||
trigger.cancel();
|
||||
}
|
||||
}
|
||||
event.settle();
|
||||
}
|
||||
delete event.resultOL;
|
||||
delete event.wuxieresult;
|
||||
|
|
48
game/game.js
48
game/game.js
|
@ -12142,6 +12142,19 @@
|
|||
if(event.animate!=false){
|
||||
if((card.name=='wuxie'||card.name=='youdishenru')&&event.getParent().source){
|
||||
var lining=event.getParent().sourcex||event.getParent().source2||event.getParent().source;
|
||||
if(get.mode()=='guozhan'&&card.hasTag&&card.hasTag('guo')){
|
||||
if(!Array.isArray(lining)){
|
||||
lining=[lining];
|
||||
}
|
||||
if(lining.length){
|
||||
lining.addArray(game.filterPlayer(function(current){
|
||||
return current.sameIdentityAs(lining[0],true);
|
||||
}));
|
||||
}
|
||||
if(lining.length==1){
|
||||
lining=lining[0];
|
||||
}
|
||||
}
|
||||
if(lining==player&&event.getParent().sourcex2){
|
||||
lining=event.getParent().sourcex2;
|
||||
}
|
||||
|
@ -12188,6 +12201,7 @@
|
|||
if(event.oncard){
|
||||
event.oncard(event.card,event.player);
|
||||
}
|
||||
event.excluded=[];
|
||||
event.trigger('useCard');
|
||||
event._oncancel=function(){
|
||||
game.broadcastAll(function(id){
|
||||
|
@ -12279,6 +12293,7 @@
|
|||
if(targets[num]&&targets[num].isDead()) return;
|
||||
if(targets[num]&&targets[num].isOut()) return;
|
||||
if(targets[num]&&targets[num].removed) return;
|
||||
if(targets[num]&&event.excluded.contains(targets[num])) return;
|
||||
var info=get.info(card);
|
||||
if(targets.length==0&&!info.notarget) return;
|
||||
var next=game.createEvent(card.name);
|
||||
|
@ -20736,6 +20751,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
hasTag:function(tag){
|
||||
if(this.cardid&&_status.cardtag&&_status.cardtag[tag]&&_status.cardtag[tag].contains(this.cardid)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
hasPosition:function(){
|
||||
return ['h','e','j'].contains(get.position(this));
|
||||
},
|
||||
|
@ -44911,14 +44932,27 @@
|
|||
str2='雷'+str2;
|
||||
}
|
||||
}
|
||||
if(get.itemtype(str)=='card'&&str.suit&&str.number){
|
||||
if(arg=='viewAs'&&str.viewAs!=str.name&&str.viewAs){
|
||||
str2+='('+get.translation(str)+')';
|
||||
if(get.itemtype(str)=='card'){
|
||||
if(_status.cardtag&&str.cardid){
|
||||
var tagstr='';
|
||||
for(var i in _status.cardtag){
|
||||
if(_status.cardtag[i].contains(str.cardid)){
|
||||
tagstr+=lib.translate[i+'_tag'];
|
||||
}
|
||||
}
|
||||
if(tagstr){
|
||||
str2+='·'+tagstr;
|
||||
}
|
||||
}
|
||||
else{
|
||||
str2+='【'+get.translation(str.suit)+str.number+'】';
|
||||
// var len=str2.length-1;
|
||||
// str2=str2.slice(0,len)+'<span style="letter-spacing: -2px">'+str2[len]+'·</span>'+get.translation(str.suit)+str.number;
|
||||
if(str.suit&&str.number){
|
||||
if(arg=='viewAs'&&str.viewAs!=str.name&&str.viewAs){
|
||||
str2+='('+get.translation(str)+')';
|
||||
}
|
||||
else{
|
||||
str2+='【'+get.translation(str.suit)+str.number+'】';
|
||||
// var len=str2.length-1;
|
||||
// str2=str2.slice(0,len)+'<span style="letter-spacing: -2px">'+str2[len]+'·</span>'+get.translation(str.suit)+str.number;
|
||||
}
|
||||
}
|
||||
}
|
||||
return str2;
|
||||
|
|
|
@ -126,7 +126,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
"step 2"
|
||||
game.broadcast(function(cardtag){
|
||||
_status.cardtag=cardtag;
|
||||
console.log(ui.cardPile,lib.cardOL,cardtag)
|
||||
},_status.cardtag);
|
||||
if(ui.coin){
|
||||
_status.coinCoeff=get.coinCoeff([game.me.name1,game.me.name2]);
|
||||
|
@ -295,11 +294,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
prompt:'将可连横的牌交给一名与你势力不同的角色,或未确定势力的角色,若你交给与你势力不同的角色,则你摸一张牌',
|
||||
filter:function(event,player){
|
||||
return (player.getCards('h',function(card){
|
||||
return _status.cardtag.lianheng.contains(card.cardid);
|
||||
return card.hasTag('lianheng');
|
||||
}).length);
|
||||
},
|
||||
filterCard:function(card){
|
||||
return _status.cardtag.lianheng.contains(card.cardid);
|
||||
return card.hasTag('lianheng');
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
if(target==player) return false;
|
||||
|
@ -4520,17 +4519,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return this.identity!=target.identity;
|
||||
},
|
||||
sameIdentityAs:function(target){
|
||||
if(this==target) return true;
|
||||
if(target.identity=='unknown'||target.identity=='ye'||this.identity=='ye') return false;
|
||||
if(this.identity=='unknown'){
|
||||
var identity=lib.character[this.name1][1];
|
||||
if(this.wontYe()) return identity==target.identity;
|
||||
return false;
|
||||
sameIdentityAs:function(target,shown){
|
||||
if(shown){
|
||||
if(this.identity=='ye'||this.identity=='unknown') return false;
|
||||
}
|
||||
else{
|
||||
return this.identity==target.identity;
|
||||
if(this==target) return true;
|
||||
if(target.identity=='unknown'||target.identity=='ye'||this.identity=='ye') return false;
|
||||
if(this.identity=='unknown'){
|
||||
var identity=lib.character[this.name1][1];
|
||||
if(this.wontYe()) return identity==target.identity;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return this.identity==target.identity;
|
||||
},
|
||||
getModeState:function(){
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue