6#ifndef BOMBERMAN_SIM_POWERUPCONFIG_H
7#define BOMBERMAN_SIM_POWERUPCONFIG_H
37 PowerupType::SpeedBoost,
38 PowerupType::Invincibility,
39 PowerupType::BombRangeBoost,
40 PowerupType::MaxBombsBoost
77 static_assert(
static_cast<std::size_t
>(PowerupType::MaxBombsBoost) + 1u ==
kPowerupTypeCount,
78 "kPowerupTypeCount must match the defined powerup enum range");
83 return rawType ==
static_cast<uint8_t
>(PowerupType::SpeedBoost) ||
84 rawType ==
static_cast<uint8_t
>(PowerupType::Invincibility) ||
85 rawType ==
static_cast<uint8_t
>(PowerupType::BombRangeBoost) ||
86 rawType ==
static_cast<uint8_t
>(PowerupType::MaxBombsBoost);
94 case PowerupType::SpeedBoost:
96 case PowerupType::Invincibility:
97 return "Invincibility";
98 case PowerupType::BombRangeBoost:
99 return "BombRangeBoost";
100 case PowerupType::MaxBombsBoost:
101 return "MaxBombsBoost";
110 return static_cast<std::size_t
>(type);
118 case PowerupType::SpeedBoost:
120 case PowerupType::Invincibility:
122 case PowerupType::BombRangeBoost:
124 case PowerupType::MaxBombsBoost:
Shared simulation tuning constants used by client and server gameplay code.
Shared simulation primitives and constants used by both the client and the authoritative server.
Definition Movement.h:21
constexpr uint8_t kPowerupsPerRound
Number of hidden powerups seeded into each round when enabled.
Definition PowerupConfig.h:44
constexpr std::array< PowerupType, 4 > kRoundPowerupPlacements
Stable per-round hidden placements seeded under random bricks.
Definition PowerupConfig.h:36
constexpr uint32_t kDefaultPowerupDurationTicks
Default temporary powerup lifetime in simulation ticks.
Definition PowerupConfig.h:47
constexpr uint32_t kPowerupPlacementSeedSalt
Deterministic salt mixed into round placement RNG so repeated map seeds can still vary by round.
Definition PowerupConfig.h:75
constexpr uint32_t kInvincibilityDurationTicks
Invincibility lifetime in simulation ticks.
Definition PowerupConfig.h:50
PowerupType
Supported temporary multiplayer powerup effects.
Definition PowerupConfig.h:22
constexpr uint32_t powerupEffectDurationTicks(const PowerupType type)
Returns the configured lifetime for one powerup effect.
Definition PowerupConfig.h:114
constexpr std::string_view powerupTypeName(const PowerupType type)
Returns a human-readable name for one powerup type.
Definition PowerupConfig.h:90
constexpr bool isValidPowerupType(const uint8_t rawType)
Returns true when a raw byte encodes one of the defined powerup types.
Definition PowerupConfig.h:81
constexpr std::size_t powerupTypeIndex(const PowerupType type)
Returns the stable array index used for per-type powerup stats.
Definition PowerupConfig.h:108
constexpr uint32_t kBombRangeBoostDurationTicks
Bomb-range boost lifetime in simulation ticks.
Definition PowerupConfig.h:56
constexpr int16_t kTickRate
Simulation tick rate in Hz.
Definition SimConfig.h:14
constexpr uint32_t kMaxBombsBoostDurationTicks
Max-bombs boost lifetime in simulation ticks.
Definition PowerupConfig.h:59
constexpr uint32_t kSpeedBoostDurationTicks
Speed boost lifetime in simulation ticks.
Definition PowerupConfig.h:53
constexpr uint8_t kBombRangeBoostAmount
Additional blast radius applied to bombs placed during the range boost.
Definition PowerupConfig.h:69
constexpr int32_t kSpeedBoostPlayerSpeedQ
Movement speed in tile-Q8 units per simulation tick while the speed boost is active.
Definition PowerupConfig.h:65
constexpr uint8_t kBoostedMaxBombs
Bomb-cap target while the max-bombs boost is active.
Definition PowerupConfig.h:72
constexpr double kSpeedBoostTilesPerSecond
Future movement-speed target while the speed boost is active.
Definition PowerupConfig.h:62
constexpr std::size_t kPowerupTypeCount
Number of defined multiplayer powerup types.
Definition PowerupConfig.h:18