This commit is contained in:
parent
8193253aeb
commit
2242a16fb6
65
game/game.js
65
game/game.js
|
@ -11793,11 +11793,8 @@
|
||||||
next.targets=[];
|
next.targets=[];
|
||||||
}
|
}
|
||||||
if(next.card){
|
if(next.card){
|
||||||
|
next.card=get.autoViewAs(next.card,false);
|
||||||
var info=get.info(next.card);
|
var info=get.info(next.card);
|
||||||
if(info.autoViewAs){
|
|
||||||
next.card={name:info.autoViewAs};
|
|
||||||
info=get.info(next.card);
|
|
||||||
}
|
|
||||||
if(info.changeTarget){
|
if(info.changeTarget){
|
||||||
info.changeTarget(next.player,next.targets);
|
info.changeTarget(next.player,next.targets);
|
||||||
}
|
}
|
||||||
|
@ -11958,10 +11955,7 @@
|
||||||
if(next.cards){
|
if(next.cards){
|
||||||
next.card=next.cards[0];
|
next.card=next.cards[0];
|
||||||
if(!next.skill){
|
if(!next.skill){
|
||||||
var info=get.info(next.card);
|
next.card=get.autoViewAs(next.card);
|
||||||
if(info.autoViewAs){
|
|
||||||
next.card={name:info.autoViewAs,suit:next.card.suit,number:next.card.number};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13359,10 +13353,7 @@
|
||||||
if(typeof card=='string'){
|
if(typeof card=='string'){
|
||||||
card={name:card};
|
card={name:card};
|
||||||
}
|
}
|
||||||
var info=get.info(card);
|
card=get.autoViewAs(card);
|
||||||
if(info.autoViewAs){
|
|
||||||
card={name:info.autoViewAs,suit:card.suit,number:card.number};
|
|
||||||
}
|
|
||||||
var num=get.info(card).usable;
|
var num=get.info(card).usable;
|
||||||
if(typeof num=='function') num=num(card,player);
|
if(typeof num=='function') num=num(card,player);
|
||||||
num=game.checkMod(card,player,num,'cardUsable',player.get('s'));
|
num=game.checkMod(card,player,num,'cardUsable',player.get('s'));
|
||||||
|
@ -16143,10 +16134,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cardEnabled:function(card,player,event){
|
cardEnabled:function(card,player,event){
|
||||||
var info=get.info(card);
|
card=get.autoViewAs(card);
|
||||||
if(info.autoViewAs){
|
|
||||||
card={name:info.autoViewAs,suit:card.suit,number:card.number};
|
|
||||||
}
|
|
||||||
if(player==undefined) player=_status.event.player;
|
if(player==undefined) player=_status.event.player;
|
||||||
var filter=get.info(card).enable;
|
var filter=get.info(card).enable;
|
||||||
if(!filter) return;
|
if(!filter) return;
|
||||||
|
@ -16163,10 +16151,7 @@
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
cardUsable:function(card,player,event){
|
cardUsable:function(card,player,event){
|
||||||
var info=get.info(card);
|
card=get.autoViewAs(card);
|
||||||
if(info.autoViewAs){
|
|
||||||
card={name:info.autoViewAs,suit:card.suit,number:card.number};
|
|
||||||
}
|
|
||||||
if(player!=_status.event.player) return true;
|
if(player!=_status.event.player) return true;
|
||||||
event=event||_status.event;
|
event=event||_status.event;
|
||||||
if(event.getParent().name!='phaseUse') return true;
|
if(event.getParent().name!='phaseUse') return true;
|
||||||
|
@ -35189,6 +35174,37 @@
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
autoViewAs:function(card,cards){
|
||||||
|
var info=get.info(card);
|
||||||
|
if(info.autoViewAs){
|
||||||
|
if(cards===false){
|
||||||
|
return {
|
||||||
|
name:info.autoViewAs
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if(Array.isArray(cards)){
|
||||||
|
return {
|
||||||
|
name:info.autoViewAs,
|
||||||
|
cards:cards.slice(0)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if(get.itemtype(card)=='card'){
|
||||||
|
return {
|
||||||
|
name:info.autoViewAs,
|
||||||
|
cards:[card]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return {
|
||||||
|
name:info.autoViewAs,
|
||||||
|
suit:card.suit,
|
||||||
|
number:card.number,
|
||||||
|
nature:card.nature
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return card;
|
||||||
|
},
|
||||||
characterIntro:function(name){
|
characterIntro:function(name){
|
||||||
if(lib.characterIntro[name]) return lib.characterIntro[name];
|
if(lib.characterIntro[name]) return lib.characterIntro[name];
|
||||||
var tags=lib.character[name][4];
|
var tags=lib.character[name][4];
|
||||||
|
@ -36173,9 +36189,7 @@
|
||||||
if(_status.event.skill){
|
if(_status.event.skill){
|
||||||
var card=get.info(_status.event.skill).viewAs;
|
var card=get.info(_status.event.skill).viewAs;
|
||||||
if(card){
|
if(card){
|
||||||
card=get.copy(card);
|
return get.autoViewAs(card);
|
||||||
card.cards=ui.selected.cards.slice(0);
|
|
||||||
return card;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(_status.event._get_card){
|
if(_status.event._get_card){
|
||||||
|
@ -36184,10 +36198,7 @@
|
||||||
var card=ui.selected.cards[0];
|
var card=ui.selected.cards[0];
|
||||||
if(original) return card;
|
if(original) return card;
|
||||||
if(card){
|
if(card){
|
||||||
var info=get.info(card);
|
card=get.autoViewAs(card,ui.selected.cards);
|
||||||
if(info.autoViewAs){
|
|
||||||
card={name:info.autoViewAs,cards:ui.selected.cards.slice(0)};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return card;
|
return card;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue