diff options
author | Eugene Sandulenko | 2016-01-26 17:43:10 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:12:53 +0100 |
commit | a9b7b0463056e23b0bcd229876e7d4285e2b5f5e (patch) | |
tree | 9a7f9cb9ef6005c651942cd7929b2e3e18e3e519 /engines | |
parent | b5d55fdf2b171ef6ff8f56d49b9f350283fde242 (diff) | |
download | scummvm-rg350-a9b7b0463056e23b0bcd229876e7d4285e2b5f5e.tar.gz scummvm-rg350-a9b7b0463056e23b0bcd229876e7d4285e2b5f5e.tar.bz2 scummvm-rg350-a9b7b0463056e23b0bcd229876e7d4285e2b5f5e.zip |
WAGE: Implement tryAttack()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/combat.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/wage/combat.cpp b/engines/wage/combat.cpp index 4a043311b8..d1f5d2639c 100644 --- a/engines/wage/combat.cpp +++ b/engines/wage/combat.cpp @@ -743,9 +743,14 @@ bool WageEngine::handleOfferCommand(const char *target) { } bool WageEngine::tryAttack(Obj *weapon, Common::String &input) { - warning("STUB: tryAttack"); - - return false; + Common::String w(weapon->_name); + w.toLowercase(); + Common::String i(input); + i.toLowercase(); + Common::String v(weapon->_operativeVerb); + v.toLowercase(); + + return i.contains(w) && i.contains(v); } bool WageEngine::handleAttack(Obj *weapon) { |