I enjoy this plugin a lot, but I recently noticed that it clashes with the Sub-Abilities plugin, both of which have a different function in my game. One unlocks flavorful abilities by level up, the other unlocks stronger abilities locked behind questlines.
Anyway, this plugin works perfectly if both are installed, but the Sub-Abilities method to draw abilities seems to be overwritten in the process. Do any of you have an idea how to get around this? I looked at both plugins but haven't arrived at an answer yet.
I enjoy this plugin a lot, but I recently noticed that it clashes with the Sub-Abilities plugin, both of which have a different function in my game. One unlocks flavorful abilities by level up, the other unlocks stronger abilities locked behind questlines.
Anyway, this plugin works perfectly if both are installed, but the Sub-Abilities method to draw abilities seems to be overwritten in the process. Do any of you have an idea how to get around this? I looked at both plugins but haven't arrived at an answer yet.
because neither were made to be used together, both serve the same function of providing more abilities for Pokémon, but Sub-abilitys is outdated. besides that you don't need 2 plugins to do the same thing, just 1 already does what the other would do but better.
and I don't think it's worth supporting an old plugin that is barely used nowadays, unlike the Summary from B/W that most still use. so your only option for now is to choose one or the other.
I enjoy this plugin a lot, but I recently noticed that it clashes with the Sub-Abilities plugin, both of which have a different function in my game. One unlocks flavorful abilities by level up, the other unlocks stronger abilities locked behind questlines.
Anyway, this plugin works perfectly if both are installed, but the Sub-Abilities method to draw abilities seems to be overwritten in the process. Do any of you have an idea how to get around this? I looked at both plugins but haven't arrived at an answer yet.
What Willow said I'm afraid. I did try and give the code a look when it was first released because I also wanted to use it on my project, but yeah, it clashes with a lot of what the Innate abilities needs to load them properly. And it appears somewhat abandoned (Kinda like this one at the moment... sorry about that, it is not I swear.) so I'm afraid I can't give it proper support. You'll have to choose for now.
Hi, ive been trying to use this plugin but when i switch to the summary page for the innates it doesnt display properly. https://imgur.com/a/JzQxaf3
This is a frersh project on rpg maker xp on the latest version of essentials and the only plugins installed are hotfixes, modular ui and innates. I havent edited anything except assigning pikachu from the demo party the innates of blaziken in the PBS innate sets
Hi, ive been trying to use this plugin but when i switch to the summary page for the innates it doesnt display properly. https://imgur.com/a/JzQxaf3
This is a frersh project on rpg maker xp on the latest version of essentials and the only plugins installed are hotfixes, modular ui and innates. I havent edited anything except assigning pikachu from the demo party the innates of blaziken in the PBS innate sets
Thanks for the reply. I ve been messing with both Modular UI and the Innates plugin to fix it but I havent been able to do it yet. Here is what I ve done up to now. Installed hotfixes -> installed modular UI -> install innates plugin -> move the 2 PNGs from the innate summary page folder into graphics -> assign innate sets to a few different pokemon to test. Right now i dont even get the weird summary page i was getting before and innates are not working since i dont see speedboost activating on pikachu in battle.
Thanks for the reply. I ve been messing with both Modular UI and the Innates plugin to fix it but I havent been able to do it yet. Here is what I ve done up to now. Installed hotfixes -> installed modular UI -> install innates plugin -> move the 2 PNGs from the innate summary page folder into graphics -> assign innate sets to a few different pokemon to test. Right now i dont even get the weird summary page i was getting before and innates are not working since i dont see speedboost activating on pikachu in battle.
Hmm, odd. Have you checked with any other ability? Maybe one that triggers on entry to see if the effect is active immediatly. Like the terrain surges for example.
Outside of that without a crash I don't see any issue. The moment your innates load in the summary they are loaded for the pokemon as well. I don't remember if I added it to this release but upon a Pokemon loading it's innates in your console command an array of all the abilities the pokemon has should appear.
Try changing it for another ability like an entry one and to see if the text appears in your console command. If nothing happens I'll give it a closer look. Sorry I can't give specific solutions for now, I'm in the middle of my shift
I tried with intimidate, sandstorm and psychic surge, i dont see anything on console and it doesnt activate in battle. Take your time tho, its probably something im doing wrong, i dont have much experience using plugins with essentials, although as stated above i dont see where i messed up at least as far as the installation of the plugins goes.
It happens because both Gen 9 Pack and Innate Abilities define a mehtod pbAbilityTriggered? in the Battle class, (with different arguments, which causes the error). Any suggestions on how to fix this?
Thank you in advance, and also thank you for the awesome Plugin!
It happens because both Gen 9 Pack and Innate Abilities define a mehtod pbAbilityTriggered? in the Battle class, (with different arguments, which causes the error). Any suggestions on how to fix this?
Thank you in advance, and also thank you for the awesome Plugin!
Thank you very much, did I alredy tell you your work is awesome?
I did a quick fix yesterday with a default parameter too, setting check_ability = nil (for lack of knowledge) and saw that at least it stopped the crash, I'm going to apply your fix and do a bunch of tests :)
Unrelated, but I was trying to fix a minor bug with Worry Seed, since it kept triggering the same mane ability the target had (e.g. if it had Triage, both ability splash showed Triage) and since for my project it was ok to just replace the main ability instead of adding Insomnia to the list of abilities of the target, I changed the method ability=(value) in AAM Battler to just set @abilityMutationList[0]=@ability_id regardless of self.hasAbilityMutation? value (so removing the unshift of the abilities array but keeping the duplicates removal).
It seems to be working correctly, but I'm keeping an eye on this edit I made to be sure I didn't break anything. At least I have everything under Version Control.
I enjoy so much using this plugin in other people games but i'm trying to make my own and my project basically doesn't read the files from "innate summary page"... I put both that and innate abilities files into my plugins an the bps and graphics in the respective folders but then in game when i go to see a pokemon innate abilities the background or the icon in the top (the two image files in the summary folder) don't show, instead they are trasparent, showing the party underneath...
I enjoy so much using this plugin in other people games but i'm trying to make my own and my project basically doesn't read the files from "innate summary page"... I put both that and innate abilities files into my plugins an the bps and graphics in the respective folders but then in game when i go to see a pokemon innate abilities the background or the icon in the top (the two image files in the summary folder) don't show, instead they are trasparent, showing the party underneath...
Inside of the Innate Summary Page folder there are 2 files, called bg_innates and page_inantes. Make sure to place those inside of your Graphics/UI/Summary folder (And of course to have the Modular UI Scenes installed)
Inside of the Innate Summary Page folder there are 2 files, called bg_innates and page_inantes. Make sure to place those inside of your Graphics/UI/Summary folder (And of course to have the Modular UI Scenes installed)
yeah... it's part of the community pack of a bilities from Loven.. i could take it out from my innates but does that mean none of them work with it?
Edit: nvm i know what happened! I got distracted and didn't put the txt file from the plugin into bps thank you for the help!
edit 2 im still getting this error, it didn't stop from playing but i think it stopped my opponent from attacking skipping its attack
[2026-01-12 09:47:53 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]
Exception: ArgumentError
Message: wrong number of arguments (given 1, expected 2)
yeah... it's part of the community pack of a bilities from Loven.. i could take it out from my innates but does that mean none of them work with it?
Edit: nvm i know what happened! I got distracted and didn't put the txt file from the plugin into bps thank you for the help!
edit 2 im still getting this error, it didn't stop from playing but i think it stopped my opponent from attacking skipping its attack
[2026-01-12 09:47:53 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]
Exception: ArgumentError
Message: wrong number of arguments (given 1, expected 2)
wait you said replace but i searched for those lines and i don't see them in the file you mentioned... this is my aam battler
module PBEffects
#===========================================================================
# These effects apply to a battler
#===========================================================================
#IMPORTANT: Set Trace to an unused Effect ID in your game.
############################################################################
Trace = 1000
end
class Battle::Battler
attr_accessor :abilityMutationList
def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end
# Gen 9 Pack Compatibility
def affectedByMoldBreaker?
return @battle.moldBreaker && !hasActiveItem?(:ABILITYSHIELD)
end
def ability=(value)
new_ability = GameData::Ability.try_get(value)
@ability_id = (new_ability) ? new_ability.id : nil
if @ability_id
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList = @abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
end
end
=begin
alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)
# Assuming @ability_id is already set for the Pokémon
speciesAbilities = [@ability_id].compact
# Initialize the innate abilities
pkmn.assign_innate_abilities if pkmn.active_innates.nil?
# Get the active innates and process them based on the settings
active_innates = pkmn.active_innates
if pkmn.hasAbilityMutation?
if Settings::INNATE_PROGRESS_WITH_VARIABLE && !Settings::INNATE_PROGRESS_WITH_LEVEL
push_ability_count = case $game_variables[Settings::INNATE_PROGRESS_VARIABLE]
when 1 then 1
when 2 then 2
when 3 then active_innates.size
else 0
end
active_innates.each_with_index do |ability, index|
speciesAbilities.push(ability)
break if index + 1 >= push_ability_count
end
elsif Settings::INNATE_PROGRESS_WITH_LEVEL && !Settings::INNATE_PROGRESS_WITH_VARIABLE
levels_to_unlock = Settings::LEVELS_TO_UNLOCK.find { |entry| entry.first == pkmn.species }&.drop(1) || Settings::LEVELS_TO_UNLOCK.last
levels_to_unlock.each_with_index do |min_level, index|
if pkmn.level >= min_level && active_innates.size > index
speciesAbilities.push(active_innates[index])
end
end
else
active_innates.each { |ability| speciesAbilities.push(ability) }
end
end
# Ensure there's at least one ability
speciesAbilities.push(:NOABILITY) if speciesAbilities.empty?
# Assign the list of abilities to the Pokémon's ability mutation list
@abilityMutationList = speciesAbilities
end
=end
alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)
# Initialize the innate abilities if not already set
pkmn.assign_innate_abilities if pkmn.active_innates.empty?
# Set the original innates of the pokemon
#pkmn.save_original_innates
# Set the ability mutation list using the new method
@abilityMutationList = pkmn.set_innate_limits
end
alias abilityMutations_pbInitEffects pbInitEffects
def pbInitEffects(batonPass)
abilityMutations_pbInitEffects(batonPass)
@effects[PBEffects::Trace] = false #DemICE AAM edit
end
#=============================================================================
# Refreshing a battler's properties
#=============================================================================
alias abilityMutations_pbUpdate pbUpdate
def pbUpdate(fullChange = false)
return if !@pokemon
abilityMutations_pbUpdate(fullChange)
if !@effects[PBEffects::Transform] && fullChange
if !@abilityMutationList.include?(@ability_id)
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList=@abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
#print @abilityMutationList
end
end
end
def hasActiveAbility?(check_ability, ignore_fainted = false)
return false if !abilityActive?(ignore_fainted, check_ability)
if self.hasAbilityMutation?
=begin
if check_ability.is_a?(Array)
for i in check_ability
$aamName2=GameData::Ability.get(i).name
return @abilityMutationList.include?(i)
end
=end
if check_ability.is_a?(Array)
common_element = (check_ability & @abilityMutationList).first
$aamName2 = GameData::Ability.get(common_element).name if common_element
return (check_ability & @abilityMutationList).any?
else
$aamName2=GameData::Ability.get(check_ability).name
return @abilityMutationList.include?(check_ability)
end
end
return check_ability.include?(@ability_id) if check_ability.is_a?(Array)
$aamName2=GameData::Ability.get(check_ability).name
return self.ability == check_ability
print chek_ability
end
alias hasWorkingAbility hasActiveAbility?
if self.hasAbilityMutation?
if check_ability.is_a?(Array)
for i in check_ability
ability_name = GameData::Ability.get(i).name
$aamName2 = ability_name
$aamName = ability_name
puts "First set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(i)
end
else
ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Else set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(check_ability)
end
end
if check_ability.is_a?(Array)
return check_ability.include?(@ability_id)
end
ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Final set [imath]aamName and[/imath]aamName2 to #{ability_name}"
return self.ability == check_ability
end
alias hasWorkingAbility hasActiveAbility?
=end
=begin
# Called when a Pokémon (self) enters battle, at the end of each move used,
# and at the end of each round.
def pbContinualAbilityChecks(onSwitchIn = false)
# Check for end of primordial weather
@battle.pbEndPrimordialWeather
# Trace
if hasActiveAbility?(:TRACE) && (self.effects[PBEffects::Trace] || onSwitchIn)
# NOTE: In Gen 5 only, Trace only triggers upon the Trace bearer switching
# in and not at any later times, even if a traceable ability turns
# up later. Essentials ignores this, and allows Trace to trigger
# whenever it can even in Gen 5 battle mechanics.
choices = @battle.allOtherSideBattlers(@index).select { |b|
next !b.ungainableAbility? &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
}
if choices.length == 0
effects[PBEffects::Trace] = true
else
choice = choices[@battle.pbRandom(choices.length)]
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
#puts "Conditional set of $aamName to #{choice.abilityName} due to Trace"
battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
self.effects[PBEffects::Trace] = false
end
end
end
=end
def pbContinualAbilityChecks(onSwitchIn = false)
@battle.pbEndPrimordialWeather
# Handle Commander Ability
if hasActiveAbility?(:COMMANDER)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
@proteanTrigger = false
plateType = pbGetJudgmentType(@legendPlateType)
@legendPlateType = plateType
# Handle Trace Ability
if hasActiveAbility?(:TRACE)
if hasActiveItem?(:ABILITYSHIELD) # Trace failed by its own Ability Shield
if onSwitchIn
@battle.pbShowAbilitySplash(self)
@battle.pbDisplay(_INTL("{1}'s Ability is protected by the effects of its Ability Shield!", pbThis))
@battle.pbHideAbilitySplash(self)
end
else
choices = @battle.allOtherSideBattlers(@index).select do |b|
next !b.hasActiveItem?(:ABILITYSHIELD) && (b.ability_id == :WONDERGUARD || !b.uncopyableAbility?) &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
end
if choices.length > 0
choice = choices[@battle.pbRandom(choices.length)]
# Update $aamName and show ability splash
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
# Handle ability mutation
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
@battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
# Trigger ability effects if applicable
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
end
end
end
pbMirrorStatUpsOpposing
end
alias aam_pbCanInflictStatus? pbCanInflictStatus?
def pbCanInflictStatus?(newStatus, user, showMessages, move = nil, ignoreStatus = false)
$aam_StatusImmunityFromAlly=[]
aam_pbCanInflictStatus?(newStatus, user, showMessages, move, ignoreStatus)
end
=begin
def abilityName # May have problem on some situations, lazy
abil = self.ability
abilitytext = abil.name
if self.hasAbilityMutation?
aamNames=[]
for i in self.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
end
return abilitytext
end
=end
def abilityName
abil = self.ability
abilitytext = abil ? abil.name : GameData::Ability.get(:NOABILITY).name
#puts "[abilityName] Initial ability: #{abil.inspect}, Name: #{abilitytext}"
if self.hasAbilityMutation?
aamNames = @abilityMutationList.map { |ability| GameData::Ability.get(ability).name }
#puts "[abilityName] Ability mutation list names: #{aamNames.inspect}"
#puts "[abilityName] Current [imath]aamName: #{[/imath]aamName}, [imath]aamName2: #{[/imath]aamName2}"
if aamNames.include?($aamName2)
abilitytext = $aamName2
#puts "[abilityName] Setting abilitytext to $aamName2: #{abilitytext}"
elsif aamNames.include?($aamName)
abilitytext = $aamName
#puts "[abilityName] Setting abilitytext to $aamName: #{abilitytext}"
end
end
puts "[abilityName] Final abilitytext: #{abilitytext}"
abilitytext
end
=begin
#-----------------------------------------------------------------------------
# Gen 9 pack Guard Dog fix
#-----------------------------------------------------------------------------
alias paldea_pbLowerStatStageByAbility pbLowerStatStageByAbility
def pbLowerStatStageByAbility(stat, increment, user, splashAnim = true, checkContact = false)
if hasActiveAbility?(:GUARDDOG) && user.hasActiveAbility?(:INTIMIDATE)#user.ability == :INTIMIDATE
return pbRaiseStatStageByAbility(stat, increment, self, true)
end
return paldea_pbLowerStatStageByAbility(stat, increment, user, splashAnim)
end
=end
end
# Safari Zone Fix
class Battle::FakeBattler
attr_accessor :abilityMutationList
alias aam_initialize initialize
def initialize(*args)
aam_initialize(*args)
@abilityMutationList=[]
end
def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end
end
=begin
class Battle::Scene::AbilitySplashBar < Sprite
def refresh
self.bitmap.clear
return if !@battler
textPos = []
textX = (@side == 0) ? 10 : self.bitmap.width - 8
# Draw Pokémon's name
textPos.push([_INTL("{1}'s", @battler.name), textX, 8, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
# Draw Pokémon's ability
abilitytext=@battler.abilityName
if @battler.hasAbilityMutation?
aamNames=[]
for i in @battler.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
#
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
end
textPos.push([abilitytext, textX, 38, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
pbDrawTextPositions(self.bitmap, textPos)
end
wait you said replace but i searched for those lines and i don't see them in the file you mentioned... this is my aam battler
module PBEffects
#===========================================================================
# These effects apply to a battler
#===========================================================================
#IMPORTANT: Set Trace to an unused Effect ID in your game.
############################################################################
Trace = 1000
end
class Battle::Battler
attr_accessor :abilityMutationList
def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end
# Gen 9 Pack Compatibility
def affectedByMoldBreaker?
return @battle.moldBreaker && !hasActiveItem?(:ABILITYSHIELD)
end
def ability=(value)
new_ability = GameData::Ability.try_get(value)
@ability_id = (new_ability) ? new_ability.id : nil
if @ability_id
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList = @abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
end
end
=begin
alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)
# Assuming @ability_id is already set for the Pokémon
speciesAbilities = [@ability_id].compact
# Initialize the innate abilities
pkmn.assign_innate_abilities if pkmn.active_innates.nil?
# Get the active innates and process them based on the settings
active_innates = pkmn.active_innates
if pkmn.hasAbilityMutation?
if Settings::INNATE_PROGRESS_WITH_VARIABLE && !Settings::INNATE_PROGRESS_WITH_LEVEL
push_ability_count = case $game_variables[Settings::INNATE_PROGRESS_VARIABLE]
when 1 then 1
when 2 then 2
when 3 then active_innates.size
else 0
end
active_innates.each_with_index do |ability, index|
speciesAbilities.push(ability)
break if index + 1 >= push_ability_count
end
elsif Settings::INNATE_PROGRESS_WITH_LEVEL && !Settings::INNATE_PROGRESS_WITH_VARIABLE
levels_to_unlock = Settings::LEVELS_TO_UNLOCK.find { |entry| entry.first == pkmn.species }&.drop(1) || Settings::LEVELS_TO_UNLOCK.last
levels_to_unlock.each_with_index do |min_level, index|
if pkmn.level >= min_level && active_innates.size > index
speciesAbilities.push(active_innates[index])
end
end
else
active_innates.each { |ability| speciesAbilities.push(ability) }
end
end
# Ensure there's at least one ability
speciesAbilities.push(:NOABILITY) if speciesAbilities.empty?
# Assign the list of abilities to the Pokémon's ability mutation list
@abilityMutationList = speciesAbilities
end
=end
alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)
# Initialize the innate abilities if not already set
pkmn.assign_innate_abilities if pkmn.active_innates.empty?
# Set the original innates of the pokemon
#pkmn.save_original_innates
# Set the ability mutation list using the new method
@abilityMutationList = pkmn.set_innate_limits
end
alias abilityMutations_pbInitEffects pbInitEffects
def pbInitEffects(batonPass)
abilityMutations_pbInitEffects(batonPass)
@effects[PBEffects::Trace] = false #DemICE AAM edit
end
#=============================================================================
# Refreshing a battler's properties
#=============================================================================
alias abilityMutations_pbUpdate pbUpdate
def pbUpdate(fullChange = false)
return if !@pokemon
abilityMutations_pbUpdate(fullChange)
if !@effects[PBEffects::Transform] && fullChange
if !@abilityMutationList.include?(@ability_id)
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList=@abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
#print @abilityMutationList
end
end
end
def hasActiveAbility?(check_ability, ignore_fainted = false)
return false if !abilityActive?(ignore_fainted, check_ability)
if self.hasAbilityMutation?
=begin
if check_ability.is_a?(Array)
for i in check_ability
$aamName2=GameData::Ability.get(i).name
return @abilityMutationList.include?(i)
end
=end
if check_ability.is_a?(Array)
common_element = (check_ability & @abilityMutationList).first
$aamName2 = GameData::Ability.get(common_element).name if common_element
return (check_ability & @abilityMutationList).any?
else
$aamName2=GameData::Ability.get(check_ability).name
return @abilityMutationList.include?(check_ability)
end
end
return check_ability.include?(@ability_id) if check_ability.is_a?(Array)
$aamName2=GameData::Ability.get(check_ability).name
return self.ability == check_ability
print chek_ability
end
alias hasWorkingAbility hasActiveAbility?
if self.hasAbilityMutation?
if check_ability.is_a?(Array)
for i in check_ability
ability_name = GameData::Ability.get(i).name
$aamName2 = ability_name
$aamName = ability_name
puts "First set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(i)
end
else
ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Else set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(check_ability)
end
end
if check_ability.is_a?(Array)
return check_ability.include?(@ability_id)
end
ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Final set [imath]aamName and[/imath]aamName2 to #{ability_name}"
return self.ability == check_ability
end
alias hasWorkingAbility hasActiveAbility?
=end
=begin
# Called when a Pokémon (self) enters battle, at the end of each move used,
# and at the end of each round.
def pbContinualAbilityChecks(onSwitchIn = false)
# Check for end of primordial weather
@battle.pbEndPrimordialWeather
# Trace
if hasActiveAbility?(:TRACE) && (self.effects[PBEffects::Trace] || onSwitchIn)
# NOTE: In Gen 5 only, Trace only triggers upon the Trace bearer switching
# in and not at any later times, even if a traceable ability turns
# up later. Essentials ignores this, and allows Trace to trigger
# whenever it can even in Gen 5 battle mechanics.
choices = @battle.allOtherSideBattlers(@index).select { |b|
next !b.ungainableAbility? &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
}
if choices.length == 0
effects[PBEffects::Trace] = true
else
choice = choices[@battle.pbRandom(choices.length)]
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
#puts "Conditional set of $aamName to #{choice.abilityName} due to Trace"
battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
self.effects[PBEffects::Trace] = false
end
end
end
=end
def pbContinualAbilityChecks(onSwitchIn = false)
@battle.pbEndPrimordialWeather
# Handle Commander Ability
if hasActiveAbility?(:COMMANDER)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
@proteanTrigger = false
plateType = pbGetJudgmentType(@legendPlateType)
@legendPlateType = plateType
# Handle Trace Ability
if hasActiveAbility?(:TRACE)
if hasActiveItem?(:ABILITYSHIELD) # Trace failed by its own Ability Shield
if onSwitchIn
@battle.pbShowAbilitySplash(self)
@battle.pbDisplay(_INTL("{1}'s Ability is protected by the effects of its Ability Shield!", pbThis))
@battle.pbHideAbilitySplash(self)
end
else
choices = @battle.allOtherSideBattlers(@index).select do |b|
next !b.hasActiveItem?(:ABILITYSHIELD) && (b.ability_id == :WONDERGUARD || !b.uncopyableAbility?) &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
end
if choices.length > 0
choice = choices[@battle.pbRandom(choices.length)]
# Update $aamName and show ability splash
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
# Handle ability mutation
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
@battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
# Trigger ability effects if applicable
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
end
end
end
pbMirrorStatUpsOpposing
end
alias aam_pbCanInflictStatus? pbCanInflictStatus?
def pbCanInflictStatus?(newStatus, user, showMessages, move = nil, ignoreStatus = false)
$aam_StatusImmunityFromAlly=[]
aam_pbCanInflictStatus?(newStatus, user, showMessages, move, ignoreStatus)
end
=begin
def abilityName # May have problem on some situations, lazy
abil = self.ability
abilitytext = abil.name
if self.hasAbilityMutation?
aamNames=[]
for i in self.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
end
return abilitytext
end
=end
def abilityName
abil = self.ability
abilitytext = abil ? abil.name : GameData::Ability.get(:NOABILITY).name
#puts "[abilityName] Initial ability: #{abil.inspect}, Name: #{abilitytext}"
if self.hasAbilityMutation?
aamNames = @abilityMutationList.map { |ability| GameData::Ability.get(ability).name }
#puts "[abilityName] Ability mutation list names: #{aamNames.inspect}"
#puts "[abilityName] Current [imath]aamName: #{[/imath]aamName}, [imath]aamName2: #{[/imath]aamName2}"
if aamNames.include?($aamName2)
abilitytext = $aamName2
#puts "[abilityName] Setting abilitytext to $aamName2: #{abilitytext}"
elsif aamNames.include?($aamName)
abilitytext = $aamName
#puts "[abilityName] Setting abilitytext to $aamName: #{abilitytext}"
end
end
puts "[abilityName] Final abilitytext: #{abilitytext}"
abilitytext
end
=begin
#-----------------------------------------------------------------------------
# Gen 9 pack Guard Dog fix
#-----------------------------------------------------------------------------
alias paldea_pbLowerStatStageByAbility pbLowerStatStageByAbility
def pbLowerStatStageByAbility(stat, increment, user, splashAnim = true, checkContact = false)
if hasActiveAbility?(:GUARDDOG) && user.hasActiveAbility?(:INTIMIDATE)#user.ability == :INTIMIDATE
return pbRaiseStatStageByAbility(stat, increment, self, true)
end
return paldea_pbLowerStatStageByAbility(stat, increment, user, splashAnim)
end
=end
end
# Safari Zone Fix
class Battle::FakeBattler
attr_accessor :abilityMutationList
alias aam_initialize initialize
def initialize(*args)
aam_initialize(*args)
@abilityMutationList=[]
end
def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end
end
=begin
class Battle::Scene::AbilitySplashBar < Sprite
def refresh
self.bitmap.clear
return if !@battler
textPos = []
textX = (@side == 0) ? 10 : self.bitmap.width - 8
# Draw Pokémon's name
textPos.push([_INTL("{1}'s", @battler.name), textX, 8, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
# Draw Pokémon's ability
abilitytext=@battler.abilityName
if @battler.hasAbilityMutation?
aamNames=[]
for i in @battler.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
#
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
end
textPos.push([abilitytext, textX, 38, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
pbDrawTextPositions(self.bitmap, textPos)
end
This section is for the discussion of the tutorials and resources on Eevee Expo. To find tutorials and resources, check out the Tutorial and Resource Manager for optimal navigation.