Made Primal Evolution objects limit a condition

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

No files matched your search

+4 -3
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"