aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-21 14:25:48 +0100
committerEugene Sandulenko2016-02-14 17:12:50 +0100
commitb70ae62d4bc5467e77ff8c1ec15cd526c67787a3 (patch)
tree26ef3ec642cb067cffc0e7780c87d5619aeb9416 /engines
parentc76b7ec63cc9ec61623ec98f4bf1149489fe9e54 (diff)
downloadscummvm-rg350-b70ae62d4bc5467e77ff8c1ec15cd526c67787a3.tar.gz
scummvm-rg350-b70ae62d4bc5467e77ff8c1ec15cd526c67787a3.tar.bz2
scummvm-rg350-b70ae62d4bc5467e77ff8c1ec15cd526c67787a3.zip
WAGE: Implement performMagic()
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/combat.cpp16
-rw-r--r--engines/wage/wage.h1
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();