BUG 2358: Schiffbeschleunigung dauert laenger als eine Woche.

This commit is contained in:
Enno Rehling 2017-08-20 19:07:52 +02:00
parent 89d50e9b72
commit 134ff982ba
5 changed files with 9 additions and 5 deletions

View File

@ -332,7 +332,7 @@ int shipspeed(const ship * sh, const unit * u)
return 0;
if (sh->attribs) {
if (curse_active(get_curse(sh->attribs, ct_find("stormwind")))) {
if (curse_active(get_curse(sh->attribs, &ct_stormwind))) {
k *= 2;
}
if (curse_active(get_curse(sh->attribs, ct_find("nodrift")))) {

View File

@ -432,8 +432,11 @@ static void test_shipspeed_stormwind(CuTest *tc) {
register_shipcurse();
assert(sh && cap && crew);
create_curse(0, &sh->attribs, ct_find("stormwind"), 1, 1, 1, 0);
create_curse(0, &sh->attribs, &ct_stormwind, 1, 1, 1, 0);
CuAssertPtrNotNull(tc, sh->attribs);
CuAssertIntEquals_Msg(tc, "stormwind doubles ship range", sh->type->range * 2, shipspeed(sh, cap));
a_age(&sh->attribs, sh);
CuAssertPtrEquals(tc, NULL, sh->attribs);
test_cleanup();
}

View File

@ -2276,7 +2276,7 @@ static int sp_stormwinds(castorder * co)
}
/* Duration = 1, nur diese Runde */
create_curse(mage, &sh->attribs, ct_find("stormwind"), power, 1,
create_curse(mage, &sh->attribs, &ct_stormwind, power, 1,
zero_effect, 0);
/* Da der Spruch nur diese Runde wirkt wird er nie im Report
* erscheinen */

View File

@ -72,8 +72,8 @@ static message *cinfo_shipnodrift(const void *obj, objtype_t typ, const curse *
return msg_message("curseinfo::shipnodrift_0", "ship id", sh, c->no);
}
static struct curse_type ct_stormwind = { "stormwind",
CURSETYP_NORM, CURSE_NOAGE, NO_MERGE, cinfo_ship
const struct curse_type ct_stormwind = { "stormwind",
CURSETYP_NORM, 0, NO_MERGE, cinfo_ship
};
static struct curse_type ct_nodrift = { "nodrift",

View File

@ -23,6 +23,7 @@ extern "C" {
struct curse;
extern const struct curse_type ct_shipspeedup;
extern const struct curse_type ct_stormwind;
struct message *cinfo_ship(const void *obj, objtype_t typ,
const struct curse *c, int self);