diff options
-rw-r--r-- | lib/mods/theme/scpt/init.lua | 3 | ||||
-rw-r--r-- | lib/mods/theme/scpt/monsters.lua | 15 | ||||
-rw-r--r-- | src/lua_bind.c | 9 | ||||
-rw-r--r-- | src/modules.c | 2 |
4 files changed, 10 insertions, 19 deletions
diff --git a/lib/mods/theme/scpt/init.lua b/lib/mods/theme/scpt/init.lua index af299f2c..edc82fe1 100644 --- a/lib/mods/theme/scpt/init.lua +++ b/lib/mods/theme/scpt/init.lua @@ -12,6 +12,3 @@ initialize_bookable_spells() -- Some tests, if the file is not present, this is fine tome_dofile_anywhere(ANGBAND_DIR_SCPT, "dg_test.lua", FALSE) - --- Add monster interaction -tome_dofile("monsters.lua") diff --git a/lib/mods/theme/scpt/monsters.lua b/lib/mods/theme/scpt/monsters.lua deleted file mode 100644 index 0f4c8cda..00000000 --- a/lib/mods/theme/scpt/monsters.lua +++ /dev/null @@ -1,15 +0,0 @@ --- This file holds various things that govern monster behaviour with respect to the player - -add_hooks{ -[HOOK_GAME_START] = function() - - if ((get_race_name() == "Maia") and - (player_has_corruption(CORRUPT_BALROG_AURA) ~= TRUE) and - (player_has_corruption(CORRUPT_BALROG_WINGS) ~= TRUE) and - (player_has_corruption(CORRUPT_BALROG_STRENGTH) ~= TRUE) and - (player_has_corruption(CORRUPT_BALROG_FORM) ~= TRUE)) then - -- "Proper" Maiar aggravate evil beings - timer_aggravate_evil_enable() - end -end, -} diff --git a/src/lua_bind.c b/src/lua_bind.c index 34a89613..ab1a19c8 100644 --- a/src/lua_bind.c +++ b/src/lua_bind.c @@ -548,7 +548,14 @@ void timer_aggravate_evil_enable() void timer_aggravate_evil_callback() { - dispel_evil(0); + if ((p_ptr->prace == RACE_MAIA) && + (!player_has_corruption(CORRUPT_BALROG_AURA)) && + (!player_has_corruption(CORRUPT_BALROG_WINGS)) && + (!player_has_corruption(CORRUPT_BALROG_STRENGTH)) && + (!player_has_corruption(CORRUPT_BALROG_FORM))) + { + dispel_evil(0); + } } cptr get_spell_info(s32b s) diff --git a/src/modules.c b/src/modules.c index 01f1be00..c4bea6eb 100644 --- a/src/modules.c +++ b/src/modules.c @@ -1152,6 +1152,8 @@ void init_hooks_module() case MODULE_THEME: { + timer_aggravate_evil_enable(); + add_hook_new(HOOK_PLAYER_LEVEL, auto_stat_gain_hook, "auto_stat_gain", |