Powerup Curiosity

Heya,

So I am running some tests,

I see the following under the Domain / Enums / Powerups:
namespace Sproutopia.Enums
{
public enum PowerUpType
{
NONE = 0,
TerritoryImmunity = 1,
Unprunable = 2,
Freeze = 3,
}

public enum SuperPowerUpType
{
    NONE = 0,
    TrailProtection = 4,
    SuperFertilizer = 5,
}

}

But under the botState.powerUpLocations I get example:
Power Locations:[{“location”:{“x”:14,“y”:24},“type”:14}]

Where is this Mapping found? And what am I missing that forces the type to equal 14?

Excuse the late response on this, only really looking at the power ups in Depth now…

Morning @WillieTheron, my apologies for taking so long to respond to this. This value of 14 is definitely incorrect. The PowerUpType and SuperPowerUpType enums have deliberately been defined with non-overlapping values so that they can be combined in a single structure, such as the powerUpLocations on BotState. But when we map the GameState to a BotStateDTO (line 239 of GameState.cs), for some reason we add 10 to the value. I can only guess that we must have done on the incorrect assumption that the enums would overlap.

We will fix this in the next release.

It did just add 10 so I mapped 14 and 15,

Thank you,

I also saw some really weird behavior of the Super Fertilizer itself.

But I would not change anything that isnt gamebreaking at this stage.

Id even say we could leave the values as 14 and 15 and just update the documentation.
**Sort of have a code freeze in place.

Just now like me someone did map to 14 and 15 and this change throws their training off.
*Id only need to change two values myself.

I agree with @WillieTheron - I think a breaking change at this stage is too late in the game (no pun intended). It might be better to just update the docs to reflect the game engine’s actual behaviour.

2 Likes