- 428
- Posts
- 5
- Years
- Zekko
- Seen Nov 21, 2023
Castform is awful so I decided to buff him by making his Forecast ability check his held item, setting one of his three weather types if he's holding the appropriate Weather-Extending Rock.
However, this code causes a crash on startup. What's wrong with it?
When I run the game it says "Unexpected end of input, expected end".
If I add a "end" it says there are too many ends. If I swap the ) with a "end" it says it expected a ")" instead of a "end".
Anyway this code is supposed to activate (like Drought) every type the pokemon with FORECAST is sent out, even if it's not Castform. However, Castform with FORECAST still has the usual "Switch forms depending on weather" code already in the game.
I also buffed Castform to have 120 HP and 100 in every other stat.
His weather forms have the ability FORECAST too, but their hidden ability is Adaptability.
Basic Castform's ability and hidden ability are both FORECAST.
So you get to decide whether you want your Castform to swap Forecast for Adaptability upon becoming a Weather Form, or keep the existing Forecast ability and swap types whenever the weather changes
I thought to myself... What if Castform checked for existing weather conditions, then swapped forms to that, only setting the weather type of his held stone if there is no weather? That could let trainers send out a weather-setter, swap to Castform, utilize him and Weather Ball in the current form, then when the weather runs out after its usual number of turns, his held rock would activate and change the weather to match his held rock for an extended duration. However, this would make Castform a poor thing to send out against enemy weather-setters, as he would be unable to ruin an enemy weather team's day by changing the weather to benefit him. Making him suck at the primary job of a weather-setter didn't seem worth any potential shenanigans one could have if their team utilized this theoretical gimmick to revolve around setting different weather types depending on the situation. Weather teams are designed to set a weather type and stick with it, after all.
Code:
BattleHandlers::AbilityOnSwitchIn.add(:FORECAST,
proc { |ability,battler,battle|
next if item == :DRYROCK
pbBattleWeatherAbility(:Sun, battler, battle)
next if item == :DAMPROCK
pbBattleWeatherAbility(:Rain, battler, battle)
next if item == :ICYROCK
pbBattleWeatherAbility(:Hail, battler, battle)
}
)
However, this code causes a crash on startup. What's wrong with it?
When I run the game it says "Unexpected end of input, expected end".
If I add a "end" it says there are too many ends. If I swap the ) with a "end" it says it expected a ")" instead of a "end".
Anyway this code is supposed to activate (like Drought) every type the pokemon with FORECAST is sent out, even if it's not Castform. However, Castform with FORECAST still has the usual "Switch forms depending on weather" code already in the game.
I also buffed Castform to have 120 HP and 100 in every other stat.
His weather forms have the ability FORECAST too, but their hidden ability is Adaptability.
Basic Castform's ability and hidden ability are both FORECAST.
So you get to decide whether you want your Castform to swap Forecast for Adaptability upon becoming a Weather Form, or keep the existing Forecast ability and swap types whenever the weather changes
I thought to myself... What if Castform checked for existing weather conditions, then swapped forms to that, only setting the weather type of his held stone if there is no weather? That could let trainers send out a weather-setter, swap to Castform, utilize him and Weather Ball in the current form, then when the weather runs out after its usual number of turns, his held rock would activate and change the weather to match his held rock for an extended duration. However, this would make Castform a poor thing to send out against enemy weather-setters, as he would be unable to ruin an enemy weather team's day by changing the weather to benefit him. Making him suck at the primary job of a weather-setter didn't seem worth any potential shenanigans one could have if their team utilized this theoretical gimmick to revolve around setting different weather types depending on the situation. Weather teams are designed to set a weather type and stick with it, after all.
Last edited: