mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-13 03:42:18 +02:00
Fix merge issues
This commit is contained in:
parent
c68363315e
commit
06f6386099
@ -15,7 +15,7 @@ import { TextStyle, addTextObject, getTextColor } from "./ui/text";
|
||||
import { allMoves } from "./data/move";
|
||||
import { ModifierPoolType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getModifierType, getPartyLuckValue, modifierTypes } from "./modifier/modifier-type";
|
||||
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 Battle, { BattleType, FixedBattleConfig } from "./battle";
|
||||
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 isFinalBoss = this.gameMode.isWaveFinal(this.currentBattle.waveIndex);
|
||||
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);
|
||||
}
|
||||
if (isFinalBoss) {
|
||||
|
@ -2794,12 +2794,12 @@ export class BonusCritAbAttr extends AbAttr {
|
||||
* If an ability has this tag, it will increase the chance of items by 20%.
|
||||
* This is used in battle-scene.ts in generateEnemyModifiers.
|
||||
*/
|
||||
export class BonusItemChance extends AbAttr {
|
||||
export class BonusItemChanceAbAttr extends AbAttr {
|
||||
constructor() {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -4817,7 +4817,7 @@ export function initAbilities() {
|
||||
.attr(PostFaintUnsuppressedWeatherFormChangeAbAttr)
|
||||
.bypassFaint(),
|
||||
new Ability(Abilities.COMPOUND_EYES, 3)
|
||||
.attr(BonusItemChance)
|
||||
.attr(BonusItemChanceAbAttr)
|
||||
.attr(StatMultiplierAbAttr, Stat.ACC, 1.3),
|
||||
new Ability(Abilities.INSOMNIA, 3)
|
||||
.attr(StatusEffectImmunityAbAttr, StatusEffect.SLEEP)
|
||||
@ -5103,7 +5103,7 @@ export function initAbilities() {
|
||||
.attr(MoveAbilityBypassAbAttr),
|
||||
new Ability(Abilities.SUPER_LUCK, 4)
|
||||
.attr(BonusCritAbAttr)
|
||||
.attr(BonusItemChance),
|
||||
.attr(BonusItemChanceAbAttr),
|
||||
new Ability(Abilities.AFTERMATH, 4)
|
||||
.attr(PostFaintContactDamageAbAttr, 4)
|
||||
.bypassFaint(),
|
||||
|
Loading…
Reference in New Issue
Block a user