|
helapordo 1.4.20
|
#include "game_fight.h"
Functions | |
| void | setCounter (Turncounter *c, int turns) |
| Takes a Turncounter pointer and an integer. | |
| int | getBoost (int lvl, int luck) |
| Takes two integers for level to calc against and luck, and returns the boost relative to the level with luck variations, as an integer. | |
| int | getBossBoost (int lvl, bossClass bclass) |
| Takes one integer and a bossClass and returns the boost relative to the level delta with base boss stats, as an integer. | |
| int | getEnemyBoost (int lvl, enemyClass eclass) |
| Takes one integer and an enemyClass and returns the boost relative to the level delta with base enemy stats, as an integer. | |
| void | statReset (Fighter *player, int force) |
| Takes a Fighter pointer and an integer used to force execution. | |
| void | statResetBoss (Boss *b, int force) |
| Takes a Boss pointer and an integer used to force execution. | |
| void | statResetEnemy (Enemy *e, int force) |
| Takes an Enemy pointer and an integer used to force execution. | |
| void | applyStatus (Fighter *f, RingaBuf *rb_notifications) |
| Takes a RingaBuf pointer to queue notifications to, a Fighter pointer value and applies the effect pertaining to its status value. | |
| void | applyEStatus (Enemy *e, RingaBuf *rb_notifications) |
| Takes a RingaBuf pointer to queue notifications to, a Enemy pointer value and applies the effect pertaining to its status value. | |
| void | applyBStatus (Boss *b, RingaBuf *rb_notifications) |
| Takes a RingaBuf pointer to queue notifications to, a Boss pointer value and applies the effect pertaining to its status value. | |
| void | printStatusText (fighterStatus status, char *subject, int color, RingaBuf *rb_notifications) |
| Takes a RingaBuf pointer to queue notifications to, a fighterStatus value and a string of who's the entity to print the respective status message. | |
| int | fight (Fighter *player, Enemy *e, Koliseo *kls, RingaBuf *rb_notifications) |
| Takes a Fighter and a Enemy pointers and compares their stats to determine who gets damaged and returns the fightStatus value. | |
| int | enemy_attack (Enemy *e, Fighter *target, Koliseo *kls, RingaBuf *rb_notifications) |
| Takes an Enemy and a Fighter pointer and compares their stats to determine who gets damaged and returns the fightStatus value. | |
| int | defer_fight_enemy (Fighter *player, Enemy *e, foeTurnOption_OP foe_op, Koliseo *kls, RingaBuf *rb_notifications) |
| Takes a Fighter and a Enemy pointers and calls fight(). | |
| int | defer_skill_enemy (Fighter *player, Enemy *e, skillType picked_skill, foeTurnOption_OP foe_op, Koliseo *kls, RingaBuf *rb_notifications) |
| Takes a Fighter and a Enemy pointers and calls do_Skill(). | |
| int | boss_fight (Fighter *player, Boss *b, Path *p, Koliseo *kls, RingaBuf *rb_notifications) |
| Takes a Fighter, a Boss and a Path pointers and compares fighters stats to determine who gets damaged and returns the fightStatus value. | |
| int | boss_attack (Boss *b, Fighter *target, Path *p, Koliseo *kls, RingaBuf *rb_notifications) |
| int | defer_fight_boss (Fighter *player, Boss *b, Path *p, foeTurnOption_OP foe_op, Koliseo *kls, RingaBuf *rb_notifications) |
| Takes a Fighter and a Boss pointers and calls boss_fight(). | |
| int | defer_skill_boss (Fighter *player, Boss *b, skillType picked_skill, Path *p, foeTurnOption_OP foe_op, Koliseo *kls, RingaBuf *rb_notifications) |
| Takes a Fighter and a Boss pointers and calls do_Skill_boss(). | |
| foeTurnOption | enemyTurnPick (Enemy *e, Fighter *f) |
| Returns a randomised pick as foeTurnOption. | |
| foeTurnOption | bossTurnPick (Boss *b, Fighter *f) |
| Returns a randomised pick as foeTurnOption. | |
| fightResult | do_Skill (Fighter *player, Enemy *e, skillType picked_skill, Koliseo *kls) |
| fightResult | do_Skill_boss (Fighter *player, Boss *b, skillType picked_skill, Path *path, Koliseo *kls) |
Variables | |
| int | G_GODMODE_ON = 0 |
| Global variable for godmode flag. | |
| void applyBStatus | ( | Boss * | b, |
| RingaBuf * | rb_notifications ) |
| void applyEStatus | ( | Enemy * | e, |
| RingaBuf * | rb_notifications ) |
| void applyStatus | ( | Fighter * | f, |
| RingaBuf * | rb_notifications ) |
Takes a RingaBuf pointer to queue notifications to, a Fighter pointer value and applies the effect pertaining to its status value.
| f | The Fighter pointer at hand. |
| rb_notifications | The RingaBuf pointer used for notifications. |
| int boss_attack | ( | Boss * | b, |
| Fighter * | target, | ||
| Path * | p, | ||
| Koliseo * | kls, | ||
| RingaBuf * | rb_notifications ) |
Takes a Fighter, a Boss and a Path pointers and compares fighters stats to determine who gets damaged and returns the fightStatus value.
Queues notifications to the passed RingaBuf pointer.
| player | The Fighter pointer at hand. |
| b | The Enemy pointer at hand. |
| p | The Path pointer for the game. |
| kls | The Koliseo used for allocations. |
| rb_notifications | The RingaBuf used for notifications. |
| foeTurnOption bossTurnPick | ( | Boss * | b, |
| Fighter * | f ) |
Returns a randomised pick as foeTurnOption.
| b | Pointer to the boss to pick for. |
| f | Pointer to the target fighter. |
| int defer_fight_boss | ( | Fighter * | player, |
| Boss * | b, | ||
| Path * | p, | ||
| foeTurnOption_OP | foe_op, | ||
| Koliseo * | kls, | ||
| RingaBuf * | rb_notifications ) |
Takes a Fighter and a Boss pointers and calls boss_fight().
| player | The Fighter pointer at hand. |
| b | The Boss pointer at hand. |
| p | The Path pointer for the game. |
| foe_op | The foeTurnOption_OP for the foe. |
| kls | The Koliseo used for allocations. |
| rb_notifications | The RingaBuf used for notifications. |
| int defer_fight_enemy | ( | Fighter * | player, |
| Enemy * | e, | ||
| foeTurnOption_OP | foe_op, | ||
| Koliseo * | kls, | ||
| RingaBuf * | rb_notifications ) |
| int defer_skill_boss | ( | Fighter * | player, |
| Boss * | b, | ||
| skillType | picked_skill, | ||
| Path * | p, | ||
| foeTurnOption_OP | foe_op, | ||
| Koliseo * | kls, | ||
| RingaBuf * | rb_notifications ) |
Takes a Fighter and a Boss pointers and calls do_Skill_boss().
| player | The Fighter pointer at hand. |
| b | The Boss pointer at hand. |
| p | The Path pointer for the game. |
| picked_skill | The skill picked by Fighter. |
| foe_op | The foeTurnOption_OP for the foe. |
| kls | The Koliseo used for allocations. |
| rb_notifications | The RingaBuf used for notifications. |
| int defer_skill_enemy | ( | Fighter * | player, |
| Enemy * | e, | ||
| skillType | picked_skill, | ||
| foeTurnOption_OP | foe_op, | ||
| Koliseo * | kls, | ||
| RingaBuf * | rb_notifications ) |
Takes a Fighter and a Enemy pointers and calls do_Skill().
| player | The Fighter pointer at hand. |
| e | The Enemy pointer at hand. |
| picked_skill | The picked skill by Fighter. |
| foe_op | The foeTurnOption_OP for the foe. |
| kls | The Koliseo used for allocations. |
| rb_notifications | The RingaBuf use for notifications. |
| fightResult do_Skill | ( | Fighter * | player, |
| Enemy * | e, | ||
| skillType | picked_skill, | ||
| Koliseo * | kls ) |
| fightResult do_Skill_boss | ( | Fighter * | player, |
| Boss * | b, | ||
| skillType | picked_skill, | ||
| Path * | path, | ||
| Koliseo * | kls ) |
Takes an Enemy and a Fighter pointer and compares their stats to determine who gets damaged and returns the fightStatus value.
Queues notifications to the passed RingaBuf pointer. NOTE: that the return values are always from the POV of the Fighter: FIGHTRES_DMG_DEALT means the Enemy was damaged!
| target | The Fighter pointer at hand. |
| e | The Enemy pointer at hand. |
| kls | The Koliseo used for allocations. |
| rb_notifications | The RingaBuf used for notifications. |
| foeTurnOption enemyTurnPick | ( | Enemy * | e, |
| Fighter * | f ) |
Returns a randomised pick as foeTurnOption.
| e | Pointer to the enemy to pick for. |
| f | Pointer to the target fighter. |
Takes a Fighter and a Enemy pointers and compares their stats to determine who gets damaged and returns the fightStatus value.
Queues notifications to the passed RingaBuf pointer.
| player | The Fighter pointer at hand. |
| e | The Enemy pointer at hand. |
| kls | The Koliseo used for allocations. |
| rb_notifications | The RingaBuf used for notifications. |
| int getBoost | ( | int | lvl, |
| int | luck ) |
Takes two integers for level to calc against and luck, and returns the boost relative to the level with luck variations, as an integer.
At level 1, returns 0.
| lvl | The level to check the boost against. |
| luck | The luck value to influence calcs. |
| int getBossBoost | ( | int | lvl, |
| bossClass | bclass ) |
Takes one integer and a bossClass and returns the boost relative to the level delta with base boss stats, as an integer.
The EnemyBossStats pointer for the boss's bossClass is loaded. If the boost is negative, returns 0.
| lvl | The level to check the boost against. |
| bclass | The bossClass used to determine base level. |
| int getEnemyBoost | ( | int | lvl, |
| enemyClass | eclass ) |
Takes one integer and an enemyClass and returns the boost relative to the level delta with base enemy stats, as an integer.
The EnemyBaseStats pointer for the enemy's enemyClass is loaded. If the boost is negative, returns 0.
| lvl | The level to check the boost against. |
| eclass | The enemyClass used to determine base level. |
| void printStatusText | ( | fighterStatus | status, |
| char * | subject, | ||
| int | color, | ||
| RingaBuf * | rb_notifications ) |
Takes a RingaBuf pointer to queue notifications to, a fighterStatus value and a string of who's the entity to print the respective status message.
| status | The fighterStatus at hand. |
| subject | A string with name of entity owning the fighterStatus. |
| color | The color to use for the notification. |
| rb_notifications | The RingaBuf used for notifications. |
| void setCounter | ( | Turncounter * | c, |
| int | turns ) |
Takes a Turncounter pointer and an integer.
If the count value at the pointer is 0 (counter is inactive), the turns valueis assigned.
| c | The Turncounter whose count value will be set. |
| turns | The value to be assigned. |
| void statReset | ( | Fighter * | player, |
| int | force ) |
Takes a Fighter pointer and an integer used to force execution.
If the force parameter is true, all checks are ignored. If enemy's hp value is at least 50% of total, and none of atk, def or vel is 0 or less, nothing happens with an early return. Otherwise, getBoost() is called to calc the level stat boost for each stat. The BaseStats pointer for the fighter's fighterClass is loaded and each one of atk, def and vel is checked accounting for level boost. If none of them is below the respective treshold of 35, 18 and 30 % of total, nothing happens. Otherwise, all of them are reset to full amount accounting for permboosts and level boost.
| player | The Fighter pointer to check the stats for. |
| force | The integer to bypass all checks if true. |
| void statResetBoss | ( | Boss * | b, |
| int | force ) |
Takes a Boss pointer and an integer used to force execution.
If the force parameter is true, all checks are ignored. If boss's hp value is at least 40% of total, and none of atk, def or vel is 0 or less, nothing happens with an early return. Otherwise, getBossBoost() is called to calc the level stat boost for each stat. The BossBaseStats pointer for the boss's bossClass is loaded and each one of atk, def and vel is checked accounting for level boost. If none of them is below the respective treshold of 30, 30 and 20 % of total, nothing happens. Otherwise, all of them are reset to full amount accounting for beast boost and level boost.
| b | The Boss pointer to check the stats for. |
| force | The integer to bypass all checks if true. |
| void statResetEnemy | ( | Enemy * | e, |
| int | force ) |
Takes an Enemy pointer and an integer used to force execution.
If the force parameter is true, all checks are ignored. If enemy's hp value is at least 40% of total, and none of atk, def or vel is 0 or less, nothing happens with an early return. Otherwise, getEnemyBoost() is called to calc the level stat boost for each stat. The EnemyBaseStats pointer for the enemy's enemyClass is loaded and each one of atk, def and vel is checked accounting for level boost. If none of them is below the respective treshold of 30, 30 and 20 % of total, nothing happens. Otherwise, all of them are reset to full amount accounting for beast boost and level boost.
| e | The Enemy pointer to check the stats for. |
| force | The integer to bypass all checks if true. |
| int G_GODMODE_ON = 0 |
Global variable for godmode flag.