Bauernblut verwandelt Bauernarmee in Ghast
  Habe das auf temporäre Kröten geändert, analog zu Magiern
This commit is contained in:
Enno Rehling 2004-07-06 18:40:08 +00:00
parent 4be3bc99fa
commit eb2334124e
3 changed files with 6 additions and 20 deletions

View File

@ -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)
{

View File

@ -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;

View File

@ -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;
}