Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
effect.c File Reference
#include <stddef.h>
#include <stdbool.h>
#include "mob.h"
#include "effect.h"
Include dependency graph for effect.c:

Functions

bool is_afflicted (Mob *mob)
 
void afflict (Mob *mob, void(*effect)(Mob *), int duration)
 
void effect_poison (Mob *mob)
 
void cure_poison (Mob *mob)
 

Function Documentation

void afflict ( Mob mob,
void(*)(Mob *)  effect,
int  duration 
)

Apply an effect to a mob (this removes any prior effect)

Parameters
mobEntity to afflict.
effectEffect to apply.
durationNumber of turns to apply the effect for (<1 = infinite)

Here is the caller graph for this function:

void cure_poison ( Mob mob)

A cure poison effect

Parameters
mobThe mob which is poisoned

Here is the call graph for this function:

Here is the caller graph for this function:

void effect_poison ( Mob mob)

A simple poison effect - damages every turn.

Parameters
mobThe mob which is poisoned.

Here is the call graph for this function:

Here is the caller graph for this function:

bool is_afflicted ( Mob mob)

Check if a mob is suffering from an effect or not

Parameters
mobEntity to examine.
Returns
true if effected by something.

Here is the caller graph for this function: