So I'm trying to implement an ability. Permafrost, Raises defense in hail. How would I go about doing that? The tutorial isn't that clear to be honest.
I don't think modded abilities can be added in standard tiers. Maybe in a customized metagame. But, from what I've seen. There is a possibly that your ability can be added. I think you should present the ability suggestion to other modded meta games like one that'd you see it working in the best. I wish ya luck on getting the ability used.
It's part of entire gen of pokemon mod I'm making to help test a game me and a community are working on, not for standard GF metagame.
abilities.cpp Code (text): struct AMPermafrost : public AM { AMPermafrost() { functions["StatModifier"] = &sm; functions["WeatherSpecial"] = &ws; } static void sm(int s, int, BS &b) { if (b.isWeatherWorking(poke(b,s)["AbilityArg"].toInt())) { turn(b,s)["Stat2AbilityModifier"] = 20; } } static void ws(int s, int, BS &b) { if (b.isWeatherWorking(poke(b,s)["AbilityArg"].toInt())) { turn(b,s)["WeatherSpecialed"] = true; } } }; [...] REGISTER_AB(122, Permafrost); ability_effects_%G.txt Code (text): 189 122-1#Permafrost abilities.txt Code (text): 189 Permafrost Give or take, this should work. You're essentially copying Chlorophyll but replacing Speed with Defense. First part determines what boost you're getting Second part prevents damage from the weather I spent only a whole 5 minutes on this so if it doesn't work, don't blame me. In addition, if you wanted any other ability to raise defense in a weather, just change the "189 122-1#Permafrost" to 2 (rain), 3 (sand), or 4 (sun), matching the first number with the ability number... so like "190 122-3#Sand Armor" if you want one for increased defense in sand