From a325fa2f9f282ea32532db358d53a2688cd8caba Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 10 Jun 2024 20:09:38 +0200 Subject: [PATCH] =?UTF-8?q?Heiltrank=20und=20Heilzauber:=20Heilt=20keine?= =?UTF-8?q?=20tempor=C3=A4ren=20K=C3=A4mpfer=20(W=C3=B6lfe)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/battle.c | 16 ++++++++++------ src/spells/combatspells.c | 6 +++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/battle.c b/src/battle.c index 7f1a6c2e6..acbcbf30a 100644 --- a/src/battle.c +++ b/src/battle.c @@ -1107,12 +1107,16 @@ static bool resurrect_troop(troop dt) { fighter *df = dt.fighter; unit *du = df->unit; - if (oldpotiontype[P_HEAL] && !fval(&df->person[dt.index], FL_HEALING_USED)) { - if (i_get(du->items, oldpotiontype[P_HEAL]) > 0) { - fset(&df->person[dt.index], FL_HEALING_USED); - i_change(&du->items, oldpotiontype[P_HEAL], -1); - df->person[dt.index].hp = u_race(du)->hitpoints * 5; /* give the person a buffer */ - return true; + + /* do not heal temporary fighters */ + if (!a_find(du->attribs, &at_unitdissolve)) { + if (oldpotiontype[P_HEAL] && !fval(&df->person[dt.index], FL_HEALING_USED)) { + if (i_get(du->items, oldpotiontype[P_HEAL]) > 0) { + fset(&df->person[dt.index], FL_HEALING_USED); + i_change(&du->items, oldpotiontype[P_HEAL], -1); + df->person[dt.index].hp = u_race(du)->hitpoints * 5; /* give the person a buffer */ + return true; + } } } return false; diff --git a/src/spells/combatspells.c b/src/spells/combatspells.c index a00661f3b..a6ae015c0 100644 --- a/src/spells/combatspells.c +++ b/src/spells/combatspells.c @@ -1392,10 +1392,14 @@ static int heal_fighters(selist * fgs, int *power, bool heal_monsters) for (qi = 0, ql = fgs; ql; selist_advance(&ql, &qi, 1)) { fighter *df = (fighter *)selist_get(ql, qi); - if (healhp <= 0) break; + /* do not heal temporary fighters */ + if (a_find(df->unit->attribs, &at_unitdissolve)) { + continue; + } + /* Untote kann man nicht heilen */ if (df->unit->number == 0 || (u_race(df->unit)->flags & RCF_NOHEAL)) continue;