bugfix
This commit is contained in:
parent
de1f7b2073
commit
5980622620
|
@ -565,6 +565,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.chooseTarget(get.prompt2('dcmanzhi'),(card,player,target)=>{
|
||||
if(player==target) return false;
|
||||
return !player.hasSkill('dcmanzhi_1')&&target.countCards('he')||!player.hasSkill('dcmanzhi_2')&&target.countCards('hej');
|
||||
}).set('ai',target=>{
|
||||
return 1-get.attitude(get.player(),target);
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
|
|
|
@ -711,7 +711,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:'twjilun',
|
||||
inherit:'twjilun',
|
||||
filter:function(event,player){
|
||||
return player.hasSkill('twjichou');
|
||||
return player.hasSkill('twjichou',null,false,false);
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -815,6 +815,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return{
|
||||
type:result.control,
|
||||
audio:'twjiaohua',
|
||||
filterCard:()=>false,
|
||||
selectCard:-1,
|
||||
filterTarget:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
|
|
@ -2694,7 +2694,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.directHit.add(target);
|
||||
player.chooseToDuiben(target).set('title','谋弈').set('namelist',[
|
||||
'出阵迎战','拱卫中军','直取敌营','扰阵疲敌'
|
||||
]);
|
||||
]).set('ai',button=>{
|
||||
var source=get.event().getParent().player,target=get.event().getParent().target;
|
||||
if(!target.countCards('he')&&button.link[2]=='db_def2') return 10;
|
||||
if(!target.countCards('he')&&get.attitude(target,source)<=0&&button.link[2]=='db_atk1') return 10;
|
||||
return 1+Math.random();
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
if(result.player=='db_def1') player.gainPlayerCard(target,'he',true);
|
||||
|
@ -4696,7 +4701,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
locked:false,
|
||||
filter:function(event,player){
|
||||
return player.hasSkill('splveying')&&(get.type(event.card)=='trick'&&!get.tag(event.card,'damage'))&&player.countMark('splveying')>1;
|
||||
return player.hasSkill('splveying',null,false,false)&&(get.type(event.card)=='trick'&&!get.tag(event.card,'damage'))&&player.countMark('splveying')>1;
|
||||
},
|
||||
content:function(){
|
||||
player.removeMark('splveying',2);
|
||||
|
|
|
@ -1472,7 +1472,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.card.name!='sha'||!event.cards||event.cards.length!=1) return false;
|
||||
var evt=event.getParent('phaseUse');
|
||||
return evt&&evt.player==player&&player.getHistory('useCard',function(evt2){
|
||||
return evt2.card.name=='sha'&&evt.cards&&evt.cards.length==1&&evt2.getParent('phaseUse')==evt;
|
||||
return evt2.card.name=='sha'&&evt2.cards&&evt2.cards.length==1&&evt2.getParent('phaseUse')==evt;
|
||||
}).indexOf(event)==0;
|
||||
},
|
||||
content:function(){
|
||||
|
|
11
game/game.js
11
game/game.js
|
@ -8577,6 +8577,9 @@
|
|||
else src=`image/${type}/${subfolder}/${name}${ext}`;
|
||||
}
|
||||
else src=`image/${name}${ext}`;
|
||||
this.style.backgroundPositionX='center';
|
||||
this.style.backgroundSize='cover';
|
||||
if(type=='character'){
|
||||
new Promise((resolve,reject)=>{
|
||||
const image=new Image();
|
||||
image.src=`${lib.assetURL}${src}`;
|
||||
|
@ -8584,8 +8587,6 @@
|
|||
if(type=='character') image.onerror=reject;
|
||||
}).then(()=>{
|
||||
this.setBackgroundImage(src);
|
||||
this.style.backgroundPositionX='center';
|
||||
this.style.backgroundSize='cover';
|
||||
}).catch(()=>new Promise((resolve,reject)=>{
|
||||
const nameinfo=get.character(name);
|
||||
const sex=nameinfo[0];
|
||||
|
@ -8604,9 +8605,11 @@
|
|||
image.onerror=reject;
|
||||
})).then((src)=>{
|
||||
this.setBackgroundImage(src);
|
||||
this.style.backgroundPositionX='center';
|
||||
this.style.backgroundSize='cover';
|
||||
}));
|
||||
}
|
||||
else{
|
||||
this.setBackgroundImage(src);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue