Added classes GameData::Environment and GameData::BattleTerrain

This commit is contained in:
Maruno17
2021-02-21 18:37:26 +00:00
parent c16311326c
commit 63e640c79b
23 changed files with 368 additions and 258 deletions

View File

@@ -283,15 +283,16 @@ class PokeBattle_Battle
when PBWeather::ShadowSky then pbDisplay(_INTL("The sky is shadowy."))
end
# Terrain announcement
pbCommonAnimation(PBBattleTerrains.animationName(@field.terrain))
terrain_data = GameData::BattleTerrain.try_get(@field.terrain)
pbCommonAnimation(terrain_data.animation) if terrain_data
case @field.terrain
when PBBattleTerrains::Electric
when :Electric
pbDisplay(_INTL("An electric current runs across the battlefield!"))
when PBBattleTerrains::Grassy
when :Grassy
pbDisplay(_INTL("Grass is covering the battlefield!"))
when PBBattleTerrains::Misty
when :Misty
pbDisplay(_INTL("Mist swirls about the battlefield!"))
when PBBattleTerrains::Psychic
when :Psychic
pbDisplay(_INTL("The battlefield is weird!"))
end
# Abilities upon entering battle