-
-
Notifications
You must be signed in to change notification settings - Fork 40
Custom Showdown Datapacking
Make sure to not add comments into your files, it doesn't compile well, you could try using comments like /* */ but in anycase if u face any issues it could be due to comments.
To add custom Pokémon abilities in the game
data/namespace/mega_showdown/showdown/abilities/ability_name.js
{
onSwitchIn(pokemon) {
this.effectState.switchingIn = true;
},
onStart(pokemon) {
if (this.effectState.switchingIn) {
this.add("-ability", pokemon, "Air Lock");
this.effectState.switchingIn = false;
}
this.eachEvent("WeatherChange", this.effect);
},
onEnd(pokemon) {
this.eachEvent("WeatherChange", this.effect);
},
suppressWeather: true,
flags: {},
name: "Ability Name",
rating: 1.5,
num: 76
}This wiki wont exactly teach you how to make abilities and showdown logic, you can refer other existing abilities to craft your custom one from Showdown
data/namespace/mega_showdown/showdown/conditions/condition_name.js
```typescript
{
name: 'condition_name',
effectType: 'Status',
onStart(target, source, sourceEffect) {
if (sourceEffect && sourceEffect.effectType === 'Ability') {
this.add('-status', target, 'psn', '[from] ability: ' + sourceEffect.name, '[of] ' + source);
} else {
this.add('-status', target, 'psn');
}
},
onResidualOrder: 9,
onResidual(pokemon) {
this.damage(pokemon.baseMaxhp / 8);
},
}This wiki wont exactly teach you how to make conditions and showdown logic, you can refer other existing abilities to craft your custom one from Showdown If you want to make persistent conditions which stay after battle like freeze you can refer Custom Persistent Statuses