From 82a98ec061d64732bb37f1c92bfc9e0d1c74dea6 Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Fri, 6 Oct 2023 18:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=90=E5=93=80=E5=B0=98?= =?UTF-8?q?=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/character/xianding.js b/character/xianding.js index 9e66a7107..12b26e05c 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -3863,6 +3863,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dcaichen:{ audio:2, + init:function(player){ + game.addGlobalSkill('dcaichen_hit'); + }, + onremove:function(player){ + game.removeGlobalSkill('dcaichen_hit'); + }, trigger:{ player:['loseAfter','phaseDiscardBefore'], global:'loseAsyncAfter', @@ -3886,6 +3892,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger.directHit.add(player); game.log(player,'不可响应',trigger.card); } + }, + subSkill:{ + hit:{ + trigger:{player:'dieAfter'}, + filter:function(event,player){ + return !game.hasPlayer(current=>current.hasSkill('dcaichen')); + }, + silent:true, + forceDie:true, + content:function(){ + game.removeGlobalSkill('dcaichen_hit'); + }, + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + return arg&&arg.card&&arg.target&&arg.target.hasSkill('dcaichen')&&ui.cardPile.childNodes.length<40&&get.suit(arg.card)==='spade'; + } + } + } } }, //杨彪