| 35 | } |
| 36 | |
| 37 | void BattleHazard::die(GameState &state, bool violently) |
| 38 | { |
| 39 | auto this_shared = shared_from_this(); |
| 40 | tileObject->removeFromMap(); |
| 41 | tileObject.reset(); |
| 42 | |
| 43 | if (!violently) |
| 44 | { |
| 45 | return; |
| 46 | } |
| 47 | // Place smoke where fire died off |
| 48 | if (damageType->effectType == DamageType::EffectType::Fire) |
| 49 | { |
| 50 | StateRef<DamageType> dtSmoke = {&state, "DAMAGETYPE_SMOKE"}; |
| 51 | state.current_battle->placeHazard(state, ownerOrganisation, ownerUnit, dtSmoke, position, |
| 52 | dtSmoke->hazardType->getLifetime(state), power, 6); |
| 53 | } |
| 54 | } |
| 55 | void BattleHazard::dieAndRemove(GameState &state, bool violently) |
| 56 | { |
| 57 | die(state, violently); |
nothing calls this directly
no test coverage detected