diff --git a/package-lock.json b/package-lock.json index b93e2b2c6..5521dcc86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pokemon-rogue-battle", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pokemon-rogue-battle", - "version": "1.0.0", + "version": "1.0.1", "dependencies": { "@material/material-color-utilities": "^0.2.7", "crypto-js": "^4.2.0", diff --git a/src/data/ability.ts b/src/data/ability.ts index 301d0fecd..e130af716 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2222,7 +2222,7 @@ export function initAbilities() { .attr(UnswappableAbilityAbAttr) .ignorable(), new Ability(Abilities.LEVITATE, "Levitate", "By floating in the air, the Pokémon receives full immunity to all Ground-type moves.", 3) - .attr(TypeImmunityAbAttr, Type.GROUND, (pokemon: Pokemon) => !pokemon.getTag(BattlerTagType.IGNORE_FLYING) && !pokemon.scene.arena.getTag(ArenaTagType.GRAVITY)) + .attr(TypeImmunityAbAttr, Type.GROUND, (pokemon: Pokemon) => !pokemon.getTag(BattlerTagType.IGNORE_FLYING) && !pokemon.scene.arena.getTag(ArenaTagType.GRAVITY) && !pokemon.getTag(BattlerTagType.GROUNDED)) .ignorable(), new Ability(Abilities.EFFECT_SPORE, "Effect Spore", "Contact with the Pokémon may inflict poison, sleep, or paralysis on its attacker.", 3) .attr(PostDefendContactApplyStatusEffectAbAttr, 10, StatusEffect.POISON, StatusEffect.PARALYSIS, StatusEffect.SLEEP), diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index a95527e6a..15dc357a4 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1094,6 +1094,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc return new BattlerTag(BattlerTagType.BYPASS_SLEEP, BattlerTagLapseType.TURN_END, turnCount, sourceMove); case BattlerTagType.IGNORE_FLYING: return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, turnCount, sourceMove); + case BattlerTagType.GROUNDED: + return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, turnCount - 1, sourceMove); case BattlerTagType.SALT_CURED: return new SaltCuredTag(sourceId); case BattlerTagType.NONE: @@ -1101,3 +1103,4 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); } } + \ No newline at end of file diff --git a/src/data/enums/battler-tag-type.ts b/src/data/enums/battler-tag-type.ts index 2dcb12ea2..b5cae5b84 100644 --- a/src/data/enums/battler-tag-type.ts +++ b/src/data/enums/battler-tag-type.ts @@ -47,5 +47,6 @@ export enum BattlerTagType { IGNORE_ACCURACY = "IGNORE_ACCURACY", BYPASS_SLEEP = "BYPASS_SLEEP", IGNORE_FLYING = "IGNORE_FLYING", + GROUNDED = "GROUNDED", SALT_CURED = "SALT_CURED" } diff --git a/src/data/move.ts b/src/data/move.ts index 5e2c148bf..d3c4db5b9 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4415,7 +4415,7 @@ export function initMoves() { .attr(StatChangeAttr, BattleStat.SPATK, -2, true), new SelfStatusMove(Moves.ROOST, Type.FLYING, -1, 5, -1, 0, 4) .attr(HealAttr, 0.5) - .attr(AddBattlerTagAttr, BattlerTagType.IGNORE_FLYING, true, false, 1) + .attr(AddBattlerTagAttr, BattlerTagType.GROUNDED, true, false, 1) .triageMove(), new StatusMove(Moves.GRAVITY, Type.PSYCHIC, -1, 5, -1, 0, 4) .attr(AddArenaTagAttr, ArenaTagType.GRAVITY, 5) @@ -6043,4 +6043,4 @@ export function initMoves() { new AttackMove(Moves.MALIGNANT_CHAIN, Type.POISON, MoveCategory.SPECIAL, 100, 100, 5, 50, 0, 9) .attr(StatusEffectAttr, StatusEffect.TOXIC) ); -} +} diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 2452a9787..61f1db672 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -28,7 +28,7 @@ import { Biome } from "../data/enums/biome"; import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, VariableMoveTypeAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs } from '../data/ability'; import { Abilities } from "#app/data/enums/abilities"; import PokemonData from '../system/pokemon-data'; -import { BattlerIndex } from '../battle'; +import Battle, { BattlerIndex } from '../battle'; import { BattleSpec } from "../enums/battle-spec"; import { Mode } from '../ui/ui'; import PartyUiHandler, { PartyOption, PartyUiMode } from '../ui/party-ui-handler'; @@ -694,7 +694,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } - if (forDefend && (this.getTag(BattlerTagType.IGNORE_FLYING) || this.scene.arena.getTag(ArenaTagType.GRAVITY))) { + if (forDefend && (this.getTag(BattlerTagType.IGNORE_FLYING) || this.scene.arena.getTag(ArenaTagType.GRAVITY) || this.getTag(BattlerTagType.GROUNDED))) { const flyingIndex = types.indexOf(Type.FLYING); if (flyingIndex > -1) types.splice(flyingIndex, 1); @@ -730,7 +730,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { while (pokemonPrevolutions.hasOwnProperty(starterSpeciesId)) starterSpeciesId = pokemonPrevolutions[starterSpeciesId]; return allAbilities[starterPassiveAbilities[starterSpeciesId]]; - } + } hasPassive(): boolean { return this.passive || this.isBoss();