forked from github/server
Merge branch 'master' of gitorious.org:eressea/server
This commit is contained in:
commit
bc48f3c29e
2 changed files with 11 additions and 7 deletions
|
@ -2354,7 +2354,7 @@
|
||||||
<arg name="spell" type="spell"/>
|
<arg name="spell" type="spell"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) schafft es nicht, genug Kraft aufzubringen, um $spell($spell) auf Stufe $int($level) zu zaubern."</text>
|
<text locale="de">"$unit($unit) schafft es nicht, genug Kraft aufzubringen, um $spell($spell) auf Stufe $int($level) zu zaubern."</text>
|
||||||
<text locale="en">"$unit($unit) cannot muster enough energy to cast $spell($spell) on level $level($level)."</text>
|
<text locale="en">"$unit($unit) cannot muster enough energy to cast $spell($spell) on level $int($level)."</text>
|
||||||
</message>
|
</message>
|
||||||
<message name="missing_components_list" section="errors">
|
<message name="missing_components_list" section="errors">
|
||||||
<type>
|
<type>
|
||||||
|
|
|
@ -1128,6 +1128,7 @@ double magic_resistance(unit * target)
|
||||||
attrib *a;
|
attrib *a;
|
||||||
curse *c;
|
curse *c;
|
||||||
int n;
|
int n;
|
||||||
|
const curse_type * ct_goodresist = 0, * ct_badresist = 0;
|
||||||
|
|
||||||
/* Bonus durch Rassenmagieresistenz */
|
/* Bonus durch Rassenmagieresistenz */
|
||||||
double probability = target->race->magres;
|
double probability = target->race->magres;
|
||||||
|
@ -1149,21 +1150,24 @@ double magic_resistance(unit * target)
|
||||||
|
|
||||||
/* Auswirkungen von Zaubern auf der Region */
|
/* Auswirkungen von Zaubern auf der Region */
|
||||||
a = a_find(target->region->attribs, &at_curse);
|
a = a_find(target->region->attribs, &at_curse);
|
||||||
|
if (a) {
|
||||||
|
ct_badresist = ct_find("badmagicresistancezone");
|
||||||
|
ct_goodresist = ct_find("goodmagicresistancezone");
|
||||||
|
}
|
||||||
while (a && a->type == &at_curse) {
|
while (a && a->type == &at_curse) {
|
||||||
curse *c = (curse *) a->data.v;
|
curse *c = (curse *) a->data.v;
|
||||||
unit *mage = c->magician;
|
unit *mage = c->magician;
|
||||||
|
|
||||||
if (mage != NULL) {
|
if (mage != NULL) {
|
||||||
if (c->type == ct_find("goodmagicresistancezone")) {
|
if (ct_goodresist && c->type == ct_goodresist) {
|
||||||
if (alliedunit(mage, target->faction, HELP_GUARD)) {
|
if (alliedunit(mage, target->faction, HELP_GUARD)) {
|
||||||
probability += curse_geteffect(c) * 0.01;
|
probability += curse_geteffect(c) * 0.01;
|
||||||
break;
|
ct_goodresist = 0; /* only one effect per region */
|
||||||
}
|
}
|
||||||
} else if (c->type == ct_find("badmagicresistancezone")) {
|
} else if (ct_badresist && c->type == ct_badresist) {
|
||||||
if (alliedunit(mage, target->faction, HELP_GUARD)) {
|
if (alliedunit(mage, target->faction, HELP_GUARD)) {
|
||||||
/* TODO: hier sollte doch sicher was passieren? */
|
probability -= curse_geteffect(c) * 0.01;
|
||||||
a = a->next;
|
ct_badresist = 0; /* only one effect per region */
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue