Skip to content

Commit 0eb48f0

Browse files
committed
aqua sharpedo
1 parent 7ee85db commit 0eb48f0

File tree

6 files changed

+58
-3
lines changed

6 files changed

+58
-3
lines changed

src/battle/data/abilities.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const abilitiesToRegister = Object.freeze({
196196
eventName: battleEventEnum.TURN_END,
197197
callback: () => {
198198
const allyPokemons = target.getPartyPokemon();
199-
target.battle.addToLog(
199+
battle.addToLog(
200200
`${target.name}'s Burning Draft increases its allies' combat readiness!`
201201
);
202202
allyPokemons.forEach((ally) => {
@@ -214,6 +214,32 @@ const abilitiesToRegister = Object.freeze({
214214
battle.unregisterListener(properties.listenerId);
215215
},
216216
}),
217+
[abilityIdEnum.JET_SPEED]: new Ability({
218+
id: abilityIdEnum.JET_SPEED,
219+
name: "Jet Speed",
220+
description:
221+
"When the weather is set to rain, increase the user's combat readiness by 20% and raise its Special Attack for 2 turns.",
222+
abilityAdd({ battle, target }) {
223+
return {
224+
listenerId: battle.registerListenerFunction({
225+
eventName: battleEventEnum.AFTER_WEATHER_SET,
226+
callback: () => {
227+
const { weather } = battle;
228+
if (weather.weatherId !== weatherConditions.RAIN) {
229+
return;
230+
}
231+
232+
battle.addToLog(`${target.name} is pumped by the Rain!`);
233+
target.boostCombatReadiness(target, 20);
234+
target.applyEffect("spaUp", 2, target, {});
235+
},
236+
}),
237+
};
238+
},
239+
abilityRemove({ battle, properties }) {
240+
battle.unregisterListener(properties.listenerId);
241+
},
242+
}),
217243
});
218244

219245
module.exports = {

src/battle/engine/Battle.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ class Battle {
507507
return false;
508508
}
509509

510+
// TODO: extend/clear weather events? should this be done?
511+
510512
// apply weather
511513
this.weather = {
512514
weatherId,
@@ -530,6 +532,8 @@ class Battle {
530532
break;
531533
}
532534

535+
this.emitEvent(battleEventEnum.AFTER_WEATHER_SET, {}); // no args because weather can be retrieved from this.weather
536+
533537
return true;
534538
}
535539

src/config/battleConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3094,7 +3094,7 @@ const moveConfig = Object.freeze({
30943094
m88: {
30953095
name: "Rock Throw",
30963096
type: pokemonTypes.ROCK,
3097-
power: 70,
3097+
power: 65,
30983098
accuracy: 70,
30993099
cooldown: 0,
31003100
targetType: targetTypes.ENEMY,

src/config/pokemonConfig.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6380,6 +6380,27 @@ const pokemonConfigRaw = {
63806380
battleEligible: true,
63816381
rarity: rarities.EPIC,
63826382
growthRate: growthRates.MEDIUMFAST,
6383+
noGacha: true,
6384+
},
6385+
[pokemonIdEnum.AQUAS_SHARPEDO]: {
6386+
name: "Aqua's Sharpedo",
6387+
emoji: "<:aquasharpedo:1325287154125111420>",
6388+
description:
6389+
"A Sharpedo controlled by Team Aqua. It is said to be able to cause tsunamis where it swims.",
6390+
type: [types.WATER, types.DARK],
6391+
baseStats: [80, 100, 50, 145, 60, 115],
6392+
sprite:
6393+
"https://raw.githubusercontent.com/ewei068/pokestar/main/media/images/sprites/aqua-sharpedo-resized.gif",
6394+
shinySprite:
6395+
"https://raw.githubusercontent.com/ewei068/pokestar/main/media/images/sprites/aqua-sharpedo-shiny-resized.gif",
6396+
abilities: {
6397+
[abilityIdEnum.JET_SPEED]: 1,
6398+
},
6399+
moveIds: ["m246", "m57", "m399", "m212"],
6400+
battleEligible: true,
6401+
rarity: rarities.EPIC,
6402+
growthRate: growthRates.MEDIUMFAST,
6403+
noGacha: true,
63836404
},
63846405
320: {
63856406
name: "Wailmer",
@@ -7215,7 +7236,7 @@ const pokemonConfigRaw = {
72157236
abilities: {
72167237
[abilityIdEnum.AQUA_POWER]: 1,
72177238
},
7218-
moveIds: ["m246", "m347", "m399", moveIdEnum.AQUA_IMPACT],
7239+
moveIds: ["m239", "m347", "m399", moveIdEnum.AQUA_IMPACT],
72197240
battleEligible: true,
72207241
rarity: rarities.LEGENDARY,
72217242
growthRate: growthRates.SLOW,

src/enums/battleEnums.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const abilityIdEnum = Object.freeze({
3838
ANGER_POINT: "83",
3939
REGENERATOR: "144",
4040
BURNING_DRAFT: "20018",
41+
JET_SPEED: "20019",
4142
});
4243

4344
/** @typedef {Enum<battleEventEnum>} BattleEventEnum */
@@ -66,6 +67,7 @@ const battleEventEnum = Object.freeze({
6667
CALCULATE_TYPE_MULTIPLIER: "calculateTypeMultiplier",
6768
CALCULATE_MISS: "calculateMiss",
6869
GET_ELIGIBLE_TARGETS: "getEligibleTargets",
70+
AFTER_WEATHER_SET: "afterWeatherSet",
6971
});
7072

7173
/**
@@ -95,6 +97,7 @@ const battleEventEnum = Object.freeze({
9597
* [battleEventEnum.CALCULATE_TYPE_MULTIPLIER]: any,
9698
* [battleEventEnum.CALCULATE_MISS]: any,
9799
* [battleEventEnum.GET_ELIGIBLE_TARGETS]: any,
100+
* [battleEventEnum.AFTER_WEATHER_SET]: any,
98101
* }[K]} BattleEventArgsWithoutEventName
99102
*/
100103

src/enums/pokemonEnums.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ const pokemonIdEnum = Object.freeze({
230230
MANECTRIC: "310",
231231
CARVANHA: "318",
232232
SHARPEDO: "319",
233+
AQUAS_SHARPEDO: "319-2",
233234
WAILMER: "320",
234235
WAILORD: "321",
235236
NUMEL: "322",

0 commit comments

Comments
 (0)