From 68b1aef3ab98bda856d5936e0003c13cf8874fd1 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 17 Mar 2024 20:58:12 -0400 Subject: [PATCH] Add clear score bonus --- src/battle-scene.ts | 2 +- src/game-mode.ts | 9 +++++++++ src/phases.ts | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index c901efffe..fe9e8fc36 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -17,7 +17,7 @@ import { TextStyle, addTextObject } from './ui/text'; import { Moves } from "./data/enums/moves"; import { } from "./data/move"; import { initMoves } from './data/move'; -import { ModifierPoolType, PokemonBaseStatBoosterModifierType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave } from './modifier/modifier-type'; +import { ModifierPoolType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave } from './modifier/modifier-type'; import AbilityBar from './ui/ability-bar'; import { BlockItemTheftAbAttr, DoubleBattleChanceAbAttr, applyAbAttrs, initAbilities } from './data/ability'; import Battle, { BattleType, FixedBattleConfig, fixedBattles } from './battle'; diff --git a/src/game-mode.ts b/src/game-mode.ts index 2c76d07c8..d05400777 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -138,6 +138,15 @@ export class GameMode implements GameModeConfig { } } + getClearScoreBonus(): integer { + switch (this.modeId) { + case GameModes.CLASSIC: + return 5000; + case GameModes.DAILY: + return 2500; + } + } + getEnemyModifierChance(isBoss: boolean): integer { switch (this.modeId) { case GameModes.CLASSIC: diff --git a/src/phases.ts b/src/phases.ts index e3f397bf8..99b065b04 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2962,6 +2962,7 @@ export class VictoryPhase extends PokemonPhase { this.scene.pushPhase(new NewBattlePhase(this.scene)); } else { this.scene.currentBattle.battleType = BattleType.CLEAR; + this.scene.score += this.scene.gameMode.getClearScoreBonus(); this.scene.pushPhase(new GameOverPhase(this.scene, true)); } }