mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-10-25 17:51:09 -05:00
Support Mod rules in tournaments
This commit is contained in:
2
rooms.js
2
rooms.js
@@ -1666,8 +1666,6 @@ let Rooms = Object.assign(getRoom, {
|
||||
}
|
||||
|
||||
const roomid = Rooms.global.prepBattleRoom(formatid);
|
||||
const format = Dex.getFormat(formatid);
|
||||
formatid = format.id;
|
||||
options.format = formatid;
|
||||
// options.rated is a number representing the lower player rating, for searching purposes
|
||||
// options.rated < 0 or falsy means "unrated", and will be converted to 0 here
|
||||
|
||||
@@ -116,8 +116,7 @@ class Tournament {
|
||||
setCustomRules(rules, output) {
|
||||
let format = Dex.getFormat(this.originalFormat);
|
||||
if (format.team) {
|
||||
output.errorReply(format.name + " does not support custom rules.");
|
||||
return false;
|
||||
output.errorReply(`WARNING: ${format.name} uses generated teams - only in-battle mod rules (like Sleep Clause Mod) will have any effect.`);
|
||||
}
|
||||
format = Dex.getFormat(this.originalFormat, rules);
|
||||
if (!format.customRules) {
|
||||
|
||||
Reference in New Issue
Block a user