version 1.20 | | version 1.21 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_util_c = | | * static char *rcsid_spell_util_c = |
* "$Id: spell_util.c,v 1.20 2000/10/20 08:11:33 peterm Exp $"; | | * "$Id: spell_util.c,v 1.21 2000/10/20 19:39:47 peterm Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
SET_FLAG(tmp, FLAG_MONSTER); | | SET_FLAG(tmp, FLAG_MONSTER); |
} | | } |
| | |
| | /* make the speed positive.*/ |
| | |
| | if(tmp->speed < 0) tmp->speed = -tmp->speed; |
| | |
/* This sets the level dependencies on dam and hp for monsters */ | | /* This sets the level dependencies on dam and hp for monsters */ |
| | if(op->type==PLAYER) { /* players can't cope with too strong summonings. */ |
| | /* but monsters can. reserve these for players. */ |
tmp->stats.hp = SP_PARAMETERS[spellnum].bdur + | | tmp->stats.hp = SP_PARAMETERS[spellnum].bdur + |
10 * SP_level_strength_adjust(op,caster,spellnum); | | 10 * SP_level_strength_adjust(op,caster,spellnum); |
tmp->stats.dam= SP_PARAMETERS[spellnum].bdam + | | tmp->stats.dam= SP_PARAMETERS[spellnum].bdam + |
2* SP_level_dam_adjust(op,caster,spellnum); | | 2* SP_level_dam_adjust(op,caster,spellnum); |
tmp->stats.wc -= SP_level_dam_adjust(op,caster,spellnum); | | |
if(tmp->speed < 0) tmp->speed = -tmp->speed; | | |
tmp->speed += .02 * SP_level_dam_adjust(op,caster,spellnum); | | tmp->speed += .02 * SP_level_dam_adjust(op,caster,spellnum); |
/* limit the speed to 0.3 for non-players, 1 for players. */ | | |
if(op->type!=PLAYER) | | |
tmp->speed = MIN(tmp->speed,0.3); | | |
tmp->speed = MIN(tmp->speed, 1.0); | | tmp->speed = MIN(tmp->speed, 1.0); |
| | } |
| | tmp->stats.wc -= SP_level_dam_adjust(op,caster,spellnum); |
| | |
| | /* limit the speed to 0.3 for non-players, 1 for players. */ |
| | |
if(tmp->stats.dam<0) tmp->stats.dam=127; /*seen this go negative!*/ | | if(tmp->stats.dam<0) tmp->stats.dam=127; /*seen this go negative!*/ |
/* make experience increase in proportion to the strength of the summoned creature. */ | | /* make experience increase in proportion to the strength of the summoned creature. */ |
tmp->stats.exp *= SP_level_spellpoint_cost(op,caster,spellnum)/spells[spellnum].sp; | | tmp->stats.exp *= SP_level_spellpoint_cost(op,caster,spellnum)/spells[spellnum].sp; |