Battles ~ Battle Item Stats - uchicago-cs/chiventure GitHub Wiki

Battle Item (Consumable) Stats Changes

Note: this is still a work in progress, and additional stat documents could be added for more classes and items, but we hope this is a valuable structure and start for documenting battle item stats. Stat change choices are also arbitrary, so it is also flexible to change

In battle_logic.c, there is consume_battle_item() function that applies battle stat changes (apply_stat_changes()) onto a combatant.

There are two contingencies that we believe ought to determine the stat changes that are being applied:

  1. The player class (class_t type inside of combatant_t type)
  2. The actually battle_item that we are consuming.

These are the stats that can be changed:

`int speed;     //the amount speed changes from a stat change
int max_sp;     //the amount max_sp changes from a stat change
int sp;         //the amount sp changes from a stat change
int phys_atk;   //the amount phys_atk changes from a stat change
int mag_atk;    //the amount mag_atk changes from a stat change
int phys_def;   //the amount phys_def changes from a stat change
int mag_def;    //the amount mag_def changes from a stat change
int crit;       //the amount crit changes from a stat change
int accuracy;   //the amount accuracy changes from a stat change
int hp;         //the amount hp changes from a stat change
int max_hp;     //the amount max_hp changes from a stat change`

Here is a foundational tree of some of the battle_items, and the stat changes multipliers we think they should apply to different combatant class types:

If Battle Item Consumable is Strength Up:

If Player Class is Warrior: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 1.5 1 1 1 1 1 1 1

Else If Player Class is Wizard: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 0.8 1 1 1 1 1 1 1

if Battle Item Consumable is Defense Up:

If Player Class is Warrior: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 1 1 1.2 1 1 1 1 1

Else If Player Class is Wizard: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 1 1 1.2 1 1 1 1 1

if Battle Item Consumable is Elixar of Life:

If Player Class is Bard: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 1 1 1 1 1 1 1.2 1

Else If Player Class is Rogues: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 1 1 1 1 1 1 0.8 1

if Battle Item Consumable is Healing Potion:

If Player Class is Wizards: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 1 1 1 1 1 1 1.5 1

Else If Player Class is Rogues: The combatant gains these multipliers to its stats

speed max_sp sp phys_atk mag_ark phys_def mag_def grit accuracy hp max_hp
1 1 1 1 1 1 1 1 1 1.2 1