diff --git a/src/alchemy.h b/src/alchemy.h index 6dec4120b..b89d1c27f 100644 --- a/src/alchemy.h +++ b/src/alchemy.h @@ -41,11 +41,7 @@ extern "C" { /* Stufe 3 */ P_WISE, /* 6 */ P_FOOL, -#ifdef INSECT_POTION - P_WARMTH, -#else P_STEEL, -#endif P_HORSE, P_BERSERK, /* 10 */ /* Stufe 4 */ diff --git a/src/kernel/faction.h b/src/kernel/faction.h index a04acabfa..8b8c88abe 100644 --- a/src/kernel/faction.h +++ b/src/kernel/faction.h @@ -84,9 +84,6 @@ extern "C" { score_t score; struct alliance *alliance; int alliance_joindate; /* the turn on which the faction joined its current alliance (or left the last one) */ -#ifdef VICTORY_DELAY - unsigned char victory_delay; -#endif struct unit *units; struct attrib *attribs; struct message_list *msgs; diff --git a/src/spells.c b/src/spells.c index e2fc3fcd3..b25b933fd 100644 --- a/src/spells.c +++ b/src/spells.c @@ -1280,10 +1280,8 @@ static int sp_rosthauch(castorder * co) add_ironweapon(it_find("axe"), it_find("rustyaxe"), 1.0); add_ironweapon(it_find("greatsword"), it_find("rustygreatsword"), 1.0); add_ironweapon(it_find("halberd"), it_find("rustyhalberd"), 0.5f); -#ifndef NO_RUSTY_ARMOR add_ironweapon(it_find("shield"), it_find("rustyshield"), 0.5f); add_ironweapon(it_find("chainmail"), it_find("rustychainmail"), 0.2f); -#endif } if (force > 0) { @@ -5454,7 +5452,8 @@ int sp_fetchastral(castorder * co) return cast_level; } -#ifdef SHOWASTRAL_NOT_BORKED +#define SHOWASTRAL_IS_BORKED +#ifndef SHOWASTRAL_IS_BORKED int sp_showastral(castorder * co) { unit *u; @@ -6493,7 +6492,7 @@ static spelldata spell_functions[] = { { "analyze_magic", sp_analysemagic, 0 }, { "concealing_aura", sp_itemcloak, 0 }, { "tybiedfumbleshield", sp_fumbleshield, 0 }, -#ifdef SHOWASTRAL_NOT_BORKED +#ifndef SHOWASTRAL_IS_BORKED { "show_astral", sp_showastral, 0 }, #endif { "resist_magic", sp_resist_magic_bonus, 0 }, diff --git a/src/study.c b/src/study.c index 9264f9060..a80577af9 100644 --- a/src/study.c +++ b/src/study.c @@ -811,23 +811,21 @@ void produceexp(struct unit *u, skill_t sk, int n) produceexp_ex(u, sk, n, learn_skill); } -#ifndef NO_TESTS static learn_fun inject_learn_fun = 0; void inject_learn(learn_fun fun) { inject_learn_fun = fun; } -#endif + /** days should be scaled by u->number; STUDYDAYS * u->number is one week worth of learning */ void learn_skill(unit *u, skill_t sk, int days) { int leveldays = STUDYDAYS * u->number; int weeks = 0; -#ifndef NO_TESTS + if (inject_learn_fun) { inject_learn_fun(u, sk, days); return; } -#endif while (days >= leveldays) { ++weeks; days -= leveldays;