diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-05-31 20:23:37 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-01 05:40:58 +0200 |
commit | 3f78069df10241f1111e171ab9d1db40b33b5774 (patch) | |
tree | 1f89e6344265e780371450cff0f17422c6d6f745 /src | |
parent | 1b9ce2b53e26ed2d983efb9da10eb2be89d6d705 (diff) |
Lua: Move Theme winged race armor restriction to C.
Diffstat (limited to 'src')
-rw-r--r-- | src/object1.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/object1.c b/src/object1.c index a4676744..63789794 100644 --- a/src/object1.c +++ b/src/object1.c @@ -4029,6 +4029,24 @@ s16b wield_slot_ideal(object_type *o_ptr, bool_ ideal) if (process_hooks_ret(HOOK_WIELD_SLOT, "d", "(O,d)", o_ptr, ideal)) return process_hooks_return[0].num; + /* Theme has restrictions for winged races. */ + if (game_module_idx == MODULE_THEME) + { + cptr race_name = rp_ptr->title + rp_name; + + if (streq(race_name, "Dragon") || + streq(race_name, "Eagle")) + { + switch (o_ptr->tval) + { + case TV_CLOAK: + case TV_HARD_ARMOR: + case TV_DRAG_ARMOR: + return -1; + } + } + } + /* Slot for equipment */ switch (o_ptr->tval) { |