From 51aecfb4d93469e556192c4faaed70b265f294af Mon Sep 17 00:00:00 2001 From: kts of kettek Date: Wed, 22 Mar 2017 13:52:17 -0700 Subject: [PATCH] Add hack to allow attacktype changes for personalized god wepaons --- server/gods.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/server/gods.c b/server/gods.c index 2b6cf56..2dc5243 100644 --- a/server/gods.c +++ b/server/gods.c @@ -968,6 +968,30 @@ static int god_enchants_weapon(object *op, const object *god, object *tr, object one time, but in that particular case we only give out additional plusses. No new slays or new attacktypes */ + /* + @@ Quick hack to allow already enchanted items of this god to add + slaying and attacktype. Presumably negating the above comment. + */ + /* Allow the weapon to slay enemies */ + if (!weapon->slaying && god->slaying) { + weapon->slaying = add_string(god->slaying); + draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ITEM, MSG_TYPE_ITEM_CHANGE, + "Your %s now hungers to slay enemies of your god!", + "Your %s now hungers to slay enemies of your god!", + weapon->name); + weapon->item_power++; + return 1; + } + /* Add the gods attacktype */ + attacktype = (weapon->attacktype == 0) ? AT_PHYSICAL : weapon->attacktype; + if ((attacktype&god->attacktype) != god->attacktype) { + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ITEM, MSG_TYPE_ITEM_CHANGE, + "Your weapon suddenly glows!", NULL); + weapon->attacktype = attacktype|god->attacktype; + weapon->item_power++; + return 1; + } + return improve_weapon_magic(op, tr, weapon, skill); }