aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-10-01 20:58:23 +1000
committerquou <quou@disroot.org>2024-10-01 20:58:23 +1000
commit13b1c6fdcbab5587cf38ee7c97a1d29cfc7c2d7d (patch)
tree70a5979a45f612af586168a2f7e7cf9163668e63
parent7fd847dcd9f951a91747405be1f9bbba91d6cedd (diff)
The player is immune to damage for 1 second after taking it.
-rw-r--r--config.h1
-rw-r--r--player.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/config.h b/config.h
index e49126e..1d89c17 100644
--- a/config.h
+++ b/config.h
@@ -42,6 +42,7 @@
#define player_health 8
#define player_special_hits 4
#define player_hurt_freeze 4
+#define player_inv_frames 50
#define enemy_inv_frames 8
#define enemy_demon_move_force 32
diff --git a/player.c b/player.c
index 4d23a05..6d8f938 100644
--- a/player.c
+++ b/player.c
@@ -170,7 +170,7 @@ void update_player_hurt(Player* p, World* w) {
p->hp -= dz->hp;
p->vx -= dz->vx;
p->vy -= dz->vy;
- p->inv = enemy_inv_frames;
+ p->inv = player_inv_frames;
w->freeze = player_hurt_freeze;
return;
}