From b55934be8b325e7c593b9c0433c0f9954753c7c2 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 24 Mar 2024 13:15:03 +0800 Subject: [PATCH 1/6] =?UTF-8?q?ddd=E4=BA=8E=E7=A6=81=E3=80=90=E6=95=B4?= =?UTF-8?q?=E5=86=9B=E3=80=91bugfix+=E5=86=99=E6=B3=95=E7=AE=80=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/ddd.js | 45 ++++++++++++++++++--------------------------- character/sp2.js | 41 ++++++++++++++++++++--------------------- 2 files changed, 38 insertions(+), 48 deletions(-) diff --git a/character/ddd.js b/character/ddd.js index 1fc8f0350..aa788c3b9 100644 --- a/character/ddd.js +++ b/character/ddd.js @@ -1637,22 +1637,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.hasSkill('dddzhengjun_hp')) return false; return event.player.getHp()==player.getHp(); } + const info=get.info('dddzhengjun'); + const hs_check=info.hs_check,es_check=info.es_check; return game.hasPlayer(target=>{ - if(event.getg&&event.getg(target)&&event.getg(target).length){ - return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h'); - } + if(event.getg&&event.getg(target)&&event.getg(target).length&&hs_check(player,target)) return true; const evt=event.getl(target); - if(evt){ - if(evt.hs&&evt.hs.length){ - return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h'); - } - if(evt.es&&evt.es.length){ - return !player.hasSkill('dddzhengjun_es')&&target.countCards('e')==player.countCards('e')&&player.canMoveCard(null,true,target); - } - } - return false; + if(evt&&evt.hs&&evt.hs.length&&hs_check(player,target)) return true; + if(event.name=='equip'&&event.player==target&&(!evt||evt.cards.length!=1)&&es_check) return true; + return evt&&evt.es&&evt.es.length&&es_check; }); }, + hs_check(player,target){ + return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h'); + }, + es_check(player,target){ + return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h'); + }, async cost(event,trigger,player){ if(trigger.name=='damage'||trigger.name=='loseHp'||trigger.name=='recover'){ let list=['失去体力','cancel2']; @@ -1674,25 +1674,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ let map={}; const hs_targets=game.filterPlayer(target=>{ - if(trigger.getg&&trigger.getg(target)&&trigger.getg(target).length){ - return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h'); - } + if(!get.info('dddzhengjun').hs_check) return false; + if(trigger.getg&&trigger.getg(target)&&trigger.getg(target).length) return true; const evt=trigger.getl(target); - if(evt){ - if(evt.es&&evt.es.length){ - return !player.hasSkill('dddzhengjun_es')&&target.countCards('e')==player.countCards('e')&&player.canMoveCard(null,true,target); - } - } - return false; + return evt&&evt.hs&&evt.hs.length; }); const es_targets=game.filterPlayer(target=>{ + if(!get.info('dddzhengjun').es_check) return false; const evt=trigger.getl(target); - if(evt){ - if(evt.es&&evt.es.length){ - return !player.hasSkill('dddzhengjun_es')&&target.countCards('e')==player.countCards('e')&&player.canMoveCard(null,true,target); - } - } - return false; + if(trigger.name=='equip'&&trigger.player==target&&(!evt||evt.cards.length!=1)) return true; + return evt&&evt.es&&evt.es.length; }); if(hs_targets.length){ let target; diff --git a/character/sp2.js b/character/sp2.js index 6ffc6032b..8be60fa17 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -6620,16 +6620,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; player.logSkill('cixiao',target); target.addSkills('panshi'); - // 彩蛋 - var str; - if(target.name.indexOf('lvbu')!=-1){ - str='公若不弃,布愿拜为义父'; - } else if(target.sex=='male'){ - str='我是'+get.translation(player)+'的义子'; - } else if(target.sex=='female'){ - str='我是'+get.translation(player)+'的义女'; - } else str='我们是'+get.translation(player)+'的义子和义女'; - target.storage.panshi=str; } event.finish(); 'step 2' @@ -6670,16 +6660,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }).concat(result.targets),'green'); target.addSkills('panshi'); - // 彩蛋 - var str; - if(target.name.indexOf('lvbu')!=-1){ - str='公若不弃,布愿拜为义父'; - } else if(target.sex=='male'){ - str='我是'+get.translation(player)+'的义子'; - } else if(target.sex=='female'){ - str='我是'+get.translation(player)+'的义女'; - } else str='我们是'+get.translation(player)+'的义子和义女'; - target.storage.panshi=str; } else event.finish(); 'step 4' @@ -6726,7 +6706,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'子', intro:{ name:'义子', - content:'$', + //content:'我是儿子', + //R·I·P——永远怀念:被棘手砍掉的“我是儿子” + content(_,player){ + const targets=game.filterPlayer2(target=>target.hasSkill('cixiao',null,null,false)).sortBySeat(player); + if(!targets.length) return '我义父呢?!'; + if(['name','name1','name2'].some(name=>{ + if(!player[name]||!get.character(player[name])||typeof get.translation(player[name])!='string') return false; + return player[name].includes('lvbu')&&get.translation(player[name]).includes('吕布'); + })) return '公若不弃,布愿拜为义父'; + return '我是'+get.translation(targets)+'的'+((player)=>{ + switch(player.sex){ + case 'female': + return '义女'; + case 'double': + return '义子义女'; + default: + return '义子'; + } + })(player); + }, }, group:'panshi_damage', }, From 41ae2f00a0486fbcc7abd9c51248a79d0c02ddd3 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 24 Mar 2024 13:23:55 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=B0=8B=E6=9B=B9=E4=B8=95=EF=BC=8C?= =?UTF-8?q?=E9=9C=8D=E9=AA=8F=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/mobile.js | 5 +++-- character/sb.js | 27 +++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/character/mobile.js b/character/mobile.js index ae810b704..fcf44f23c 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -718,7 +718,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(gains.length) player.gain(gains.randomGets(Math.min(gains.length,num)),'gain2'); }, getNum:function(player,event){ - let num=3; + let num=(get.mode()=='identity'?3:4); const history=game.getAllGlobalHistory('everything'); for(let i=history.length-1;i>=0;i--){ const evt=history[i]; @@ -16763,7 +16763,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sidai:'伺怠', sidai_info:'限定技,出牌阶段,你可以将手牌区内的所有基本牌当做【杀】使用。若此牌对应的实体牌中:包含【闪】,则目标角色成为此牌的目标后,需弃置一张基本牌,否则不可响应此牌;包含【桃】,则当目标角色受到此牌的伤害后,其减1点体力上限。', jieyu:'竭御', - jieyu_info:'结束阶段,你可以从弃牌堆中获得共X张不同牌名的基本牌(X为3-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数,且X至少为1)。', + jieyu_info:'结束阶段,你可以从弃牌堆中获得共X张不同牌名的基本牌(X为4-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数,且X至少为1)。', + jieyu_info_identity:'结束阶段,你可以从弃牌堆中获得共X张不同牌名的基本牌(X为3-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数,且X至少为1)。', yangfeng:'杨奉', mbxuetu:'血途', mbxuetu_info:'转换技。出牌阶段限一次,阴:你可以弃置一张牌,然后令一名角色回复1点体力;阳:你可以失去1点体力,然后令一名角色摸两张牌。', diff --git a/character/sb.js b/character/sb.js index b3f1f502c..3fdd69361 100644 --- a/character/sb.js +++ b/character/sb.js @@ -746,11 +746,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.countMark('sbxingshang')>=get.info('sbxingshang').getLimit) return false; return event.name=='die'||!player.getHistory('custom',evt=>evt.sbxingshang).length; }, - usable:1, forced:true, locked:false, async content(event,trigger,player){ - player.addMark('sbxingshang',1); + player.addMark('sbxingshang',Math.min(2,get.info('sbxingshang').getLimit-player.countMark('sbxingshang'))); if(trigger.name=='damage') player.getHistory('custom').push({sbxingshang:true}); }, marktext:'颂', @@ -762,27 +761,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ getLimit:9, getNum(num){ if(typeof num!='number'||!Array.from({length:9}).map((_,i)=>i+1).includes(num)) return 0; - return [1,2,3,4,1,2,2,3,3][num-1]; + return [2,2,5,5,1,2,2,3,3][num-1]; }, getEffect(player,num){ if(!player||typeof num!='number') return 0; switch(num){ //行殇选项 - case 1://-1,重置武将牌 + case 1://-2,重置武将牌 if(game.hasPlayer(target=>{ return get.attitude(player,target)>0&&target.isTurnedOver(); })) return 10; return 0; case 2://-2,摸min(5,max(1,阵亡角色数))的牌 return Math.min(5,(Math.max(1,game.dead.length))); - case 3://-3,加上限加血+复原装备栏 + case 3://-5,加上限加血+复原装备栏 if(!game.hasPlayer(target=>{ return get.attitude(player,target)>0&&target.maxHp<10; })) return 0; return 5+(game.hasPlayer(target=>{ return get.attitude(player,target)>0&&target.hasDisabledSlot(); })?1:0); - case 4://-4,劝封/化萍 + case 4://-5,劝封/化萍 return 0; //放逐选项 case 5://-1,封印基本牌外的手牌 @@ -828,20 +827,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.countMark('sbxingshang')&&(target.isLinked()||target.isTurnedOver()); }); }, - usable:1, + usable:2, chooseButton:{ dialog(){ var dialog=ui.create.dialog('行殇:请选择你要执行的一项','hidden'); dialog.add([[ - [1,'移去1个“颂”标记,复原一名角色的武将牌'], + [1,'移去2个“颂”标记,复原一名角色的武将牌'], [2,'移去2个“颂”标记,令一名角色摸'+get.cnNumber(Math.min(5,Math.max(1,game.dead.length)))+'张牌'], - [3,'移去3个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏'], - [4,'移去4个“颂”标记,获得一名已阵亡角色的所有技能,然后失去〖行殇〗〖放逐〗〖颂威〗'], + [3,'移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏'], + [4,'移去5个“颂”标记,获得一名已阵亡角色的所有技能,然后失去〖行殇〗〖放逐〗〖颂威〗'], ],'textbutton']); return dialog; }, filter(button,player){ - if(button.link>player.countMark('sbxingshang')) return false; + if(player.countMark('sbxingshang')target.isLinked()||target.isTurnedOver()); @@ -963,7 +962,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order(_,player){ const info=get.info('sbxingshang'); - const goon=(player.hasSkill('sbfangzhu')&&!player.getStat('skill').sbfangzhu); + const goon=(player.hasSkill('sbfangzhu')&&(player.getStat('skill').sbfangzhu||0)<(get.info('sbfangzhu').usable||Infinity)); let list=Array.from({length:goon?9:4}).map((_,i)=>i+1); list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num)); list.sort((a,b)=>info.getEffect(player,b)-info.getEffect(player,a)); @@ -1088,7 +1087,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order(_,player){ const info=get.info('sbxingshang'); - const goon=(player.hasSkill('sbxingshang')&&!player.getStat('skill').sbxingshang_use); + const goon=(player.hasSkill('sbxingshang')&&(player.getStat('skill').sbxingshang_use||0)<(info.subSkill.use.usable||Infinity)); let list=Array.from({length:goon?9:5}).map((_,i)=>i+(goon?1:5)); list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num)); list.sort((a,b)=>info.getEffect(player,b)-info.getEffect(player,a)); @@ -7086,7 +7085,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sb_caopi:'谋曹丕', sb_caopi_prefix:'谋', sbxingshang:'行殇', - sbxingshang_info:'①当一名角色受到伤害后(每回合限一次)或死亡时,你获得1个“颂”标记(你至多拥有9个“颂”标记)。②出牌阶段限一次,你可以:1.移去1个“颂”标记,令一名角色复原武将牌;2.移去2个“颂”标记,令一名角色摸X张牌(X为场上阵亡角色数,且X至少为1,至多为5);3.移去3个“颂”标记,令一名体力上限小于10的角色加1点体力上限,回复1点体力,随机恢复一个已废除的装备栏;4.移去4个“颂”标记,获得一名阵亡角色武将牌上的所有技能,然后你失去〖行殇〗〖放逐〗〖颂威〗。', + sbxingshang_info:'①当一名角色受到伤害后(每回合限一次)或死亡时,你获得2个“颂”标记(你至多拥有9个“颂”标记)。②出牌阶段限两次,你可以:1.移去2个“颂”标记,令一名角色复原武将牌;2.移去2个“颂”标记,令一名角色摸X张牌(X为场上阵亡角色数,且X至少为1,至多为5);3.移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限,回复1点体力,随机恢复一个已废除的装备栏;4.移去5个“颂”标记,获得一名阵亡角色武将牌上的所有技能,然后你失去〖行殇〗〖放逐〗〖颂威〗。', sbfangzhu:'放逐', sbfangzhu_info:'出牌阶段限一次,你可以:1.移去1个“颂”标记,令一名其他角色于手牌中只能使用基本牌直到其回合结束;2.移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束;3.移去2个“颂”标记,令一名其他角色不能响应除其以外的角色使用的牌直到其回合结束;4.移去3个“颂”标记,令一名其他角色将武将牌翻面;5.移去3个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束。', sbsongwei:'颂威', From 943ea893f7783c2830e425378e799b8f2c74a18d Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 24 Mar 2024 13:26:50 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=B0=8B=E6=9B=B9=E4=B8=95=E3=80=90?= =?UTF-8?q?=E8=A1=8C=E6=AE=87=E3=80=91prompt=E6=B7=BB=E5=8A=A0=E7=A7=BB?= =?UTF-8?q?=E5=8E=BB=E6=A0=87=E8=AE=B0=E6=95=B0=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sb.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/character/sb.js b/character/sb.js index 3fdd69361..e7d1c20d4 100644 --- a/character/sb.js +++ b/character/sb.js @@ -949,13 +949,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ const str='###行殇###'; switch(links[0]){ case 1: - return str+'复原一名角色的武将牌'; + return str+'移去2个“颂”标记,复原一名角色的武将牌'; case 2: - return str+'令一名角色摸'+get.cnNumber(Math.min(5,Math.max(1,game.dead.length)))+'张牌'; + return str+'移去2个“颂”标记,令一名角色摸'+get.cnNumber(Math.min(5,Math.max(1,game.dead.length)))+'张牌'; case 3: - return str+'令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏'; + return str+'移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏'; case 4: - return str+'获得一名已阵亡角色的所有技能,然后失去武将牌上的所有技能'; + return str+'移去5个“颂”标记,获得一名已阵亡角色的所有技能,然后失去武将牌上的所有技能'; } } }, From b7f362002587e4e7c889fab666a8c42cb2cb18ab Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 24 Mar 2024 14:26:17 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=9F=A9=E9=BE=99=E3=80=90=E5=88=BA?= =?UTF-8?q?=E5=8C=97=E3=80=91=E6=95=88=E6=9E=9C=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/yijiang.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/character/yijiang.js b/character/yijiang.js index aa9ef5e8e..21847ead3 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -843,6 +843,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ + ignoredHandcard:function(card,player){ + if(card.hasGaintag('cibei_mark')) return true; + }, cardDiscardable:function(card,player,name){ if(card.hasGaintag('cibei_mark')) return false; }, @@ -14605,7 +14608,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ duwang:'独往', duwang_info:'锁定技。①游戏开始时,你从牌堆顶将五张不为【杀】的牌置于武将牌上,称为“刺”。②若你有牌名不为【杀】“刺”,你至其他角色或其他角色至你的距离+1。', cibei:'刺北', - cibei_info:'①当一名角色使用【杀】造成伤害且此牌对应的实体牌进入弃牌堆后,你可以将一张不为【杀】的“刺”置入弃牌堆,并将这些牌置入“刺”,然后弃置一名角色区域里的一张牌。②一名角色的回合结束时,若你的“刺”均为【杀】,你获得所有“刺”,且这些牌不能被弃置,且当你使用对应实体牌包含这些牌的牌时无次数和距离限制。', + cibei_info:'①当一名角色使用【杀】造成伤害且此牌对应的实体牌进入弃牌堆后,你可以将一张不为【杀】的“刺”置入弃牌堆,并将这些牌置入“刺”,然后弃置一名角色区域里的一张牌。②一名角色的回合结束时,若你的“刺”均为【杀】,你获得所有“刺”,且这些牌不能被弃置,不计入手牌上限,且当你使用对应实体牌包含这些牌的牌时无次数和距离限制。', wuanguo:'武安国', diezhang:'叠嶂', diezhang_info:'转换技。①出牌阶段,你使用杀的次数上限+1。②阴:当你使用牌被其他角色抵消后,你可以弃置一张牌,视为对其使用X张【杀】;阳:当其他角色使用牌被你抵消后,你可以摸X张牌,视为对其使用一张【杀】(X为1)。', From df7f0be43949dcd3efc84a1788bd79440985c9d7 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 24 Mar 2024 16:17:51 +0800 Subject: [PATCH 5/6] bugfix --- character/ddd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/character/ddd.js b/character/ddd.js index aa788c3b9..b1fede2cb 100644 --- a/character/ddd.js +++ b/character/ddd.js @@ -1651,7 +1651,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h'); }, es_check(player,target){ - return !player.hasSkill('dddzhengjun_hs')&&target.countCards('h')==player.countCards('h'); + return !player.hasSkill('dddzhengjun_es')&&target.countCards('e')==player.countCards('e'); }, async cost(event,trigger,player){ if(trigger.name=='damage'||trigger.name=='loseHp'||trigger.name=='recover'){ From 97a302759215214510753d7a1c30c2440aea8497 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 24 Mar 2024 16:19:38 +0800 Subject: [PATCH 6/6] bugfix --- character/ddd.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/character/ddd.js b/character/ddd.js index b1fede2cb..dbc3693fe 100644 --- a/character/ddd.js +++ b/character/ddd.js @@ -1643,8 +1643,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.getg&&event.getg(target)&&event.getg(target).length&&hs_check(player,target)) return true; const evt=event.getl(target); if(evt&&evt.hs&&evt.hs.length&&hs_check(player,target)) return true; - if(event.name=='equip'&&event.player==target&&(!evt||evt.cards.length!=1)&&es_check) return true; - return evt&&evt.es&&evt.es.length&&es_check; + if(event.name=='equip'&&event.player==target&&(!evt||evt.cards.length!=1)&&es_check(player,target)) return true; + return evt&&evt.es&&evt.es.length&&es_check(player,target); }); }, hs_check(player,target){ @@ -1674,13 +1674,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ let map={}; const hs_targets=game.filterPlayer(target=>{ - if(!get.info('dddzhengjun').hs_check) return false; + if(!get.info('dddzhengjun').hs_check(player,target)) return false; if(trigger.getg&&trigger.getg(target)&&trigger.getg(target).length) return true; const evt=trigger.getl(target); return evt&&evt.hs&&evt.hs.length; }); const es_targets=game.filterPlayer(target=>{ - if(!get.info('dddzhengjun').es_check) return false; + if(!get.info('dddzhengjun').es_check(player,target)) return false; const evt=trigger.getl(target); if(trigger.name=='equip'&&trigger.player==target&&(!evt||evt.cards.length!=1)) return true; return evt&&evt.es&&evt.es.length;