From 69e28034b458ad1afd34cb51e49ec088710a111a Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 27 Feb 2017 21:00:15 +0100 Subject: [PATCH] Kill unused "magicboost" function. I have no idea why this exists. --- src/items.c | 3 +++ src/kernel/item.c | 32 -------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/src/items.c b/src/items.c index 51a4b2970..78f6e3188 100644 --- a/src/items.c +++ b/src/items.c @@ -424,4 +424,7 @@ void register_itemfunctions(void) register_item_use(use_bloodpotion, "use_peasantblood"); register_item_use(use_healingpotion, "use_ointment"); register_item_use(use_warmthpotion, "use_nestwarmth"); + + /* ungetestet: Wasser des Lebens */ + register_item_use(use_potion_delayed, "use_p2"); } diff --git a/src/kernel/item.c b/src/kernel/item.c index 8d5224d79..6bd97e6dd 100644 --- a/src/kernel/item.c +++ b/src/kernel/item.c @@ -726,35 +726,6 @@ struct order *), const char *name) register_function((pf_generic)foo, name); } -static int -use_magicboost(struct unit *user, const struct item_type *itype, int amount, -struct order *ord) -{ - int mtoes = - get_pooled(user, itype->rtype, GET_SLACK | GET_RESERVE | GET_POOLED_SLACK, - user->number); - faction *f = user->faction; - if (user->number > mtoes) { - ADDMSG(&user->faction->msgs, msg_message("use_singleperson", - "unit item region command", user, itype->rtype, user->region, ord)); - return -1; - } - if (!is_mage(user) || key_get(f->attribs, atoi36("mbst"))) { - cmistake(user, user->thisorder, 214, MSG_EVENT); - return -1; - } - use_pooled(user, itype->rtype, GET_SLACK | GET_RESERVE | GET_POOLED_SLACK, - user->number); - - key_set(&f->attribs, atoi36("mbst"), turn); - set_level(user, SK_MAGIC, 3); - - ADDMSG(&user->faction->msgs, msg_message("use_item", - "unit item", user, itype->rtype)); - - return 0; -} - static void init_oldpotions(void) { const char *potionnames[MAX_POTIONS] = { @@ -1085,8 +1056,5 @@ void register_resources(void) register_function((pf_generic)res_changehp, "changehp"); register_function((pf_generic)res_changeaura, "changeaura"); - register_item_use(use_potion_delayed, "use_p2"); - register_item_use(use_magicboost, "usemagicboost"); - register_item_give(give_horses, "givehorses"); }