Add natural disasters system
Introduce a natural-disasters feature: add DisasterManager, an abstract NaturalDisaster base class, and four concrete implementations (Earthquake, Meteor, Thunder, Tornado). Integrate the manager into SpeedHG (property, initialization/start) so disasters run on a timed cycle with guards for game state, grace period and per-disaster validation. Implementations: Meteor spawns a non-destructive LargeFireball impact, Earthquake applies nausea/impulses and particles, Thunder triggers multiple lightning strikes with fire chance, Tornado creates a particle vortex and pulls nearby players (uses a coroutine for precomputation). Add localization keys for disaster warnings in en_US.yml. Safety/cancel logic and flight/timeout cutoffs included to avoid leaks or invalid triggers.
This commit is contained in:
@@ -67,6 +67,20 @@ pit:
|
||||
title-sub: '<red>Survive at all costs!</red>'
|
||||
escape-warning: '<red>⚠ Leave the pit and you will die! Return immediately!</red>'
|
||||
|
||||
disasters:
|
||||
tornado:
|
||||
warning-main: '<red><bold>BEWARE!</bold></red>'
|
||||
warning-sub: '<gray>A tornado is forming near you!</gray>'
|
||||
earthquake:
|
||||
warning-main: '<red><bold>EARTHQUAKE!</bold></red>'
|
||||
warning-sub: '<gray>The ground beneath you is starting to shake!</gray>'
|
||||
meteor:
|
||||
warning-main: '<dark_red><bold>METEOR!</bold></dark_red>'
|
||||
warning-sub: '<gray>A glowing boulder is hurtling toward you!</gray>'
|
||||
thunder:
|
||||
warning-main: '<yellow><bold>THUNDERSTORM!</bold></yellow>'
|
||||
warning-sub: '<gray>Your height attracts lightning!</gray>'
|
||||
|
||||
commands:
|
||||
kit:
|
||||
usage: '<red>Usage: /kit <kitName> <playstyle></red>'
|
||||
|
||||
Reference in New Issue
Block a user