mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Fixed up conditionals + stall/M.m
This commit is contained in:
parent
10281f4a87
commit
545e09565b
@ -4657,7 +4657,7 @@ export function initAbilities() {
|
||||
.attr(AlwaysHitAbAttr)
|
||||
.attr(DoubleBattleChanceAbAttr),
|
||||
new Ability(Abilities.STALL, 4)
|
||||
.attr(ChangeMovePriorityAbAttr, (pokemon, move: Move) => true, -0.5),
|
||||
.attr(ChangeMovePriorityAbAttr, (pokemon, move: Move) => true, -0.2),
|
||||
new Ability(Abilities.TECHNICIAN, 4)
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => {
|
||||
const power = new Utils.NumberHolder(move.power);
|
||||
@ -5343,7 +5343,7 @@ export function initAbilities() {
|
||||
.partial() // Healing not blocked by Heal Block
|
||||
.ignorable(),
|
||||
new Ability(Abilities.MYCELIUM_MIGHT, 9)
|
||||
.attr(ChangeMovePriorityAbAttr, (pokemon, move) => move.category === MoveCategory.STATUS, -0.5)
|
||||
.attr(ChangeMovePriorityAbAttr, (pokemon, move) => move.category === MoveCategory.STATUS, -0.2)
|
||||
.attr(PreventBypassSpeedChanceAbAttr, (pokemon, move) => move.category === MoveCategory.STATUS)
|
||||
.attr(MoveAbilityBypassAbAttr, (pokemon, move: Move) => move.category === MoveCategory.STATUS),
|
||||
new Ability(Abilities.MINDS_EYE, 9)
|
||||
|
@ -2352,7 +2352,7 @@ export class TurnStartPhase extends FieldPhase {
|
||||
// If the moves share the same original priority bracket, it can check for differences in battlerBypassSpeed and return the result.
|
||||
// This conditional is used to ensure that Quick Claw can still activate with abilities like Stall and Mycelium Might (attack moves only)
|
||||
// Otherwise, the game returns the user of the move with the highest priority.
|
||||
const isSameBracket = Math.abs(aPriority.value - bPriority.value) === 0.5;
|
||||
const isSameBracket = Math.ceil(aPriority.value) - Math.ceil(bPriority.value) === 0;
|
||||
if (aPriority.value !== bPriority.value) {
|
||||
if (isSameBracket && battlerBypassSpeed[a].value !== battlerBypassSpeed[b].value) {
|
||||
return battlerBypassSpeed[a].value ? -1 : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user