helapordo 1.4.12
Loading...
Searching...
No Matches
game_fight.h File Reference
#include "game_utils.h"
Include dependency graph for game_fight.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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 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_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().
 
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)
 
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)
 

Function Documentation

◆ boss_attack()

int boss_attack ( Boss * b,
Fighter * target,
Path * p,
Koliseo * kls,
RingaBuf * rb_notifications )

◆ boss_fight()

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.

Queues notifications to the passed RingaBuf pointer. On boss death, we call dropConsumable, dropEquip and dropArtifact.

See also
Fighter
Boss
statReset()
statResetBoss()
stringFromBossClass()
dropConsumable()
dropEquip()
dropArtifact()
Parameters
playerThe Fighter pointer at hand.
bThe Enemy pointer at hand.
pThe Path pointer for the game.
klsThe Koliseo used for allocations.
rb_notificationsThe RingaBuf used for notifications.
See also
enqueue_notification()

◆ defer_fight_boss()

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().

See also
Fighter
Boss
boss_fight()
Parameters
playerThe Fighter pointer at hand.
bThe Boss pointer at hand.
pThe Path pointer for the game.
foe_opThe foeTurnOption_OP for the foe.
klsThe Koliseo used for allocations.
rb_notificationsThe RingaBuf used for notifications.

◆ defer_fight_enemy()

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().

See also
Fighter
Enemy
fight()
Parameters
playerThe Fighter pointer at hand.
eThe Enemy pointer at hand.
foe_opThe foeTurnOption_OP for the foe.
klsThe Koliseo used for allocations.
rb_notificationsThe RingaBuf used for notifications.

◆ defer_skill_boss()

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().

See also
Fighter
Boss
do_Skill_boss()
Parameters
playerThe Fighter pointer at hand.
bThe Boss pointer at hand.
pThe Path pointer for the game.
picked_skillThe skill picked by Fighter.
foe_opThe foeTurnOption_OP for the foe.
klsThe Koliseo used for allocations.
rb_notificationsThe RingaBuf used for notifications.

◆ defer_skill_enemy()

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().

See also
Fighter
Enemy
do_Skill()
Parameters
playerThe Fighter pointer at hand.
eThe Enemy pointer at hand.
picked_skillThe picked skill by Fighter.
foe_opThe foeTurnOption_OP for the foe.
klsThe Koliseo used for allocations.
rb_notificationsThe RingaBuf use for notifications.

◆ do_Skill()

fightResult do_Skill ( Fighter * player,
Enemy * e,
skillType picked_skill,
Koliseo * kls )

◆ do_Skill_boss()

fightResult do_Skill_boss ( Fighter * player,
Boss * b,
skillType picked_skill,
Path * path,
Koliseo * kls )

◆ enemy_attack()

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.

Queues notifications to the passed RingaBuf pointer. On enemy death, there's a chance to call dropConsumable, dropEquip or dropArtifact (guaranteed for beast enemies). NOTE: that the return values are always from the POV of the Fighter: FIGHTRES_DMG_DEALT means the Enemy was damaged!

See also
defer_fight_enemy()
Fighter
Enemy
statReset()
statResetEnemy()
stringFromEClass()
dropConsumable()
dropEquip()
dropArtifact()
Parameters
targetThe Fighter pointer at hand.
eThe Enemy pointer at hand.
klsThe Koliseo used for allocations.
rb_notificationsThe RingaBuf used for notifications.
See also
enqueue_notification()

◆ fight()

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.

Queues notifications to the passed RingaBuf pointer. On enemy death, there's a chance to call dropConsumable, dropEquip or dropArtifact (guaranteed for beast enemies).

See also
Fighter
Enemy
statReset()
statResetEnemy()
stringFromEClass()
dropConsumable()
dropEquip()
dropArtifact()
Parameters
playerThe Fighter pointer at hand.
eThe Enemy pointer at hand.
klsThe Koliseo used for allocations.
rb_notificationsThe RingaBuf used for notifications.
See also
enqueue_notification()