Skip to content

Commit 6b9f9c7

Browse files
committed
add numel and camerupt
1 parent b58dc65 commit 6b9f9c7

File tree

4 files changed

+82
-3
lines changed

4 files changed

+82
-3
lines changed

src/battle/data/abilities.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ const {
77
effectIdEnum,
88
} = require("../../enums/battleEnums");
99
const { logger } = require("../../log");
10-
const { getIsActivePokemonCallback } = require("../engine/eventConditions");
10+
const {
11+
getIsActivePokemonCallback,
12+
getIsTargetPokemonCallback,
13+
} = require("../engine/eventConditions");
1114

1215
/**
1316
* @template T
@@ -131,6 +134,31 @@ const abilitiesToRegister = Object.freeze({
131134
battle.unregisterListener(properties.listenerId);
132135
},
133136
}),
137+
[abilityIdEnum.ANGER_POINT]: new Ability({
138+
id: abilityIdEnum.ANGER_POINT,
139+
name: "Anger Point",
140+
description:
141+
"When the user takes more than 33% of its health of damage at once, sharply raise its Atk and Spa for 3 turns.",
142+
abilityAdd({ battle, target }) {
143+
return {
144+
listenerId: battle.registerListenerFunction({
145+
eventName: battleEventEnum.AFTER_DAMAGE_TAKEN,
146+
callback: ({ damage }) => {
147+
if (damage < target.maxHp * 0.33) {
148+
return;
149+
}
150+
battle.addToLog(`${target.name}'s Anger Point activates!`);
151+
target.applyEffect("greaterAtkUp", 3, target, {});
152+
target.applyEffect("greaterSpaUp", 3, target, {});
153+
},
154+
conditionCallback: getIsTargetPokemonCallback(target),
155+
}),
156+
};
157+
},
158+
abilityRemove({ battle, properties }) {
159+
battle.unregisterListener(properties.listenerId);
160+
},
161+
}),
134162
[abilityIdEnum.REGENERATOR]: new Ability({
135163
id: abilityIdEnum.REGENERATOR,
136164
name: "Regenerator",

src/config/pokemonConfig.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6429,6 +6429,54 @@ const pokemonConfigRaw = {
64296429
rarity: rarities.EPIC,
64306430
growthRate: growthRates.MEDIUMSLOW,
64316431
},
6432+
[pokemonIdEnum.NUMEL]: {
6433+
name: "Numel",
6434+
emoji: "<:322:1132496591115276389>",
6435+
description:
6436+
"Numel is extremely dull witted - it doesn't notice being hit. However, it can't stand hunger for even a second. This Pokémon's body is a seething cauldron of boiling magma.",
6437+
type: [types.FIRE, types.GROUND],
6438+
baseStats: [60, 60, 40, 65, 45, 35],
6439+
sprite:
6440+
"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/322.png",
6441+
shinySprite:
6442+
"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/322.png",
6443+
evolution: [
6444+
{
6445+
level: 33,
6446+
id: "323",
6447+
},
6448+
],
6449+
abilities: {
6450+
12: 0.45,
6451+
86: 0.45,
6452+
20: 0.1,
6453+
},
6454+
moveIds: ["m33", "m52", "m281", "m414"],
6455+
battleEligible: true,
6456+
rarity: rarities.RARE,
6457+
growthRate: growthRates.MEDIUMFAST,
6458+
},
6459+
[pokemonIdEnum.CAMERUPT]: {
6460+
name: "Camerupt",
6461+
emoji: "<:323:1132496592709111869>",
6462+
description:
6463+
"Camerupt has a volcano inside its body. Magma of 18,000 degrees Fahrenheit courses through its body. Occasionally, the humps on this Pokémon's back erupt, spewing the superheated magma.",
6464+
type: [types.FIRE, types.GROUND],
6465+
baseStats: [70, 100, 70, 105, 75, 40],
6466+
sprite:
6467+
"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/323.png",
6468+
shinySprite:
6469+
"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/323.png",
6470+
abilities: {
6471+
40: 0.45,
6472+
116: 0.45,
6473+
83: 0.1,
6474+
},
6475+
moveIds: ["m52", "m281", "m414", "m284"],
6476+
battleEligible: true,
6477+
rarity: rarities.EPIC,
6478+
growthRate: growthRates.MEDIUMFAST,
6479+
},
64326480
324: {
64336481
name: "Torkoal",
64346482
emoji: "<:324:1132496594567188584>",

src/enums/battleEnums.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ const moveIdEnum = Object.freeze({
3232
*/
3333
const abilityIdEnum = Object.freeze({
3434
TEST_ABILITY: "testAbility",
35-
REGENERATOR: "144",
3635
AQUA_POWER: "2-1",
3736
MAGMA_POWER: "70-1",
37+
ANGER_POINT: "83",
38+
REGENERATOR: "144",
3839
});
3940

4041
/** @typedef {Enum<battleEventEnum>} BattleEventEnum */
@@ -77,7 +78,7 @@ const battleEventEnum = Object.freeze({
7778
* [battleEventEnum.BEFORE_DAMAGE_DEALT]: any,
7879
* [battleEventEnum.AFTER_DAMAGE_DEALT]: any,
7980
* [battleEventEnum.BEFORE_DAMAGE_TAKEN]: any,
80-
* [battleEventEnum.AFTER_DAMAGE_TAKEN]: any,
81+
* [battleEventEnum.AFTER_DAMAGE_TAKEN]: { target: BattlePokemon, source: BattlePokemon, damage: number, damageInfo: any },
8182
* [battleEventEnum.BEFORE_CR_GAINED]: any,
8283
* [battleEventEnum.AFTER_CR_GAINED]: any,
8384
* [battleEventEnum.BEFORE_EFFECT_ADD]: { target: BattlePokemon, source: BattlePokemon, effectId: EffectIdEnum, duration: number, initialArgs: any, canAdd: boolean },

src/enums/pokemonEnums.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ const pokemonIdEnum = Object.freeze({
232232
SHARPEDO: "319",
233233
WAILMER: "320",
234234
WAILORD: "321",
235+
NUMEL: "322",
236+
CAMERUPT: "323",
235237
TORKOAL: "324",
236238
TRAPINCH: "328",
237239
VIBRAVA: "329",

0 commit comments

Comments
 (0)