forked from github/server
Bauernblut verwandelt Bauernarmee in Ghast Habe das auf temporäre Kröten geändert, analog zu Magiern
This commit is contained in:
parent
4be3bc99fa
commit
eb2334124e
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1993,18 +1993,13 @@ 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue