- Joined
- Jul 1, 2024
- Posts
- 28
Since you're trying to make this plugin compatible with the Gen IX Plugin, I wanted to bring up a compatibility issue I came across. It seems that both plugins are using their own version of "ability_triggered?" that do not align in usage.
Here's the version found in the AAM Battler script:
And here's the version in the Gen IX plugin's Battle_Battler script:
And, for reference, here's the Gen IX plugin using it in Supersweet Syrup, which is what gave me an error when a Pokémon with the ability appeared:
Now, the note attached to the AAM Battler usage says that the method is not necessary, and I am unable to find any instance of the plugin as a whole using the method, so I'm tempted to just delete it to fix the contradiction, but I'm unsure if there's any kind of interplay that I'm not understanding, so I wanted to bring it up here.
Here's the version found in the AAM Battler script:
Ruby:
def ability_triggered?(check_ability) # honestly, this method is not necessary
return @battle.pbAbilityTriggered?(self, check_ability)
end
And here's the version in the Gen IX plugin's Battle_Battler script:
Ruby:
def ability_triggered?
return @battle.pbAbilityTriggered?(self)
end
And, for reference, here's the Gen IX plugin using it in Supersweet Syrup, which is what gave me an error when a Pokémon with the ability appeared:
Ruby:
Battle::AbilityEffects::OnSwitchIn.add(:SUPERSWEETSYRUP,
proc { |ability, battler, battle, switch_in|
next if battler.ability_triggered?
battle.pbShowAbilitySplash(battler)
battle.pbDisplay(_INTL("A supersweet aroma is wafting from the syrup covering {1}!", battler.pbThis))
battle.allOtherSideBattlers(battler.index).each do |b|
next if !b.near?(battler) || b.fainted?
if b.itemActive? && !b.hasActiveAbility?(:CONTRARY) && b.effects[PBEffects::Substitute] == 0
next if Battle::ItemEffects.triggerStatLossImmunity(b.item, b, :EVASION, battle, true)
end
b.pbLowerStatStageByAbility(:EVASION, 1, battler, false)
end
battle.pbHideAbilitySplash(battler)
battle.pbSetAbilityTrigger(battler)
}
)
Now, the note attached to the AAM Battler usage says that the method is not necessary, and I am unable to find any instance of the plugin as a whole using the method, so I'm tempted to just delete it to fix the contradiction, but I'm unsure if there's any kind of interplay that I'm not understanding, so I wanted to bring it up here.