untoten aufstufen zauber wandelt auch hp mit, damit die besseren untoten

nicht von anfang an schwer verwundet sind
This commit is contained in:
Katja Zedel 2002-11-24 08:28:16 +00:00
parent cccc612fc7
commit 4a25f466dd
1 changed files with 8 additions and 0 deletions

View File

@ -3193,6 +3193,7 @@ sp_unholypower(castorder *co)
spellparameter *pa = co->par; spellparameter *pa = co->par;
int i; int i;
int n; int n;
int wounds;
n = dice(co->force, 10); n = dice(co->force, 10);
@ -3220,10 +3221,14 @@ sp_unholypower(castorder *co)
cmistake(mage, strdup(co->order), 284, MSG_MAGIC); cmistake(mage, strdup(co->order), 284, MSG_MAGIC);
continue; continue;
} }
/* Untote heilen nicht, darum den neuen Untoten maximale hp geben
* und vorhandene Wunden abziehen */
wounds = unit_max_hp(u)*u->number - u->hp;
if(u->number <= n) { if(u->number <= n) {
n -= u->number; n -= u->number;
u->race = target_race; u->race = target_race;
u->hp = unit_max_hp(u)*u->number - wounds;
add_message(&co->rt->msgs, msg_message("unholypower_effect", add_message(&co->rt->msgs, msg_message("unholypower_effect",
"mage target race", mage, u, target_race)); "mage target race", mage, u, target_race));
} else { } else {
@ -3238,6 +3243,8 @@ sp_unholypower(castorder *co)
cmistake(mage, strdup(co->order), 74, MSG_MAGIC); cmistake(mage, strdup(co->order), 74, MSG_MAGIC);
continue; continue;
} }
/* Verletzungsanteil der transferierten Personen berechnen */
wounds = wounds*n/u->number;
un = createunit(co->rt, u->faction, 0, target_race); un = createunit(co->rt, u->faction, 0, target_race);
if (co->rt==u->region) { if (co->rt==u->region) {
@ -3245,6 +3252,7 @@ sp_unholypower(castorder *co)
un->ship = u->ship; un->ship = u->ship;
} }
transfermen(u, un, n); transfermen(u, un, n);
un->hp = unit_max_hp(un)*n - wounds;
add_message(&co->rt->msgs, msg_message("unholypower_limitedeffect", add_message(&co->rt->msgs, msg_message("unholypower_limitedeffect",
"mage target race amount", "mage target race amount",
mage, u, target_race, n)); mage, u, target_race, n));