diff options
Diffstat (limited to 'actions.c')
-rw-r--r-- | actions.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -45,6 +45,10 @@ static int compute_damages(const struct character_t *src, const struct character } } + if (dest->defensive) { + avg /= 2; + } + min = avg - avg / 4; max = avg + avg / 4; @@ -81,6 +85,16 @@ void attack(SURFACES *surfaces, POSITIONS *positions, struct character_t *src, s __attack(surfaces, positions, src, dest->chr); } +void defend(SURFACES *surfaces, POSITIONS *positions, struct character_t *src, struct target_t *dest, void *data) +{ + (void) data; + (void) dest; + (void) surfaces; + (void) positions; + + src->defensive = true; +} + void cast_element(SURFACES *surfaces, POSITIONS *positions, struct character_t *src, struct target_t *dest, void *data) { int damages; |