Merge pull request #1046 from mengxinzxz/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-03-09 16:09:19 +08:00 committed by GitHub
commit 5776a6b1fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 41 additions and 91 deletions

View File

@ -6835,17 +6835,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
prompt:'将♦牌当做杀,♥牌当做桃,♣牌当做闪,♠牌当做无懈可击使用或打出',
//动态的viewAs
viewAs(cards,player){
var name=false;
var nature=null;
//根据选择的卡牌的花色 判断要转化出的卡牌是闪还是火杀还是无懈还是桃
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
if(cards.length){
var name=false,nature=null;
//根据选择的卡牌的花色 判断要转化出的卡牌是闪还是火杀还是无懈还是桃
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
}
//返回判断结果
if(name) return {name:name,nature:nature};
}
//返回判断结果
if(name) return {name:name,nature:nature};
return null;
},
//AI选牌思路
@ -6996,15 +6997,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:['chooseToUse','chooseToRespond'],
prompt:'将♦手牌当做火【杀】,♥手牌当做【桃】,♣手牌当做【闪】,♠手牌当做【无懈可击】使用或打出',
viewAs(cards,player){
var name=false;
var nature=null;
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
if(cards.length){
var name=false,nature=null;
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
}
if(name) return {name:name,nature:nature};
}
if(name) return {name:name,nature:nature};
return null;
},
check(card){

View File

@ -8698,14 +8698,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
position:'hs',
prompt:'将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出',
viewAs:function(cards,player){
var name=false;
switch(get.name(cards[0],player)){
case 'sha':name='shan';break;
case 'shan':name='sha';break;
case 'tao':name='jiu';break;
case 'jiu':name='tao';break;
if(cards.length){
var name=false;
switch(get.name(cards[0],player)){
case 'sha':name='shan';break;
case 'shan':name='sha';break;
case 'tao':name='jiu';break;
case 'jiu':name='tao';break;
}
if(name) return {name:name};
}
if(name) return {name:name};
return null;
},
check:function(card){

View File

@ -5790,13 +5790,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
for(var i=0;i<lib.inpile.length;i++){
var name=lib.inpile[i];
if(name=='sha'){
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
if(event.filterCard(get.autoViewAs({name:name},'unsure'),player,event)) list.push(['基本','','sha']);
for(var nature of lib.inpile_nature){
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
if(event.filterCard(get.autoViewAs({name:name,nature:nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
}
}
else if(get.type2(name)=='trick'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['锦囊','',name]);
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
else if(get.type2(name)=='trick'&&event.filterCard(get.autoViewAs({name:name},'unsure'),player,event)) list.push(['锦囊','',name]);
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name:name},'unsure'),player,event)) list.push(['基本','',name]);
}
return ui.create.dialog('灭吴',[list,'vcard']);
},

View File

@ -18212,60 +18212,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
sha:{
audio:'fanghun',
inherit:'ollongdan',
enable:['chooseToUse','chooseToRespond'],
prompt:'弃置一枚【梅影】标记,将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出',
viewAs:function(cards,player){
var name=false;
switch(get.name(cards[0],player)){
case 'sha':name='shan';break;
case 'shan':name='sha';break;
case 'tao':name='jiu';break;
case 'jiu':name='tao';break;
}
if(name) return {name:name};
return null;
},
position:'hs',
check:function(card){
var player=_status.event.player;
if(_status.event.type=='phase'){
var max=0;
var name2;
var list=['sha','tao','jiu'];
var map={sha:'shan',tao:'jiu',jiu:'tao'}
for(var i=0;i<list.length;i++){
var name=list[i];
if(player.countCards('hs',map[name])>(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){
var temp=get.order({name:name});
if(temp>max){
max=temp;
name2=map[name];
}
}
}
if(name2==get.name(card,player)) return 1;
return 0;
}
return 1;
},
filterCard:function(card,player,event){
event=event||_status.event;
var filter=event._backup.filterCard;
var name=get.name(card,player);
if(name=='sha'&&filter({name:'shan',cards:[card]},player,event)) return true;
if(name=='shan'&&filter({name:'sha',cards:[card]},player,event)) return true;
if(name=='tao'&&filter({name:'jiu',cards:[card]},player,event)) return true;
if(name=='jiu'&&filter({name:'tao',cards:[card]},player,event)) return true;
return false;
},
filter:function(event,player){
if(!player.storage.fanghun||player.storage.fanghun<=0) return false;
var filter=event.filterCard;
if(filter(get.autoViewAs({name:'sha'},'unsure'),player,event)&&player.countCards('hs','shan')) return true;
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hs','sha')) return true;
if(filter(get.autoViewAs({name:'jiu'},'unsure'),player,event)&&player.countCards('hs','jiu')) return true;
if(filter(get.autoViewAs({name:'tao'},'unsure'),player, event)&&player.countCards('hs','tao')) return true;
return false;
return player.hasMark('fanghun')&&get.info('ollongdan').filter(event,player);
},
onrespond:function(){return this.onuse.apply(this,arguments)},
onuse:function(result,player){
@ -18275,15 +18226,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
respondSha:true,
respondShan:true,
skillTagFilter:function(player,tag){
if(!player.storage.fanghun||player.storage.fanghun<0) return false;
var name;
switch(tag){
case 'respondSha':name='shan';break;
case 'respondShan':name='sha';break;
}
if(!player.countCards('hs',name)) return false;
if(!player.hasMark('fanghun')) return false;
return get.info('ollongdan').ai.skillTagFilter(player,tag);
},
order:function(item,player){
const awakened=Object.keys(player.storage).some(i=>typeof i=='string'&&i.indexOf('fuhan')!=-1);
if(player&&_status.event.type=='phase'){
var max=0;
var list=['sha','tao','jiu'];
@ -18295,11 +18242,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(temp>max) max=temp;
}
}
if(max>0) max+=((player.storage.refuhan||player.storage.twfuhan)?0.3:-0.3);
if(max>0) max+=(awakened?0.3:-0.3);
return max;
}
if(!player) player=_status.event.player;
return (player.storage.refuhan||player.storage.twfuhan)?4:1;
return awakened?4:1;
},
},
},
@ -27624,8 +27571,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olgangshu_info:'①当你使用非基本牌结算结束后,你可以令以下一项数值+1每项至多加至51.攻击范围2.受〖刚述〗影响的下个摸牌阶段摸牌数3.使用【杀】的次数上限。②当有牌被你抵消后,重置你〖刚述①〗增加的所有数值。',
oljianxuan:'谏旋',
oljianxuan_info:'当你受到伤害后,你可以令一名角色摸一张牌,然后若其手牌数等于你〖刚述①〗中的任意一项对应的数值,其重复此流程。',
ol_pengyang:'OL彭羕',
ol_pengyang_prefix:'OL',
ol_pengyang:'彭羕',
olqifan:'嚣翻',
olqifan_info:'当你需要使用不为【无懈可击】的牌时你可以观看牌堆底的X+1张牌并使用其中的一张。此牌结算结束时你依次弃置以下前X个区域中的所有牌⒈判定区、⒉装备区、⒊手牌区X为本回合使用过的牌中包含的类型数。',
oltuishi:'侻失',