« get me outta code hell

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:
Diffstat (limited to 'index.js')
-rw-r--r--index.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/index.js b/index.js
index 9968e33..7eef526 100644
--- a/index.js
+++ b/index.js
@@ -185,7 +185,8 @@ class ATBBar {
     }
 
     // Determine a target
-    if (!this.battleCharacter.targetCharacter) {
+    // TODO: AI logic for when to change target
+    if (!this.battleCharacter.isExecutingChain && (true || !this.battleCharacter.targetCharacter)) {
       this.battleCharacter.determineNewTarget('enemy')
     }
 
@@ -1108,10 +1109,11 @@ class SlideacrossMessage {
 const battle = new Battle({
   teamData: [
     {characterData: [
-      {x: -70, y: 200, name: 'Ren', knownActions: ['fire', 'fira', 'firaga', 'blizz', 'blizzara', 'blizzaga', 'cure']}
+      {x: -70, y: 200, name: 'Ren', hp: 400, maxHP: 400, knownActions: ['fire', 'fira', 'firaga', 'blizz', 'blizzara', 'cure']},
+      {x: -85, y: 210, name: 'Fie', hp: 375, maxHP: 375, knownActions: ['fire', 'fira', 'blizz', 'blizzara', 'blizzaga']}
     ]},
     {characterData: [
-      {x: 70, y: 200, name: 'Manasvin Warmech', knownActions: ['firaga', 'manasvinSwipe']}
+      {x: 70, y: 200, name: 'Manasvin Warmech', hp: 700, maxHP: 700, knownActions: ['firaga', 'manasvinSwipe']}
     ]}
   ]
 })