Merge pull request #622 from copcap/dev-pic

bugfix;原画补充
This commit is contained in:
Spmario233 2023-11-11 23:39:10 +08:00 committed by GitHub
commit 704962ef28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 49 additions and 35 deletions

View File

@ -820,6 +820,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseTarget(get.prompt2('dcmanzhi'),(card,player,target)=>{ player.chooseTarget(get.prompt2('dcmanzhi'),(card,player,target)=>{
if(player==target) return false; if(player==target) return false;
return !player.hasSkill('dcmanzhi_1')&&target.countCards('he')||!player.hasSkill('dcmanzhi_2')&&target.countCards('hej'); 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' 'step 1'
if(result.bool){ if(result.bool){
@ -1991,7 +1993,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.useCard({name:'sha',isCard:true},trigger.player,false).set('shanReq',num).set('oncard',card=>{ player.useCard({name:'sha',isCard:true},trigger.player,false).set('shanReq',num).set('oncard',card=>{
var evt=_status.event; var evt=_status.event;
evt.baseDamage++; evt.baseDamage++;
for(var target of evt.targets){ for(var target of game.filterPlayer(null,null,true)){
var id=target.playerid; var id=target.playerid;
var map=evt.customArgs; var map=evt.customArgs;
if(!map[id]) map[id]={}; if(!map[id]) map[id]={};

View File

@ -711,7 +711,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'twjilun', audio:'twjilun',
inherit:'twjilun', inherit:'twjilun',
filter:function(event,player){ filter:function(event,player){
return player.hasSkill('twjichou'); return player.hasSkill('twjichou',null,false,false);
}, },
content:function(){ content:function(){
'step 0' 'step 0'
@ -815,6 +815,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return{ return{
type:result.control, type:result.control,
audio:'twjiaohua', audio:'twjiaohua',
filterCard:()=>false,
selectCard:-1,
filterTarget:true, filterTarget:true,
content:function(){ content:function(){
'step 0' 'step 0'

View File

@ -2694,7 +2694,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.directHit.add(target); trigger.directHit.add(target);
player.chooseToDuiben(target).set('title','谋弈').set('namelist',[ 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' 'step 1'
if(result.bool){ if(result.bool){
if(result.player=='db_def1') player.gainPlayerCard(target,'he',true); 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, forced:true,
locked:false, locked:false,
filter:function(event,player){ 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(){ content:function(){
player.removeMark('splveying',2); player.removeMark('splveying',2);

View File

@ -85,7 +85,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
shanReq:cards.length, shanReq:cards.length,
oncard:()=>{ oncard:()=>{
var evt=get.event(); var evt=get.event();
for(var target of evt.targets){ for(var target of game.filterPlayer(null,null,true)){
var id=target.playerid; var id=target.playerid;
var map=evt.customArgs; var map=evt.customArgs;
if(!map[id]) map[id]={}; if(!map[id]) map[id]={};
@ -152,8 +152,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!evt._olchuming) return; if(!evt._olchuming) return;
var target=evt[evt.source==player?'player':'source']; var target=evt[evt.source==player?'player':'source'];
if(!target.isIn()) return; if(!target.isIn()) return;
var cards=evt.cards.filterInD('d');
if(!cards.length) return;
if(!mapx[target.playerid]) mapx[target.playerid]=[]; if(!mapx[target.playerid]) mapx[target.playerid]=[];
mapx[target.playerid].addArray(evt.cards.filterInD('d')); mapx[target.playerid].addArray(cards);
}); });
var entries=Object.entries(mapx).map(entry=>{ var entries=Object.entries(mapx).map(entry=>{
return [(_status.connectMode?lib.playerOL:game.playerMap)[entry[0]],entry[1]]; return [(_status.connectMode?lib.playerOL:game.playerMap)[entry[0]],entry[1]];

View File

@ -8583,6 +8583,9 @@
else src=`image/${type}/${subfolder}/${name}${ext}`; else src=`image/${type}/${subfolder}/${name}${ext}`;
} }
else src=`image/${name}${ext}`; else src=`image/${name}${ext}`;
this.style.backgroundPositionX='center';
this.style.backgroundSize='cover';
if(type=='character'){
new Promise((resolve,reject)=>{ new Promise((resolve,reject)=>{
const image=new Image(); const image=new Image();
image.src=`${lib.assetURL}${src}`; image.src=`${lib.assetURL}${src}`;
@ -8590,8 +8593,6 @@
if(type=='character') image.onerror=reject; if(type=='character') image.onerror=reject;
}).then(()=>{ }).then(()=>{
this.setBackgroundImage(src); this.setBackgroundImage(src);
this.style.backgroundPositionX='center';
this.style.backgroundSize='cover';
}).catch(()=>new Promise((resolve,reject)=>{ }).catch(()=>new Promise((resolve,reject)=>{
const nameinfo=get.character(name); const nameinfo=get.character(name);
const sex=nameinfo[0]; const sex=nameinfo[0];
@ -8610,9 +8611,11 @@
image.onerror=reject; image.onerror=reject;
})).then((src)=>{ })).then((src)=>{
this.setBackgroundImage(src); this.setBackgroundImage(src);
this.style.backgroundPositionX='center';
this.style.backgroundSize='cover';
})); }));
}
else{
this.setBackgroundImage(src);
}
return this; return this;
} }
}); });

BIN
image/character/laimin.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
image/character/liwei.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB