ring-of-power bonus for elves in a forest

This commit is contained in:
Enno Rehling 2009-06-14 22:06:35 +00:00
parent dc9c2d635a
commit 67a1e18723
3 changed files with 10 additions and 0 deletions

View File

@ -722,6 +722,7 @@ static int
CavalryBonus(const unit * u, troop enemy)
{
static int mode = -1;
if (mode<0) {
mode = get_param_int(global.parameters, "rules.cavalry.mode", 1);
}

View File

@ -1081,6 +1081,8 @@ spellpower(region * r, unit * u, const spell * sp, int cast_level, struct order
{
curse * c;
double force = cast_level;
int elf_power = -1;
if (sp==NULL) {
return 0;
} else {
@ -1091,6 +1093,12 @@ spellpower(region * r, unit * u, const spell * sp, int cast_level, struct order
}
if (get_item(u, I_RING_OF_POWER) > 0) ++force;
if (elf_power<0) {
elf_power = get_param_int(global.parameters, "rules.magic.elfpower", 0);
}
if (elf_power && u->race==new_race[RC_ELF] && r_isforest(r)) {
++force;
}
/* Antimagie in der Zielregion */
c = get_curse(r->attribs, ct_find("antimagiczone"));

View File

@ -138,6 +138,7 @@
<param name="rules.cavalry.mode" value="1"/>
<param name="rules.magic.factionlist" value="1"/>
<param name="rules.magic.common" value="tybied"/> <!-- tybied spells can be cast by anyone -->
<param name="rules.magic.elfpower" value="1"/> <!-- elves get ring-of-power bonus in a forest -->
<param name="rules.magic.playerschools" value="gwyrrd illaun draig cerddor"/>
<param name="rules.economy.taxation" value="1"/>
<param name="rules.economy.wages" value="1"/>