mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-23 15:59:26 +02:00
moved it back
This commit is contained in:
parent
aefa6098c9
commit
13cb236ca8
@ -2680,12 +2680,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
* Applies the results of a move to this pokemon
|
* Applies the results of a move to this pokemon
|
||||||
* @param source The {@linkcode Pokemon} using the move
|
* @param source The {@linkcode Pokemon} using the move
|
||||||
* @param move The {@linkcode Move} being used
|
* @param move The {@linkcode Move} being used
|
||||||
* @param moveCategory the {@linkcode MoveCategory} of the move used
|
|
||||||
* @returns The {@linkcode HitResult} of the attack
|
* @returns The {@linkcode HitResult} of the attack
|
||||||
*/
|
*/
|
||||||
apply(source: Pokemon, move: Move, moveCategory: MoveCategory): HitResult {
|
apply(source: Pokemon, move: Move): HitResult {
|
||||||
const defendingSide = this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
const defendingSide = this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
||||||
if (moveCategory === MoveCategory.STATUS) {
|
const moveCategory = new Utils.NumberHolder(move.category);
|
||||||
|
applyMoveAttrs(VariableMoveCategoryAttr, source, this, move, moveCategory);
|
||||||
|
if (moveCategory.value === MoveCategory.STATUS) {
|
||||||
const cancelled = new Utils.BooleanHolder(false);
|
const cancelled = new Utils.BooleanHolder(false);
|
||||||
const typeMultiplier = this.getMoveEffectiveness(source, move, false, false, cancelled);
|
const typeMultiplier = this.getMoveEffectiveness(source, move, false, false, cancelled);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { applyPreAttackAbAttrs, AddSecondStrikeAbAttr, IgnoreMoveEffectsAbAttr,
|
|||||||
import { ArenaTagSide, ConditionalProtectTag } from "#app/data/arena-tag";
|
import { ArenaTagSide, ConditionalProtectTag } from "#app/data/arena-tag";
|
||||||
import { MoveAnim } from "#app/data/battle-anims";
|
import { MoveAnim } from "#app/data/battle-anims";
|
||||||
import { BattlerTagLapseType, DamageProtectedTag, ProtectedTag, SemiInvulnerableTag, SubstituteTag } from "#app/data/battler-tags";
|
import { BattlerTagLapseType, DamageProtectedTag, ProtectedTag, SemiInvulnerableTag, SubstituteTag } from "#app/data/battler-tags";
|
||||||
import { MoveTarget, applyMoveAttrs, OverrideMoveEffectAttr, MultiHitAttr, AttackMove, FixedDamageAttr, VariableTargetAttr, MissEffectAttr, MoveFlags, applyFilteredMoveAttrs, MoveAttr, MoveEffectAttr, MoveEffectTrigger, ChargeAttr, MoveCategory, NoEffectAttr, HitsTagAttr, ToxicAccuracyAttr, VariableMoveCategoryAttr } from "#app/data/move";
|
import { MoveTarget, applyMoveAttrs, OverrideMoveEffectAttr, MultiHitAttr, AttackMove, FixedDamageAttr, VariableTargetAttr, MissEffectAttr, MoveFlags, applyFilteredMoveAttrs, MoveAttr, MoveEffectAttr, MoveEffectTrigger, ChargeAttr, MoveCategory, NoEffectAttr, HitsTagAttr, ToxicAccuracyAttr } from "#app/data/move";
|
||||||
import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms";
|
||||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||||
import { Moves } from "#app/enums/moves";
|
import { Moves } from "#app/enums/moves";
|
||||||
@ -192,9 +192,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
* made visible to the user until the resulting {@linkcode DamagePhase}
|
* made visible to the user until the resulting {@linkcode DamagePhase}
|
||||||
* is invoked.
|
* is invoked.
|
||||||
*/
|
*/
|
||||||
const moveCategory = new Utils.NumberHolder(move.category);
|
const hitResult = !isProtected ? target.apply(user, move) : HitResult.NO_EFFECT;
|
||||||
applyMoveAttrs(VariableMoveCategoryAttr, user, target, move, moveCategory);
|
|
||||||
const hitResult = !isProtected ? target.apply(user, move, moveCategory.value) : HitResult.NO_EFFECT;
|
|
||||||
|
|
||||||
/** Does {@linkcode hitResult} indicate that damage was dealt to the target? */
|
/** Does {@linkcode hitResult} indicate that damage was dealt to the target? */
|
||||||
const dealsDamage = [
|
const dealsDamage = [
|
||||||
|
@ -165,7 +165,7 @@ describe("Abilities - Sheer Force", () => {
|
|||||||
|
|
||||||
applyAbAttrs(MoveEffectChanceMultiplierAbAttr, user, null, false, chance, move, target, false);
|
applyAbAttrs(MoveEffectChanceMultiplierAbAttr, user, null, false, chance, move, target, false);
|
||||||
applyPreAttackAbAttrs(MovePowerBoostAbAttr, user, target, move, false, power);
|
applyPreAttackAbAttrs(MovePowerBoostAbAttr, user, target, move, false, power);
|
||||||
applyPostDefendAbAttrs(PostDefendTypeChangeAbAttr, target, user, move, target.apply(user, move, move.category));
|
applyPostDefendAbAttrs(PostDefendTypeChangeAbAttr, target, user, move, target.apply(user, move));
|
||||||
|
|
||||||
expect(chance.value).toBe(0);
|
expect(chance.value).toBe(0);
|
||||||
expect(power.value).toBe(move.power * 5461 / 4096);
|
expect(power.value).toBe(move.power * 5461 / 4096);
|
||||||
|
Loading…
Reference in New Issue
Block a user