diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/combat.cpp | 16 | ||||
-rw-r--r-- | engines/wage/wage.h | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/engines/wage/combat.cpp b/engines/wage/combat.cpp index 5a9426c9c2..b057b7e2ad 100644 --- a/engines/wage/combat.cpp +++ b/engines/wage/combat.cpp @@ -237,10 +237,24 @@ void WageEngine::decrementUses(Obj *obj) { bool WageEngine::attackHit(Chr *attacker, Chr *victim, Obj *weapon, int targetIndex) { warning("STUB: attackHit"); + + return false; } void WageEngine::performMagic(Chr *attacker, Chr *victim, Obj *magicalObject) { - warning("STUB: performMagic()"); + switch (magicalObject->_attackType) { + case Obj::HEALS_PHYSICAL_DAMAGE: + case Obj::HEALS_SPIRITUAL_DAMAGE: + case Obj::HEALS_PHYSICAL_AND_SPIRITUAL_DAMAGE: + performHealingMagic(attacker, magicalObject); + return; + } + + performAttack(attacker, victim, magicalObject); +} + +void WageEngine::performHealingMagic(Chr *chr, Obj *magicalObject) { + warning("STUB: performHealingMagic()"); } void WageEngine::performMove(Chr *chr, int validMoves) { diff --git a/engines/wage/wage.h b/engines/wage/wage.h index 1a0fe765b0..e5228e6ffc 100644 --- a/engines/wage/wage.h +++ b/engines/wage/wage.h @@ -137,6 +137,7 @@ private: void performTake(Chr *npc, Obj *obj); void decrementUses(Obj *obj); bool attackHit(Chr *attacker, Chr *victim, Obj *weapon, int targetIndex); + void performHealingMagic(Chr *chr, Obj *magicalObject); void doClose(); |