From 182fc3fa3c2f574685600498586972bfde848ece Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 12 Feb 2017 19:32:27 +0100 Subject: [PATCH] remove test for bug 2253 --- src/give.test.c | 6 ------ src/spells.c | 11 ++++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/give.test.c b/src/give.test.c index 029ee7c44..7da787c87 100644 --- a/src/give.test.c +++ b/src/give.test.c @@ -124,12 +124,6 @@ static void test_give_men_magicians(CuTest * tc) { CuAssertIntEquals(tc, 1, env.src->number); msg_release(msg); - - set_number(env.dst, 0); - CuAssertPtrEquals(tc, NULL, give_men(1, env.src, env.dst, NULL)); - CuAssertIntEquals(tc, 1, env.dst->number); - CuAssertIntEquals(tc, 0, env.src->number); - p = rpeasants(env.r); CuAssertPtrNotNull(tc, msg = disband_men(1, env.dst, NULL)); CuAssertStrEquals(tc, "give_person_peasants", (const char *)msg->parameters[0].v); diff --git a/src/spells.c b/src/spells.c index 19c1e81f8..b40192016 100644 --- a/src/spells.c +++ b/src/spells.c @@ -4714,7 +4714,6 @@ static int sp_gbdreams(castorder * co, const char *curse_name, int effect) int cast_level = co->level; double power = co->force; region *r = co_get_region(co); - curse *c; /* wirkt erst in der Folgerunde, soll mindestens eine Runde wirken, * also duration+2 */ @@ -4722,8 +4721,8 @@ static int sp_gbdreams(castorder * co, const char *curse_name, int effect) duration = 2 + rng_int() % duration; /* Nichts machen als ein entsprechendes Attribut in die Region legen. */ - c = create_curse(mage, &r->attribs, ct_find(curse_name), power, duration, effect, 0); - + create_curse(mage, &r->attribs, ct_find(curse_name), power, duration, effect, 0); + /* Erfolg melden */ ADDMSG(&mage->faction->msgs, msg_message("regionmagic_effect", "unit region command", mage, mage->region, co->order)); @@ -4841,7 +4840,6 @@ int sp_sweetdreams(castorder * co) /* Schleife ueber alle angegebenen Einheiten */ for (n = 0; n < pa->length; n++) { - curse *c; unit *u; double effect; message *msg; @@ -4865,7 +4863,7 @@ int sp_sweetdreams(castorder * co) /* Nichts machen als ein entsprechendes Attribut an die Einheit legen. */ effect = 0.05f; - c = create_curse(mage, &u->attribs, ct_find("orcish"), power, duration, effect, men); + create_curse(mage, &u->attribs, ct_find("orcish"), power, duration, effect, men); msg = msg_message("sp_sweetdreams_effect", "mage unit region", mage, u, r); r_addmessage(r, mage->faction, msg); @@ -4886,10 +4884,9 @@ int sp_disturbingdreams(castorder * co) double power = co->force; int duration = 1 + (int)(power / 6); double effect; - curse *c; effect = 10; - c = create_curse(mage, &r->attribs, ct_find("badlearn"), power, duration, effect, 0); + create_curse(mage, &r->attribs, ct_find("badlearn"), power, duration, effect, 0); ADDMSG(&mage->faction->msgs, msg_message("sp_disturbingdreams_effect", "mage region", mage, r));