Weather Manipulation: Difference between revisions

m (1 revision imported)
 
Line 45: Line 45:
The possible values for the '''weatherId''' are:
The possible values for the '''weatherId''' are:


*'''"WEATHER1_SUN"'''
*'''"WEATHER_1SUN"'''
*'''"WEATHER_RAIN"'''
*'''"WEATHER_RAIN"'''
*'''"WEATHER_SANDSTORM"'''
*'''"WEATHER_SANDSTORM"'''

Latest revision as of 01:40, 9 December 2023

There are 5 types of Weather in Commander Wars:

  • Clear Weather
  • Rain
  • Sandstorm
  • Mist
  • Snow

Each of these have an effect on different COs such as Olaf or Penny.

The following percentages are set if the match options are set for random weather, otherwise the weather will always be clear.

Clear Weather

There's a 70% chance of Clear Weather. It has no special effect on Units or COs unless they are customized to benefit or otherwise be affected by it.

Rain

There's 10% chance of Rain. By default, it creates Fog of War as well, during the days it's raining. On top of the temporary Fog of War, there is reduced vision (-1) for all Units.

Sandstorm

There's 10% chance of a Sandstorm. This reduces the Offense of all units by 15% and the Fire Range by -1.

Mist

There's a 0% chance of Mist. This creates a Fog of War like mode where the same rules as Fog of War apply, however, there are no dark tiles in the map. Instead, players Units' must have the opponent's Units in Vision Range to be able to attack them.

Snow

There's 10% chance of Snow. This reduces the movement of Air Units by -1; and the Movement of Ground Units by -1, except in the following Terrain Types:

  • STREET
  • STREET1
  • SNOW_STREET
  • BRIDGE
  • BRIDGE1
  • WASTE_PATH
  • DESERT_PATH
  • DESERT_PATH1
  • TELEPORTTILE

Manipulating the Weather

The Weather can be manipulated by a CO, a Unit or scripted as an event in a map. To do so the code is:

map.getGameRules().changeWeather(String weatherId , int duration );

The possible values for the weatherId are:

  • "WEATHER_1SUN"
  • "WEATHER_RAIN"
  • "WEATHER_SANDSTORM"
  • "WEATHER_MIST"
  • "WEATHER_SNOW"

The duration parameter is the number of days the weather will be changed.