MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / spawnEnzymeSmoke

Method spawnEnzymeSmoke

game/state/battle/battleunit.cpp:4056–4066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4054}
4055
4056void BattleUnit::spawnEnzymeSmoke(GameState &state)
4057{
4058 // FIXME: Ensure this is proper, for now just emulating vanilla crudely
4059 // This makes smoke spawned by enzyme grow smaller when debuff runs out
4060 int divisor = std::max(1, 36 / enzymeDebuffIntensity);
4061 StateRef<DamageType> smokeDamageType = {&state, "DAMAGETYPE_SMOKE"};
4062 // Power of 0 means no spread
4063 state.current_battle->placeHazard(state, owner, {&state, id}, smokeDamageType, position,
4064 smokeDamageType->hazardType->getLifetime(state), 0, divisor,
4065 false);
4066}
4067
4068void BattleUnit::sendAgentEvent(GameState &state, GameEventType type, bool checkOwnership,
4069 bool checkVisibility) const

Callers

nothing calls this directly

Calls 2

placeHazardMethod · 0.80
getLifetimeMethod · 0.80

Tested by

no test coverage detected