diff --git a/src/common/kernel/alchemy.c b/src/common/kernel/alchemy.c index 4684e4fad..960a03368 100644 --- a/src/common/kernel/alchemy.c +++ b/src/common/kernel/alchemy.c @@ -87,12 +87,6 @@ herbsearch(region * r, unit * u, int max) } } -#ifdef OLD_DEMON_POTION -attrib_type at_bauernblut = { - "bauernblut", NULL, NULL, NULL, NULL, NULL -}; -#endif - int use_potion(unit * u, const item_type * itype, int amount, struct order *ord) { diff --git a/src/common/kernel/alchemy.h b/src/common/kernel/alchemy.h index 5c3c61ce4..2a6ffeab7 100644 --- a/src/common/kernel/alchemy.h +++ b/src/common/kernel/alchemy.h @@ -83,9 +83,6 @@ void herbsearch(struct region * r, struct unit * u, int max); int use_potion(struct unit * u, const struct item_type * itype, int amount, struct order *); void init_potions(void); -#ifdef OLD_DEMON_POTION -extern struct attrib_type at_bauernblut; -#endif extern int get_effect(const struct unit * u, const struct potion_type * effect); extern int change_effect(struct unit * u, const struct potion_type * effect, int value); extern attrib_type at_effect; diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index 525897bbb..2bcdf21d7 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -1993,19 +1993,14 @@ use_bloodpotion(struct unit *u, const struct potion_type *ptype, int amount, str assert(ptype==oldpotiontype[P_BAUERNBLUT]); unused(ptype); if (u->race == new_race[RC_DAEMON] ) { -#ifdef OLD_DEMON_POTION - attrib * a = (attrib*)a_find(u->attribs, &at_bauernblut); - if (!a) a = a_add(&u->attribs, a_new(&at_bauernblut)); - a->data.i += 100*amount; -#else change_effect(u, ptype, 100*amount); -#endif } else { - /* bekommt nicht: */ - cmistake(u, ord, 165, MSG_EVENT); - u->race = new_race[RC_GHOUL]; - u_setfaction(u, findfaction(MONSTER_FACTION)); - } + trigger * trestore = trigger_changerace(u, u->race, u->irace); + int duration = 2 + rand() % 8; + + add_trigger(&u->attribs, "timer", trigger_timeout(duration, trestore)); + u->irace = u->race = new_race[RC_TOAD]; + } return 0; }