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)=>{
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){
@ -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=>{
var evt=_status.event;
evt.baseDamage++;
for(var target of evt.targets){
for(var target of game.filterPlayer(null,null,true)){
var id=target.playerid;
var map=evt.customArgs;
if(!map[id]) map[id]={};

View File

@ -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'

View File

@ -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);

View File

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

View File

@ -8583,36 +8583,39 @@
else src=`image/${type}/${subfolder}/${name}${ext}`;
}
else src=`image/${name}${ext}`;
new Promise((resolve,reject)=>{
const image=new Image();
image.src=`${lib.assetURL}${src}`;
image.onload=resolve;
if(type=='character') image.onerror=reject;
}).then(()=>{
this.style.backgroundPositionX='center';
this.style.backgroundSize='cover';
if(type=='character'){
new Promise((resolve,reject)=>{
const image=new Image();
image.src=`${lib.assetURL}${src}`;
image.onload=resolve;
if(type=='character') image.onerror=reject;
}).then(()=>{
this.setBackgroundImage(src);
}).catch(()=>new Promise((resolve,reject)=>{
const nameinfo=get.character(name);
const sex=nameinfo[0];
src=`image/character/default_silhouette_${sex}${ext}`;
const image=new Image();
image.src=`${lib.assetURL}${src}`;
image.onload=()=>resolve(src);
image.onerror=reject;
}).catch(()=>new Promise((resolve,reject)=>{
const nameinfo=get.character(name);
const sex=nameinfo[0];
src=`image/character/default_silhouette_${sex=='female'?'female':'male'}${ext}`;
const image=new Image();
image.src=`${lib.assetURL}${src}`;
image.onload=()=>resolve(src);
image.onerror=reject;
})).then((src)=>{
this.setBackgroundImage(src);
}));
}
else{
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];
src=`image/character/default_silhouette_${sex}${ext}`;
const image=new Image();
image.src=`${lib.assetURL}${src}`;
image.onload=()=>resolve(src);
image.onerror=reject;
}).catch(()=>new Promise((resolve,reject)=>{
const nameinfo=get.character(name);
const sex=nameinfo[0];
src=`image/character/default_silhouette_${sex=='female'?'female':'male'}${ext}`;
const image=new Image();
image.src=`${lib.assetURL}${src}`;
image.onload=()=>resolve(src);
image.onerror=reject;
})).then((src)=>{
this.setBackgroundImage(src);
this.style.backgroundPositionX='center';
this.style.backgroundSize='cover';
}));
}
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