Various fix.
This commit is contained in:
parent
5f4253867f
commit
5a20089ca5
|
@ -293,7 +293,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var info=get.info(skill);
|
var info=get.info(skill);
|
||||||
if(info.charlotte) return false;
|
if(info.charlotte) return false;
|
||||||
var translation=get.skillInfoTranslation(skill,event.player);
|
var translation=get.skillInfoTranslation(skill,event.player);
|
||||||
if(!translation||translation.match(/“?出牌阶段限一次/g).every(value=>value!='出牌阶段限一次')) return false;
|
if(!translation) return false;
|
||||||
|
var match=translation.match(/“?出牌阶段限一次/g);
|
||||||
|
if(!match||match.every(value=>value!='出牌阶段限一次')) return false;
|
||||||
return event.player.countCards('h')>0;
|
return event.player.countCards('h')>0;
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
|
|
|
@ -4019,13 +4019,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
jsrglinghua:{
|
jsrglinghua:{
|
||||||
audio:2,
|
audio:2,
|
||||||
locked:false,
|
|
||||||
mod:{
|
|
||||||
judge:(player,result)=>{
|
|
||||||
const parent=_status.event.getParent(2);
|
|
||||||
if(parent.name=='jsrglinghua'&&parent.triggername=='phaseJieshuBegin') result.bool=!result.bool;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger:{
|
trigger:{
|
||||||
player:['phaseZhunbeiBegin','phaseJieshuBegin'],
|
player:['phaseZhunbeiBegin','phaseJieshuBegin'],
|
||||||
},
|
},
|
||||||
|
@ -4048,7 +4041,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
event.executeDelayCardEffect=player.executeDelayCardEffect('shandian');
|
var next=event.executeDelayCardEffect=player.executeDelayCardEffect('shandian');
|
||||||
|
if(event.triggername!='phaseJieshuBegin') return;
|
||||||
|
next.judge=card=>-lib.card.shandian.judge(card)-4;
|
||||||
|
next.judge2=result=>!lib.card.shandian.judge2(result);
|
||||||
'step 1'
|
'step 1'
|
||||||
var executeDelayCardEffect=event.executeDelayCardEffect;
|
var executeDelayCardEffect=event.executeDelayCardEffect;
|
||||||
if(!player.hasHistory('damage',evt=>evt.getParent(2)==executeDelayCardEffect)){
|
if(!player.hasHistory('damage',evt=>evt.getParent(2)==executeDelayCardEffect)){
|
||||||
|
|
32
game/game.js
32
game/game.js
|
@ -11021,23 +11021,27 @@
|
||||||
event.nojudge=true;
|
event.nojudge=true;
|
||||||
}
|
}
|
||||||
'step 1'
|
'step 1'
|
||||||
if(!event.cancelled&&!event.nojudge) player.judge(card);
|
if(event.cancelled||event.nojudge) return;
|
||||||
|
var next=player.judge(card),judge=event.judge;
|
||||||
|
if(typeof judge=='function') next.judge=judge;
|
||||||
|
var judge2=event.judge2;
|
||||||
|
if(typeof judge2=='function') next.judge2=judge2;
|
||||||
'step 2'
|
'step 2'
|
||||||
if(event.excluded) delete event.excluded;
|
if(event.excluded) delete event.excluded;
|
||||||
else{
|
else{
|
||||||
const cardName=event.cardName;
|
var cardName=event.cardName;
|
||||||
if(event.cancelled&&!event.direct){
|
if(event.cancelled&&!event.direct){
|
||||||
const cardCancel=lib.card[cardName].cancel;
|
var cardCancel=lib.card[cardName].cancel;
|
||||||
if(cardCancel){
|
if(cardCancel){
|
||||||
const next=game.createEvent(`${cardName}Cancel`);
|
var next=game.createEvent(`${cardName}Cancel`);
|
||||||
next.setContent(cardCancel);
|
next.setContent(cardCancel);
|
||||||
next.cards=[card];
|
next.cards=[card];
|
||||||
if(!card.viewAs){
|
if(!card.viewAs){
|
||||||
const autoViewAs=next.card=get.autoViewAs(card);
|
var autoViewAs=next.card=get.autoViewAs(card);
|
||||||
autoViewAs.expired=card.expired;
|
autoViewAs.expired=card.expired;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
const autoViewAs=next.card=get.autoViewAs({
|
var autoViewAs=next.card=get.autoViewAs({
|
||||||
name:cardName
|
name:cardName
|
||||||
},next.cards);
|
},next.cards);
|
||||||
autoViewAs.expired=card.expired;
|
autoViewAs.expired=card.expired;
|
||||||
|
@ -11046,16 +11050,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
const next=game.createEvent(cardName);
|
var next=game.createEvent(cardName);
|
||||||
next.setContent(lib.card[cardName].effect);
|
next.setContent(lib.card[cardName].effect);
|
||||||
next._result=result;
|
next._result=result;
|
||||||
next.cards=[card];
|
next.cards=[card];
|
||||||
if(!card.viewAs){
|
if(!card.viewAs){
|
||||||
const autoViewAs=next.card=get.autoViewAs(card);
|
var autoViewAs=next.card=get.autoViewAs(card);
|
||||||
autoViewAs.expired=card.expired;
|
autoViewAs.expired=card.expired;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
const autoViewAs=next.card=get.autoViewAs({
|
var autoViewAs=next.card=get.autoViewAs({
|
||||||
name:cardName
|
name:cardName
|
||||||
},next.cards);
|
},next.cards);
|
||||||
autoViewAs.expired=card.expired;
|
autoViewAs.expired=card.expired;
|
||||||
|
@ -18943,7 +18947,7 @@
|
||||||
},
|
},
|
||||||
//Execute the delay card effect
|
//Execute the delay card effect
|
||||||
//执行延时锦囊牌效果
|
//执行延时锦囊牌效果
|
||||||
executeDelayCardEffect:function(card,target){
|
executeDelayCardEffect:function(card,target,judge,judge2){
|
||||||
const executeDelayCardEffect=game.createEvent('executeDelayCardEffect');
|
const executeDelayCardEffect=game.createEvent('executeDelayCardEffect');
|
||||||
executeDelayCardEffect.player=this;
|
executeDelayCardEffect.player=this;
|
||||||
executeDelayCardEffect.target=target||this;
|
executeDelayCardEffect.target=target||this;
|
||||||
|
@ -18956,6 +18960,8 @@
|
||||||
}
|
}
|
||||||
else if(get.itemtype(card)=='card') executeDelayCardEffect.card=card;
|
else if(get.itemtype(card)=='card') executeDelayCardEffect.card=card;
|
||||||
else _status.event.next.remove(executeDelayCardEffect);
|
else _status.event.next.remove(executeDelayCardEffect);
|
||||||
|
executeDelayCardEffect.judge=judge;
|
||||||
|
executeDelayCardEffect.judge2=judge2;
|
||||||
executeDelayCardEffect.setContent('executeDelayCardEffect');
|
executeDelayCardEffect.setContent('executeDelayCardEffect');
|
||||||
executeDelayCardEffect._args=Array.from(arguments);
|
executeDelayCardEffect._args=Array.from(arguments);
|
||||||
return executeDelayCardEffect;
|
return executeDelayCardEffect;
|
||||||
|
@ -28142,14 +28148,14 @@
|
||||||
if(this.player&&lib.phaseName.contains(this.name)) this.player.getHistory('skipped').add(this.name)}
|
if(this.player&&lib.phaseName.contains(this.name)) this.player.getHistory('skipped').add(this.name)}
|
||||||
},
|
},
|
||||||
neutralize:function(event){
|
neutralize:function(event){
|
||||||
this.untrigger(true);
|
this.untrigger();
|
||||||
this.finish();
|
this.finish();
|
||||||
this._neutralized=true;
|
this._neutralized=true;
|
||||||
this.trigger('eventNeutralized');
|
this.trigger('eventNeutralized');
|
||||||
this._neutralize_event=event||_status.event;
|
this._neutralize_event=event||_status.event;
|
||||||
},
|
},
|
||||||
unneutralize:function(){
|
unneutralize:function(){
|
||||||
this.untrigger(true);
|
this.untrigger();
|
||||||
delete this._neutralized;
|
delete this._neutralized;
|
||||||
delete this.finished;
|
delete this.finished;
|
||||||
if(this.type=='card'&&this.card&&this.name=='sha') this.directHit=true;
|
if(this.type=='card'&&this.card&&this.name=='sha') this.directHit=true;
|
||||||
|
@ -35463,7 +35469,7 @@
|
||||||
linexy:function(path){
|
linexy:function(path){
|
||||||
const from=[path[0],path[1]],to=[path[2],path[3]];
|
const from=[path[0],path[1]],to=[path[2],path[3]];
|
||||||
let total=typeof arguments[1]==='number'?arguments[1]:lib.config.duration*2,opacity=1,color=[255,255,255],dashed=false,drag=false;
|
let total=typeof arguments[1]==='number'?arguments[1]:lib.config.duration*2,opacity=1,color=[255,255,255],dashed=false,drag=false;
|
||||||
if(arguments[1]!=null&&typeof arguments[1]=='object') Object.keys(arguments[1]).forEach(value=>{
|
if(arguments[1]&&typeof arguments[1]=='object') Object.keys(arguments[1]).forEach(value=>{
|
||||||
switch(value){
|
switch(value){
|
||||||
case 'opacity':
|
case 'opacity':
|
||||||
opacity=arguments[1][value];
|
opacity=arguments[1][value];
|
||||||
|
|
Loading…
Reference in New Issue