diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:45:47 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:51:49 +0200 |
commit | 203d42e75a02c68d7cda9ff85023910bd1a0a6f4 (patch) | |
tree | 5567957f8576b55a8fc6ba4b9c7e99786397f7f7 /src/powers.c | |
parent | a01f15e08da3b2e0e326b2a94100e17962136741 (diff) |
Lua: Refactor Lua-based powers into C
Diffstat (limited to 'src/powers.c')
-rw-r--r-- | src/powers.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/powers.c b/src/powers.c index 12b2c2c0..2f0206aa 100644 --- a/src/powers.c +++ b/src/powers.c @@ -1221,7 +1221,32 @@ static void power_activate(int power) use_ability_blade(); break; + case POWER_INVISIBILITY: + set_invis(20 + randint(30), 30); + break; + + case POWER_WEB: + /* Warning, beware of f_info changes .. I hate to do that .. */ + grow_things(16, 1 + (p_ptr->lev / 10)); + break; + + case POWER_COR_SPACE_TIME: + if (p_ptr->corrupt_anti_teleport_stopped) + { + p_ptr->corrupt_anti_teleport_stopped = FALSE; + msg_print("You stop controlling your corruption."); + p_ptr->update |= PU_BONUS; + } + else + { + p_ptr->corrupt_anti_teleport_stopped = TRUE; + msg_print("You start controlling your corruption, teleportation works once more."); + p_ptr->update |= PU_BONUS; + } + break; + default: + if (!process_hooks(HOOK_ACTIVATE_POWER, "(d)", power)) { msg_format("Warning power_activate() called with invalid power(%d).", power); |