16 lines
488 B
GDScript
16 lines
488 B
GDScript
class_name WeatherSpeedAbility
|
|
extends BattleEffect
|
|
|
|
#Glissade, Chlorophylle, Baigne Sable, Chasse-Neige : Vitesse x2 sous une meteo donnee
|
|
|
|
var weather : BattleField.Weather
|
|
|
|
func _init(p_weather : BattleField.Weather) -> void:
|
|
id = &"weather_speed"
|
|
weather = p_weather
|
|
|
|
func modify_stat(mon : BattleMon, stat : PokemonNature.Stat, value : float) -> float:
|
|
if stat == PokemonNature.Stat.SPEED and mon.field != null and mon.field.weather == weather:
|
|
return value * 2.0
|
|
return value
|