mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-28 03:36:56 -05:00
Linked: Fix priority on moves in the first moveslots while choice-locked
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
This commit is contained in:
parent
4415c0ffbe
commit
04a026782d
|
|
@ -27,7 +27,8 @@ export const Scripts: ModdedBattleScriptsData = {
|
||||||
// Linked mod
|
// Linked mod
|
||||||
const linkedMoves: [ActiveMove, ActiveMove] = action.pokemon.getLinkedMoves();
|
const linkedMoves: [ActiveMove, ActiveMove] = action.pokemon.getLinkedMoves();
|
||||||
let linkIndex = -1;
|
let linkIndex = -1;
|
||||||
if (linkedMoves.length && !move.isZ && !move.isMax &&
|
if (linkedMoves.length && !action.pokemon.hasItem(['choiceband', 'choicescarf', 'choicespecs']) &&
|
||||||
|
!action.pokemon.hasAbility('gorillatactics') && !move.isZ && !move.isMax &&
|
||||||
(linkIndex = linkedMoves.findIndex(x => x.id === this.toID(action.move))) >= 0) {
|
(linkIndex = linkedMoves.findIndex(x => x.id === this.toID(action.move))) >= 0) {
|
||||||
const linkedActions = action.linked || linkedMoves;
|
const linkedActions = action.linked || linkedMoves;
|
||||||
const altMove = linkedActions[1 - linkIndex];
|
const altMove = linkedActions[1 - linkIndex];
|
||||||
|
|
@ -618,9 +619,8 @@ export const Scripts: ModdedBattleScriptsData = {
|
||||||
action.fractionalPriority = this.battle.runEvent('FractionalPriority', action.pokemon, null, action.move, 0);
|
action.fractionalPriority = this.battle.runEvent('FractionalPriority', action.pokemon, null, action.move, 0);
|
||||||
const linkedMoves: [ActiveMove, ActiveMove] = action.pokemon.getLinkedMoves();
|
const linkedMoves: [ActiveMove, ActiveMove] = action.pokemon.getLinkedMoves();
|
||||||
if (
|
if (
|
||||||
linkedMoves.length &&
|
linkedMoves.length && !action.pokemon.hasItem(['choiceband', 'choicescarf', 'choicespecs']) &&
|
||||||
!(action.pokemon.getItem().isChoice || action.pokemon.hasAbility('gorillatactics')) &&
|
!action.pokemon.hasAbility('gorillatactics') && !action.zmove && !action.maxMove
|
||||||
!action.zmove && !action.maxMove
|
|
||||||
) {
|
) {
|
||||||
const decisionMove = this.battle.toID(action.move);
|
const decisionMove = this.battle.toID(action.move);
|
||||||
if (linkedMoves.some(x => x.id === decisionMove)) {
|
if (linkedMoves.some(x => x.id === decisionMove)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user