From 4d383807667bc7cfff0585dd023c779ce6db7340 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 23 Oct 2005 10:15:30 +0000 Subject: [PATCH] removed R_ANTIMAGICCRYSTAL as well. --- src/common/gamecode/items.c | 9 +++++++-- src/common/kernel/item.h | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/gamecode/items.c b/src/common/gamecode/items.c index 8870a1f2a..c69ca0938 100644 --- a/src/common/gamecode/items.c +++ b/src/common/gamecode/items.c @@ -98,7 +98,13 @@ use_speedsail(struct unit * u, const struct item_type * itype, int amount, struc static void use_antimagiccrystal(region * r, unit * mage, int amount, struct order * ord) { + const resource_type rt_crystal = NULL; int i; + + if (rt_crystal == NULL) { + rt_crystal = rt_find("antimagic"); + assert(rt_crystal!=NULL); + } for (i=0;i!=amount;++i) { int effect, duration = 2; double force; @@ -143,9 +149,8 @@ use_antimagiccrystal(region * r, unit * mage, int amount, struct order * ord) var.i = effect; create_curse(mage, &r->attribs, ct_find("antimagiczone"), force, duration, var, 0); } - } - use_pooled(mage, mage->region, R_ANTIMAGICCRYSTAL, amount); + new_use_pooled(mage, rt_crystal, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, amount); ADDMSG(&mage->faction->msgs, msg_message("use_antimagiccrystal", "unit region", mage, r)); return; diff --git a/src/common/kernel/item.h b/src/common/kernel/item.h index 59a185293..e9fce53f9 100644 --- a/src/common/kernel/item.h +++ b/src/common/kernel/item.h @@ -374,7 +374,6 @@ enum { R_PEGASUS, R_UNICORN, R_DOLPHIN, - R_ANTIMAGICCRYSTAL, R_RING_OF_NIMBLEFINGER, R_TROLLBELT, R_PRESSCARD,