From 8ab97514bf5838d5ccb4ec3fc0b26886bc6e1338 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Mon, 11 Mar 2024 16:06:53 +0800 Subject: [PATCH] bugfix --- mode/versus.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mode/versus.js b/mode/versus.js index 55dddb6b9..ae04b2d6c 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -4908,11 +4908,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ prompt: '将【杀】当作【闪】,或将【闪】当作的【杀】使用或打出,然后你的下个弃牌阶段的手牌上限-1', viewAs: function(cards, player) { var name = false; - switch (get.name(cards[0], player)) { - case 'sha': name = 'shan'; break; - case 'shan': name = 'sha'; break; + if(cards.length){ + switch (get.name(cards[0], player)) { + case 'sha': name = 'shan'; break; + case 'shan': name = 'sha'; break; + } + if (name) return { name: name }; } - if (name) return { name: name }; return null; }, onuse: function(links, player) {