Rename some German symbols to English.

I felt like I needed to make a commit today.
This commit is contained in:
Enno Rehling 2014-02-17 02:20:30 -08:00
parent 8e611d759d
commit 3db9fcf82f
3 changed files with 16 additions and 18 deletions

View File

@ -1273,7 +1273,7 @@ bool fumble(region * r, unit * u, const spell * sp, int cast_grade)
int rnd = 0; int rnd = 0;
double x = (double)cast_grade / (double)eff_skill(u, SK_MAGIC, r); double x = (double)cast_grade / (double)eff_skill(u, SK_MAGIC, r);
int patzer = (int)(((double)x * 40.0) - 20.0); int fumble_chance = (int)(((double)x * 40.0) - 20.0);
struct building *b = inside_building(u); struct building *b = inside_building(u);
const struct building_type *btype = b ? b->type : NULL; const struct building_type *btype = b ? b->type : NULL;
int fumble_enabled = get_param_int(global.parameters, "magic.fumble.enable", 1); int fumble_enabled = get_param_int(global.parameters, "magic.fumble.enable", 1);
@ -1283,38 +1283,34 @@ bool fumble(region * r, unit * u, const spell * sp, int cast_grade)
return false; return false;
} }
if (btype) if (btype)
patzer -= btype->fumblebonus; fumble_chance -= btype->fumblebonus;
/* CHAOSPATZERCHANCE 10 : +10% Chance zu Patzern */ /* CHAOSPATZERCHANCE 10 : +10% Chance zu Patzern */
mage = get_mage(u); mage = get_mage(u);
if (mage->magietyp == M_DRAIG) { if (mage->magietyp == M_DRAIG) {
patzer += CHAOSPATZERCHANCE; fumble_chance += CHAOSPATZERCHANCE;
} }
if (is_cursed(u->attribs, C_MBOOST, 0)) { if (is_cursed(u->attribs, C_MBOOST, 0)) {
patzer += CHAOSPATZERCHANCE; fumble_chance += CHAOSPATZERCHANCE;
} }
if (is_cursed(u->attribs, C_FUMBLE, 0)) { if (is_cursed(u->attribs, C_FUMBLE, 0)) {
patzer += CHAOSPATZERCHANCE; fumble_chance += CHAOSPATZERCHANCE;
} }
/* wenn die Chance kleiner als 0 ist, können wir gleich false /* wenn die Chance kleiner als 0 ist, können wir gleich false
* zurückgeben */ * zurückgeben */
if (patzer <= 0) { if (fumble_chance <= 0) {
return false; return false;
} }
rnd = rng_int() % 100; rnd = rng_int() % 100;
if (rnd > patzer) { return (rnd <= fumble_chance);
/* Glück gehabt, kein Patzer */
return false;
}
return true;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
/* Dummy-Zauberpatzer, Platzhalter für speziel auf die Sprüche /* Dummy-Zauberpatzer, Platzhalter für speziel auf die Sprüche
* zugeschnittene Patzer */ * zugeschnittene Patzer */
static void patzer(castorder * co) static void fumble_default(castorder * co)
{ {
unit *mage = co->magician.u; unit *mage = co->magician.u;
@ -1342,10 +1338,12 @@ static void do_fumble(castorder * co)
switch (rng_int() % 10) { switch (rng_int() % 10) {
case 0: case 0:
/* wenn vorhanden spezieller Patzer, ansonsten nix */ /* wenn vorhanden spezieller Patzer, ansonsten nix */
if (sp->patzer) if (sp->fumble) {
sp->patzer(co); sp->fumble(co);
else }
patzer(co); else {
fumble_default(co);
}
break; break;
case 1: case 1:

View File

@ -35,7 +35,7 @@ extern "C" {
int rank; /* Reihenfolge der Zauber */ int rank; /* Reihenfolge der Zauber */
struct spell_component *components; struct spell_component *components;
spell_f cast; spell_f cast;
fumble_f patzer; fumble_f fumble;
} spell; } spell;
int use_item_power(struct region *r, struct unit *u); int use_item_power(struct region *r, struct unit *u);

View File

@ -1622,7 +1622,7 @@ static int parse_spells(xmlDocPtr doc)
} }
} }
sp->cast = (spell_f)cast; sp->cast = (spell_f)cast;
sp->patzer = (fumble_f)fumble; sp->fumble = (fumble_f)fumble;
xmlXPathFreeObject(result); xmlXPathFreeObject(result);
} }