mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
Implement Honey Gather (#1360)
* Implement Honey Gather * Updated Ability Description --------- Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
This commit is contained in:
parent
aaa96ebe0e
commit
caeb22c26b
@ -3012,6 +3012,29 @@ export class IgnoreTypeStatusEffectImmunityAbAttr extends AbAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives money to the user after the battle.
|
||||
*
|
||||
* @extends PostBattleAbAttr
|
||||
* @see {@linkcode applyPostBattle}
|
||||
*/
|
||||
export class MoneyAbAttr extends PostBattleAbAttr {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pokemon {@linkcode Pokemon} that is the user of this ability.
|
||||
* @param passive N/A
|
||||
* @param args N/A
|
||||
* @returns true
|
||||
*/
|
||||
applyPostBattle(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||
pokemon.scene.currentBattle.moneyScattered += pokemon.scene.getWaveMoneyAmount(0.2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function applyAbAttrsInternal<TAttr extends AbAttr>(attrType: { new(...args: any[]): TAttr },
|
||||
pokemon: Pokemon, applyFunc: AbAttrApplyFunc<TAttr>, args: any[], isAsync: boolean = false, showAbilityInstant: boolean = false, quiet: boolean = false, passive: boolean = false): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
@ -3557,7 +3580,7 @@ export function initAbilities() {
|
||||
.attr(PostSummonWeatherChangeAbAttr, WeatherType.SNOW)
|
||||
.attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.SNOW),
|
||||
new Ability(Abilities.HONEY_GATHER, 4)
|
||||
.unimplemented(),
|
||||
.attr(MoneyAbAttr),
|
||||
new Ability(Abilities.FRISK, 4)
|
||||
.attr(FriskAbAttr),
|
||||
new Ability(Abilities.RECKLESS, 4)
|
||||
|
@ -471,7 +471,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
},
|
||||
honeyGather: {
|
||||
name: "Honigmaul",
|
||||
description: "Das Pokémon sammelt nach Kämpfen eventuell Honig auf.",
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money.",
|
||||
},
|
||||
frisk: {
|
||||
name: "Schnüffler",
|
||||
|
@ -471,7 +471,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
},
|
||||
honeyGather: {
|
||||
name: "Honey Gather",
|
||||
description: "The Pokémon may gather Honey after a battle.",
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money.",
|
||||
},
|
||||
frisk: {
|
||||
name: "Frisk",
|
||||
|
@ -471,7 +471,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
},
|
||||
"honeyGather": {
|
||||
name: "Recogemiel",
|
||||
description: "Puede que encuentre Miel una vez concluido el combate."
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money."
|
||||
},
|
||||
"frisk": {
|
||||
name: "Cacheo",
|
||||
|
@ -471,7 +471,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
},
|
||||
honeyGather: {
|
||||
name: "Cherche Miel",
|
||||
description: "Le Pokémon peut parfois trouver du Miel après un combat.",
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money.",
|
||||
},
|
||||
frisk: {
|
||||
name: "Fouille",
|
||||
|
@ -471,7 +471,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
},
|
||||
honeyGather: {
|
||||
name: "Mielincetta",
|
||||
description: "Il Pokémon può raccogliere del Miele alla fine della lotta.",
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money.",
|
||||
},
|
||||
frisk: {
|
||||
name: "Indagine",
|
||||
|
@ -471,7 +471,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
},
|
||||
honeyGather: {
|
||||
name: "Honey Gather",
|
||||
description: "O Pokémon pode coletar Mel ao final de uma batalha.",
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money.",
|
||||
},
|
||||
frisk: {
|
||||
name: "Frisk",
|
||||
|
@ -471,7 +471,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
},
|
||||
honeyGather: {
|
||||
name: "采蜜",
|
||||
description: "战斗结束时,有时候会捡来\n甜甜蜜。",
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money.",
|
||||
},
|
||||
frisk: {
|
||||
name: "察觉",
|
||||
|
@ -418,7 +418,7 @@ export const ability: AbilityTranslationEntries = {
|
||||
snowWarning: { name: "降雪", description: "出場時,會將天氣變爲下雪。" },
|
||||
honeyGather: {
|
||||
name: "採蜜",
|
||||
description: "戰鬥結束時,有時候會撿來\n甜甜蜜。",
|
||||
description: "The Pokémon gathers Honey after a battle. The Honey is then sold for money.",
|
||||
},
|
||||
frisk: {
|
||||
name: "察覺",
|
||||
|
@ -2301,9 +2301,6 @@ export class BattleEndPhase extends BattlePhase {
|
||||
super.start();
|
||||
|
||||
this.scene.currentBattle.addBattleScore(this.scene);
|
||||
if (this.scene.currentBattle.moneyScattered) {
|
||||
this.scene.currentBattle.pickUpScatteredMoney(this.scene);
|
||||
}
|
||||
|
||||
this.scene.gameData.gameStats.battles++;
|
||||
if (this.scene.currentBattle.trainer) {
|
||||
@ -2323,6 +2320,10 @@ export class BattleEndPhase extends BattlePhase {
|
||||
applyPostBattleAbAttrs(PostBattleAbAttr, pokemon);
|
||||
}
|
||||
|
||||
if (this.scene.currentBattle.moneyScattered) {
|
||||
this.scene.currentBattle.pickUpScatteredMoney(this.scene);
|
||||
}
|
||||
|
||||
this.scene.clearEnemyHeldItemModifiers();
|
||||
|
||||
const lapsingModifiers = this.scene.findModifiers(m => m instanceof LapsingPersistentModifier || m instanceof LapsingPokemonHeldItemModifier) as (LapsingPersistentModifier | LapsingPokemonHeldItemModifier)[];
|
||||
|
Loading…
Reference in New Issue
Block a user