From 72f18f00b88492a6895dc94f8e07354b2dc17880 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Sat, 13 Apr 2024 23:43:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A6=E5=85=B3=E7=BE=BD=20bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/character/xianding.js b/character/xianding.js index 887e8623a..2b9929e88 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -330,10 +330,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ cards = await target.chooseToGive(player, true).forResultCards(); } const card = cards[0]; - if (!target.storage.dcwuyou_transfer) target.storage.dcwuyou_transfer = {}; - target.storage.dcwuyou_transfer[card.cardid] = viewAs; - target.addGaintag(cards, 'dcwuyou_transfer'); - target.addSkill('dcwuyou_transfer'); + if (player.getCards('h').contains(card)) { + if (!player.storage.dcwuyou_transfer) player.storage.dcwuyou_transfer = {}; + player.storage.dcwuyou_transfer[card.cardid] = viewAs; + player.addGaintag(cards, 'dcwuyou_transfer'); + player.addSkill('dcwuyou_transfer'); + } }, ai:{ order:10,