Pikachuun

Resmons code

Dec 3rd, 2014
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. --------------------------------------------------------------------------------------
  2. team-validator.js [Place this DIRECTLY BELOW the STABmons hack present there. Use Ctrl/Cmd + F to find it if you don't know where it is.]
  3. --------------------------------------------------------------------------------------
  4. // Resmons hack to avoid copying all of validateSet to formats
  5. if (format.banlistTable && format.banlistTable['ignoreresmoves']) {
  6. var typet = template.types;
  7. if (typet[1]) {
  8. var typep = {types: [typet[0], typet[1]]};
  9. } else {
  10. var typep = {types: [typet[0]]};
  11. }
  12. var typem = tools.getMove(move).type;
  13. var notImmune = Tools.getImmunity(typem, typep);
  14. if (notImmune) {
  15. var typeMod = Tools.getEffectiveness(typem, typep);
  16. if (typeMod < 0) {
  17. return false;
  18. }
  19. } else {
  20. return false;
  21. }
  22. }
  23.  
  24. --------------------------------------------------------------------------------------
  25. config/formats.js
  26. --------------------------------------------------------------------------------------
  27. {
  28. name: "Resmons",
  29. section: "Other Metagames",
  30.  
  31. ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Swagger Clause', 'Baton Pass Clause'],
  32. banlist: ['Uber', 'Soul Dew', 'Gengarite', 'Kangaskhanite', 'Lucarionite', 'Mawilite', 'Ignore Res Moves', 'Shell Smash']
  33. },
Advertisement
Add Comment
Please, Sign In to add comment