From 75940a7771984f3c34bfbb624ab9260fbc208e11 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Sat, 6 Apr 2024 22:54:39 +0800 Subject: [PATCH] bugfix --- character/mobile.js | 22 +++++++++++++++++++--- character/sp.js | 17 ++++++++++------- character/yingbian.js | 33 +++++++++++++++------------------ 3 files changed, 44 insertions(+), 28 deletions(-) diff --git a/character/mobile.js b/character/mobile.js index 783d4661e..4c86ae3e3 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -3829,7 +3829,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, threaten:1.14, - unequip:true, unequip_ai:true, skillTagFilter:function(player,tag,arg){ if(arg&&arg.name=='sha'&&arg.card&&arg.card.storage&&arg.card.storage.mbguli) return true; @@ -3856,8 +3855,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.loseHp(); 'step 1' player.drawTo(player.maxHp); - } - } + }, + group:'mbguli_unequip', + }, + unequip:{ + trigger:{ + player:'useCardToPlayered', + }, + filter:function({card}){ + return card.name=='sha' && card.storage && card.storage.mbguli; + }, + forced:true, + popup:false, + logTarget:'target', + content:function(){ + trigger.target.addTempSkill('qinggang2'); + trigger.target.storage.qinggang2.add(trigger.card); + trigger.target.markSkill('qinggang2'); + }, + }, }, }, mbaosi:{ diff --git a/character/sp.js b/character/sp.js index 433814014..acfcf080f 100755 --- a/character/sp.js +++ b/character/sp.js @@ -11537,12 +11537,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 5' - player.chooseTarget('是否令一名手牌数小于自己的目标角色摸一张牌?',function(card,player,target){ - return _status.event.getParent().targets.includes(target)&&target.countCards('h')0&&targets.some(target=>target.isIn()&&target.countCards('h')0; }, - content:function(){ - 'step 0' - event.cards=player.getExpansions('qiaoyan'); - player.chooseTarget(true,'请选择【献珠】的目标','将'+get.translation(event.cards)+'交给一名角色。若该角色不为你自己,则你令其视为对其攻击范围内的另一名角色使用【杀】').set('ai',function(target){ + async cost(event, trigger, player){ + event.cards = player.getExpansions('qiaoyan'); + event.result = await player.chooseTarget(true,'请选择【献珠】的目标','将'+get.translation(event.cards)+'交给一名角色。若该角色不为你自己,则你令其视为对其攻击范围内的另一名角色使用【杀】').set('ai',function(target){ var player=_status.event.player; var eff=get.sgn(get.attitude(player,target))*get.value(_status.event.getParent().cards[0],target); if(player!=target) eff+=Math.max.apply(null,game.filterPlayer(function(current){ - if(current!=target&&target.inRange(current)&&target.canUse('sha',current)) return true; + if(current!=target&&player.inRange(current)&&target.canUse('sha',current,false)) return true; }).map(function(current){ return get.effect(current,{name:'sha'},target,player); })); return eff; - }); + }).forResult(); + }, + content:function(){ + 'step 0' + event.cards = player.getExpansions('qiaoyan'); + event.target = targets[0]; 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('xianzhu',target); - player.give(cards,target,'give'); - } - else event.finish(); + player.give(cards,target,'give'); 'step 2' if(player!=target&&target.isIn()&&player.isIn()&&game.hasPlayer(function(current){ - return current!=target&&target.inRange(current)&&target.canUse('sha',current); + return current!=target&&player.inRange(current)&&target.canUse('sha',current,false); })){ var str=get.translation(target); - player.chooseTarget(true,'选择'+str+'攻击范围内的一名角色,视为'+str+'对其使用【杀】',function(card,player,target){ + player.chooseTarget(true,'选择攻击范围内的一名角色,视为'+str+'对其使用【杀】',function(card,player,target){ var source=_status.event.target; - return source.inRange(target)&&source.canUse('sha',target); + return player.inRange(target)&&source.canUse('sha', target, false); }).set('target',target).set('ai',function(target){ var evt=_status.event; return get.effect(target,{name:'sha'},evt.target,evt.player) @@ -3992,7 +3989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qiaoyan:'巧言', qiaoyan_info:'锁定技,当你于回合外受到其他角色造成的伤害时,若你:有“珠”,则你令伤害来源获得“珠”;没有“珠”,则你防止此伤害,然后摸一张牌,并将一张牌正面朝上置于武将牌上,称为“珠”。', xianzhu:'献珠', - xianzhu_info:'锁定技,出牌阶段开始时,你令一名角色A获得“珠”。若A不为你自己,则你选择A攻击范围内的一名角色B,视为A对B使用一张【杀】。', + xianzhu_info:'锁定技,出牌阶段开始时,你令一名角色A获得“珠”。若A不为你自己,则你选择你攻击范围内的一名角色B,视为A对B使用一张【杀】。', chengjichengcui:'成济成倅', oltousui:'透髓', oltousui_info:'你可以将任意张牌置于牌堆底,视为使用一张需使用等量张【闪】抵消的【杀】。',