mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Battlers now make use of Ability objects to be consistent with Pokemon objects
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
class Data
|
module PokemonData
|
||||||
|
|
||||||
# A mixin module for data classes which provides common class methods (called
|
# A mixin module for data classes which provides common class methods (called
|
||||||
# by Data::Thing.method) that provide access to data held within. Assumes the
|
# by PokemonData::Thing.method) that provide access to data held within.
|
||||||
# data class's data is stored in a class constant hash called DATA.
|
# Assumes the data class's data is stored in a class constant hash called DATA.
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
# @param other [Symbol, self, Integer]
|
# @param other [Symbol, self, Integer]
|
||||||
# @return [Boolean] whether the given other is defined as a self
|
# @return [Boolean] whether the given other is defined as a self
|
||||||
@@ -37,7 +36,7 @@ class Data
|
|||||||
|
|
||||||
def each
|
def each
|
||||||
keys = self::DATA.keys
|
keys = self::DATA.keys
|
||||||
keys.sort! { |a, b| a.to_s <=> b.to_s }
|
keys.sort! { |a, b| a.id_number <=> b.id_number }
|
||||||
keys.each do |key|
|
keys.each do |key|
|
||||||
yield self::DATA[key] if key.is_a?(Symbol)
|
yield self::DATA[key] if key.is_a?(Symbol)
|
||||||
end
|
end
|
||||||
@@ -71,5 +70,4 @@ class Data
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Data
|
module PokemonData
|
||||||
|
|
||||||
class Item
|
class Item
|
||||||
attr_reader :id
|
attr_reader :id
|
||||||
attr_reader :id_number
|
attr_reader :id_number
|
||||||
@@ -49,7 +48,6 @@ class Data
|
|||||||
return pbGetMessage(MessageTypes::ItemDescriptions, @id_number)
|
return pbGetMessage(MessageTypes::ItemDescriptions, @id_number)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -66,9 +64,9 @@ module Compiler
|
|||||||
line = pbGetCsvRecord(line, line_no, [0, "vnssuusuuUN"])
|
line = pbGetCsvRecord(line, line_no, [0, "vnssuusuuUN"])
|
||||||
item_number = line[0]
|
item_number = line[0]
|
||||||
item_symbol = line[1].to_sym
|
item_symbol = line[1].to_sym
|
||||||
if Data::Item::DATA[item_number]
|
if PokemonData::Item::DATA[item_number]
|
||||||
raise _INTL("Item ID number '{1}' is used twice.\r\n{2}", item_number, FileLineData.linereport)
|
raise _INTL("Item ID number '{1}' is used twice.\r\n{2}", item_number, FileLineData.linereport)
|
||||||
elsif Data::Item::DATA[item_symbol]
|
elsif PokemonData::Item::DATA[item_symbol]
|
||||||
raise _INTL("Item ID '{1}' is used twice.\r\n{2}", item_symbol, FileLineData.linereport)
|
raise _INTL("Item ID '{1}' is used twice.\r\n{2}", item_symbol, FileLineData.linereport)
|
||||||
end
|
end
|
||||||
# Construct item hash
|
# Construct item hash
|
||||||
@@ -86,13 +84,13 @@ module Compiler
|
|||||||
}
|
}
|
||||||
item_hash[:move] = parseMove(line[10]) if !nil_or_empty?(line[10])
|
item_hash[:move] = parseMove(line[10]) if !nil_or_empty?(line[10])
|
||||||
# Add item's data to records
|
# Add item's data to records
|
||||||
Data::Item::DATA[item_number] = Data::Item::DATA[item_symbol] = Data::Item.new(item_hash)
|
PokemonData::Item::DATA[item_number] = PokemonData::Item::DATA[item_symbol] = PokemonData::Item.new(item_hash)
|
||||||
item_names[item_number] = item_hash[:name]
|
item_names[item_number] = item_hash[:name]
|
||||||
item_names_plural[item_number] = item_hash[:name_plural]
|
item_names_plural[item_number] = item_hash[:name_plural]
|
||||||
item_descriptions[item_number] = item_hash[:description]
|
item_descriptions[item_number] = item_hash[:description]
|
||||||
}
|
}
|
||||||
# Save all data
|
# Save all data
|
||||||
Data::Item.save
|
PokemonData::Item.save
|
||||||
MessageTypes.setMessages(MessageTypes::Items, item_names)
|
MessageTypes.setMessages(MessageTypes::Items, item_names)
|
||||||
MessageTypes.setMessages(MessageTypes::ItemPlurals, item_names_plural)
|
MessageTypes.setMessages(MessageTypes::ItemPlurals, item_names_plural)
|
||||||
MessageTypes.setMessages(MessageTypes::ItemDescriptions, item_descriptions)
|
MessageTypes.setMessages(MessageTypes::ItemDescriptions, item_descriptions)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class Ability
|
module PokemonData
|
||||||
|
class Ability
|
||||||
attr_reader :id
|
attr_reader :id
|
||||||
attr_reader :id_number
|
attr_reader :id_number
|
||||||
attr_reader :real_name
|
attr_reader :real_name
|
||||||
@@ -27,4 +28,5 @@ class Ability
|
|||||||
def description
|
def description
|
||||||
return pbGetMessage(MessageTypes::AbilityDescs, @id_number)
|
return pbGetMessage(MessageTypes::AbilityDescs, @id_number)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class PokeBattle_Battler
|
|||||||
attr_accessor :species
|
attr_accessor :species
|
||||||
attr_accessor :type1
|
attr_accessor :type1
|
||||||
attr_accessor :type2
|
attr_accessor :type2
|
||||||
attr_accessor :ability
|
attr_accessor :ability_id
|
||||||
attr_accessor :moves
|
attr_accessor :moves
|
||||||
attr_accessor :gender
|
attr_accessor :gender
|
||||||
attr_accessor :iv
|
attr_accessor :iv
|
||||||
@@ -59,6 +59,15 @@ class PokeBattle_Battler
|
|||||||
@pokemon.form = value if @pokemon
|
@pokemon.form = value if @pokemon
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ability
|
||||||
|
return PokemonData::Ability.try_get(@ability_id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def ability=(value)
|
||||||
|
abil = PokemonData::Ability.try_get(value)
|
||||||
|
@ability_id = (abil) ? abil.id : nil
|
||||||
|
end
|
||||||
|
|
||||||
attr_reader :item
|
attr_reader :item
|
||||||
|
|
||||||
def item=(value)
|
def item=(value)
|
||||||
@@ -181,7 +190,11 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
alias owned owned?
|
alias owned owned?
|
||||||
|
|
||||||
def abilityName; return Data::Ability.get(@ability).name; end
|
def abilityName
|
||||||
|
abil = self.ability
|
||||||
|
return (abil) ? abil.name : ""
|
||||||
|
end
|
||||||
|
|
||||||
def itemName; return PBItems.getName(@item); end
|
def itemName; return PBItems.getName(@item); end
|
||||||
|
|
||||||
def pbThis(lowerCase=false)
|
def pbThis(lowerCase=false)
|
||||||
@@ -223,7 +236,7 @@ class PokeBattle_Battler
|
|||||||
speedMult = 1.0
|
speedMult = 1.0
|
||||||
# Ability effects that alter calculated Speed
|
# Ability effects that alter calculated Speed
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
speedMult = BattleHandlers.triggerSpeedCalcAbility(@ability,self,speedMult)
|
speedMult = BattleHandlers.triggerSpeedCalcAbility(self.ability,self,speedMult)
|
||||||
end
|
end
|
||||||
# Item effects that alter calculated Speed
|
# Item effects that alter calculated Speed
|
||||||
if itemActive?
|
if itemActive?
|
||||||
@@ -250,7 +263,7 @@ class PokeBattle_Battler
|
|||||||
ret += @effects[PBEffects::WeightChange]
|
ret += @effects[PBEffects::WeightChange]
|
||||||
ret = 1 if ret<1
|
ret = 1 if ret<1
|
||||||
if abilityActive? && !@battle.moldBreaker
|
if abilityActive? && !@battle.moldBreaker
|
||||||
ret = BattleHandlers.triggerWeightCalcAbility(@ability,self,ret)
|
ret = BattleHandlers.triggerWeightCalcAbility(self.ability,self,ret)
|
||||||
end
|
end
|
||||||
if itemActive?
|
if itemActive?
|
||||||
ret = BattleHandlers.triggerWeightCalcItem(@item,self,ret)
|
ret = BattleHandlers.triggerWeightCalcItem(@item,self,ret)
|
||||||
@@ -326,18 +339,18 @@ class PokeBattle_Battler
|
|||||||
|
|
||||||
def hasActiveAbility?(check_ability, ignoreFainted = false)
|
def hasActiveAbility?(check_ability, ignoreFainted = false)
|
||||||
return false if !abilityActive?(ignoreFainted)
|
return false if !abilityActive?(ignoreFainted)
|
||||||
if check_ability.is_a?(Array)
|
return check_ability.include?(@ability_id) if check_ability.is_a?(Array)
|
||||||
return check_ability.any? { |a| a == @ability }
|
return check_ability == self.ability
|
||||||
end
|
|
||||||
return check_ability == @ability
|
|
||||||
end
|
end
|
||||||
alias hasWorkingAbility hasActiveAbility?
|
alias hasWorkingAbility hasActiveAbility?
|
||||||
|
|
||||||
# Applies to both losing self's ability (i.e. being replaced by another) and
|
# Applies to both losing self's ability (i.e. being replaced by another) and
|
||||||
# having self's ability be negated.
|
# having self's ability be negated.
|
||||||
def unstoppableAbility?(abil = nil)
|
def unstoppableAbility?(abil = nil)
|
||||||
abil = @ability if !abil
|
abil = @ability_id if !abil
|
||||||
abilityBlacklist = [
|
abil = PokemonData::Ability.try_get(abil)
|
||||||
|
return false if !abil
|
||||||
|
ability_blacklist = [
|
||||||
# Form-changing abilities
|
# Form-changing abilities
|
||||||
:BATTLEBOND,
|
:BATTLEBOND,
|
||||||
:DISGUISE,
|
:DISGUISE,
|
||||||
@@ -353,13 +366,15 @@ class PokeBattle_Battler
|
|||||||
:COMATOSE,
|
:COMATOSE,
|
||||||
:RKSSYSTEM
|
:RKSSYSTEM
|
||||||
]
|
]
|
||||||
return abilityBlacklist.any? { |a| a == abil }
|
return ability_blacklist.include?(abil.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Applies to gaining the ability.
|
# Applies to gaining the ability.
|
||||||
def ungainableAbility?(abil = nil)
|
def ungainableAbility?(abil = nil)
|
||||||
abil = @ability if !abil
|
abil = @ability_id if !abil
|
||||||
abilityBlacklist = [
|
abil = PokemonData::Ability.try_get(abil)
|
||||||
|
return false if !abil
|
||||||
|
ability_blacklist = [
|
||||||
# Form-changing abilities
|
# Form-changing abilities
|
||||||
:BATTLEBOND,
|
:BATTLEBOND,
|
||||||
:DISGUISE,
|
:DISGUISE,
|
||||||
@@ -378,7 +393,7 @@ class PokeBattle_Battler
|
|||||||
:COMATOSE,
|
:COMATOSE,
|
||||||
:RKSSYSTEM
|
:RKSSYSTEM
|
||||||
]
|
]
|
||||||
return abilityBlacklist.any? { |a| a == abil }
|
return ability_blacklist.include?(abil.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def itemActive?(ignoreFainted=false)
|
def itemActive?(ignoreFainted=false)
|
||||||
@@ -410,7 +425,7 @@ class PokeBattle_Battler
|
|||||||
return false if @effects[PBEffects::Transform]
|
return false if @effects[PBEffects::Transform]
|
||||||
# Items that change a Pokémon's form
|
# Items that change a Pokémon's form
|
||||||
return true if @pokemon && @pokemon.getMegaForm(true) > 0 # Mega Stone
|
return true if @pokemon && @pokemon.getMegaForm(true) > 0 # Mega Stone
|
||||||
return pbIsUnlosableItem?(check_item, @species, @ability)
|
return pbIsUnlosableItem?(check_item, @species, self.ability)
|
||||||
end
|
end
|
||||||
|
|
||||||
def eachMove
|
def eachMove
|
||||||
@@ -448,7 +463,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def canChangeType?
|
def canChangeType?
|
||||||
return ![:MULTITYPE, :RKSSYSTEM].include?(@ability)
|
return ![:MULTITYPE, :RKSSYSTEM].include?(@ability_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def airborne?
|
def airborne?
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class PokeBattle_Battler
|
|||||||
@level = 0
|
@level = 0
|
||||||
@hp = @totalhp = 0
|
@hp = @totalhp = 0
|
||||||
@type1 = @type2 = 0
|
@type1 = @type2 = 0
|
||||||
@ability = nil
|
@ability_id = nil
|
||||||
@item = 0
|
@item = 0
|
||||||
@gender = 0
|
@gender = 0
|
||||||
@attack = @defense = @spatk = @spdef = @speed = 0
|
@attack = @defense = @spatk = @spdef = @speed = 0
|
||||||
@@ -78,7 +78,7 @@ class PokeBattle_Battler
|
|||||||
@totalhp = pkmn.totalhp
|
@totalhp = pkmn.totalhp
|
||||||
@type1 = pkmn.type1
|
@type1 = pkmn.type1
|
||||||
@type2 = pkmn.type2
|
@type2 = pkmn.type2
|
||||||
@ability = pkmn.ability_id
|
@ability_id = pkmn.ability_id
|
||||||
@item = pkmn.item
|
@item = pkmn.item
|
||||||
@gender = pkmn.gender
|
@gender = pkmn.gender
|
||||||
@attack = pkmn.attack
|
@attack = pkmn.attack
|
||||||
@@ -297,7 +297,7 @@ class PokeBattle_Battler
|
|||||||
if fullChange
|
if fullChange
|
||||||
@type1 = @pokemon.type1
|
@type1 = @pokemon.type1
|
||||||
@type2 = @pokemon.type2
|
@type2 = @pokemon.type2
|
||||||
@ability = @pokemon.ability_id
|
@ability_id = @pokemon.ability_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class PokeBattle_Battler
|
|||||||
# Form changes upon entering battle and when the weather changes
|
# Form changes upon entering battle and when the weather changes
|
||||||
pbCheckFormOnWeatherChange if !endOfRound
|
pbCheckFormOnWeatherChange if !endOfRound
|
||||||
# Darmanitan - Zen Mode
|
# Darmanitan - Zen Mode
|
||||||
if isSpecies?(:DARMANITAN) && @ability == :ZENMODE
|
if isSpecies?(:DARMANITAN) && self.ability == :ZENMODE
|
||||||
if @hp<=@totalhp/2
|
if @hp<=@totalhp/2
|
||||||
if @form!=1
|
if @form!=1
|
||||||
@battle.pbShowAbilitySplash(self,true)
|
@battle.pbShowAbilitySplash(self,true)
|
||||||
@@ -223,7 +223,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Minior - Shields Down
|
# Minior - Shields Down
|
||||||
if isSpecies?(:MINIOR) && @ability == :SHIELDSDOWN
|
if isSpecies?(:MINIOR) && self.ability == :SHIELDSDOWN
|
||||||
if @hp>@totalhp/2 # Turn into Meteor form
|
if @hp>@totalhp/2 # Turn into Meteor form
|
||||||
newForm = (@form>=7) ? @form-7 : @form
|
newForm = (@form>=7) ? @form-7 : @form
|
||||||
if @form!=newForm
|
if @form!=newForm
|
||||||
@@ -240,7 +240,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Wishiwashi - Schooling
|
# Wishiwashi - Schooling
|
||||||
if isSpecies?(:WISHIWASHI) && @ability == :SCHOOLING
|
if isSpecies?(:WISHIWASHI) && self.ability == :SCHOOLING
|
||||||
if @level>=20 && @hp>@totalhp/4
|
if @level>=20 && @hp>@totalhp/4
|
||||||
if @form!=1
|
if @form!=1
|
||||||
@battle.pbShowAbilitySplash(self,true)
|
@battle.pbShowAbilitySplash(self,true)
|
||||||
@@ -254,7 +254,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Zygarde - Power Construct
|
# Zygarde - Power Construct
|
||||||
if isSpecies?(:ZYGARDE) && @ability == :POWERCONSTRUCT && endOfRound
|
if isSpecies?(:ZYGARDE) && self.ability == :POWERCONSTRUCT && endOfRound
|
||||||
if @hp<=@totalhp/2 && @form<2 # Turn into Complete Forme
|
if @hp<=@totalhp/2 && @form<2 # Turn into Complete Forme
|
||||||
newForm = @form+2
|
newForm = @form+2
|
||||||
@battle.pbDisplay(_INTL("You sense the presence of many!"))
|
@battle.pbDisplay(_INTL("You sense the presence of many!"))
|
||||||
@@ -266,11 +266,11 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbTransform(target)
|
def pbTransform(target)
|
||||||
oldAbil = @ability
|
oldAbil = @ability_id
|
||||||
@effects[PBEffects::Transform] = true
|
@effects[PBEffects::Transform] = true
|
||||||
@effects[PBEffects::TransformSpecies] = target.species
|
@effects[PBEffects::TransformSpecies] = target.species
|
||||||
pbChangeTypes(target)
|
pbChangeTypes(target)
|
||||||
@ability = target.ability
|
self.ability = target.ability
|
||||||
@attack = target.attack
|
@attack = target.attack
|
||||||
@defense = target.defense
|
@defense = target.defense
|
||||||
@spatk = target.spatk
|
@spatk = target.spatk
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ class PokeBattle_Battler
|
|||||||
# "counts as having that status", which includes Comatose which can't be
|
# "counts as having that status", which includes Comatose which can't be
|
||||||
# cured.
|
# cured.
|
||||||
def pbHasStatus?(checkStatus)
|
def pbHasStatus?(checkStatus)
|
||||||
if BattleHandlers.triggerStatusCheckAbilityNonIgnorable(@ability,self,checkStatus)
|
if BattleHandlers.triggerStatusCheckAbilityNonIgnorable(self.ability,self,checkStatus)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return @status==checkStatus
|
return @status==checkStatus
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbHasAnyStatus?
|
def pbHasAnyStatus?
|
||||||
if BattleHandlers.triggerStatusCheckAbilityNonIgnorable(@ability,self,nil)
|
if BattleHandlers.triggerStatusCheckAbilityNonIgnorable(self.ability,self,nil)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return @status!=PBStatuses::NONE
|
return @status!=PBStatuses::NONE
|
||||||
@@ -103,10 +103,10 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
# Ability immunity
|
# Ability immunity
|
||||||
immuneByAbility = false; immAlly = nil
|
immuneByAbility = false; immAlly = nil
|
||||||
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(@ability,self,newStatus)
|
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(self.ability,self,newStatus)
|
||||||
immuneByAbility = true
|
immuneByAbility = true
|
||||||
elsif selfInflicted || !@battle.moldBreaker
|
elsif selfInflicted || !@battle.moldBreaker
|
||||||
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(@ability,self,newStatus)
|
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(self.ability,self,newStatus)
|
||||||
immuneByAbility = true
|
immuneByAbility = true
|
||||||
else
|
else
|
||||||
eachAlly do |b|
|
eachAlly do |b|
|
||||||
@@ -193,10 +193,10 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
return false if hasImmuneType
|
return false if hasImmuneType
|
||||||
# Ability immunity
|
# Ability immunity
|
||||||
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(@ability,self,newStatus)
|
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(self.ability,self,newStatus)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(@ability,self,newStatus)
|
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(self.ability,self,newStatus)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
eachAlly do |b|
|
eachAlly do |b|
|
||||||
@@ -249,7 +249,7 @@ class PokeBattle_Battler
|
|||||||
pbCheckFormOnStatusChange
|
pbCheckFormOnStatusChange
|
||||||
# Synchronize
|
# Synchronize
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatusInflicted(@ability,self,user,newStatus)
|
BattleHandlers.triggerAbilityOnStatusInflicted(self.ability,self,user,newStatus)
|
||||||
end
|
end
|
||||||
# Status cures
|
# Status cures
|
||||||
pbItemStatusCureCheck
|
pbItemStatusCureCheck
|
||||||
@@ -287,13 +287,13 @@ class PokeBattle_Battler
|
|||||||
return false if b.effects[PBEffects::Uproar]>0
|
return false if b.effects[PBEffects::Uproar]>0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(@ability,self,PBStatuses::SLEEP)
|
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(self.ability,self,PBStatuses::SLEEP)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
# NOTE: Bulbapedia claims that Flower Veil shouldn't prevent sleep due to
|
# NOTE: Bulbapedia claims that Flower Veil shouldn't prevent sleep due to
|
||||||
# drowsiness, but I disagree because that makes no sense. Also, the
|
# drowsiness, but I disagree because that makes no sense. Also, the
|
||||||
# comparable Sweet Veil does prevent sleep due to drowsiness.
|
# comparable Sweet Veil does prevent sleep due to drowsiness.
|
||||||
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(@ability,self,PBStatuses::SLEEP)
|
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(self.ability,self,PBStatuses::SLEEP)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
eachAlly do |b|
|
eachAlly do |b|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class PokeBattle_Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat gain
|
# Trigger abilities upon stat gain
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatGain(@ability,self,stat,user)
|
BattleHandlers.triggerAbilityOnStatGain(self.ability,self,stat,user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -88,7 +88,7 @@ class PokeBattle_Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat gain
|
# Trigger abilities upon stat gain
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatGain(@ability,self,stat,user)
|
BattleHandlers.triggerAbilityOnStatGain(self.ability,self,stat,user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -133,9 +133,9 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
return false if BattleHandlers.triggerStatLossImmunityAbility(
|
return false if BattleHandlers.triggerStatLossImmunityAbility(
|
||||||
@ability,self,stat,@battle,showFailMsg) if !@battle.moldBreaker
|
self.ability,self,stat,@battle,showFailMsg) if !@battle.moldBreaker
|
||||||
return false if BattleHandlers.triggerStatLossImmunityAbilityNonIgnorable(
|
return false if BattleHandlers.triggerStatLossImmunityAbilityNonIgnorable(
|
||||||
@ability,self,stat,@battle,showFailMsg)
|
self.ability,self,stat,@battle,showFailMsg)
|
||||||
end
|
end
|
||||||
if !@battle.moldBreaker
|
if !@battle.moldBreaker
|
||||||
eachAlly do |b|
|
eachAlly do |b|
|
||||||
@@ -191,7 +191,7 @@ class PokeBattle_Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat loss
|
# Trigger abilities upon stat loss
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatLoss(@ability,self,stat,user)
|
BattleHandlers.triggerAbilityOnStatLoss(self.ability,self,stat,user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -221,7 +221,7 @@ class PokeBattle_Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat loss
|
# Trigger abilities upon stat loss
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatLoss(@ability,self,stat,user)
|
BattleHandlers.triggerAbilityOnStatLoss(self.ability,self,stat,user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -266,8 +266,8 @@ class PokeBattle_Battler
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
if BattleHandlers.triggerStatLossImmunityAbility(@ability,self,PBStats::ATTACK,@battle,false) ||
|
if BattleHandlers.triggerStatLossImmunityAbility(self.ability,self,PBStats::ATTACK,@battle,false) ||
|
||||||
BattleHandlers.triggerStatLossImmunityAbilityNonIgnorable(@ability,self,PBStats::ATTACK,@battle,false)
|
BattleHandlers.triggerStatLossImmunityAbilityNonIgnorable(self.ability,self,PBStats::ATTACK,@battle,false)
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
|
@battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
|
||||||
pbThis,abilityName,user.pbThis(true),user.abilityName))
|
pbThis,abilityName,user.pbThis(true),user.abilityName))
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class PokeBattle_Battler
|
|||||||
pbContinualAbilityChecks(true)
|
pbContinualAbilityChecks(true)
|
||||||
# Abilities that trigger upon switching in
|
# Abilities that trigger upon switching in
|
||||||
if (!fainted? && unstoppableAbility?) || abilityActive?
|
if (!fainted? && unstoppableAbility?) || abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnSwitchIn(@ability,self,@battle)
|
BattleHandlers.triggerAbilityOnSwitchIn(self.ability,self,@battle)
|
||||||
end
|
end
|
||||||
# Check for end of primordial weather
|
# Check for end of primordial weather
|
||||||
@battle.pbEndPrimordialWeather
|
@battle.pbEndPrimordialWeather
|
||||||
@@ -29,7 +29,7 @@ class PokeBattle_Battler
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbAbilitiesOnSwitchOut
|
def pbAbilitiesOnSwitchOut
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnSwitchOut(@ability,self,false)
|
BattleHandlers.triggerAbilityOnSwitchOut(self.ability,self,false)
|
||||||
end
|
end
|
||||||
# Reset form
|
# Reset form
|
||||||
@battle.peer.pbOnLeavingBattle(@battle,@pokemon,@battle.usedInBattle[idxOwnSide][@index/2])
|
@battle.peer.pbOnLeavingBattle(@battle,@pokemon,@battle.usedInBattle[idxOwnSide][@index/2])
|
||||||
@@ -57,7 +57,7 @@ class PokeBattle_Battler
|
|||||||
return false if !abilityActive?
|
return false if !abilityActive?
|
||||||
newHP = @hp if newHP<0
|
newHP = @hp if newHP<0
|
||||||
return false if oldHP<@totalhp/2 || newHP>=@totalhp/2 # Didn't drop below half
|
return false if oldHP<@totalhp/2 || newHP>=@totalhp/2 # Didn't drop below half
|
||||||
ret = BattleHandlers.triggerAbilityOnHPDroppedBelowHalf(@ability,self,@battle)
|
ret = BattleHandlers.triggerAbilityOnHPDroppedBelowHalf(self.ability,self,@battle)
|
||||||
return ret # Whether self has switched out
|
return ret # Whether self has switched out
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -81,11 +81,11 @@ class PokeBattle_Battler
|
|||||||
if choices.length>0
|
if choices.length>0
|
||||||
choice = choices[@battle.pbRandom(choices.length)]
|
choice = choices[@battle.pbRandom(choices.length)]
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
@ability = choice.ability
|
self.ability = choice.ability
|
||||||
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!",pbThis,choice.pbThis(true),choice.abilityName))
|
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!",pbThis,choice.pbThis(true),choice.abilityName))
|
||||||
@battle.pbHideAbilitySplash(self)
|
@battle.pbHideAbilitySplash(self)
|
||||||
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
|
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
|
||||||
BattleHandlers.triggerAbilityOnSwitchIn(@ability,self,@battle)
|
BattleHandlers.triggerAbilityOnSwitchIn(self.ability,self,@battle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -97,7 +97,7 @@ class PokeBattle_Battler
|
|||||||
# Cures status conditions, confusion and infatuation.
|
# Cures status conditions, confusion and infatuation.
|
||||||
def pbAbilityStatusCureCheck
|
def pbAbilityStatusCureCheck
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerStatusCureAbility(@ability,self)
|
BattleHandlers.triggerStatusCureAbility(self.ability,self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -109,12 +109,12 @@ class PokeBattle_Battler
|
|||||||
@effects[PBEffects::Illusion] = nil
|
@effects[PBEffects::Illusion] = nil
|
||||||
if !@effects[PBEffects::Transform]
|
if !@effects[PBEffects::Transform]
|
||||||
@battle.scene.pbChangePokemon(self, @pokemon)
|
@battle.scene.pbChangePokemon(self, @pokemon)
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} wore off!", pbThis, Data::Ability.get(oldAbil).name))
|
@battle.pbDisplay(_INTL("{1}'s {2} wore off!", pbThis, PokemonData::Ability.get(oldAbil).name))
|
||||||
@battle.pbSetSeen(self)
|
@battle.pbSetSeen(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@effects[PBEffects::GastroAcid] = false if unstoppableAbility?
|
@effects[PBEffects::GastroAcid] = false if unstoppableAbility?
|
||||||
@effects[PBEffects::SlowStart] = 0 if @ability != :SLOWSTART
|
@effects[PBEffects::SlowStart] = 0 if self.ability != :SLOWSTART
|
||||||
# Revert form if Flower Gift/Forecast was lost
|
# Revert form if Flower Gift/Forecast was lost
|
||||||
pbCheckFormOnWeatherChange
|
pbCheckFormOnWeatherChange
|
||||||
# Check for end of primordial weather
|
# Check for end of primordial weather
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Stance Change
|
# Stance Change
|
||||||
if isSpecies?(:AEGISLASH) && @ability == :STANCECHANGE
|
if isSpecies?(:AEGISLASH) && self.ability == :STANCECHANGE
|
||||||
if move.damagingMove?
|
if move.damagingMove?
|
||||||
pbChangeForm(1,_INTL("{1} changed to Blade Forme!",pbThis))
|
pbChangeForm(1,_INTL("{1} changed to Blade Forme!",pbThis))
|
||||||
elsif isConst?(move.id,PBMoves,:KINGSSHIELD)
|
elsif isConst?(move.id,PBMoves,:KINGSSHIELD)
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ class PokeBattle_Battler
|
|||||||
if @effects[PBEffects::Flinch]
|
if @effects[PBEffects::Flinch]
|
||||||
@battle.pbDisplay(_INTL("{1} flinched and couldn't move!",pbThis))
|
@battle.pbDisplay(_INTL("{1} flinched and couldn't move!",pbThis))
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnFlinch(@ability,self,@battle)
|
BattleHandlers.triggerAbilityOnFlinch(self.ability,self,@battle)
|
||||||
end
|
end
|
||||||
@lastMoveFailed = true
|
@lastMoveFailed = true
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -1997,7 +1997,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_063 < PokeBattle_Move
|
class PokeBattle_Move_063 < PokeBattle_Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !Data::Ability.exists?(:SIMPLE)
|
if !PokemonData::Ability.exists?(:SIMPLE)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -2030,7 +2030,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_064 < PokeBattle_Move
|
class PokeBattle_Move_064 < PokeBattle_Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !Data::Ability.exists?(:INSOMNIA)
|
if !PokemonData::Ability.exists?(:INSOMNIA)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -2038,7 +2038,7 @@ class PokeBattle_Move_064 < PokeBattle_Move
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user,target)
|
def pbFailsAgainstTarget?(user,target)
|
||||||
if target.unstoppableAbility? || [:TRUANT, :INSOMNIA].include?(target.ability)
|
if target.unstoppableAbility? || [:TRUANT, :INSOMNIA].include?(target.ability_id)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -2073,12 +2073,12 @@ class PokeBattle_Move_065 < PokeBattle_Move
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user,target)
|
def pbFailsAgainstTarget?(user,target)
|
||||||
if target.ability==0 || user.ability==target.ability
|
if !target.ability || user.ability==target.ability
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if target.ungainableAbility? ||
|
if target.ungainableAbility? ||
|
||||||
[:POWEROFALCHEMY, :RECEIVER, :TRACE, :WONDERGUARD].include?(target.ability)
|
[:POWEROFALCHEMY, :RECEIVER, :TRACE, :WONDERGUARD].include?(target.ability_id)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -2105,12 +2105,12 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_066 < PokeBattle_Move
|
class PokeBattle_Move_066 < PokeBattle_Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.ability==0
|
if !user.ability
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if user.ungainableAbility? ||
|
if user.ungainableAbility? ||
|
||||||
[:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(user.ability)
|
[:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(user.ability_id)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -2146,7 +2146,7 @@ class PokeBattle_Move_067 < PokeBattle_Move
|
|||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.ability==0
|
if !user.ability
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -2162,7 +2162,7 @@ class PokeBattle_Move_067 < PokeBattle_Move
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user,target)
|
def pbFailsAgainstTarget?(user,target)
|
||||||
if target.ability==0 ||
|
if !target.ability ||
|
||||||
(user.ability==target.ability && !NEWEST_BATTLE_MECHANICS)
|
(user.ability==target.ability && !NEWEST_BATTLE_MECHANICS)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -1387,7 +1387,7 @@ class PokeBattle_AI
|
|||||||
if target.effects[PBEffects::Substitute]>0
|
if target.effects[PBEffects::Substitute]>0
|
||||||
score -= 90
|
score -= 90
|
||||||
elsif skill>=PBTrainerAI.mediumSkill
|
elsif skill>=PBTrainerAI.mediumSkill
|
||||||
if [:MULTITYPE, :RKSSYSTEM, :SIMPLE, :TRUANT].include?(target.ability)
|
if [:MULTITYPE, :RKSSYSTEM, :SIMPLE, :TRUANT].include?(target.ability_id)
|
||||||
score -= 90
|
score -= 90
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1396,7 +1396,7 @@ class PokeBattle_AI
|
|||||||
if target.effects[PBEffects::Substitute]>0
|
if target.effects[PBEffects::Substitute]>0
|
||||||
score -= 90
|
score -= 90
|
||||||
elsif skill>=PBTrainerAI.mediumSkill
|
elsif skill>=PBTrainerAI.mediumSkill
|
||||||
if [:INSOMNIA, :MULTITYPE, :RKSSYSTEM, :TRUANT].include?(target.ability)
|
if [:INSOMNIA, :MULTITYPE, :RKSSYSTEM, :TRUANT].include?(target.ability_id)
|
||||||
score -= 90
|
score -= 90
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1404,10 +1404,10 @@ class PokeBattle_AI
|
|||||||
when "065"
|
when "065"
|
||||||
score -= 40 # don't prefer this move
|
score -= 40 # don't prefer this move
|
||||||
if skill>=PBTrainerAI.mediumSkill
|
if skill>=PBTrainerAI.mediumSkill
|
||||||
if target.ability==0 || user.ability==target.ability ||
|
if !target.ability || user.ability==target.ability ||
|
||||||
[:MULTITYPE, :RKSSYSTEM].include?(user.ability) ||
|
[:MULTITYPE, :RKSSYSTEM].include?(user.ability_id) ||
|
||||||
[:FLOWERGIFT, :FORECAST, :ILLUSION, :IMPOSTER, :MULTITYPE, :RKSSYSTEM,
|
[:FLOWERGIFT, :FORECAST, :ILLUSION, :IMPOSTER, :MULTITYPE, :RKSSYSTEM,
|
||||||
:TRACE, :WONDERGUARD, :ZENMODE].include?(target.ability)
|
:TRACE, :WONDERGUARD, :ZENMODE].include?(target.ability_id)
|
||||||
score -= 90
|
score -= 90
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1424,10 +1424,10 @@ class PokeBattle_AI
|
|||||||
if target.effects[PBEffects::Substitute]>0
|
if target.effects[PBEffects::Substitute]>0
|
||||||
score -= 90
|
score -= 90
|
||||||
elsif skill>=PBTrainerAI.mediumSkill
|
elsif skill>=PBTrainerAI.mediumSkill
|
||||||
if user.ability==0 || user.ability==target.ability ||
|
if !user.ability || user.ability==target.ability ||
|
||||||
[:MULTITYPE, :RKSSYSTEM, :TRUANT].include?(target.ability) ||
|
[:MULTITYPE, :RKSSYSTEM, :TRUANT].include?(target.ability_id) ||
|
||||||
[:FLOWERGIFT, :FORECAST, :ILLUSION, :IMPOSTER, :MULTITYPE, :RKSSYSTEM,
|
[:FLOWERGIFT, :FORECAST, :ILLUSION, :IMPOSTER, :MULTITYPE, :RKSSYSTEM,
|
||||||
:TRACE, :ZENMODE].include?(user.ability)
|
:TRACE, :ZENMODE].include?(user.ability_id)
|
||||||
score -= 90
|
score -= 90
|
||||||
end
|
end
|
||||||
if skill>=PBTrainerAI.highSkill
|
if skill>=PBTrainerAI.highSkill
|
||||||
@@ -1442,10 +1442,10 @@ class PokeBattle_AI
|
|||||||
when "067"
|
when "067"
|
||||||
score -= 40 # don't prefer this move
|
score -= 40 # don't prefer this move
|
||||||
if skill>=PBTrainerAI.mediumSkill
|
if skill>=PBTrainerAI.mediumSkill
|
||||||
if (user.ability==0 && target.ability==0) ||
|
if (!user.ability && !target.ability) ||
|
||||||
user.ability==target.ability ||
|
user.ability==target.ability ||
|
||||||
[:ILLUSION, :MULTITYPE, :RKSSYSTEM, :WONDERGUARD].include?(user.ability) ||
|
[:ILLUSION, :MULTITYPE, :RKSSYSTEM, :WONDERGUARD].include?(user.ability_id) ||
|
||||||
[:ILLUSION, :MULTITYPE, :RKSSYSTEM, :WONDERGUARD].include?(target.ability)
|
[:ILLUSION, :MULTITYPE, :RKSSYSTEM, :WONDERGUARD].include?(target.ability_id)
|
||||||
score -= 90
|
score -= 90
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1462,7 +1462,7 @@ class PokeBattle_AI
|
|||||||
target.effects[PBEffects::GastroAcid]
|
target.effects[PBEffects::GastroAcid]
|
||||||
score -= 90
|
score -= 90
|
||||||
elsif skill>=PBTrainerAI.highSkill
|
elsif skill>=PBTrainerAI.highSkill
|
||||||
score -= 90 if [:MULTITYPE, :RKSSYSTEM, :SLOWSTART, :TRUANT].include?(target.ability)
|
score -= 90 if [:MULTITYPE, :RKSSYSTEM, :SLOWSTART, :TRUANT].include?(target.ability_id)
|
||||||
end
|
end
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
when "069"
|
when "069"
|
||||||
|
|||||||
@@ -2419,7 +2419,7 @@ BattleHandlers::AbilityChangeOnBattlerFainting.add(:POWEROFALCHEMY,
|
|||||||
proc { |ability,battler,fainted,battle|
|
proc { |ability,battler,fainted,battle|
|
||||||
next if battler.opposes?(fainted)
|
next if battler.opposes?(fainted)
|
||||||
next if fainted.ungainableAbility? ||
|
next if fainted.ungainableAbility? ||
|
||||||
[:POWEROFALCHEMY, :RECEIVER, :TRACE, :WONDERGUARD].include?(fainted.ability)
|
[:POWEROFALCHEMY, :RECEIVER, :TRACE, :WONDERGUARD].include?(fainted.ability_id)
|
||||||
battle.pbShowAbilitySplash(battler,true)
|
battle.pbShowAbilitySplash(battler,true)
|
||||||
battler.ability = fainted.ability
|
battler.ability = fainted.ability
|
||||||
battle.pbReplaceAbilitySplash(battler)
|
battle.pbReplaceAbilitySplash(battler)
|
||||||
|
|||||||
@@ -1161,7 +1161,7 @@ def pbFishingEnd
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbFishing(hasEncounter,rodType=1)
|
def pbFishing(hasEncounter,rodType=1)
|
||||||
speedup = ($Trainer.firstPokemon && [:STICKYHOLD, :SUCTIONCUPS].include?($Trainer.firstPokemon.ability))
|
speedup = ($Trainer.firstPokemon && [:STICKYHOLD, :SUCTIONCUPS].include?($Trainer.firstPokemon.ability_id))
|
||||||
biteChance = 20+(25*rodType) # 45, 70, 95
|
biteChance = 20+(25*rodType) # 45, 70, 95
|
||||||
biteChance *= 1.5 if speedup # 67.5, 100, 100
|
biteChance *= 1.5 if speedup # 67.5, 100, 100
|
||||||
hookChance = 100
|
hookChance = 100
|
||||||
|
|||||||
@@ -328,40 +328,33 @@ class PokemonEncounters
|
|||||||
# modifiers applied, divided by 180 (numbers are multiplied by 16 below to
|
# modifiers applied, divided by 180 (numbers are multiplied by 16 below to
|
||||||
# increase precision).
|
# increase precision).
|
||||||
encount = @density[enctype]*16
|
encount = @density[enctype]*16
|
||||||
encount = encount*0.8 if $PokemonGlobal.bicycle
|
encount *= 0.8 if $PokemonGlobal.bicycle
|
||||||
if !NEWEST_BATTLE_MECHANICS
|
if !NEWEST_BATTLE_MECHANICS
|
||||||
if $PokemonMap.blackFluteUsed
|
if $PokemonMap.blackFluteUsed
|
||||||
encount = encount/2
|
encount /= 2
|
||||||
elsif $PokemonMap.whiteFluteUsed
|
elsif $PokemonMap.whiteFluteUsed
|
||||||
encount = encount*1.5
|
encount *= 1.5
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
firstPkmn = $Trainer.firstPokemon
|
firstPkmn = $Trainer.firstPokemon
|
||||||
if firstPkmn
|
if firstPkmn
|
||||||
if firstPkmn.hasItem?(:CLEANSETAG)
|
if firstPkmn.hasItem?(:CLEANSETAG)
|
||||||
encount = encount*2/3
|
encount *= 2.0 / 3
|
||||||
elsif firstPkmn.hasItem?(:PUREINCENSE)
|
elsif firstPkmn.hasItem?(:PUREINCENSE)
|
||||||
encount = encount*2/3
|
encount *= 2.0 / 3
|
||||||
else # Ignore ability effects if an item effect applies
|
else # Ignore ability effects if an item effect applies
|
||||||
if firstPkmn.hasAbility?(:STENCH)
|
case firstPkmn.ability_id
|
||||||
encount = encount/2
|
when :STENCH, :WHITESMOKE, :QUICKFEET
|
||||||
elsif firstPkmn.hasAbility?(:WHITESMOKE)
|
encount /= 2
|
||||||
encount = encount/2
|
when :SNOWCLOAK
|
||||||
elsif firstPkmn.hasAbility?(:QUICKFEET)
|
encount /= 2 if $game_screen.weather_type==PBFieldWeather::Snow ||
|
||||||
encount = encount/2
|
|
||||||
elsif firstPkmn.hasAbility?(:SNOWCLOAK)
|
|
||||||
encount = encount/2 if $game_screen.weather_type==PBFieldWeather::Snow ||
|
|
||||||
$game_screen.weather_type==PBFieldWeather::Blizzard
|
$game_screen.weather_type==PBFieldWeather::Blizzard
|
||||||
elsif firstPkmn.hasAbility?(:SANDVEIL)
|
when :SANDVEIL
|
||||||
encount = encount/2 if $game_screen.weather_type==PBFieldWeather::Sandstorm
|
encount /= 2 if $game_screen.weather_type==PBFieldWeather::Sandstorm
|
||||||
elsif firstPkmn.hasAbility?(:SWARM)
|
when :SWARM
|
||||||
encount = encount*1.5
|
encount *= 1.5
|
||||||
elsif firstPkmn.hasAbility?(:ILLUMINATE)
|
when :ILLUMINATE, :ARENATRAP, :NOGUARD
|
||||||
encount = encount*2
|
encount *= 2
|
||||||
elsif firstPkmn.hasAbility?(:ARENATRAP)
|
|
||||||
encount = encount*2
|
|
||||||
elsif firstPkmn.hasAbility?(:NOGUARD)
|
|
||||||
encount = encount*2
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1096,7 +1096,7 @@ ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE,proc { |item,pkmn,scene|
|
|||||||
next false
|
next false
|
||||||
end
|
end
|
||||||
newabil = (pkmn.abilityIndex+1)%2
|
newabil = (pkmn.abilityIndex+1)%2
|
||||||
newabilname = Data::Ability.get((newabil==0) ? abil1 : abil2).name
|
newabilname = PokemonData::Ability.get((newabil==0) ? abil1 : abil2).name
|
||||||
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
|
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
|
||||||
pkmn.name,newabilname))
|
pkmn.name,newabilname))
|
||||||
pkmn.setAbility(newabil)
|
pkmn.setAbility(newabil)
|
||||||
|
|||||||
@@ -279,10 +279,10 @@ class Pokemon
|
|||||||
return @abilityflag || (@personalID & 1)
|
return @abilityflag || (@personalID & 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [Data::Ability] an Ability object corresponding to this Pokémon's ability
|
# @return [PokemonData::Ability] an Ability object corresponding to this Pokémon's ability
|
||||||
def ability
|
def ability
|
||||||
ret = ability_id
|
ret = ability_id
|
||||||
return Data::Ability.try_get(ret)
|
return PokemonData::Ability.try_get(ret)
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [Symbol] the ability symbol of this Pokémon's ability
|
# @return [Symbol] the ability symbol of this Pokémon's ability
|
||||||
@@ -293,9 +293,9 @@ class Pokemon
|
|||||||
hiddenAbil = pbGetSpeciesData(@species, formSimple, SpeciesData::HIDDEN_ABILITY)
|
hiddenAbil = pbGetSpeciesData(@species, formSimple, SpeciesData::HIDDEN_ABILITY)
|
||||||
if hiddenAbil.is_a?(Array)
|
if hiddenAbil.is_a?(Array)
|
||||||
ret = hiddenAbil[abilIndex - 2]
|
ret = hiddenAbil[abilIndex - 2]
|
||||||
return ret if Data::Ability.exists?(ret)
|
return ret if PokemonData::Ability.exists?(ret)
|
||||||
elsif abilIndex == 2
|
elsif abilIndex == 2
|
||||||
return hiddenAbil if Data::Ability.exists?(hiddenAbil)
|
return hiddenAbil if PokemonData::Ability.exists?(hiddenAbil)
|
||||||
end
|
end
|
||||||
abilIndex = (@personalID & 1)
|
abilIndex = (@personalID & 1)
|
||||||
end
|
end
|
||||||
@@ -303,7 +303,7 @@ class Pokemon
|
|||||||
abilities = pbGetSpeciesData(@species, formSimple, SpeciesData::ABILITIES)
|
abilities = pbGetSpeciesData(@species, formSimple, SpeciesData::ABILITIES)
|
||||||
if abilities.is_a?(Array)
|
if abilities.is_a?(Array)
|
||||||
ret = abilities[abilIndex]
|
ret = abilities[abilIndex]
|
||||||
ret = abilities[(abilIndex + 1) % 2] if !Data::Ability.exists?(ret)
|
ret = abilities[(abilIndex + 1) % 2] if !PokemonData::Ability.exists?(ret)
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
return abilities
|
return abilities
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ class PokemonLoadScreen
|
|||||||
$scene = nil
|
$scene = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
Data::Ability.load
|
PokemonData::Ability.load
|
||||||
commands = []
|
commands = []
|
||||||
cmdContinue = -1
|
cmdContinue = -1
|
||||||
cmdNewGame = -1
|
cmdNewGame = -1
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ module PokemonDebugMixin
|
|||||||
oldabil = (pkmn.ability) ? pkmn.ability.name : "No ability"
|
oldabil = (pkmn.ability) ? pkmn.ability.name : "No ability"
|
||||||
commands = []
|
commands = []
|
||||||
for i in abils
|
for i in abils
|
||||||
commands.push(((i[1]<2) ? "" : "(H) ") + Data::Ability.get(i[0]).name)
|
commands.push(((i[1]<2) ? "" : "(H) ") + PokemonData::Ability.get(i[0]).name)
|
||||||
end
|
end
|
||||||
commands.push(_INTL("Remove override"))
|
commands.push(_INTL("Remove override"))
|
||||||
msg = [_INTL("Ability {1} is natural.",oldabil),
|
msg = [_INTL("Ability {1} is natural.",oldabil),
|
||||||
|
|||||||
@@ -838,10 +838,10 @@ def pbPokemonEditor
|
|||||||
formname = messages.get(MessageTypes::FormNames,selection)
|
formname = messages.get(MessageTypes::FormNames,selection)
|
||||||
abilities = speciesData[SpeciesData::ABILITIES]
|
abilities = speciesData[SpeciesData::ABILITIES]
|
||||||
if abilities.is_a?(Array)
|
if abilities.is_a?(Array)
|
||||||
ability1 = (abilities[0]) ? Data::Ability.get(abilities[0]).id_number : 0
|
ability1 = (abilities[0]) ? PokemonData::Ability.get(abilities[0]).id_number : 0
|
||||||
ability2 = (abilities[1]) ? Data::Ability.get(abilities[1]).id_number : 0
|
ability2 = (abilities[1]) ? PokemonData::Ability.get(abilities[1]).id_number : 0
|
||||||
else
|
else
|
||||||
ability1 = (abilities) ? Data::Ability.get(abilities).id_number : 0
|
ability1 = (abilities) ? PokemonData::Ability.get(abilities).id_number : 0
|
||||||
ability2 = 0
|
ability2 = 0
|
||||||
end
|
end
|
||||||
color = speciesData[SpeciesData::COLOR]
|
color = speciesData[SpeciesData::COLOR]
|
||||||
@@ -870,12 +870,12 @@ def pbPokemonEditor
|
|||||||
baseexp = speciesData[SpeciesData::BASE_EXP]
|
baseexp = speciesData[SpeciesData::BASE_EXP]
|
||||||
hiddenAbils = speciesData[SpeciesData::HIDDEN_ABILITY]
|
hiddenAbils = speciesData[SpeciesData::HIDDEN_ABILITY]
|
||||||
if hiddenAbils.is_a?(Array)
|
if hiddenAbils.is_a?(Array)
|
||||||
hiddenability1 = (hiddenAbils[0]) ? Data::Ability.get(hiddenAbils[0]).id_number : 0
|
hiddenability1 = (hiddenAbils[0]) ? PokemonData::Ability.get(hiddenAbils[0]).id_number : 0
|
||||||
hiddenability2 = (hiddenAbils[1]) ? Data::Ability.get(hiddenAbils[1]).id_number : 0
|
hiddenability2 = (hiddenAbils[1]) ? PokemonData::Ability.get(hiddenAbils[1]).id_number : 0
|
||||||
hiddenability3 = (hiddenAbils[2]) ? Data::Ability.get(hiddenAbils[2]).id_number : 0
|
hiddenability3 = (hiddenAbils[2]) ? PokemonData::Ability.get(hiddenAbils[2]).id_number : 0
|
||||||
hiddenability4 = (hiddenAbils[3]) ? Data::Ability.get(hiddenAbils[3]).id_number : 0
|
hiddenability4 = (hiddenAbils[3]) ? PokemonData::Ability.get(hiddenAbils[3]).id_number : 0
|
||||||
else
|
else
|
||||||
hiddenability1 = (hiddenAbils) ? Data::Ability.get(hiddenAbils).id_number : 0
|
hiddenability1 = (hiddenAbils) ? PokemonData::Ability.get(hiddenAbils).id_number : 0
|
||||||
hiddenability2 = 0
|
hiddenability2 = 0
|
||||||
hiddenability3 = 0
|
hiddenability3 = 0
|
||||||
hiddenability4 = 0
|
hiddenability4 = 0
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ def pbSaveAbilities
|
|||||||
f.write("\# "+_INTL("See the documentation on the wiki to learn how to edit this file."))
|
f.write("\# "+_INTL("See the documentation on the wiki to learn how to edit this file."))
|
||||||
f.write("\r\n")
|
f.write("\r\n")
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
Data::Ability.each do |a|
|
PokemonData::Ability.each do |a|
|
||||||
f.write(sprintf("%d,%s,%s,%s\r\n",
|
f.write(sprintf("%d,%s,%s,%s\r\n",
|
||||||
a.id_number,
|
a.id_number,
|
||||||
csvQuote(a.id.to_s),
|
csvQuote(a.id.to_s),
|
||||||
@@ -711,12 +711,12 @@ def pbSavePokemonData
|
|||||||
pokedata.write("Happiness = #{happiness}\r\n")
|
pokedata.write("Happiness = #{happiness}\r\n")
|
||||||
pokedata.write("Abilities = ")
|
pokedata.write("Abilities = ")
|
||||||
if ability1
|
if ability1
|
||||||
cability1 = Data::Ability.get(ability1).name
|
cability1 = PokemonData::Ability.get(ability1).name
|
||||||
pokedata.write("#{cability1}")
|
pokedata.write("#{cability1}")
|
||||||
pokedata.write(",") if ability2
|
pokedata.write(",") if ability2
|
||||||
end
|
end
|
||||||
if ability2
|
if ability2
|
||||||
cability2 = Data::Ability.get(ability2).name
|
cability2 = PokemonData::Ability.get(ability2).name
|
||||||
pokedata.write("#{cability2}")
|
pokedata.write("#{cability2}")
|
||||||
end
|
end
|
||||||
pokedata.write("\r\n")
|
pokedata.write("\r\n")
|
||||||
@@ -724,22 +724,22 @@ def pbSavePokemonData
|
|||||||
pokedata.write("HiddenAbility = ")
|
pokedata.write("HiddenAbility = ")
|
||||||
needcomma = false
|
needcomma = false
|
||||||
if hiddenability1
|
if hiddenability1
|
||||||
cabilityh = Data::Ability.get(hiddenability1).name
|
cabilityh = PokemonData::Ability.get(hiddenability1).name
|
||||||
pokedata.write("#{cabilityh}"); needcomma = true
|
pokedata.write("#{cabilityh}"); needcomma = true
|
||||||
end
|
end
|
||||||
if hiddenability2
|
if hiddenability2
|
||||||
pokedata.write(",") if needcomma
|
pokedata.write(",") if needcomma
|
||||||
cabilityh = Data::Ability.get(hiddenability2).name
|
cabilityh = PokemonData::Ability.get(hiddenability2).name
|
||||||
pokedata.write("#{cabilityh}"); needcomma = true
|
pokedata.write("#{cabilityh}"); needcomma = true
|
||||||
end
|
end
|
||||||
if hiddenability3
|
if hiddenability3
|
||||||
pokedata.write(",") if needcomma
|
pokedata.write(",") if needcomma
|
||||||
cabilityh = Data::Ability.get(hiddenability3).name
|
cabilityh = PokemonData::Ability.get(hiddenability3).name
|
||||||
pokedata.write("#{cabilityh}"); needcomma = true
|
pokedata.write("#{cabilityh}"); needcomma = true
|
||||||
end
|
end
|
||||||
if hiddenability4
|
if hiddenability4
|
||||||
pokedata.write(",") if needcomma
|
pokedata.write(",") if needcomma
|
||||||
cabilityh = Data::Ability.get(hiddenability4).name
|
cabilityh = PokemonData::Ability.get(hiddenability4).name
|
||||||
pokedata.write("#{cabilityh}")
|
pokedata.write("#{cabilityh}")
|
||||||
end
|
end
|
||||||
pokedata.write("\r\n")
|
pokedata.write("\r\n")
|
||||||
@@ -1107,12 +1107,12 @@ def pbSavePokemonFormsData
|
|||||||
if ability1 || ability2
|
if ability1 || ability2
|
||||||
pokedata.write("Abilities = ")
|
pokedata.write("Abilities = ")
|
||||||
if ability1
|
if ability1
|
||||||
cability1 = Data::Ability.get(ability1).name
|
cability1 = PokemonData::Ability.get(ability1).name
|
||||||
pokedata.write("#{cability1}")
|
pokedata.write("#{cability1}")
|
||||||
pokedata.write(",") if ability2
|
pokedata.write(",") if ability2
|
||||||
end
|
end
|
||||||
if ability2
|
if ability2
|
||||||
cability2 = Data::Ability.get(ability2).name
|
cability2 = PokemonData::Ability.get(ability2).name
|
||||||
pokedata.write("#{cability2}")
|
pokedata.write("#{cability2}")
|
||||||
end
|
end
|
||||||
pokedata.write("\r\n")
|
pokedata.write("\r\n")
|
||||||
@@ -1122,22 +1122,22 @@ def pbSavePokemonFormsData
|
|||||||
pokedata.write("HiddenAbility = ")
|
pokedata.write("HiddenAbility = ")
|
||||||
needcomma = false
|
needcomma = false
|
||||||
if hiddenability1
|
if hiddenability1
|
||||||
cabilityh = Data::Ability.get(hiddenability1).name
|
cabilityh = PokemonData::Ability.get(hiddenability1).name
|
||||||
pokedata.write("#{cabilityh}"); needcomma=true
|
pokedata.write("#{cabilityh}"); needcomma=true
|
||||||
end
|
end
|
||||||
if hiddenability2
|
if hiddenability2
|
||||||
pokedata.write(",") if needcomma
|
pokedata.write(",") if needcomma
|
||||||
cabilityh = Data::Ability.get(hiddenability2).name
|
cabilityh = PokemonData::Ability.get(hiddenability2).name
|
||||||
pokedata.write("#{cabilityh}"); needcomma=true
|
pokedata.write("#{cabilityh}"); needcomma=true
|
||||||
end
|
end
|
||||||
if hiddenability3
|
if hiddenability3
|
||||||
pokedata.write(",") if needcomma
|
pokedata.write(",") if needcomma
|
||||||
cabilityh = Data::Ability.get(hiddenability3).name
|
cabilityh = PokemonData::Ability.get(hiddenability3).name
|
||||||
pokedata.write("#{cabilityh}"); needcomma=true
|
pokedata.write("#{cabilityh}"); needcomma=true
|
||||||
end
|
end
|
||||||
if hiddenability4
|
if hiddenability4
|
||||||
pokedata.write(",") if needcomma
|
pokedata.write(",") if needcomma
|
||||||
cabilityh = Data::Ability.get(hiddenability4).name
|
cabilityh = PokemonData::Ability.get(hiddenability4).name
|
||||||
pokedata.write("#{cabilityh}")
|
pokedata.write("#{cabilityh}")
|
||||||
end
|
end
|
||||||
pokedata.write("\r\n")
|
pokedata.write("\r\n")
|
||||||
|
|||||||
@@ -827,7 +827,7 @@ module AbilityProperty
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.format(value)
|
def self.format(value)
|
||||||
return (value && Data::Ability.exists?(value)) ? Data::Ability.get(value).name : "-"
|
return (value && PokemonData::Ability.exists?(value)) ? PokemonData::Ability.get(value).name : "-"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ end
|
|||||||
# sorting between numerical and alphabetical.
|
# sorting between numerical and alphabetical.
|
||||||
def pbChooseAbilityList(default=0)
|
def pbChooseAbilityList(default=0)
|
||||||
commands = []
|
commands = []
|
||||||
Data::Ability.each do |a|
|
PokemonData::Ability.each do |a|
|
||||||
commands.push([a.id_number, a.name])
|
commands.push([a.id_number, a.name])
|
||||||
end
|
end
|
||||||
return pbChooseList(commands,default,0,-1)
|
return pbChooseList(commands,default,0,-1)
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ module Compiler
|
|||||||
return enumer.const_get(ret.to_sym)
|
return enumer.const_get(ret.to_sym)
|
||||||
elsif enumer.is_a?(Symbol) || enumer.is_a?(String)
|
elsif enumer.is_a?(Symbol) || enumer.is_a?(String)
|
||||||
if enumer == :Ability
|
if enumer == :Ability
|
||||||
enumer = Data.const_get(enumer.to_sym)
|
enumer = PokemonData.const_get(enumer.to_sym)
|
||||||
begin
|
begin
|
||||||
if ret == "" || !enumer.exists?(ret.to_sym)
|
if ret == "" || !enumer.exists?(ret.to_sym)
|
||||||
raise _INTL("Undefined value {1} in {2}\r\n{3}", ret, enumer.name, FileLineData.linereport)
|
raise _INTL("Undefined value {1} in {2}\r\n{3}", ret, enumer.name, FileLineData.linereport)
|
||||||
@@ -354,7 +354,7 @@ module Compiler
|
|||||||
return enumer.const_get(ret.to_sym)
|
return enumer.const_get(ret.to_sym)
|
||||||
elsif enumer.is_a?(Symbol) || enumer.is_a?(String)
|
elsif enumer.is_a?(Symbol) || enumer.is_a?(String)
|
||||||
if enumer == :Ability
|
if enumer == :Ability
|
||||||
enumer = Data.const_get(enumer.to_sym)
|
enumer = PokemonData.const_get(enumer.to_sym)
|
||||||
return nil if ret == "" || !enumer.exists?(ret.to_sym)
|
return nil if ret == "" || !enumer.exists?(ret.to_sym)
|
||||||
return ret.to_sym
|
return ret.to_sym
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -332,9 +332,9 @@ module Compiler
|
|||||||
line = pbGetCsvRecord(line, line_no, [0, "vnss"])
|
line = pbGetCsvRecord(line, line_no, [0, "vnss"])
|
||||||
ability_number = line[0]
|
ability_number = line[0]
|
||||||
ability_symbol = line[1].to_sym
|
ability_symbol = line[1].to_sym
|
||||||
if Data::Ability::DATA[ability_number]
|
if PokemonData::Ability::DATA[ability_number]
|
||||||
raise _INTL("Ability ID number '{1}' is used twice.\r\n{2}", ability_number, FileLineData.linereport)
|
raise _INTL("Ability ID number '{1}' is used twice.\r\n{2}", ability_number, FileLineData.linereport)
|
||||||
elsif Data::Ability::DATA[ability_symbol]
|
elsif PokemonData::Ability::DATA[ability_symbol]
|
||||||
raise _INTL("Ability ID '{1}' is used twice.\r\n{2}", ability_symbol, FileLineData.linereport)
|
raise _INTL("Ability ID '{1}' is used twice.\r\n{2}", ability_symbol, FileLineData.linereport)
|
||||||
end
|
end
|
||||||
# Construct ability hash
|
# Construct ability hash
|
||||||
@@ -345,12 +345,12 @@ module Compiler
|
|||||||
:description => line[3]
|
:description => line[3]
|
||||||
}
|
}
|
||||||
# Add ability's data to records
|
# Add ability's data to records
|
||||||
Data::Ability::DATA[ability_number] = Data::Ability::DATA[ability_symbol] = Data::Ability.new(ability_hash)
|
PokemonData::Ability::DATA[ability_number] = PokemonData::Ability::DATA[ability_symbol] = PokemonData::Ability.new(ability_hash)
|
||||||
ability_names[ability_number] = ability_hash[:name]
|
ability_names[ability_number] = ability_hash[:name]
|
||||||
ability_descriptions[ability_number] = ability_hash[:description]
|
ability_descriptions[ability_number] = ability_hash[:description]
|
||||||
}
|
}
|
||||||
# Save all data
|
# Save all data
|
||||||
Data::Ability.save
|
PokemonData::Ability.save
|
||||||
MessageTypes.setMessages(MessageTypes::Abilities, ability_names)
|
MessageTypes.setMessages(MessageTypes::Abilities, ability_names)
|
||||||
MessageTypes.setMessages(MessageTypes::AbilityDescs, ability_descriptions)
|
MessageTypes.setMessages(MessageTypes::AbilityDescs, ability_descriptions)
|
||||||
Graphics.update
|
Graphics.update
|
||||||
|
|||||||
Reference in New Issue
Block a user