From f65b4f5ac8b10147c889432f3b643e485aba291e Mon Sep 17 00:00:00 2001 From: jsalmon3 <> Date: Wed, 22 Jan 2003 20:07:35 +0000 Subject: [PATCH] Fixed bug #672490: FlameShield can now be cast on catapults and naval units --- doc/ChangeLog.html | 2 ++ src/stratagus/spells.cpp | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html index 8d9e6b7f3..769a5066f 100644 --- a/doc/ChangeLog.html +++ b/doc/ChangeLog.html @@ -1042,6 +1042,8 @@ <LI>Fixed bug #668971: Segfaults on game load (from Jimmy Salmon). <LI>Fixed bug #672467: FlameShield is unable to hit air (from Jimmy Salmon). + <LI>Fixed bug #672490: FlameShield can now be cast on catapults and naval + units (from Jimmy Salmon). <LI>+++ </UL> </UL> diff --git a/src/stratagus/spells.cpp b/src/stratagus/spells.cpp index 8debecf84..7c9fcc722 100644 --- a/src/stratagus/spells.cpp +++ b/src/stratagus/spells.cpp @@ -640,8 +640,10 @@ global int CanCastSpell(const Unit* unit, const SpellType* spell, return 0; case SpellActionFlameShield: - // flame shield only on organic land units? - if (target && target->Type->Organic && target->Type->LandUnit + // flame shield only on land and sea units + if (target && !target->Type->Building + && (target->Type->UnitType == UnitTypeLand + || target->Type->UnitType == UnitTypeNaval) && target->FlameShield < spell->TTL ) { return 1; } @@ -876,7 +878,9 @@ global int SpellCast(Unit * unit, const SpellType * spell, Unit * target, break; case SpellActionFlameShield: - if (target && target->Type->Organic && target->Type->LandUnit + if (target && !target->Type->Building + && (target->Type->UnitType == UnitTypeLand + || target->Type->UnitType == UnitTypeNaval) && target->FlameShield < spell->TTL) { Missile* mis;