diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-10 00:52:31 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-10 00:52:31 +0100 |
commit | a1f75a644e0119fa6e31b0a0c852b71f6fc28410 (patch) | |
tree | dd7d67f3e527f9a25168f53c7c1be4975a8844e3 /jouer.c | |
parent | 30842cc79c0a3e3566e9da61f2499fa1342c6d52 (diff) |
added "cyanmure" magic
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'jouer.c')
-rw-r--r-- | jouer.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -5,6 +5,8 @@ #include "ai.h" #include "blits.h" +#include "character.h" + #include "priv_entries.h" static inline void highlight_current_character(struct team_t *team) @@ -301,6 +303,19 @@ static enum action_state_t character_play_turn(struct action_params_t *params) return ACTION_PERFORMED; } +static void hook_post_action(struct action_params_t *params) +{ + struct character_t *chr = params->src; + + if (chr->alive && chr->poisoned) { + damage_target_hp(params->surfaces, params->positions, chr, chr->max_hp / 4); + + SDL_Flip(params->surfaces->screen); + + SDL_Delay(1000); + } +} + int Fjouer (SURFACES *surfaces, POSITIONS *positions, struct team_t *t1, struct team_t *t2) { struct team_t *playing_team; @@ -347,6 +362,8 @@ int Fjouer (SURFACES *surfaces, POSITIONS *positions, struct team_t *t1, struct SDL_Flip(surfaces->Pecran); + hook_post_action(¶ms); + update_current_character(t1, t2, &playing_team); blit_team(surfaces, t1); blit_team(surfaces, t2); |