From 45fd9e80ac5a4bf959e9ab51bb48e4d7dccf9ffb Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Mon, 11 Apr 2016 05:36:12 -0400 Subject: [PATCH] Track status-causing items in tooltips If Flame Orb or Toxic Orb activate, PS will now show the known item in tooltips. As a side effect, this also fixes the Flame Orb / Toxic Orb message not appearing correctly in replays. --- js/battle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/battle.js b/js/battle.js index 1ad2131a0..a11a5ca06 100644 --- a/js/battle.js +++ b/js/battle.js @@ -4067,7 +4067,8 @@ var Battle = (function () { this.resultAnim(ofpoke, effect.name, 'ability'); this.message('', "[" + ofpoke.getName(true) + "'s " + effect.name + "!]"); ofpoke.markAbility(effect); - } else if (effect.exists) { + } else if (effect.effectType === 'Item') { + (ofpoke || poke).item = effect.name; effectMessage = " by the " + effect.name; }