From 1fd1a6ed98001eb1568e6c55c78e5513a21d3556 Mon Sep 17 00:00:00 2001 From: Loobinex Date: Sat, 12 Oct 2024 10:52:54 +0200 Subject: [PATCH] Familiars dying will unsummon (#3547) Also fixed the unsummon effect for new player colors --- src/thing_creature.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/thing_creature.c b/src/thing_creature.c index 742a6634ca..9e3fd0b9aa 100644 --- a/src/thing_creature.c +++ b/src/thing_creature.c @@ -2879,6 +2879,13 @@ struct Thing* kill_creature(struct Thing *creatng, struct Thing *killertng, Play if (creature_affected_by_spell(creatng, SplK_Rebound)) { terminate_thing_spell_effect(creatng, SplK_Rebound); } + struct CreatureControl* cctrl = creature_control_get_from_thing(creatng); + if ((cctrl->unsummon_turn > 0) && (cctrl->unsummon_turn > game.play_gameturn)) + { + create_effect_around_thing(creatng, ball_puff_effects[creatng->owner]); + set_flag(flags, CrDed_NotReallyDying | CrDed_NoEffects); + return cause_creature_death(creatng, flags); + } struct Dungeon* dungeon = (!is_neutral_thing(creatng)) ? get_players_num_dungeon(creatng->owner) : INVALID_DUNGEON; if (!dungeon_invalid(dungeon)) {