battle
Vars | |
all_worlds | List of all worlds in the game. |
---|---|
battle_arcade_gear_list | List of all battle arcade gear that is available in the shop in game. |
bomb_cooldown | unique to the emag mode, acts as a time limit where the player dies when it reaches 0. |
enemies_defeated | How many enemies we've defeated in a row, used to tell when we need to spawn the boss in. |
enemy_gold_reward | How much gold the enemy will drop, randomized on new opponent. |
enemy_hp | How much HP the current enemy has. |
enemy_icon_id | Determines which boss image to use on the UI. |
enemy_max_hp | How much HP the current enemy has. |
enemy_mp | How much MP the current enemy has. |
enemy_name | The enemy's name |
equipped_gear | Assoc list of gear the player has equipped. |
feedback_message | CURRENT ENEMY INFORMATION A feedback message displayed in the UI during combat sequences. |
latest_unlocked_world | The latest world the player has unlocked, granting access to all worlds below this. |
player_current_hp | The current amount of HP the player has. |
player_current_mp | The current amount of MP the player has. |
player_current_world | The world we're currently in. |
player_gold | How much money the player has, used in the Inn. Starts with the default price for a single item. |
player_turn | PLAYER INFORMATION Boolean on whether it's the player's time to do their turn. |
ui_panel | The current panel the player is viewieng in the UI. |
Procs | |
lose_game | Called when a mob loses at the battle arcade. |
on_battle_win | on_battle_win |
perform_enemy_turn | perform_enemy_turn |
process_enemy_turn | Handles the delay between the user's and enemy's turns to process what's going on. |
process_player_attack | Called when you attack the enemy. |
setup_new_opponent | Sets up a new opponent depending on what stage they are at. |
successful_counterattack | Called when you successfully counterattack the enemy. |
user_take_damage | Called when the enemy attacks you. |
Var Details
all_worlds
List of all worlds in the game.
battle_arcade_gear_list
List of all battle arcade gear that is available in the shop in game.
bomb_cooldown
unique to the emag mode, acts as a time limit where the player dies when it reaches 0.
enemies_defeated
How many enemies we've defeated in a row, used to tell when we need to spawn the boss in.
enemy_gold_reward
How much gold the enemy will drop, randomized on new opponent.
enemy_hp
How much HP the current enemy has.
enemy_icon_id
Determines which boss image to use on the UI.
enemy_max_hp
How much HP the current enemy has.
enemy_mp
How much MP the current enemy has.
enemy_name
The enemy's name
equipped_gear
Assoc list of gear the player has equipped.
feedback_message
CURRENT ENEMY INFORMATION A feedback message displayed in the UI during combat sequences.
latest_unlocked_world
The latest world the player has unlocked, granting access to all worlds below this.
player_current_hp
The current amount of HP the player has.
player_current_mp
The current amount of MP the player has.
player_current_world
The world we're currently in.
player_gold
How much money the player has, used in the Inn. Starts with the default price for a single item.
player_turn
PLAYER INFORMATION Boolean on whether it's the player's time to do their turn.
ui_panel
The current panel the player is viewieng in the UI.
Proc Details
lose_game
Called when a mob loses at the battle arcade.
on_battle_win
on_battle_win
Called when the player wins a level, this handles giving EXP, loot, tickets, etc. It also handles clearing the enemy out for the next one, and unlocking new worlds. We stop at BATTLE_WORLD_NINE because it is the last stage, and has infinite bosses.
perform_enemy_turn
perform_enemy_turn
Actually performs the enemy's turn. We first roll to see if the enemy should use magic. As their HP goes lower, the chances of self healing goes higher, but if they lack the MP, then it's rolling to steal MP from the player. After, we will roll to see if the player counterattacks the enemy (if set), otherwise we will attack normally.
process_enemy_turn
Handles the delay between the user's and enemy's turns to process what's going on.
process_player_attack
Called when you attack the enemy.
setup_new_opponent
Sets up a new opponent depending on what stage they are at.
successful_counterattack
Called when you successfully counterattack the enemy.
user_take_damage
Called when the enemy attacks you.