WeaponOptions struct
#include <Jazz2/WeaponDefinition.h>
Options of a weapon a level can change, as JJ2+ scripts know them.
Scripts read and write the fields by their offsets (jjWEAPON), so a script changes the options the game itself plays by. The fields a script sees as int or as an enum stay 32 bits wide.
Public static functions
- static auto MakeDefault(WeaponType weaponType) -> WeaponOptions
- Returns the options of a weapon of the game.
Public functions
-
auto GetMaximumAmmo() const -> std::
int32_t - Returns the most ammo a player can have, in whole rounds before Multiplier.
- auto operator==(const WeaponOptions& other) const -> bool
- auto operator!=(const WeaponOptions& other) const -> bool
Public variables
-
std::
int32_t Multiplier - How many times as much ammo a pickup gives, the ammo shown is divided by it.
-
std::
int32_t Maximum - Most ammo a player can have, -1 for the default.
-
std::
int32_t GemsLost - Gems a player hit by a shot loses in Treasure Hunt.
-
std::
int32_t GemsLostPowerup - Gems a player hit by a powered-up shot loses in Treasure Hunt.
- WeaponSpread Spread
- How many shots it fires at once.
- WeaponStyle Style
- How it fires.
- bool Infinite
- Whether the ammo never runs out.
- bool Replenishes
- Whether the ammo is full again when the level starts.
- bool ReplacedByShield
- Whether a shield fires in place of the weapon while it lasts.
- bool ReplacedByBubbles
- Whether a shot under water is an air bubble.
- bool ComesFromGunCrates
- Whether a gun crate or barrel of random ammo may give its ammo.
- bool GradualAim
- Whether the shots turn towards where the player aims over a few shots, scripts only.
- bool DefaultSample
- Whether the sound of firing is played.
- bool Allowed
- Whether the weapon can be used in the level.
- bool AllowedPowerup
- Whether the weapon can be powered up in the level.
- bool ComesFromBirds
- Whether a bird helping the player fires it.
- bool ComesFromBirdsPowerup
- Whether a bird helping the player fires it powered up.