diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-05-13 10:15:07 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-05-13 10:15:07 +0200 |
commit | 2d57accf3a3c68e7eb41571eadf54ca2c7c4607f (patch) | |
tree | eb7177f4f367cad454921aff4442f7d6dc8908b2 /src/object1.c | |
parent | 6d8f14307f6e9ad22c7b34ad7a7058537cb6b738 (diff) |
Lua: Move Demonology wield slot implementation to C
Diffstat (limited to 'src/object1.c')
-rw-r--r-- | src/object1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/object1.c b/src/object1.c index 857deb2c..b834eb91 100644 --- a/src/object1.c +++ b/src/object1.c @@ -4145,6 +4145,25 @@ s16b wield_slot_ideal(object_type *o_ptr, bool_ ideal) } return -1; } + + case TV_DAEMON_BOOK: + { + int slot = -1; + + switch (o_ptr->sval) + { + case SV_DEMONBLADE : slot = INVEN_WIELD; break; + case SV_DEMONSHIELD: slot = INVEN_ARM; break; + case SV_DEMONHORN : slot = INVEN_HEAD; break; + } + + if ((slot >= 0) && (!ideal)) + { + slot = get_slot(slot); + } + + return slot; + } } /* No slot available */ |