From 265aaaae6e0a0d23b261ef1ef62e7d76ddb41d48 Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 24 Apr 2017 12:05:00 +0800 Subject: [PATCH] h --- character/hearth.js | 8 ++++++-- game/game.js | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/character/hearth.js b/character/hearth.js index a8cedf4d6..7c68b804d 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -5320,7 +5320,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var info=lib.card[lib.inpile[i]]; if(info.multitarget) continue; if(lib.filter.targetEnabled2({name:lib.inpile[i]},trigger.player,trigger.targets[0])){ - var cardinfo=[trigger.card.suit,trigger.card.number,lib.inpile[i]]; + var cardinfo=[trigger.card.suit||'',trigger.card.number||'',lib.inpile[i]]; list1.push(cardinfo); if(info.type!='equip'){ list2.push(cardinfo); @@ -5343,7 +5343,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }; 'step 1' if(result.bool){ - var card=game.createCard({suit:trigger.card.suit,number:trigger.card.number,name:result.links[0][2]}); + var card=game.createCard({ + suit:trigger.card.suit||lib.suit.randomGet(), + number:trigger.card.number||Math.ceil(Math.random()*13), + name:result.links[0][2]} + ); event.card=card; game.log(player,'将',trigger.card,'变为',card); if(!event.isMine()) game.delay(); diff --git a/game/game.js b/game/game.js index bc0af01f5..0d4546f58 100644 --- a/game/game.js +++ b/game/game.js @@ -20347,6 +20347,7 @@ } } }, + suit:['club','spade','diamond','heart'], group:['wei','shu','wu','qun'], nature:['fire','thunder','poison'], linked:['fire','thunder'],