« get me outta code hell

Don't show targetCharacter HP bar if in target menu - csb-game - Pixelly spin-off of the Command Synergy Battle system used in Final Fantasy XIII
summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-08-16 16:40:25 -0300
committerFlorrie <towerofnix@gmail.com>2018-08-16 16:40:25 -0300
commitf8e2f134a56eb100e715a01094e0c59f7407a2e8 (patch)
treec31366f262af6e875c883fcaa3975ba87c40f384 /index.js
parent409fb44793d3b4125155e4d42aae1b629adab91b (diff)
Don't show targetCharacter HP bar if in target menu
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/index.js b/index.js
index 39517f5..0dedbb1 100644
--- a/index.js
+++ b/index.js
@@ -787,7 +787,10 @@ class Battle {
     }
 
     addOverlayHPBarFor(this.playerCharacter.targetEnemyCharacter)
-    addOverlayHPBarFor(this.playerCharacter.targetCharacter)
+
+    if (this.currentMenu !== this.targetMenu) {
+      addOverlayHPBarFor(this.playerCharacter.targetCharacter)
+    }
 
     if (this.currentMenu === this.targetMenu) {
       const option = this.currentMenu.getCurrentOption()