裴秀【行图】添加倍数和约数tag标记,优化ai【爵制】和【行图】的配合

This commit is contained in:
mengxinzxz 2023-11-04 14:00:15 +08:00
parent 88f6f0e7c5
commit 6d171d9756
1 changed files with 72 additions and 4 deletions

View File

@ -4760,18 +4760,58 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{
content:'当前记录X=#',
},
init:function(player){
player.addSkill('xingtu_mark');
},
onremove:function(player){
player.removeSkill('xingtu_mark');
player.removeGaintag('xingtu1');
player.removeGaintag('xingtu2');
delete player.storage.xingtu;
},
subSkill:{
record:{
audio:'xingtu',
trigger:{player:'useCardAfter'},
forced:true,
filter:function(event,player){
return typeof get.number(event.card)=='number';
},
forced:true,
content:function(){
player.storage.xingtu=get.number(trigger.card);
var num=get.number(trigger.card)
player.storage.xingtu=num;
player.markSkill('xingtu');
},
},
mark:{
charlotte:true,
trigger:{
player:['xingtu_recordAfter','gainAfter'],
global:'loseAsyncAfter',
},
filter:function(event,player){
if(typeof player.storage.xingtu!='number'||!player.countCards('h')) return false;
return event.name=='xingtu_record'||event.getg(player).length;
},
direct:true,
firstDo:true,
content:function(){
'step 0'
player.removeGaintag('xingtu1');
player.removeGaintag('xingtu2');
'step 1'
var cards1=[],cards2=[],num=player.storage.xingtu;
player.getCards('h').forEach(card=>{
var numx=get.number(card,player);
if(typeof numx=='number'){
if(numx%num==0) cards1.push(card);
if(num%numx==0) cards2.push(card);
}
});
player.addGaintag(cards1,'xingtu1');
player.addGaintag(cards2,'xingtu2');
},
},
},
},
juezhi:{
@ -4784,7 +4824,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
selectCard:[2,Infinity],
check:function(card){
if(ui.selected.cards.length>1) return 0;
return 4-get.value(card);
var player=_status.event.player;
if(player.hasSkill('xingtu')&&player.storage.xingtu){
var cards=player.getCards('he');
var num=player.storage.xingtu,stop=false;
for(var i=0;i<=cards.length;i++){
if(i!=cards.length){
var num1=get.number(cards[i],player);
if(typeof num1!='number') continue;
for(var j=0;j<cards.length;j++){
if(i==j) continue;
var num2=get.number(cards[j],player);
if(typeof num2!='number') continue;
var sum=num1+num2;
if(sum%num==0||num%sum==0){
stop=true;
break;
}
}
if(stop) break;
}
}
if(i!=cards.length){
var cardx=[cards[i],cards[j]];
if(cardx.includes(card)) return 10-get.value(card);
}
}
return 5-get.value(card);
},
content:function(){
var num=0;
@ -15272,7 +15338,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_gaoshun_prefix:'手杀界',
peixiu:'裴秀',
xingtu:'行图',
xingtu_info:'锁定技。①当你使用有点数的牌结算结束后你将此牌点数记录为X。②当你使用牌时若X÷Y的余数为0则你摸一张牌Y为此牌的点数。③你使用Y÷X的余数为0的牌无次数限制Y为此牌的点数。',
xingtu1:'倍数',
xingtu2:'约数',
xingtu_info:'锁定技。①当你使用有点数的牌结算结束后你将此牌点数记录为X。②你使用点数为X的倍数的牌无次数限制你使用点数为X的约数的牌时摸一张牌。',
juezhi:'爵制',
juezhi_info:'出牌阶段你可以弃置至少两张牌然后从牌堆中获得一张点数为X的牌X为这些牌的点数和除以13后的余数且当余数为0时X为13。',
sp_jianggan:'手杀蒋干',