diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-06 19:39:20 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-07 18:23:34 -0600 |
commit | f25431f1f0bb12d6d846ebff2a9f49d88f0472ee (patch) | |
tree | 5a2bc3a1359efde3dca6d278c71f56580efabc98 /crawl-ref/source/ability.cc | |
parent | 96155f285f40cdba3563b22b3d9a028a68e54326 (diff) | |
download | crawl-ref-f25431f1f0bb12d6d846ebff2a9f49d88f0472ee.tar.gz crawl-ref-f25431f1f0bb12d6d846ebff2a9f49d88f0472ee.zip |
Use uncancels for Gozag abilities.
Includes properly splitting the usability checks out of the function
itself.
Diffstat (limited to 'crawl-ref/source/ability.cc')
-rw-r--r-- | crawl-ref/source/ability.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/ability.cc b/crawl-ref/source/ability.cc index 653d674fa4..abf4f9da5e 100644 --- a/crawl-ref/source/ability.cc +++ b/crawl-ref/source/ability.cc @@ -80,6 +80,7 @@ #include "hints.h" #include "terrain.h" #include "traps.h" +#include "uncancel.h" #include "zotdef.h" enum ability_flag_type @@ -1657,6 +1658,12 @@ static bool _check_ability_possible(const ability_def& abil, } return true; + case ABIL_GOZAG_POTION_PETITION: + return gozag_setup_potion_petition(); + + case ABIL_GOZAG_CALL_MERCHANT: + return gozag_setup_call_merchant(); + default: return true; } @@ -2935,15 +2942,11 @@ static bool _do_ability(const ability_def& abil) break; case ABIL_GOZAG_POTION_PETITION: - if (!gozag_potion_petition()) - return false; - + run_uncancel(UNC_POTION_PETITION, 0); break; case ABIL_GOZAG_CALL_MERCHANT: - if (!gozag_call_merchant()) - return false; - + run_uncancel(UNC_CALL_MERCHANT, 0); break; case ABIL_GOZAG_BRIBE_BRANCH: |