From 5804e756d537b246338346ed3e71ecf4317e5491 Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 6 Feb 2017 16:01:18 +0800 Subject: [PATCH] h --- character/hearth.js | 4 +--- game/game.js | 8 +++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/character/hearth.js b/character/hearth.js index b31f3009f..03330d78f 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -1570,9 +1570,7 @@ character.hearth={ xianji3:{ mark:'character', intro:{ - content:function(storage,player){ - return '每当'+get.translation(storage)+'对你使用一张牌,你摸一张牌'; - } + content:'每当$对你使用一张牌,你摸一张牌' }, trigger:{target:'useCardToBegin'}, filter:function(event,player){ diff --git a/game/game.js b/game/game.js index 763b64b09..f03415222 100644 --- a/game/game.js +++ b/game/game.js @@ -3596,7 +3596,8 @@ }, placePoppedDialog:function(dialog,e){ if(dialog._place_text){ - if(dialog._place_text.firstChild.offsetWidth>=190){ + if(dialog._place_text.firstChild.offsetWidth>=190|| + dialog._place_text.firstChild.offsetHeight>=30){ dialog._place_text.style.textAlign='left'; dialog._place_text.style.marginLeft='14px'; } @@ -12232,6 +12233,11 @@ if(typeof intro=='function'){ intro=intro(this.storage[skill],this); } + else if(typeof intro=='string'){ + intro=intro.replace(/#/g,this.storage[skill]); + intro=intro.replace(/&/g,get.cnNumber(this.storage[skill])); + intro=intro.replace(/\$/g,get.translation(this.storage[skill])); + } this.markSkillCharacter(skill,this.storage[skill],get.translation(skill),intro); } else{