Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "lightsout": {
- name: "Lights Out!",
- id: "lightsout",
- desc: [
- "Oh no, it seems like some of the Christmas lights have burnt out from overuse!",
- "In this format, at the start of every battle, 4 types will be randomly selected, and announced.",
- "Any moves that involve those types will fail.",
- ],
- ruleset: ["Standard"],
- banlist: [],
- onStart: function () {
- let types = ["Bug", "Dark", "Dragon", "Electric", "Fairy", "Fighting", "Fire", "Flying", "Ghost", "Grass", "Ground", "Ice", "Normal", "Poison", "Psychic", "Rock", "Steel", "Water"];
- let banned = types.slice(0).randomize().slice(0, 4);
- this.bannedTypes = banned;
- this.log("<div class=card-button>The following types of moves will fail in this battle: <b>" + banned.join(", ") + "</b>.</div>");
- },
- onTryHit: function (move) {
- if (this.bannedTypes.includes(move.type)) {
- this.log("But it failed!");
- return false;
- }
- },
- // hard code damage calc for AI use.
- onDamage: function (damage, attacker, defender, move) {
- if (this.bannedTypes.includes(move.type)) return 0;
- },
- },
- "russianroulette": {
- name: "Russian Roulette",
- id: "russianroulette",
- banlist: [],
- ruleset: ["Standard"],
- desc: ["Every time you use a Physical or Special move more than once in a row, the second hit and so on has a chance of failing and backfiring on the attacker."],
- onTryHit: function (move, pet) {
- if (pet.side !== "p1") return;
- let cat = move.category;
- if (!this.record || this.record.cat !== cat) {
- this.record = {
- cat: cat,
- count: 1,
- }
- return;
- }
- this.record.count++;
- if (Math.random() < (1 / this.record.count)) {
- pet.damage(1, "[Backfire]", true);
- this.log("<b>" + pet.name + " has fainted from an explosion!");
- this.onFaint("p1");
- return false;
- }
- },
- },
- "masqueradeball": {
- name: "Masquerade Ball",
- id: "masqueradeball",
- desc: [
- "A BT ladder that modifies the type for every move.",
- "Bug -> Dark -> Dragon -> Electric -> Fairy -> Fighting -> Fire -> Flying -> Ghost -> Grass -> Ground -> Ice -> Normal -> Poison -> Psychic -> Rock -> Steel -> Water -> Bug"
- ],
- ruleset: ["Standard"],
- banlist: [],
- onStart: function () {
- this.log("<div class=card-button> <b>Type Chart: </b><br />" +
- "Bug -> Dark -> Dragon -> Electric -> Fairy -> Fighting -> Fire -> Flying -> Ghost -> Grass -> Ground -> Ice -> Normal -> Poison -> Psychic -> Rock -> Steel -> Water -> Bug"
- );
- },
- onModifyMove: function(move) {
- let types = ["Bug", "Dark", "Dragon", "Electric", "Fairy", "Fighting", "Fire", "Flying", "Ghost", "Grass", "Ground", "Ice", "Normal", "Poison", "Psychic", "Rock", "Steel", "Water", "Bug"];
- let newType = types[types.indexOf(move.type) + 1];
- move.type = newType;
- return move;
- },
- },
- "kitchenchaos": {
- name: "Kitchen Chaos!",
- id: "kitchenchaos",
- desc: ["Battle Tower Event Centered around 5 differently coloured groups - Red, Yellow, Green, Blue and Colourless. The goal is to have gathered all the needed ingredients, as seen for the colours before the battle ends! If you fail to gather all the ingredients you will lose the match!",
- "Red: Fire, Psychic, Fairy, Fighting",
- "Yellow: Electric, Normal, Ground",
- "Green: Grass, Bug, Rock",
- "Blue: Water, Dragon, Ice, Poison, Flying",
- "Colourless: Dark, Steel, Ghost",
- "Damage done will be reduced by 30%, to allow more time to gather ingredients.",
- ],
- banlist: ["Mew", "Smeargle"],
- ruleset: ["Standard"],
- onStart: function () {
- let colours = ["Red", "Red", "Red", "Red", "Yellow", "Yellow", "Yellow", "Green", "Green", "Green", "Blue", "Blue", "Blue", "Blue", "Blue", "Colourless", "Colourless", "Colourless"];
- let count = Math.ceil(this.level / 8.5);
- let number = 0;
- let cumulative = 0;
- do {
- number++
- cumulative += number;
- } while (cumulative < count);
- this.recipe = {};
- this.ingredients = {};
- colours.randomize().slice(0, number).forEach(c => {
- if (!this.recipe[c]) this.recipe[c] = 0;
- this.recipe[c]++;
- });
- this.log("<div class=card-button> <b>The ingredients needed are: " +
- Object.keys(this.recipe).map(c => "<font color=" + c + ">" + c + " Berry x" + this.recipe[c] + "</font>").join(", ") +
- "</b><br /><br />Red: Fire, Psychic, Fairy, Fighting<br />" +
- "Yellow: Electric, Normal, Ground<br />" +
- "Green: Grass, Bug, Rock<br />" +
- "Blue: Water, Dragon, Ice, Poison, Flying<br />" +
- "Colourless: Dark, Steel, Ghost<br />" +
- "</div>"
- );
- },
- onTurnEnd: function () {
- this.log(
- "<p><b>Ingredients collected:</b></p><p>" +
- Object.keys(this.recipe).map(c => "<span style=\"background-color: " + (c === "Colourless" ? "gray" : c) + "; padding: 5px 10px;\">" + (this.ingredients[c] || 0) + " / " + this.recipe[c] + "</span>").join("") +
- "</p>"
- );
- },
- onEnd: function (something ,side) {
- if (side === "p2") {
- for (let c in this.recipe) {
- if (!this.ingredients[c] || this.ingredients[c] < this.recipe[c]) {
- this.log("You have failed to complete the recipe!");
- this.ended = false;
- this.onFaint("p1");
- return 0;
- }
- }
- // success!
- this.log("Congratulations! You have completed the recipe!");
- }
- },
- onDamagePet: function (damage) {
- return Math.ceil(damage * 0.70);
- },
- onTryHit: function (move, attacker) {
- if (attacker.side === "p1") {
- let chart = {
- "Psychic": "Red",
- "Fighting": "Red",
- "Fairy": "Red",
- "Fire": "Red",
- "Normal": "Yellow",
- "Ground": "Yellow",
- "Electric": "Yellow",
- "Grass": "Green",
- "Bug": "Green",
- "Rock": "Green",
- "Water": "Blue",
- "Dragon": "Blue",
- "Ice": "Blue",
- "Poison": "Blue",
- "Flying": "Blue",
- "Dark": "Colourless",
- "Steel": "Colourless",
- "Ghost": "Colourless",
- };
- let ingType = chart[move.type];
- if (!this.ingredients[ingType]) this.ingredients[ingType] = 0;
- this.ingredients[ingType]++;
- }
- },
- },
- /*
- "transposition": {
- name: "Transposition",
- id: "transposition",
- desc: ["A meta where Physical moves become Special, and vice versa ... but just for the player! Be prepared for chaos!"],
- banlist: [],
- ruleset: ["Standard"],
- onBoost: function (stages, pet, stat) {
- if (pet.side !== "p1") return;
- let conversion = {
- spa: "atk",
- atk: "spa",
- };
- if (conversion[stat]) {
- stat = conversion[stat];
- if (stages > 0 && pet.boosts[stat] && pet.boosts[stat] === 6) return false;
- if (stages < 0 && pet.boosts[stat] && pet.boosts[stat] === -6) return false;
- let newAmount = (pet.boosts[stat] || 0) + stages;
- // cap at +/-6 stages
- if (newAmount > 6) newAmount = 6;
- if (newAmount < -6) newAmount = -6;
- this.p1.boosts[stat] = newAmount;
- this.log(pet.name + "'s " + stat.toUpperCase() + " was " + (stages > 0 ? "increased" : "decreased") + " by " + Math.abs(stages) + " stages.");
- return 0;
- }
- },
- onModifyMove: function (move, attacker, defender) {
- if (attacker.side !== "p1") return;
- if (move.category === "Physical") {
- move.category = "Special";
- } else {
- move.category = "Physical";
- }
- return move;
- },
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement