From eac3bad74309d1445e80e77ab96d799925919754 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Tue, 5 Sep 2023 19:08:16 +0800 Subject: [PATCH] bugfixs --- character/ddd.js | 6 +++--- character/huicui.js | 18 +++++++++--------- character/mobile.js | 2 +- character/sb.js | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/character/ddd.js b/character/ddd.js index c658ac347..c830ba442 100644 --- a/character/ddd.js +++ b/character/ddd.js @@ -1011,7 +1011,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player==current) return false; if(boole&¤t.countCards('e')==es){ var num=trigger.getl(current).es.length; - if(trigger.name=='equip'&&trigger==event.player) num--; + if(trigger.name=='equip'&&trigger.player==current) num--; if(num!=0) return true; } return false; @@ -1714,9 +1714,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mod:{ "cardEnabled2":function (card,player){ var source=_status.currentPhase; - if(!source||source==player||!source.hasSkill('dddfusi')||source.countCards('h')==0||source.hasCard('h',function(card){ + if(!source||source==player||!source.hasSkill('dddfusi')||source.countCards('h')==0||source.hasCard(function(card){ return !card.hasGaintag('dddxujing_tag'); - })) return; + },'h')) return; if(player.getCards('h').contains(card)) return false; }, }, diff --git a/character/huicui.js b/character/huicui.js index 7ff66f6c0..303af565d 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -615,7 +615,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return current.hasHistory('lose',function(evt){ return evt.cards2.length>0; }); - })&&(_status.connectMode||player.hasCard({type:'basic'},'h')); + })&&player.countCards('he')>0; }, direct:true, content:function(){ @@ -626,14 +626,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(current.hasHistory('lose',function(evt){ return evt.cards2.length>0; })) map[current.playerid]=Math.min(5,current.getHistory('lose').reduce(function(num,evt){ - return num=evt.cards2.length; + return num+evt.cards2.length; },0))+1; }); player.chooseCardTarget({ prompt:get.prompt('dcporui'), prompt2:get.skillInfoTranslation('dcporui',player), filterCard:function(card,player){ - return get.type2(card)=='basic'&&lib.filter.cardDiscardable(card,player,'dcporui'); + return lib.filter.cardDiscardable(card,player,'dcporui'); }, position:'he', filterTarget:function(card,player,target){ @@ -653,7 +653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('dcporui',target); player.discard(cards); event.num2=Math.min(5,target.getHistory('lose').reduce(function(num,evt){ - return num=evt.cards2.length; + return num+evt.cards2.length; },0)); event.num=event.num2+1; player.addTempSkill('dcporui_round','roundStart'); @@ -708,7 +708,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, filter:function(event,player){ - if(!_status.currentPhase||_status.currentPhase==player) return false; if(event.name=='damage'){ if(player.hasMark('dcgonghu_damage')) return false; var num=0; @@ -716,6 +715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.getHistory('sourceDamage',evt=>num+=evt.num); return num>1; } + if(!_status.currentPhase||_status.currentPhase==player) return false; if(player.hasMark('dcgonghu_basic')) return false; if(_status.currentPhase&&_status.currentPhase==player) return false; var evt=event.getl(player); @@ -9826,7 +9826,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return str; }, dcporui:function(player){ - return '每轮限'+(player.hasMark('dcgonghu_basic')?'两':'一')+'次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】'+(player.hasMark('dcgonghu_damage')?'':',然后你交给其X张手牌')+'(X为其本回合失去的牌数且至多为5)。'; + return '每轮限'+(player.hasMark('dcgonghu_basic')?'两':'一')+'次。其他角色的结束阶段,你可以弃置一张牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】'+(player.hasMark('dcgonghu_damage')?'':',然后你交给其X张手牌')+'(X为其本回合失去的牌数且至多为5)。'; }, }, perfectPair:{}, @@ -9843,7 +9843,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jiling:['dc_jiling','tw_jiling','jiling'], sp_jiaxu:['dc_sp_jiaxu','sp_jiaxu','yj_jiaxu'], qiaorui:['qiaorui','tw_qiaorui'], - + mamidi:['mamidi','xin_mamidi'], }, translate:{ re_panfeng:'潘凤', @@ -10246,9 +10246,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcjini_info:'当你受到伤害后,你可以重铸至多Y张手牌(Y为你的体力上限减本回合你以此法重铸过的牌数)。若你以此法获得了【杀】,你可以对伤害来源使用一张无视距离且不可被响应的【杀】。', yuechen:'乐綝', dcporui:'破锐', - dcporui_info:'每轮限一次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】,然后你交给其X张手牌(X为其本回合失去的牌数且至多为5)。', + dcporui_info:'每轮限一次。其他角色的结束阶段,你可以弃置一张牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】,然后你交给其X张手牌(X为其本回合失去的牌数且至多为5)。', dcgonghu:'共护', - dcgonghu_info:'锁定技。①当你于回合外失去基本牌后,若你本回合内失去基本牌的数量大于1,你将〖破锐〗改为每轮限两次。②当你于回合外造成或受到伤害后,若你本回合内造成或受到的伤害大于1,你删除〖破锐〗中的“,然后你交给其X张手牌”。③当你使用红色基本牌/红色普通锦囊牌时,若你已发动过〖共护①〗和〖共护②〗,则此牌不可被响应/可额外增加一个目标。', + dcgonghu_info:'锁定技。①当你于回合外失去基本牌后,若你本回合内失去基本牌的数量大于1,你将〖破锐〗改为每轮限两次。②当你造成或受到伤害后,若你本回合内造成或受到的总伤害大于1,你删除〖破锐〗中的“,然后你交给其X张手牌”。③当你使用红色基本牌/红色普通锦囊牌时,若你已发动过〖共护①〗和〖共护②〗,则此牌不可被响应/可额外增加一个目标。', yue_caiwenji:'乐蔡琰', dcshuangjia:'霜笳', dcshuangjia_tag:'胡笳', diff --git a/character/mobile.js b/character/mobile.js index 6963e6a33..0cf2e6c9d 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -12425,7 +12425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:(event,player)=>{ if(event.type!='dying') return false; if(player!=event.dying) return false; - return player.hasCard(card=>lib.skill.xinfu_jingxie2.filterCard(card,player),lib.skill.xinfu_jingxie2.position); + return player.hasCard(card=>lib.skill.xinfu_jingxie2.filterCard(card,player),'he'); }, position:"he", discard:false, diff --git a/character/sb.js b/character/sb.js index 4c091fa84..be2af55c5 100644 --- a/character/sb.js +++ b/character/sb.js @@ -3544,7 +3544,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ effect:{ target:function(card,player,target){ - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1&&player.maxHp>1) return [0,0]; + if(get.tag(card,'recover')&&target.hp>=target.maxHp-1&&target.maxHp>1) return [0,0]; } } }