From edce08b35cddd03c9fa1eae42e9c9b4bdcbec15c Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 20 Apr 2023 22:26:38 -0400 Subject: [PATCH] Adjust enemy modifier rate --- src/battle-phases.ts | 4 +++- src/battle-scene.ts | 6 +++--- src/data/battle-anims.ts | 2 +- src/data/battle-tag.ts | 1 - src/data/status-effect.ts | 2 +- src/modifier/modifier-type.ts | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 0eeb45203..4dfaf51a3 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1339,7 +1339,9 @@ export class VictoryPhase extends PokemonPhase { for (let partyMember of expPartyMembers) { const pId = partyMember.id; const participated = participantIds.has(pId); - if (!participated && !expShareModifier) { + if (participated) + partyMember.winCount++; + else if (!expShareModifier) { partyMemberExp.push(0); continue; } diff --git a/src/battle-scene.ts b/src/battle-scene.ts index b13de3f34..5d9fb9e98 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -670,17 +670,17 @@ export default class BattleScene extends Phaser.Scene { generateEnemyModifiers(): Promise { return new Promise(resolve => { const waveIndex = this.currentBattle.waveIndex; - const chances = Math.ceil(waveIndex / 20); + const chances = Math.ceil(waveIndex / 10); const isBoss = waveIndex >= 100 || !(waveIndex % 10); let count = 0; for (let c = 0; c < chances; c++) { - if (!Utils.randInt(!isBoss ? 8 : 2)) + if (!Utils.randInt(!isBoss ? 12 : 4)) count++; if (count === 12) break; } if (isBoss) - count = Math.max(count, Math.ceil(chances / 2)); + count = Math.max(count, Math.floor(chances / 2)); getEnemyModifierTypesForWave(waveIndex, count, this.getEnemyParty()).map(mt => mt.newModifier(this.getEnemyPokemon()).add(this.enemyModifiers, false)); this.updateModifiers(false).then(() => resolve()); diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index be332da8f..90f5a2d26 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -333,7 +333,7 @@ class AnimTimedAddBgEvent extends AnimTimedBgEvent { moveAnim.bgSprite.setScale(1.25); moveAnim.bgSprite.setAlpha(0); scene.field.add(moveAnim.bgSprite); - scene.field.moveBelow(moveAnim.bgSprite, scene.getEnemyPokemon()); + scene.field.moveBelow(moveAnim.bgSprite, scene.getEnemyPokemon() || scene.getPlayerPokemon()); scene.tweens.add({ targets: moveAnim.bgSprite, diff --git a/src/data/battle-tag.ts b/src/data/battle-tag.ts index 99a34e5b5..b352bb60d 100644 --- a/src/data/battle-tag.ts +++ b/src/data/battle-tag.ts @@ -157,7 +157,6 @@ export class SeedTag extends PseudoStatusTag { } lapse(pokemon: Pokemon, lapseType: BattleTagLapseType): boolean { - console.trace(lapseType); const ret = lapseType !== BattleTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); if (ret) { diff --git a/src/data/status-effect.ts b/src/data/status-effect.ts index c8bfafedb..b6322c014 100644 --- a/src/data/status-effect.ts +++ b/src/data/status-effect.ts @@ -99,7 +99,7 @@ export function getStatusEffectHealText(statusEffect: StatusEffect): string { case StatusEffect.FREEZE: return ' was\ndefrosted!'; case StatusEffect.BURN: - return ' is hurt\nby its burn!'; + return ' was\nhealed of its burn!'; } return ''; diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index f7c8ee00b..90bbf9252 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -498,7 +498,7 @@ const modifierTypes = { EXP_SHARE: new ModifierType('EXP. SHARE', 'All POKéMON in your party gain an additional 10% of a battle\'s EXP. Points', (type, _args) => new Modifiers.ExpShareModifier(type), 'exp_share'), - EXP_BALANCE: new ModifierType('EXP. BALANCE', 'All EXP. Points received from battles is split among the lower leveled party members', + EXP_BALANCE: new ModifierType('EXP. BALANCE', 'All EXP. Points received from battles are split between the lower leveled party members', (type, _args) => new Modifiers.ExpBalanceModifier(type), 'exp_balance'), EXP_CHARM: new ExpBoosterModifierType('EXP CHARM', 25),