summaryrefslogtreecommitdiff
path: root/jouer.c
diff options
context:
space:
mode:
Diffstat (limited to 'jouer.c')
-rw-r--r--jouer.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/jouer.c b/jouer.c
index a5f20ad..29365f3 100644
--- a/jouer.c
+++ b/jouer.c
@@ -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(&params);
+
update_current_character(t1, t2, &playing_team);
blit_team(surfaces, t1);
blit_team(surfaces, t2);