This would add code to allow suppressing terrains in the same way that Cloud Nine suppresses weather, as well as the blocking of them in the same way that the Primals' Abilities do. While there's nothing in the games that does this, it would be of use to Other Metagames that wish to implement such a thing (Megas For All, for instance, already has an Ability that suppresses terrain, but it works by adding checks to everything each terrain does).
The code would involve adding an onSetTerrain event family for moves/abilities/etc. to be able to catch the terrain before it begins, a Terrain event type to categorize the Terrain's other events, an effectiveTerrain function to determine if terrain is being suppressed, and a check in runEvent/singleEvent to catch and prevent said Terrain events (plus Grassy Terrain's heal gets its own check, since it's Residual). I have already coded and tested these changes and confirmed that they work and are all necessary in order to work.
I don't know if there's a reason that everything weather-related is separated out (weathers are in conditions.ts, they get their own event id for this.add, even things like their damage modification being separated from onBasePower) but not anything terrain-related. I would assume that's how the game handles it, but if not, it might be worth considering equalizing weather and terrain effects on one side or the other.
The code would involve adding an onSetTerrain event family for moves/abilities/etc. to be able to catch the terrain before it begins, a Terrain event type to categorize the Terrain's other events, an effectiveTerrain function to determine if terrain is being suppressed, and a check in runEvent/singleEvent to catch and prevent said Terrain events (plus Grassy Terrain's heal gets its own check, since it's Residual). I have already coded and tested these changes and confirmed that they work and are all necessary in order to work.
I don't know if there's a reason that everything weather-related is separated out (weathers are in conditions.ts, they get their own event id for this.add, even things like their damage modification being separated from onBasePower) but not anything terrain-related. I would assume that's how the game handles it, but if not, it might be worth considering equalizing weather and terrain effects on one side or the other.