Hey all. So I've been teaching myself how to program in pokemon showdown, to mixed results. I've learned how to edit moves and pokemon, as well as create new pokemon. However, my first attempt at creating a custom ability hasn't gone to well.
I had an ability idea called skirmisher, which increases the priority of attacking moves with a base power of 40 or lower by 1 (don't worry, I plan to apply it discreetly). However, it came out defective and caused the game to crash every time I sent out a pokemon with the ability. The coding I used is listed below, and it would great if one of you would help me correct whatever problem may have come up.
I had an ability idea called skirmisher, which increases the priority of attacking moves with a base power of 40 or lower by 1 (don't worry, I plan to apply it discreetly). However, it came out defective and caused the game to crash every time I sent out a pokemon with the ability. The coding I used is listed below, and it would great if one of you would help me correct whatever problem may have come up.
"skirmisher": {
desc: "This Pokemon's Weaker (40 or less power) moves have their priority increased by 1 stage.",
shortDesc: "This Pokemon's Weaker moves have their priority increased by 1.",
onModifyPriority: function (priority, pokemon, target, move) {
if (basePower <= 40) {
return priority + 1;
}
},
id: "skirmisher",
name: "Skirmisher",
rating: 4.5,
num: 158
},
desc: "This Pokemon's Weaker (40 or less power) moves have their priority increased by 1 stage.",
shortDesc: "This Pokemon's Weaker moves have their priority increased by 1.",
onModifyPriority: function (priority, pokemon, target, move) {
if (basePower <= 40) {
return priority + 1;
}
},
id: "skirmisher",
name: "Skirmisher",
rating: 4.5,
num: 158
},