Merge pull request #842 from PZ157/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-01-23 23:23:09 +08:00 committed by GitHub
commit 5aca31c225
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 12 additions and 11 deletions

View File

@ -1343,7 +1343,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
target:(card,player,target)=>{
if(target._g_taipingyaoshu_temp) return;
if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmpty(2)){
if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmptySlot(2)){
target._g_taipingyaoshu_temp=true;
let lose=get.effect(target,{name:'losehp'},target,target),
draw=2*get.effect(target,{name:'draw'},target,target);

View File

@ -4563,7 +4563,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
filter:function(event,player){
if(!event.source||!event.source.isIn()||event.source.group!='qun') return false;
if(!event.souce.countCards('he')<2) return false;
if(!event.source.countCards('he')<2) return false;
if(!player.hasZhuSkill('dddfuyi',event.source)) return false;
const skills=player.getStockSkills(true,true).filter(skill=>{
return !player.hasSkill(skill,null,false,false);

View File

@ -1214,6 +1214,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'chooseToUse',
viewAs:{name:'lebu'},
position:'hes',
round:1,
viewAsFilter(player){
return player.countCards('hes');
},

View File

@ -4112,7 +4112,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
var hp=player.hp-1,maxhp=player.maxHp-1;
if(hp>0&&maxhp>0){
player.chooseControl(choices).set('prompt','安国:请选择一项').set('choiceList',[
player.chooseControl().set('prompt','安国:请选择一项').set('choiceList',[
'失去'+hp+'点体力,令'+get.translation(trigger.player)+'获得1点护甲',
'减'+maxhp+'点体力上限,令'+get.translation(trigger.player)+'获得1点护甲'
]).set('ai',()=>'选项一');
@ -6760,7 +6760,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mingzhi:false,
effect:{
target:function(card,player,target,current){
if((get.tag(card,'respondShan')||get.tag(card,'respondSha'))&&target.getStorage('jibing').length>0&&player.isMaxHp()){
if((get.tag(card,'respondShan')||get.tag(card,'respondSha'))&&target.getExpansions('jibing').length>0&&player.isMaxHp()){
if(get.attitude(target,player)<=0){
return [0,0,1,0.3];
}

View File

@ -645,7 +645,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
filterCardx:function(card,player){
//if(player.getStorage('sbqicai').includes(card.name)) return false;
return get.type(card)=='equip'&&get.hasPlayer(target=>target!=player&&target.hasEmptySlot(get.subtype(card)));
return get.type(card)=='equip'&&game.hasPlayer(target=>target!=player&&target.hasEmptySlot(get.subtype(card)));
},
usable:1,
chooseButton:{

View File

@ -3038,13 +3038,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var aimx=game.filterPlayer(current=>{
return target.canUse({name:'sha'},current)&&get.effect(current,{name:'sha'},target,target)>0;
}).sort((a,b)=>get.effect(b,{name:'sha'},target,target)-get.effect(a,{name:'sha'},target,target))[0];
if(get.effect(aimx,{name:'sha'},target,player)<0&&get.effect(aimx,{name:'sha'},target,aimx)<0&&!canSave(player,aimx)) return 0;
if(aimx&&get.effect(aimx,{name:'sha'},target,player)<0&&get.effect(aimx,{name:'sha'},target,aimx)<0&&!canSave(player,aimx)) return 0;
}
if(target.hasValueTarget({name:'juedou'})){
var aimy=game.filterPlayer(current=>{
return target.canUse({name:'juedou'},current)&&get.effect(current,{name:'juedou'},target,target)>0;
}).sort((a,b)=>get.effect(b,{name:'juedou'},target,target)-get.effect(a,{name:'juedou'},target,target))[0];
if(get.effect(aimy,{name:'juedou'},target,player)<0&&get.effect(aimy,{name:'sha'},target,aimy)<0&&!canSave(player,aimy)) return 0;
if(aimy&&get.effect(aimy,{name:'juedou'},target,player)<0&&get.effect(aimy,{name:'sha'},target,aimy)<0&&!canSave(player,aimy)) return 0;
}
return -1;
},
@ -14987,7 +14987,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseCard('he',get.prompt('new_xingwu'),'将一张牌置于武将牌上作为“舞”').set('ai',function(card){
if(_status.event.goon) return 20-get.value(card);
return 7-get.value(card);
}).set('goon',player.needsToDiscard()||player.getStorage('new_xingwu').length>1);
}).set('goon',player.needsToDiscard()||player.getExpansions('new_xingwu').length>1);
'step 1'
if(result.bool){
player.logSkill('new_xingwu');
@ -15061,7 +15061,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
new_luoyan:{
init:function(player){
if(player.getStorage('new_xingwu').length) player.addAdditionalSkill('new_luoyan',['oltianxiang','liuli']);
if(player.getExpansions('new_xingwu').length) player.addAdditionalSkill('new_luoyan',['oltianxiang','liuli']);
},
onremove:function(player){
player.removeAdditionalSkill('new_luoyan');

View File

@ -10998,7 +10998,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gongxiu:'共修',
gongxiu_info:'结束阶段,若你本回合内发动过〖经合〗,则你选择一项:①令所有本回合内成为过〖经合〗目标的角色各摸一张牌;②令所有本回合内未成为过〖经合〗目标的角色各弃置一张手牌。',
jinghe:'经合',
jinghe_info:'出牌阶段限一次,你可以展示四张牌名各不相同的牌并选择等量的角色。系统从“写满技能的天书”中随机选择等量的技能,然后这些角色依次选择获得其中的一个。',
jinghe_info:'出牌阶段限一次,你可以展示至多四张牌名各不相同的牌并选择等量的角色。系统从“写满技能的天书”中随机选择等量的技能,然后这些角色依次选择获得其中的一个。',
nhyinbing:'阴兵',
nhyinbing_info:'锁定技,你使用的【杀】造成伤害改为失去体力。其他角色失去体力后,你摸一张牌。',
nhhuoqi:'活气',

View File

@ -1700,7 +1700,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if (!list.includes(get.suit(card))) att = 2;
if (_status.event.goon) return (20 - get.value(card)) * att;
return (7 - get.value(card)) * att;
}).set('goon', player.needsToDiscard() || player.getStorage('dcxingwu').length == 2);
}).set('goon', player.needsToDiscard() || player.getExpansions('dcxingwu').length == 2);
'step 1'
if (result.bool) {
player.logSkill('dcxingwu');