Fix merge issues

This commit is contained in:
NightKev 2024-09-05 00:58:03 -07:00
parent c68363315e
commit 06f6386099
2 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ import { TextStyle, addTextObject, getTextColor } from "./ui/text";
import { allMoves } from "./data/move"; import { allMoves } from "./data/move";
import { ModifierPoolType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getModifierType, getPartyLuckValue, modifierTypes } from "./modifier/modifier-type"; import { ModifierPoolType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getModifierType, getPartyLuckValue, modifierTypes } from "./modifier/modifier-type";
import AbilityBar from "./ui/ability-bar"; import AbilityBar from "./ui/ability-bar";
import { BlockItemTheftAbAttr, BonusItemChance, DoubleBattleChanceAbAttr, ChangeMovePriorityAbAttr, PostBattleInitAbAttr, applyAbAttrs, applyPostBattleInitAbAttrs } from "./data/ability"; import { BlockItemTheftAbAttr, BonusItemChanceAbAttr, DoubleBattleChanceAbAttr, ChangeMovePriorityAbAttr, PostBattleInitAbAttr, applyAbAttrs, applyPostBattleInitAbAttrs } from "./data/ability";
import { allAbilities } from "./data/ability"; import { allAbilities } from "./data/ability";
import Battle, { BattleType, FixedBattleConfig } from "./battle"; import Battle, { BattleType, FixedBattleConfig } from "./battle";
import { GameMode, GameModes, getGameMode } from "./game-mode"; import { GameMode, GameModes, getGameMode } from "./game-mode";
@ -2467,7 +2467,7 @@ export default class BattleScene extends SceneBase {
const difficultyWaveIndex = this.gameMode.getWaveForDifficulty(this.currentBattle.waveIndex); const difficultyWaveIndex = this.gameMode.getWaveForDifficulty(this.currentBattle.waveIndex);
const isFinalBoss = this.gameMode.isWaveFinal(this.currentBattle.waveIndex); const isFinalBoss = this.gameMode.isWaveFinal(this.currentBattle.waveIndex);
let chances = Math.ceil(difficultyWaveIndex / 10); let chances = Math.ceil(difficultyWaveIndex / 10);
if (this.getPlayerPokemon().getAbility().hasAttr(BonusItemChance) || this.getPlayerPokemon().getPassiveAbility().hasAttr(BonusItemChance)) { if (this.getPlayerPokemon()?.getAbility().hasAttr(BonusItemChanceAbAttr) || this.getPlayerPokemon()?.getPassiveAbility().hasAttr(BonusItemChanceAbAttr)) {
chances += Math.floor(chances * 1.2); chances += Math.floor(chances * 1.2);
} }
if (isFinalBoss) { if (isFinalBoss) {

View File

@ -2794,12 +2794,12 @@ export class BonusCritAbAttr extends AbAttr {
* If an ability has this tag, it will increase the chance of items by 20%. * If an ability has this tag, it will increase the chance of items by 20%.
* This is used in battle-scene.ts in generateEnemyModifiers. * This is used in battle-scene.ts in generateEnemyModifiers.
*/ */
export class BonusItemChance extends AbAttr { export class BonusItemChanceAbAttr extends AbAttr {
constructor() { constructor() {
super(false); super(false);
} }
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise<boolean> { apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder | null, args: any[]): boolean | Promise<boolean> {
return true; return true;
} }
} }
@ -4817,7 +4817,7 @@ export function initAbilities() {
.attr(PostFaintUnsuppressedWeatherFormChangeAbAttr) .attr(PostFaintUnsuppressedWeatherFormChangeAbAttr)
.bypassFaint(), .bypassFaint(),
new Ability(Abilities.COMPOUND_EYES, 3) new Ability(Abilities.COMPOUND_EYES, 3)
.attr(BonusItemChance) .attr(BonusItemChanceAbAttr)
.attr(StatMultiplierAbAttr, Stat.ACC, 1.3), .attr(StatMultiplierAbAttr, Stat.ACC, 1.3),
new Ability(Abilities.INSOMNIA, 3) new Ability(Abilities.INSOMNIA, 3)
.attr(StatusEffectImmunityAbAttr, StatusEffect.SLEEP) .attr(StatusEffectImmunityAbAttr, StatusEffect.SLEEP)
@ -5103,7 +5103,7 @@ export function initAbilities() {
.attr(MoveAbilityBypassAbAttr), .attr(MoveAbilityBypassAbAttr),
new Ability(Abilities.SUPER_LUCK, 4) new Ability(Abilities.SUPER_LUCK, 4)
.attr(BonusCritAbAttr) .attr(BonusCritAbAttr)
.attr(BonusItemChance), .attr(BonusItemChanceAbAttr),
new Ability(Abilities.AFTERMATH, 4) new Ability(Abilities.AFTERMATH, 4)
.attr(PostFaintContactDamageAbAttr, 4) .attr(PostFaintContactDamageAbAttr, 4)
.bypassFaint(), .bypassFaint(),