diff options
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); |