Free Switch Clause!!

Status
Not open for further replies.
It's just a little gift for Smogon U. If a reason needs to be given, it is this: THANK YOU FOR NOT ALLOWING GARCHOMP TO RUN RAMPANT ON THIS GREAT SERVER.

Code:
new Clause("Free Switch Clause") {
            public String getClauseDescription() {
                return "No Pokémon may lay or know Stealth Rock, Spikes OR "
                        + "Toxic Spikes. Any attempt WILL FAIL.";
            }
            
            public boolean isTeamValid(BattleField field, Pokemon[] team, int idx) {
                Set set = new HashSet(Arrays.asList(new String[] {
                    "Stealth Rock",
                    "Spikes",
                    "Toxic Spikes",
                }));
                for (int i = 0; i < team.length; ++i) {
                    if (team[i] == null)
                        continue;
                    for (int j = 0; j < 4; j++){
                        if (team[i].getMoveName(j) == null)
                            continue;
                        if (set.contains(team[i].getMoveName(j))){
                            return false;
                        }
                    }
                }
                return true;
            }
            
            public boolean isMoveTransformer(boolean enemy){
                return true;
            }
            
            public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry){
                Set set = new HashSet(Arrays.asList(new String[] {
                    "Stealth Rock",
                    "Spikes",
                    "Toxic Spikes",
                }));
                if (set.contains(entry.getName())){
                    p.getField().showMessage("But it failed due to the Free Switch Clause!");
                    return null;
                }
                return entry;
            }
        };
 
Been a while since I did this, but I think just removing the lines "Spikes", and "Toxic Spikes", would be enough to let it just ban Stealth Rock.
 
I don't think it's up to you to decide how the pace of smogon goes. While I, at least, am grateful that you want to get involved, Doug, among others, is very capable of doing this himself.
 
Nice one Numbah, agreeing with people that a version of this just for SR would probably be used more.

For the line "No Pokémon may lay or know Stealth Rock....." maybe the "lay or know" bit could be changed? I don't know coding but I assume that you have not blocked both brining a Poke with those moves into battle and Pokemon using those moves, as that would be redundant.

I suppose you could have done both to block Metronome/Assist or something using Entry Hazards though... If that is the case ignore my previous suggestion.

I don't think it's up to you to decide how the pace of smogon goes. While I, at least, am grateful that you want to get involved, Doug, among others, is very capable of doing this himself.
Smogon need not have its testing of SR affected by this, as he said, its a gift. Doug or someone else could almost certainly make a code that does this but at the very least it saves them the time.
 
I don't think it's up to you to decide how the pace of smogon goes. While I, at least, am grateful that you want to get involved, Doug, among others, is very capable of doing this himself.

Don't look a gift horse in the mouth, especially when numbuh already talked to Doug and I on the CaP server about this. He said he's coding a bunch of things that haven't been coded yet. Yes Doug is capable, but Doug has a bunch of other things to do at the moment.
 
For the line "No Pokémon may lay or know Stealth Rock....." maybe the "lay or know" bit could be changed? I don't know coding but I assume that you have not blocked both brining a Poke with those moves into battle and Pokemon using those moves, as that would be redundant.

Redundant, eh? Then... WHAT IF SOMEONE PICKED IT THROUGH METRONOME? (Also, it wouldn't be a fair match if someone brought in a entry hazards MASTER like Forretress in, as he would turn completely useless. And, unless I miss my guess, this server is about having a fair chance without resorting to stale tactics like entry hazards and Tyranichomp.)

But, regardless; if you have a better idea for the text, then by all means, post it here! I just put that there because I couldn't think of anything better.

Don't look a gift horse in the mouth, especially when numbuh already talked to Doug and I on the CaP server about this. He said he's coding a bunch of things that haven't been coded yet. Yes Doug is capable, but Doug has a bunch of other things to do at the moment.

THANK YOU, tennis. I knew you'd back me up.
 
I'd also like to chime in with the "let Spikes and Toxic Spikes lay" sentiment. Nothing about the moves has ever been argued for broken in these parts in recent memory. If anyone here is wanting a clause on entry hazards, chances are they're talking about Stealth Rock, anyway.

You don't see people leading with Forretress or Skarmory to try and get Spikes down on turn one (Deoxys likes SR if it's spiking at all), and Toxic Spikes can even be used against the user in the advent of Guts or Quick Feet in addition to being easier to remove or avoid.
 
Well, if you don't want to ban them, by all means don't. Just take them out of both Sets and they will still work fine. I was thinking that some people would like ALL of them banned; just because ONE person doesn't happen to see them doesn't mean it isn't a threat. I've lost my fair share of matches to stacked entry hazards, believe me.
 
I think it needs a better name than "free switch clause".

A few other nitpicks:

"But it failed!" is all the text should read. When you use Spore twice, it doesn't say "But it failed thanks to Sleep Clause!", it says "But it failed!".

This should probably go in C&C or something.
 
Status
Not open for further replies.
Back
Top