* fix ageing effect on certain curses.
This commit is contained in:
Enno Rehling 2009-07-30 19:30:01 +00:00
parent ecc5d85118
commit d530340db6
2 changed files with 7 additions and 6 deletions

View File

@ -4151,18 +4151,19 @@ processorders (void)
process(); process();
/*************************************************/ /*************************************************/
if (get_param_int(global.parameters, "modules.markets", 0)) {
do_markets();
}
if (verbosity>=1) puts(" - Attribute altern"); if (verbosity>=1) puts(" - Attribute altern");
ageing(); ageing();
remove_empty_units(); remove_empty_units();
/* must happen AFTER age, because that would destroy them right away */
if (get_param_int(global.parameters, "modules.wormholes", 0)) { if (get_param_int(global.parameters, "modules.wormholes", 0)) {
create_wormholes(); create_wormholes();
} }
if (get_param_int(global.parameters, "modules.markets", 0)) {
do_markets();
}
/* immer ausführen, wenn neue Sprüche dazugekommen sind, oder sich /* immer ausführen, wenn neue Sprüche dazugekommen sind, oder sich
* Beschreibungen geändert haben */ * Beschreibungen geändert haben */
update_spells(); update_spells();

View File

@ -5260,10 +5260,10 @@ sp_itemcloak(castorder *co)
{ {
unit *target; unit *target;
unit *mage = co->magician.u; unit *mage = co->magician.u;
spellparameter *pa = co->par;
int cast_level = co->level; int cast_level = co->level;
double power = co->force; double power = co->force;
int duration = (int)power+1; int duration = (int)MAX(2.0, power+1); /* works in the report, and ageing this round would kill it if it's <=1 */
spellparameter *pa = co->par;
/* wenn kein Ziel gefunden, Zauber abbrechen */ /* wenn kein Ziel gefunden, Zauber abbrechen */
if (pa->param[0]->flag == TARGET_NOTFOUND) return 0; if (pa->param[0]->flag == TARGET_NOTFOUND) return 0;