1
0
mirror of https://gitlab.com/Deukhoofd/BattleSim.git synced 2025-10-28 02:00:04 +00:00

Made Primal Evolution objects limit a condition

This commit is contained in:
Deukhoofd
2016-02-20 17:25:41 +01:00
parent e48b6408fb
commit ed22806774
6 changed files with 61 additions and 42 deletions

View File

@@ -321,10 +321,11 @@ class @Battle extends Room
# Passing -1 to turns makes the weather last forever.
setWeather: (weatherName, turns=-1) ->
console.log(weatherName)
console.log(@weakWeather)
if weatherName in @weakWeather and @weather in @strongWeather
@cannedText("WEATHER_FAIL")
switch @weather
when Weather.DELTASTREAM then "WEATHER_FAIL_AIR"
when Weather.HARSHSUN then "WEATHER_FAIL_SUN"
when Weather.HEAVYRAIN then "WEATHER_FAIL_RAIN"
return
cannedText = switch weatherName
when Weather.SUN then "SUN_START"