mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Merge branch 'main-doubleAbilities' of https://github.com/infinitefusion/infinitefusion-e18
Conflicts: Data/MapInfos.rxdata Data/System.rxdata
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Data/Map707.rxdata
Normal file
BIN
Data/Map707.rxdata
Normal file
Binary file not shown.
BIN
Data/Map708.rxdata
Normal file
BIN
Data/Map708.rxdata
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Data/Map797.rxdata
Normal file
BIN
Data/Map797.rxdata
Normal file
Binary file not shown.
BIN
Data/Map798.rxdata
Normal file
BIN
Data/Map798.rxdata
Normal file
Binary file not shown.
@@ -325,6 +325,14 @@ module GameData
|
||||
end
|
||||
pkmn.ability_index = pkmn_data[:ability_index]
|
||||
pkmn.ability = pkmn_data[:ability]
|
||||
|
||||
if $game_switches[SWITCH_DOUBLE_ABILITIES] && pkmn.isFusion?
|
||||
secondary_ability_index = pkmn.ability_index == 0 ? 1 : 0
|
||||
pkmn.ability2_index = secondary_ability_index
|
||||
pkmn.ability2 = pkmn.getAbilityList[secondary_ability_index][0]
|
||||
#print _INTL("Primary: {1}, Secondary: {2}",pkmn.ability.id, pkmn.ability2.id)
|
||||
end
|
||||
|
||||
pkmn.gender = pkmn_data[:gender] || ((trainer.male?) ? 0 : 1)
|
||||
pkmn.shiny = (pkmn_data[:shininess]) ? true : false
|
||||
if pkmn_data[:nature]
|
||||
|
||||
@@ -318,6 +318,10 @@ class PokeBattle_Battler
|
||||
return @pokemon.isFusionOf(check_species)
|
||||
end
|
||||
|
||||
def isFusion?()
|
||||
return @pokemon.isFusion?()
|
||||
end
|
||||
|
||||
# Returns the active types of this Pokémon. The array should not include the
|
||||
# same type more than once, and should not include any invalid type numbers
|
||||
# (e.g. -1).
|
||||
|
||||
@@ -22,6 +22,7 @@ class PokeBattle_Battler
|
||||
@hp = @totalhp = 0
|
||||
@type1 = @type2 = nil
|
||||
@ability_id = nil
|
||||
@ability2_id = nil
|
||||
@item_id = nil
|
||||
@gender = 0
|
||||
@attack = @defense = @spatk = @spdef = @speed = 0
|
||||
@@ -81,6 +82,7 @@ class PokeBattle_Battler
|
||||
@type1 = pkmn.type1
|
||||
@type2 = pkmn.type2
|
||||
@ability_id = pkmn.ability_id
|
||||
@ability2_id = pkmn.ability2_id
|
||||
@item_id = pkmn.item_id
|
||||
@gender = pkmn.gender
|
||||
@attack = pkmn.attack
|
||||
|
||||
@@ -283,6 +283,7 @@ class PokeBattle_Battler
|
||||
@effects[PBEffects::TransformSpecies] = target.species
|
||||
pbChangeTypes(target)
|
||||
self.ability = target.ability
|
||||
self.ability2 = target.ability2 if target.ability2
|
||||
@attack = target.attack
|
||||
@defense = target.defense
|
||||
@spatk = target.spatk
|
||||
|
||||
@@ -92,10 +92,10 @@ class PokeBattle_Battler
|
||||
return true
|
||||
end
|
||||
|
||||
def pbRaiseStatStageByAbility(stat,increment,user,splashAnim=true)
|
||||
def pbRaiseStatStageByAbility(stat,increment,user,splashAnim=true, abilityName=nil)
|
||||
return false if fainted?
|
||||
ret = false
|
||||
@battle.pbShowAbilitySplash(user) if splashAnim
|
||||
@battle.pbShowAbilitySplash(user,false,true,abilityName) #if splashAnim
|
||||
if pbCanRaiseStatStage?(stat,user,nil,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
ret = pbRaiseStatStage(stat,increment,user)
|
||||
@@ -224,9 +224,9 @@ class PokeBattle_Battler
|
||||
return true
|
||||
end
|
||||
|
||||
def pbLowerStatStageByAbility(stat,increment,user,splashAnim=true,checkContact=false)
|
||||
def pbLowerStatStageByAbility(stat,increment,user,splashAnim=true,checkContact=false,ability_name=nil)
|
||||
ret = false
|
||||
@battle.pbShowAbilitySplash(user) if splashAnim
|
||||
@battle.pbShowAbilitySplash(user,false ,false ,ability_name) if splashAnim
|
||||
if pbCanLowerStatStage?(stat,user,nil,PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
||||
(!checkContact || affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH))
|
||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
@@ -252,7 +252,7 @@ class PokeBattle_Battler
|
||||
return false
|
||||
end
|
||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
return pbLowerStatStageByAbility(:ATTACK,1,user,false)
|
||||
return pbLowerStatStageByAbility(:ATTACK,1,user,false,false ,user.abilityName)
|
||||
end
|
||||
# NOTE: These checks exist to ensure appropriate messages are shown if
|
||||
# Intimidate is blocked somehow (i.e. the messages should mention the
|
||||
|
||||
@@ -2,19 +2,25 @@ class PokeBattle_Battler
|
||||
#=============================================================================
|
||||
# Effect per hit
|
||||
#=============================================================================
|
||||
#
|
||||
|
||||
def triggerAbilityEffectsOnHit(move,user,target)
|
||||
# Target's ability
|
||||
if target.abilityActive?(true)
|
||||
oldHP = user.hp
|
||||
BattleHandlers.triggerTargetAbilityOnHit(target.ability,user,target,move,@battle)
|
||||
user.pbItemHPHealCheck if user.hp<oldHP
|
||||
end
|
||||
# User's ability
|
||||
if user.abilityActive?(true)
|
||||
BattleHandlers.triggerUserAbilityOnHit(user.ability,user,target,move,@battle)
|
||||
user.pbItemHPHealCheck
|
||||
end
|
||||
end
|
||||
|
||||
def pbEffectsOnMakingHit(move,user,target)
|
||||
if target.damageState.calcDamage>0 && !target.damageState.substitute
|
||||
# Target's ability
|
||||
if target.abilityActive?(true)
|
||||
oldHP = user.hp
|
||||
BattleHandlers.triggerTargetAbilityOnHit(target.ability,user,target,move,@battle)
|
||||
user.pbItemHPHealCheck if user.hp<oldHP
|
||||
end
|
||||
# User's ability
|
||||
if user.abilityActive?(true)
|
||||
BattleHandlers.triggerUserAbilityOnHit(user.ability,user,target,move,@battle)
|
||||
user.pbItemHPHealCheck
|
||||
end
|
||||
triggerAbilityEffectsOnHit(move,user,target)
|
||||
# Target's item
|
||||
if target.itemActive?(true)
|
||||
oldHP = user.hp
|
||||
@@ -92,6 +98,7 @@ class PokeBattle_Battler
|
||||
# User's ability
|
||||
if user.abilityActive?
|
||||
BattleHandlers.triggerUserAbilityEndOfMove(user.ability,user,targets,move,@battle)
|
||||
BattleHandlers.triggerUserAbilityEndOfMove(user.ability2,user,targets,move,@battle) if user.ability2
|
||||
end
|
||||
# Greninja - Battle Bond
|
||||
if !user.fainted? && !user.effects[PBEffects::Transform] &&
|
||||
@@ -161,6 +168,7 @@ class PokeBattle_Battler
|
||||
next if b.damageState.unaffected || switchedBattlers.include?(b.index)
|
||||
next if !b.abilityActive?
|
||||
BattleHandlers.triggerTargetAbilityAfterMoveUse(b.ability,b,user,move,switchedBattlers,@battle)
|
||||
BattleHandlers.triggerTargetAbilityAfterMoveUse(b.ability2,b,user,move,switchedBattlers,@battle) if b.ability2
|
||||
if !switchedBattlers.include?(b.index) && move.damagingMove?
|
||||
if b.pbAbilitiesOnDamageTaken(b.damageState.initialHP) # Emergency Exit, Wimp Out
|
||||
switchWimpOut.push(b.index)
|
||||
|
||||
@@ -767,10 +767,12 @@ class PokeBattle_Battle
|
||||
@scene.pbCommonAnimation(name,user,targets) if @showAnims
|
||||
end
|
||||
|
||||
def pbShowAbilitySplash(battler,delay=false,logTrigger=true)
|
||||
|
||||
|
||||
def pbShowAbilitySplash(battler,delay=false,logTrigger=true,abilityName=nil)
|
||||
PBDebug.log("[Ability triggered] #{battler.pbThis}'s #{battler.abilityName}") if logTrigger
|
||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
@scene.pbShowAbilitySplash(battler)
|
||||
@scene.pbShowAbilitySplash(battler,false ,abilityName)
|
||||
if delay
|
||||
Graphics.frame_rate.times { @scene.pbUpdate } # 1 second
|
||||
end
|
||||
|
||||
@@ -497,14 +497,14 @@ BattleHandlers::StatLossImmunityAllyAbility.add(:FLOWERVEIL,
|
||||
BattleHandlers::AbilityOnStatLoss.add(:COMPETITIVE,
|
||||
proc { |ability,battler,stat,user|
|
||||
next if user && !user.opposes?(battler)
|
||||
battler.pbRaiseStatStageByAbility(:SPECIAL_ATTACK,2,battler)
|
||||
battler.pbRaiseStatStageByAbility(:SPECIAL_ATTACK,2,battler,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::AbilityOnStatLoss.add(:DEFIANT,
|
||||
proc { |ability,battler,stat,user|
|
||||
next if user && !user.opposes?(battler)
|
||||
battler.pbRaiseStatStageByAbility(:ATTACK,2,battler)
|
||||
battler.pbRaiseStatStageByAbility(:ATTACK,2,battler,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -555,7 +555,7 @@ BattleHandlers::PriorityBracketChangeAbility.add(:STALL,
|
||||
|
||||
BattleHandlers::AbilityOnFlinch.add(:STEADFAST,
|
||||
proc { |ability,battler,battle|
|
||||
battler.pbRaiseStatStageByAbility(:SPEED,1,battler)
|
||||
battler.pbRaiseStatStageByAbility(:SPEED,1,battler,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1441,7 +1441,7 @@ BattleHandlers::TargetAbilityOnHit.add(:FLAMEBODY,
|
||||
BattleHandlers::TargetAbilityOnHit.add(:GOOEY,
|
||||
proc { |ability,user,target,move,battle|
|
||||
next if !move.pbContactMove?(user)
|
||||
user.pbLowerStatStageByAbility(:SPEED,1,target,true,true)
|
||||
user.pbLowerStatStageByAbility(:SPEED,1,target,true,true,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1500,7 +1500,7 @@ BattleHandlers::TargetAbilityOnHit.copy(:IRONBARBS,:ROUGHSKIN)
|
||||
BattleHandlers::TargetAbilityOnHit.add(:JUSTIFIED,
|
||||
proc { |ability,user,target,move,battle|
|
||||
next if move.calcType != :DARK
|
||||
target.pbRaiseStatStageByAbility(:ATTACK,1,target)
|
||||
target.pbRaiseStatStageByAbility(:ATTACK,1,target,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1549,13 +1549,13 @@ BattleHandlers::TargetAbilityOnHit.add(:POISONPOINT,
|
||||
BattleHandlers::TargetAbilityOnHit.add(:RATTLED,
|
||||
proc { |ability,user,target,move,battle|
|
||||
next if ![:BUG, :DARK, :GHOST].include?(move.calcType)
|
||||
target.pbRaiseStatStageByAbility(:SPEED,1,target)
|
||||
target.pbRaiseStatStageByAbility(:SPEED,1,target,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::TargetAbilityOnHit.add(:STAMINA,
|
||||
proc { |ability,user,target,move,battle|
|
||||
target.pbRaiseStatStageByAbility(:DEFENSE,1,target)
|
||||
target.pbRaiseStatStageByAbility(:DEFENSE,1,target,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1580,7 +1580,7 @@ BattleHandlers::TargetAbilityOnHit.add(:STATIC,
|
||||
BattleHandlers::TargetAbilityOnHit.add(:WATERCOMPACTION,
|
||||
proc { |ability,user,target,move,battle|
|
||||
next if move.calcType != :WATER
|
||||
target.pbRaiseStatStageByAbility(:DEFENSE,2,target)
|
||||
target.pbRaiseStatStageByAbility(:DEFENSE,2,target,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1590,9 +1590,9 @@ BattleHandlers::TargetAbilityOnHit.add(:WEAKARMOR,
|
||||
next if !target.pbCanLowerStatStage?(:DEFENSE, target) &&
|
||||
!target.pbCanRaiseStatStage?(:SPEED, target)
|
||||
battle.pbShowAbilitySplash(target)
|
||||
target.pbLowerStatStageByAbility(:DEFENSE, 1, target, false)
|
||||
target.pbLowerStatStageByAbility(:DEFENSE, 1, target, false,GameData::Ability.get(ability).real_name)
|
||||
target.pbRaiseStatStageByAbility(:SPEED,
|
||||
(Settings::MECHANICS_GENERATION >= 7) ? 2 : 1, target, false)
|
||||
(Settings::MECHANICS_GENERATION >= 7) ? 2 : 1, target, false,GameData::Ability.get(ability).real_name)
|
||||
battle.pbHideAbilitySplash(target)
|
||||
}
|
||||
)
|
||||
@@ -1639,7 +1639,7 @@ BattleHandlers::UserAbilityEndOfMove.add(:BEASTBOOST,
|
||||
GameData::Stat.each_main_battle do |s|
|
||||
next if userStats[s.id] < highestStatValue
|
||||
if user.pbCanRaiseStatStage?(s.id, user)
|
||||
user.pbRaiseStatStageByAbility(s.id, numFainted, user)
|
||||
user.pbRaiseStatStageByAbility(s.id, numFainted, user,GameData::Ability.get(ability).real_name)
|
||||
end
|
||||
break
|
||||
end
|
||||
@@ -1692,7 +1692,7 @@ BattleHandlers::UserAbilityEndOfMove.add(:MOXIE,
|
||||
numFainted = 0
|
||||
targets.each { |b| numFainted += 1 if b.damageState.fainted }
|
||||
next if numFainted==0 || !user.pbCanRaiseStatStage?(:ATTACK,user)
|
||||
user.pbRaiseStatStageByAbility(:ATTACK,numFainted,user)
|
||||
user.pbRaiseStatStageByAbility(:ATTACK,numFainted,user,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1705,7 +1705,7 @@ BattleHandlers::TargetAbilityAfterMoveUse.add(:BERSERK,
|
||||
next if !move.damagingMove?
|
||||
next if target.damageState.initialHP<target.totalhp/2 || target.hp>=target.totalhp/2
|
||||
next if !target.pbCanRaiseStatStage?(:SPECIAL_ATTACK,target)
|
||||
target.pbRaiseStatStageByAbility(:SPECIAL_ATTACK,1,target)
|
||||
target.pbRaiseStatStageByAbility(:SPECIAL_ATTACK,1,target,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1947,12 +1947,12 @@ BattleHandlers::EOREffectAbility.add(:MOODY,
|
||||
battle.pbShowAbilitySplash(battler)
|
||||
if randomUp.length>0
|
||||
r = battle.pbRandom(randomUp.length)
|
||||
battler.pbRaiseStatStageByAbility(randomUp[r],2,battler,false)
|
||||
battler.pbRaiseStatStageByAbility(randomUp[r],2,battler,false,GameData::Ability.get(ability).real_name)
|
||||
randomDown.delete(randomUp[r])
|
||||
end
|
||||
if randomDown.length>0
|
||||
r = battle.pbRandom(randomDown.length)
|
||||
battler.pbLowerStatStageByAbility(randomDown[r],1,battler,false)
|
||||
battler.pbLowerStatStageByAbility(randomDown[r],1,battler,false,GameData::Ability.get(ability).real_name)
|
||||
end
|
||||
battle.pbHideAbilitySplash(battler)
|
||||
battler.pbItemStatRestoreCheck if randomDown.length>0
|
||||
@@ -1964,7 +1964,8 @@ BattleHandlers::EOREffectAbility.add(:SPEEDBOOST,
|
||||
# A Pokémon's turnCount is 0 if it became active after the beginning of a
|
||||
# round
|
||||
if battler.turnCount>0 && battler.pbCanRaiseStatStage?(:SPEED,battler)
|
||||
battler.pbRaiseStatStageByAbility(:SPEED,1,battler)
|
||||
ability_name = GameData::Ability.get(ability).real_name
|
||||
battler.pbRaiseStatStageByAbility(:SPEED,1,battler,true,ability_name)
|
||||
end
|
||||
}
|
||||
)
|
||||
@@ -2141,7 +2142,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:DOWNLOAD,
|
||||
oSpDef += b.spdef
|
||||
end
|
||||
stat = (oDef<oSpDef) ? :ATTACK : :SPECIAL_ATTACK
|
||||
battler.pbRaiseStatStageByAbility(stat,1,battler)
|
||||
battler.pbRaiseStatStageByAbility(stat,1,battler,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2410,7 +2411,7 @@ BattleHandlers::AbilityChangeOnBattlerFainting.copy(:POWEROFALCHEMY,:RECEIVER)
|
||||
|
||||
BattleHandlers::AbilityOnBattlerFainting.add(:SOULHEART,
|
||||
proc { |ability,battler,fainted,battle|
|
||||
battler.pbRaiseStatStageByAbility(:SPECIAL_ATTACK,1,battler)
|
||||
battler.pbRaiseStatStageByAbility(:SPECIAL_ATTACK,1,battler,GameData::Ability.get(ability).real_name)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -228,14 +228,21 @@ end
|
||||
# Makes a Pokémon's ability bar appear
|
||||
#===============================================================================
|
||||
class AbilitySplashAppearAnimation < PokeBattle_Animation
|
||||
def initialize(sprites,viewport,side)
|
||||
def initialize(sprites,viewport,side,secondAbility=false)
|
||||
@secondAbility=secondAbility
|
||||
@side = side
|
||||
super(sprites,viewport)
|
||||
end
|
||||
|
||||
def createProcesses
|
||||
return if !@sprites["abilityBar_#{@side}"]
|
||||
bar = addSprite(@sprites["abilityBar_#{@side}"])
|
||||
if @secondAbility
|
||||
return if !@sprites["ability2Bar_#{@side}"]
|
||||
bar = addSprite(@sprites["ability2Bar_#{@side}"])
|
||||
else
|
||||
return if !@sprites["abilityBar_#{@side}"]
|
||||
bar = addSprite(@sprites["abilityBar_#{@side}"])
|
||||
end
|
||||
|
||||
bar.setVisible(0,true)
|
||||
dir = (@side==0) ? 1 : -1
|
||||
bar.moveDelta(0,8,dir*Graphics.width/2,0)
|
||||
|
||||
@@ -392,8 +392,10 @@ class AbilitySplashBar < SpriteWrapper
|
||||
TEXT_BASE_COLOR = Color.new(0,0,0)
|
||||
TEXT_SHADOW_COLOR = Color.new(248,248,248)
|
||||
|
||||
def initialize(side,viewport=nil)
|
||||
def initialize(side,viewport=nil, secondAbility=false)
|
||||
super(viewport)
|
||||
@ability_name=nil
|
||||
@secondAbility=secondAbility
|
||||
@side = side
|
||||
@battler = nil
|
||||
# Create sprite wrapper that displays background graphic
|
||||
@@ -435,6 +437,10 @@ class AbilitySplashBar < SpriteWrapper
|
||||
@bgSprite.z = value-1
|
||||
end
|
||||
|
||||
def ability_name=(value)
|
||||
@ability_name=value
|
||||
end
|
||||
|
||||
def opacity=(value)
|
||||
super
|
||||
@bgSprite.opacity = value
|
||||
@@ -455,6 +461,9 @@ class AbilitySplashBar < SpriteWrapper
|
||||
refresh
|
||||
end
|
||||
|
||||
def secondAbility=(value)
|
||||
@secondAbility = value
|
||||
end
|
||||
def refresh
|
||||
self.bitmap.clear
|
||||
return if !@battler
|
||||
@@ -462,9 +471,12 @@ class AbilitySplashBar < SpriteWrapper
|
||||
textX = (@side==0) ? 10 : self.bitmap.width-8
|
||||
# Draw Pokémon's name
|
||||
textPos.push([_INTL("{1}'s",@battler.name),textX,-4,@side==1,
|
||||
TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true])
|
||||
TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true]) if !@secondAbility
|
||||
# Draw Pokémon's ability
|
||||
textPos.push([@battler.abilityName,textX,26,@side==1,
|
||||
abilityName = @secondAbility ? @battler.ability2Name : @battler.abilityName
|
||||
abilityName = @ability_name if @ability_name
|
||||
#return if abilityName ==""
|
||||
textPos.push([abilityName,textX,26,@side==1,
|
||||
TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true])
|
||||
pbDrawTextPositions(self.bitmap,textPos)
|
||||
end
|
||||
|
||||
@@ -61,6 +61,10 @@ class PokeBattle_Scene
|
||||
# Ability splash bars
|
||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
@sprites["abilityBar_#{side}"] = AbilitySplashBar.new(side,@viewport)
|
||||
if $game_switches[SWITCH_DOUBLE_ABILITIES]
|
||||
@sprites["ability2Bar_#{side}"] = AbilitySplashBar.new(side,@viewport,true)
|
||||
@sprites["ability2Bar_#{side}"].y = @sprites["ability2Bar_#{side}"].y+30
|
||||
end
|
||||
end
|
||||
end
|
||||
# Player's and partner trainer's back sprite
|
||||
|
||||
@@ -43,7 +43,7 @@ class PokeBattle_Scene
|
||||
for i in 0...@battle.sideSizes[1]
|
||||
idxBattler = 2*i+1
|
||||
|
||||
#hidden ability animation
|
||||
#hidden ability animation
|
||||
if @battle.battlers[idxBattler].hasHiddenAbility?
|
||||
pbCommonAnimation("StatUp",@battle.battlers[idxBattler])
|
||||
if @battle.is_a?(PokeBattle_Battle)
|
||||
@@ -173,19 +173,21 @@ class PokeBattle_Scene
|
||||
#=============================================================================
|
||||
# Ability splash bar animations
|
||||
#=============================================================================
|
||||
def pbShowAbilitySplash(battler)
|
||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
side = battler.index%2
|
||||
pbHideAbilitySplash(battler) if @sprites["abilityBar_#{side}"].visible
|
||||
@sprites["abilityBar_#{side}"].battler = battler
|
||||
abilitySplashAnim = AbilitySplashAppearAnimation.new(@sprites,@viewport,side)
|
||||
loop do
|
||||
abilitySplashAnim.update
|
||||
pbUpdate
|
||||
break if abilitySplashAnim.animDone?
|
||||
end
|
||||
abilitySplashAnim.dispose
|
||||
end
|
||||
# def pbShowAbilitySplash(battler)
|
||||
# return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
# side = battler.index%2
|
||||
# pbHideAbilitySplash(battler) if @sprites["abilityBar_#{side}"].visible
|
||||
# @sprites["abilityBar_#{side}"].battler = battler
|
||||
# abilitySplashAnim = AbilitySplashAppearAnimation.new(@sprites,@viewport,side)
|
||||
# loop do
|
||||
# abilitySplashAnim.update
|
||||
# pbUpdate
|
||||
# break if abilitySplashAnim.animDone?
|
||||
# end
|
||||
# abilitySplashAnim.dispose
|
||||
# end
|
||||
|
||||
|
||||
|
||||
def pbHideAbilitySplash(battler)
|
||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
|
||||
@@ -42,7 +42,14 @@ ItemHandlers::CanUseInBattle.addIf(proc { |item| GameData::Item.get(item).is_pok
|
||||
scene.pbDisplay(_INTL("It's no good! It's impossible to aim at a Pokémon that's not in sight!")) if showMessages
|
||||
next false
|
||||
end
|
||||
# NOTE: The code below stops you from throwing a Poké Ball if there is more
|
||||
|
||||
if $game_switches[SWITCH_SILVERBOSS_BATTLE]
|
||||
scene.pbDisplay(_INTL("It's no good! It's too agitated to aim!")) if showMessages
|
||||
next false
|
||||
end
|
||||
|
||||
|
||||
# NOTE: The code below stops you from throwing a Poké Ball if there is more
|
||||
# than one unfainted opposing Pokémon. (Snag Balls can be thrown in
|
||||
# this case, but only in trainer battles, and the trainer will deflect
|
||||
# them if they are trying to catch a non-Shadow Pokémon.)
|
||||
|
||||
@@ -1148,6 +1148,9 @@ class Pokemon
|
||||
return this_level
|
||||
end
|
||||
|
||||
def adjustHPForWonderGuard(stats)
|
||||
return self.ability == :WONDERGUARD ? 1 : stats[:HP]
|
||||
end
|
||||
|
||||
# Recalculates this Pokémon's stats.
|
||||
def calc_stats
|
||||
@@ -1177,7 +1180,7 @@ class Pokemon
|
||||
end
|
||||
hpDiff = @totalhp - @hp
|
||||
#@totalhp = stats[:HP]
|
||||
@totalhp = self.ability == :WONDERGUARD ? 1 : stats[:HP]
|
||||
@totalhp = adjustHPForWonderGuard(stats)
|
||||
calculated_hp = @totalhp - hpDiff
|
||||
@hp = calculated_hp > 0 ? calculated_hp : 0
|
||||
@attack = stats[:ATTACK]
|
||||
@@ -1229,7 +1232,11 @@ class Pokemon
|
||||
@gender = nil
|
||||
@shiny = nil
|
||||
@ability_index = nil
|
||||
@ability2_index = nil
|
||||
|
||||
@ability = nil
|
||||
@ability2 = nil
|
||||
|
||||
@nature = nil
|
||||
@nature_for_stats = nil
|
||||
@item = nil
|
||||
|
||||
@@ -674,10 +674,22 @@ class PokemonSummary_Scene
|
||||
]
|
||||
# Draw ability name and description
|
||||
ability = @pokemon.ability
|
||||
ability2 = @pokemon.ability2
|
||||
|
||||
# if ability
|
||||
# textpos.push([ability.name, 362, 278, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
# drawTextEx(overlay, 224, 320, 282, 2, ability.description, Color.new(64, 64, 64), Color.new(176, 176, 176))
|
||||
# end
|
||||
|
||||
#fixme temp
|
||||
if ability
|
||||
textpos.push([ability.name, 362, 278, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
drawTextEx(overlay, 224, 320, 282, 2, ability.description, Color.new(64, 64, 64), Color.new(176, 176, 176))
|
||||
if ability2
|
||||
drawTextEx(overlay, 224, 320, 282, 2, ability2.name, Color.new(64, 64, 64), Color.new(176, 176, 176))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Draw all text
|
||||
pbDrawTextPositions(overlay, textpos)
|
||||
# Draw HP bar
|
||||
|
||||
@@ -7,7 +7,7 @@ class BattleSwapScene
|
||||
@sprites = {}
|
||||
addBackgroundPlane(@sprites, "bg", "rentbg", @viewport)
|
||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||
_INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport)
|
||||
_INTL("RENTAL POKÉMON"), 0, 0, Graphics.width, 64, @viewport)
|
||||
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
|
||||
[], 0, 64, Graphics.width, Graphics.height - 128 , @viewport)
|
||||
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize("",
|
||||
@@ -29,7 +29,7 @@ class BattleSwapScene
|
||||
@sprites = {}
|
||||
addBackgroundPlane(@sprites, "bg", "swapbg", @viewport)
|
||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||
_INTL("POKéMON SWAP"), 0, 0, Graphics.width, 64, @viewport)
|
||||
_INTL("POKÉMON SWAP"), 0, 0, Graphics.width, 64, @viewport)
|
||||
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
|
||||
[], 0, 64, Graphics.width, Graphics.height - 128, @viewport)
|
||||
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize(
|
||||
|
||||
@@ -659,7 +659,7 @@ PokemonDebugMenuCommands.register("setitem", {
|
||||
|
||||
PokemonDebugMenuCommands.register("setability", {
|
||||
"parent" => "main",
|
||||
"name" => _INTL("Set ability"),
|
||||
"name" => _INTL("Set primary ability"),
|
||||
"always_show" => true,
|
||||
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
|
||||
cmd = 0
|
||||
@@ -706,6 +706,56 @@ PokemonDebugMenuCommands.register("setability", {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
PokemonDebugMenuCommands.register("setability2", {
|
||||
"parent" => "main",
|
||||
"name" => _INTL("Set secondary ability"),
|
||||
"always_show" => true,
|
||||
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
|
||||
cmd = 0
|
||||
commands = [
|
||||
_INTL("Set possible ability"),
|
||||
_INTL("Set any ability"),
|
||||
_INTL("Reset")
|
||||
]
|
||||
loop do
|
||||
if pkmn.ability
|
||||
msg = _INTL("Ability 2 is {1} (index {2}).", pkmn.ability2.name, pkmn.ability2_index)
|
||||
else
|
||||
msg = _INTL("No ability (index {1}).", pkmn.ability2_index)
|
||||
end
|
||||
cmd = screen.pbShowCommands(msg, commands, cmd)
|
||||
break if cmd < 0
|
||||
case cmd
|
||||
when 0 # Set possible ability
|
||||
abils = pkmn.getAbilityList
|
||||
ability_commands = []
|
||||
abil_cmd = 0
|
||||
for i in abils
|
||||
ability_commands.push(((i[1] < 2) ? "" : "(H) ") + GameData::Ability.get(i[0]).name)
|
||||
abil_cmd = ability_commands.length - 1 if pkmn.ability2_id == i[0]
|
||||
end
|
||||
abil_cmd = screen.pbShowCommands(_INTL("Choose an ability."), ability_commands, abil_cmd)
|
||||
next if abil_cmd < 0
|
||||
pkmn.ability2_index = abils[abil_cmd][1]
|
||||
pkmn.ability2 = nil
|
||||
screen.pbRefreshSingle(pkmnid)
|
||||
when 1 # Set any ability
|
||||
new_ability = pbChooseAbilityList(pkmn.ability2_id)
|
||||
if new_ability && new_ability != pkmn.ability2_id
|
||||
pkmn.ability2 = new_ability
|
||||
screen.pbRefreshSingle(pkmnid)
|
||||
end
|
||||
when 2 # Reset
|
||||
pkmn.ability2_index = nil
|
||||
pkmn.ability2 = nil
|
||||
screen.pbRefreshSingle(pkmnid)
|
||||
end
|
||||
end
|
||||
next false
|
||||
}
|
||||
})
|
||||
|
||||
PokemonDebugMenuCommands.register("setnature", {
|
||||
"parent" => "main",
|
||||
"name" => _INTL("Set nature"),
|
||||
|
||||
@@ -103,10 +103,10 @@ class FusionSelectOptionsScene < PokemonOption_Scene
|
||||
@selectedNature=@natureList[value]
|
||||
}, [getNatureDescription(@natureList[0]), getNatureDescription(@natureList[1])]
|
||||
)
|
||||
|
||||
return options
|
||||
end
|
||||
|
||||
|
||||
def isConfirmedOnKeyPress
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -23,6 +23,7 @@ SWITCH_GAME_DIFFICULTY_HARD = 666
|
||||
SWITCH_MODERN_MODE=974
|
||||
SWITCH_V5_1=825
|
||||
SWITCH_NO_LEVELS_MODE=774
|
||||
SWITCH_DOUBLE_ABILITIES=773
|
||||
|
||||
#Game progression switches
|
||||
SWITCH_DURING_INTRO = 917
|
||||
|
||||
255
Data/Scripts/050_AddOns/DoubleAbilities.rb
Normal file
255
Data/Scripts/050_AddOns/DoubleAbilities.rb
Normal file
@@ -0,0 +1,255 @@
|
||||
class PokeBattle_Battler
|
||||
attr_accessor :ability_id
|
||||
attr_accessor :ability2_id
|
||||
|
||||
#Primary ability utility methods for battlers class
|
||||
def ability
|
||||
return GameData::Ability.try_get(@ability_id)
|
||||
end
|
||||
|
||||
def ability=(value)
|
||||
new_ability = GameData::Ability.try_get(value)
|
||||
@ability_id = (new_ability) ? new_ability.id : nil
|
||||
end
|
||||
|
||||
def abilityName
|
||||
abil = self.ability
|
||||
return (abil) ? abil.name : ""
|
||||
end
|
||||
|
||||
#Secondary ability utility methods for battlers class
|
||||
def ability2
|
||||
return GameData::Ability.try_get(@ability2_id)
|
||||
end
|
||||
|
||||
def ability2=(value)
|
||||
new_ability = GameData::Ability.try_get(value)
|
||||
@ability2_id = (new_ability) ? new_ability.id : nil
|
||||
end
|
||||
|
||||
def ability2Name
|
||||
abil = self.ability2
|
||||
return (abil) ? abil.name : ""
|
||||
end
|
||||
|
||||
#Ability logic overrides
|
||||
|
||||
def hasActiveAbility?(check_ability, ignore_fainted = false)
|
||||
return hasActiveAbilityDouble?(check_ability, ignore_fainted) if $game_switches[SWITCH_DOUBLE_ABILITIES]
|
||||
return false if !abilityActive?(ignore_fainted)
|
||||
return check_ability.include?(@ability_id) if check_ability.is_a?(Array)
|
||||
return self.ability == check_ability
|
||||
end
|
||||
|
||||
def hasActiveAbilityDouble?(check_ability, ignore_fainted = false)
|
||||
return false if !abilityActive?(ignore_fainted)
|
||||
if check_ability.is_a?(Array)
|
||||
return check_ability.include?(@ability_id) || check_ability.include?(@ability2_id)
|
||||
end
|
||||
return self.ability == check_ability || self.ability2 == check_ability
|
||||
end
|
||||
|
||||
def triggerAbilityEffectsOnHit(move, user, target)
|
||||
# Target's ability
|
||||
if target.abilityActive?(true)
|
||||
oldHP = user.hp
|
||||
BattleHandlers.triggerTargetAbilityOnHit(target.ability, user, target, move, @battle)
|
||||
BattleHandlers.triggerTargetAbilityOnHit(target.ability2, user, target, move, @battle) if $game_switches[SWITCH_DOUBLE_ABILITIES] && target.ability2
|
||||
user.pbItemHPHealCheck if user.hp < oldHP
|
||||
end
|
||||
# User's ability
|
||||
if user.abilityActive?(true)
|
||||
BattleHandlers.triggerUserAbilityOnHit(user.ability, user, target, move, @battle)
|
||||
BattleHandlers.triggerUserAbilityOnHit(user.ability2, user, target, move, @battle) if $game_switches[SWITCH_DOUBLE_ABILITIES] && user.ability2
|
||||
user.pbItemHPHealCheck
|
||||
end
|
||||
end
|
||||
|
||||
def pbCheckDamageAbsorption(user, target)
|
||||
# Substitute will take the damage
|
||||
if target.effects[PBEffects::Substitute] > 0 && !ignoresSubstitute?(user) &&
|
||||
(!user || user.index != target.index)
|
||||
target.damageState.substitute = true
|
||||
return
|
||||
end
|
||||
# Disguise will take the damage
|
||||
if !@battle.moldBreaker && target.isFusionOf(:MIMIKYU) &&
|
||||
target.form == 0 && (target.ability == :DISGUISE || target.ability2 == :DISGUISE)
|
||||
target.damageState.disguise = true
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
# 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 $game_switches[SWITCH_DOUBLE_ABILITIES] && onSwitchIn
|
||||
displayOpponentDoubleAbilities()
|
||||
else
|
||||
if hasActiveAbility?(:TRACE)
|
||||
# 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 the old battle mechanics.
|
||||
choices = []
|
||||
@battle.eachOtherSideBattler(@index) do |b|
|
||||
next if b.ungainableAbility? ||
|
||||
[:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id)
|
||||
choices.push(b)
|
||||
end
|
||||
if choices.length > 0
|
||||
choice = choices[@battle.pbRandom(choices.length)]
|
||||
@battle.pbShowAbilitySplash(self)
|
||||
self.ability = choice.ability
|
||||
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
|
||||
@battle.pbHideAbilitySplash(self)
|
||||
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
|
||||
BattleHandlers.triggerAbilityOnSwitchIn(self.ability, self, @battle)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def displayOpponentDoubleAbilities()
|
||||
@battle.eachOtherSideBattler(@index) do |battler|
|
||||
@battle.pbShowPrimaryAbilitySplash(battler,true)
|
||||
@battle.pbShowSecondaryAbilitySplash(battler,true) if battler.isFusion?()
|
||||
@battle.pbHideAbilitySplash(battler)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
class Pokemon
|
||||
attr_writer :ability_index
|
||||
attr_writer :ability2_index
|
||||
|
||||
#Primary ability utility methods for pokemon class
|
||||
def ability_index
|
||||
@ability_index = (@personalID & 1) if !@ability_index
|
||||
return @ability_index
|
||||
end
|
||||
|
||||
def ability
|
||||
return GameData::Ability.try_get(ability_id())
|
||||
end
|
||||
|
||||
def ability=(value)
|
||||
return if value && !GameData::Ability.exists?(value)
|
||||
@ability = (value) ? GameData::Ability.get(value).id : value
|
||||
end
|
||||
|
||||
#Secondary ability utility methods for pokemon class
|
||||
def ability2_index
|
||||
@ability2_index = (@personalID & 1) if !@ability2_index
|
||||
return @ability2_index
|
||||
end
|
||||
|
||||
def ability2
|
||||
return GameData::Ability.try_get(ability2_id())
|
||||
end
|
||||
|
||||
def ability2=(value)
|
||||
return if value && !GameData::Ability.exists?(value)
|
||||
@ability2 = (value) ? GameData::Ability.get(value).id : value
|
||||
end
|
||||
|
||||
|
||||
def ability_id
|
||||
if !@ability
|
||||
sp_data = species_data
|
||||
abil_index = ability_index
|
||||
if abil_index >= 2 # Hidden ability
|
||||
@ability = sp_data.hidden_abilities[abil_index - 2]
|
||||
abil_index = (@personalID & 1) if !@ability
|
||||
end
|
||||
if !@ability # Natural ability or no hidden ability defined
|
||||
if $game_switches[SWITCH_NO_LEVELS_MODE]
|
||||
@ability = sp_data.abilities[0] || sp_data.abilities[0]
|
||||
@ability2 = sp_data.abilities[1] || sp_data.abilities[0]
|
||||
else
|
||||
@ability = sp_data.abilities[abil_index] || sp_data.abilities[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
return @ability
|
||||
end
|
||||
|
||||
def ability2_id
|
||||
if !@ability2
|
||||
sp_data = species_data
|
||||
abil_index = ability_index
|
||||
if abil_index >= 2 # Hidden ability
|
||||
@ability2 = sp_data.hidden_abilities[abil_index - 2]
|
||||
abil_index = (@personalID & 1) if !@ability2
|
||||
end
|
||||
if !@ability2 # Natural ability or no hidden ability defined
|
||||
@ability2 = sp_data.abilities[abil_index] || sp_data.abilities[0]
|
||||
end
|
||||
end
|
||||
return @ability2
|
||||
end
|
||||
|
||||
def adjustHPForWonderGuard(stats)
|
||||
return self.ability == :WONDERGUARD ? 1 : stats[:HP] || ($game_switches[SWITCH_DOUBLE_ABILITIES] && self.ability2 == :WONDERGUARD)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
class PokemonFusionScene
|
||||
|
||||
def pbChooseAbility(poke, hidden1 = false, hidden2 = false)
|
||||
abilityList = poke.getAbilityList
|
||||
|
||||
if $game_switches[SWITCH_DOUBLE_ABILITIES]
|
||||
abID1 = @pokemon1.ability
|
||||
abID2 = @pokemon2.ability
|
||||
else
|
||||
abID1 = hidden1 ? abilityList[4][0] : abilityList[0][0]
|
||||
abID2 = hidden2 ? abilityList[5][0] : abilityList[1][0]
|
||||
end
|
||||
availableNatures = []
|
||||
availableNatures << @pokemon1.nature
|
||||
availableNatures << @pokemon2.nature
|
||||
|
||||
setAbilityAndNatureAndNickname([GameData::Ability.get(abID1), GameData::Ability.get(abID2)], availableNatures)
|
||||
end
|
||||
|
||||
def setAbilityAndNatureAndNickname(abilitiesList, naturesList)
|
||||
clearUIForMoves
|
||||
if $game_switches[SWITCH_DOUBLE_ABILITIES]
|
||||
scene = FusionSelectOptionsScene.new(nil, naturesList, @pokemon1, @pokemon2)
|
||||
screen = PokemonOptionScreen.new(scene)
|
||||
screen.pbStartScreen
|
||||
|
||||
@pokemon1.ability = abilitiesList[0]
|
||||
@pokemon1.ability2 = abilitiesList[1]
|
||||
else
|
||||
scene = FusionSelectOptionsScene.new(abilitiesList, naturesList, @pokemon1, @pokemon2)
|
||||
screen = PokemonOptionScreen.new(scene)
|
||||
screen.pbStartScreen
|
||||
@pokemon1.ability = scene.selectedAbility
|
||||
end
|
||||
|
||||
@pokemon1.nature = scene.selectedNature
|
||||
if scene.hasNickname
|
||||
@pokemon1.name = scene.nickname
|
||||
end
|
||||
|
||||
p @pokemon1.ability.real_name
|
||||
p @pokemon1.ability2.real_name
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
389
Data/Scripts/050_AddOns/DoubleAbilitiesHandlersOverrides.rb
Normal file
389
Data/Scripts/050_AddOns/DoubleAbilitiesHandlersOverrides.rb
Normal file
@@ -0,0 +1,389 @@
|
||||
|
||||
module BattleHandlers
|
||||
#
|
||||
# Speed calculation
|
||||
#
|
||||
|
||||
def self.triggerSpeedCalcAbility(ability, battler, mult)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
calculateAbilitySpeedMultiplier(ability1, battler, mult)
|
||||
if $game_switches[SWITCH_DOUBLE_ABILITIES]
|
||||
calculateAbilitySpeedMultiplier(ability2, battler, mult)
|
||||
end
|
||||
return mult
|
||||
end
|
||||
|
||||
def self.calculateAbilitySpeedMultiplier(ability, battler, mult)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = SpeedCalcAbility.trigger(ability1, battler, mult) || SpeedCalcAbility.trigger(ability2, battler, mult)
|
||||
return (ret != nil) ? ret : mult
|
||||
end
|
||||
|
||||
def self.triggerWeightCalcAbility(ability,battler,w)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = WeightCalcAbility.trigger(ability1,battler,w) || WeightCalcAbility.trigger(ability2,battler,w)
|
||||
return (ret!=nil) ? ret : w
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
def self.triggerEOREffectAbility(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
|
||||
EOREffectAbility.trigger(ability1,battler,battle)
|
||||
EOREffectAbility.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
def self.triggerEORGainItemAbility(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
|
||||
EORGainItemAbility.trigger(ability1,battler,battle)
|
||||
EORGainItemAbility.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
def self.triggerCertainSwitchingUserAbility(ability,switcher,battle)
|
||||
ability1 = ability
|
||||
ability2 = switcher.ability2
|
||||
|
||||
ret = CertainSwitchingUserAbility.trigger(ability1,switcher,battle) || CertainSwitchingUserAbility.trigger(ability2,switcher,battle)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerCertainSwitchingUserAbility(ability,switcher,battle)
|
||||
ability1 = ability
|
||||
ability2 = switcher.ability2
|
||||
|
||||
ret = CertainSwitchingUserAbility.trigger(ability1,switcher,battle) || CertainSwitchingUserAbility.trigger(ability2,switcher,battle)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerTrappingTargetAbility(ability,switcher,bearer,battle)
|
||||
ability1 = ability
|
||||
ability2 = switcher.ability2
|
||||
ret = TrappingTargetAbility.trigger(ability1,switcher,bearer,battle) || TrappingTargetAbility.trigger(ability2,switcher,bearer,battle)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerAbilityOnSwitchIn(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityOnSwitchIn.trigger(ability1,battler,battle)
|
||||
AbilityOnSwitchIn.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
def self.triggerAbilityOnSwitchOut(ability,battler,endOfBattle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityOnSwitchOut.trigger(ability1,battler,endOfBattle)
|
||||
AbilityOnSwitchOut.trigger(ability2,battler,endOfBattle)
|
||||
end
|
||||
|
||||
def self.triggerAbilityChangeOnBattlerFainting(ability,battler,fainted,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityChangeOnBattlerFainting.trigger(ability1,battler,fainted,battle)
|
||||
AbilityChangeOnBattlerFainting.trigger(ability2,battler,fainted,battle)
|
||||
|
||||
end
|
||||
|
||||
def self.triggerAbilityOnBattlerFainting(ability,battler,fainted,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityOnBattlerFainting.trigger(ability1,battler,fainted,battle)
|
||||
AbilityOnBattlerFainting.trigger(ability2,battler,fainted,battle)
|
||||
end
|
||||
|
||||
|
||||
def self.triggerRunFromBattleAbility(ability,battler)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = RunFromBattleAbility.trigger(ability1,battler) || RunFromBattleAbility.trigger(ability2,battler)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
########
|
||||
# FROM HERE
|
||||
#
|
||||
|
||||
def self.triggerAbilityOnHPDroppedBelowHalf(ability,user,battle)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
ret = AbilityOnHPDroppedBelowHalf.trigger(ability1,user,battle) || AbilityOnHPDroppedBelowHalf.trigger(ability2,user,battle)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerStatusCheckAbilityNonIgnorable(ability,battler,status)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatusCheckAbilityNonIgnorable.trigger(ability1,battler,status) || StatusCheckAbilityNonIgnorable.trigger(ability2,battler,status)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerStatusImmunityAbility(ability,battler,status)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatusImmunityAbility.trigger(ability1,battler,status) || StatusImmunityAbility.trigger(ability2,battler,status)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerStatusImmunityAbilityNonIgnorable(ability,battler,status)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatusImmunityAbilityNonIgnorable.trigger(ability1,battler,status) || StatusImmunityAbilityNonIgnorable.trigger(ability2,battler,status)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerStatusImmunityAllyAbility(ability,battler,status)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatusImmunityAllyAbility.trigger(ability1,battler,status) || StatusImmunityAllyAbility.trigger(ability2,battler,status)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerAbilityOnStatusInflicted(ability,battler,user,status)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityOnStatusInflicted.trigger(ability1,battler,user,status)
|
||||
AbilityOnStatusInflicted.trigger(ability2,battler,user,status)
|
||||
end
|
||||
|
||||
def self.triggerStatusCureAbility(ability,battler)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatusCureAbility.trigger(ability1,battler) || StatusCureAbility.trigger(ability2,battler)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
|
||||
def self.triggerStatLossImmunityAbility(ability,battler,stat,battle,showMessages)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatLossImmunityAbility.trigger(ability1,battler,stat,battle,showMessages) || StatLossImmunityAbility.trigger(ability2,battler,stat,battle,showMessages)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerStatLossImmunityAbilityNonIgnorable(ability,battler,stat,battle,showMessages)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatLossImmunityAbilityNonIgnorable.trigger(ability1,battler,stat,battle,showMessages) || StatLossImmunityAbilityNonIgnorable.trigger(ability2,battler,stat,battle,showMessages)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerStatLossImmunityAllyAbility(ability,bearer,battler,stat,battle,showMessages)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = StatLossImmunityAllyAbility.trigger(ability1,bearer,battler,stat,battle,showMessages) || StatLossImmunityAllyAbility.trigger(ability2,bearer,battler,stat,battle,showMessages)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerAbilityOnStatGain(ability,battler,stat,user)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityOnStatGain.trigger(ability1,battler,stat,user)
|
||||
AbilityOnStatGain.trigger(ability2,battler,stat,user)
|
||||
end
|
||||
|
||||
def self.triggerAbilityOnStatLoss(ability,battler,stat,user)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityOnStatLoss.trigger(ability1,battler,stat,user)
|
||||
AbilityOnStatLoss.trigger(ability2,battler,stat,user)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
|
||||
def self.triggerPriorityChangeAbility(ability,battler,move,pri)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = PriorityChangeAbility.trigger(ability1,battler,move,pri) || PriorityChangeAbility.trigger(ability2,battler,move,pri)
|
||||
return (ret!=nil) ? ret : pri
|
||||
end
|
||||
|
||||
def self.triggerPriorityBracketChangeAbility(ability,battler,subPri,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
ret = PriorityBracketChangeAbility.trigger(ability1,battler,subPri,battle) || PriorityBracketChangeAbility.trigger(ability2,battler,subPri,battle)
|
||||
return (ret!=nil) ? ret : subPri
|
||||
end
|
||||
|
||||
def self.triggerPriorityBracketUseAbility(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
PriorityBracketUseAbility.trigger(ability1,battler,battle)
|
||||
PriorityBracketUseAbility.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerAbilityOnFlinch(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
AbilityOnFlinch.trigger(ability1,battler,battle)
|
||||
AbilityOnFlinch.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
def self.triggerMoveBlockingAbility(ability,bearer,user,targets,move,battle)
|
||||
ability1 = ability
|
||||
ability2 = bearer.ability2
|
||||
ret = MoveBlockingAbility.trigger(ability1,bearer,user,targets,move,battle) || MoveBlockingAbility.trigger(ability2,bearer,user,targets,move,battle)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
def self.triggerMoveImmunityTargetAbility(ability,user,target,move,type,battle)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
ret = MoveImmunityTargetAbility.trigger(ability1,user,target,move,type,battle) || MoveImmunityTargetAbility.trigger(ability2,user,target,move,type,battle)
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerMoveBaseTypeModifierAbility(ability,user,move,type)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
ret = MoveBaseTypeModifierAbility.trigger(ability1,user,move,type) || MoveBaseTypeModifierAbility.trigger(ability2,user,move,type)
|
||||
return (ret!=nil) ? ret : type
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerAccuracyCalcUserAbility(ability,mods,user,target,move,type)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
AccuracyCalcUserAbility.trigger(ability1,mods,user,target,move,type)
|
||||
AccuracyCalcUserAbility.trigger(ability2,mods,user,target,move,type)
|
||||
end
|
||||
|
||||
def self.triggerAccuracyCalcUserAllyAbility(ability,mods,user,target,move,type)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
AccuracyCalcUserAllyAbility.trigger(ability1,mods,user,target,move,type)
|
||||
AccuracyCalcUserAllyAbility.trigger(ability2,mods,user,target,move,type)
|
||||
end
|
||||
|
||||
def self.triggerAccuracyCalcTargetAbility(ability,mods,user,target,move,type)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
AccuracyCalcTargetAbility.trigger(ability1,mods,user,target,move,type)
|
||||
AccuracyCalcTargetAbility.trigger(ability2,mods,user,target,move,type)
|
||||
end
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerDamageCalcUserAbility(ability,user,target,move,mults,baseDmg,type)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
DamageCalcUserAbility.trigger(ability1,user,target,move,mults,baseDmg,type)
|
||||
DamageCalcUserAbility.trigger(ability2,user,target,move,mults,baseDmg,type)
|
||||
end
|
||||
|
||||
def self.triggerDamageCalcUserAllyAbility(ability,user,target,move,mults,baseDmg,type)
|
||||
ability1 = ability
|
||||
ability2 = target.ability2
|
||||
DamageCalcUserAllyAbility.trigger(ability1,user,target,move,mults,baseDmg,type)
|
||||
DamageCalcUserAllyAbility.trigger(ability2,user,target,move,mults,baseDmg,type)
|
||||
end
|
||||
|
||||
def self.triggerDamageCalcTargetAbility(ability,user,target,move,mults,baseDmg,type)
|
||||
ability1 = ability
|
||||
ability2 = target.ability2
|
||||
DamageCalcTargetAbility.trigger(ability1,user,target,move,mults,baseDmg,type)
|
||||
DamageCalcTargetAbility.trigger(ability2,user,target,move,mults,baseDmg,type)
|
||||
end
|
||||
|
||||
def self.triggerDamageCalcTargetAbilityNonIgnorable(ability,user,target,move,mults,baseDmg,type)
|
||||
ability1 = ability
|
||||
ability2 = target.ability2
|
||||
DamageCalcTargetAbilityNonIgnorable.trigger(ability1,user,target,move,mults,baseDmg,type)
|
||||
DamageCalcTargetAbilityNonIgnorable.trigger(ability2,user,target,move,mults,baseDmg,type)
|
||||
end
|
||||
|
||||
def self.triggerDamageCalcTargetAllyAbility(ability,user,target,move,mults,baseDmg,type)
|
||||
ability1 = ability
|
||||
ability2 = target.ability2
|
||||
DamageCalcTargetAllyAbility.trigger(ability1,user,target,move,mults,baseDmg,type)
|
||||
DamageCalcTargetAllyAbility.trigger(ability2,user,target,move,mults,baseDmg,type)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerCriticalCalcUserAbility(ability,user,target,c)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
ret = CriticalCalcUserAbility.trigger(ability1,user,target,c) || CriticalCalcUserAbility.trigger(ability2,user,target,c)
|
||||
return (ret!=nil) ? ret : c
|
||||
end
|
||||
|
||||
def self.triggerCriticalCalcTargetAbility(ability,user,target,c)
|
||||
ability1 = ability
|
||||
ability2 = target.ability2
|
||||
ret = CriticalCalcTargetAbility.trigger(ability1,user,target,c) || CriticalCalcTargetAbility.trigger(ability2,user,target,c)
|
||||
return (ret!=nil) ? ret : c
|
||||
end
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerTargetAbilityOnHit(ability,user,target,move,battle)
|
||||
ability1 = ability
|
||||
ability2 = target.ability2
|
||||
TargetAbilityOnHit.trigger(ability1,user,target,move,battle)
|
||||
TargetAbilityOnHit.trigger(ability2,user,target,move,battle)
|
||||
end
|
||||
|
||||
def self.triggerUserAbilityOnHit(ability,user,target,move,battle)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
UserAbilityOnHit.trigger(ability1,user,target,move,battle)
|
||||
UserAbilityOnHit.trigger(ability2,user,target,move,battle)
|
||||
end
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerUserAbilityEndOfMove(ability,user,targets,move,battle)
|
||||
ability1 = ability
|
||||
ability2 = user.ability2
|
||||
UserAbilityEndOfMove.trigger(ability1,user,targets,move,battle)
|
||||
UserAbilityEndOfMove.trigger(ability2,user,targets,move,battle)
|
||||
end
|
||||
|
||||
def self.triggerTargetAbilityAfterMoveUse(ability,target,user,move,switched,battle)
|
||||
ability1 = ability
|
||||
ability2 = target.ability2
|
||||
TargetAbilityAfterMoveUse.trigger(ability1,target,user,move,switched,battle)
|
||||
TargetAbilityAfterMoveUse.trigger(ability2,target,user,move,switched,battle)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
def self.triggerEORWeatherAbility(ability,weather,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
EORWeatherAbility.trigger(ability1,weather,battler,battle)
|
||||
EORWeatherAbility.trigger(ability2,weather,battler,battle)
|
||||
end
|
||||
|
||||
def self.triggerEORHealingAbility(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
EORHealingAbility.trigger(ability1,battler,battle)
|
||||
EORHealingAbility.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
def self.triggerEOREffectAbility(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
EOREffectAbility.trigger(ability1,battler,battle)
|
||||
EOREffectAbility.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
def self.triggerEORGainItemAbility(ability,battler,battle)
|
||||
ability1 = ability
|
||||
ability2 = battler.ability2
|
||||
EORGainItemAbility.trigger(ability1,battler,battle)
|
||||
EORGainItemAbility.trigger(ability2,battler,battle)
|
||||
end
|
||||
|
||||
end
|
||||
130
Data/Scripts/050_AddOns/DoubleAbilities_UI.rb
Normal file
130
Data/Scripts/050_AddOns/DoubleAbilities_UI.rb
Normal file
@@ -0,0 +1,130 @@
|
||||
#
|
||||
# class AbilitySplashBar < SpriteWrapper
|
||||
# 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,-4,@side==1,
|
||||
# TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true])
|
||||
# # Draw Pokémon's ability
|
||||
# textPos.push([@battler.abilityName,textX,26,@side==1,
|
||||
# TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true])
|
||||
# pbDrawTextPositions(self.bitmap,textPos)
|
||||
#
|
||||
# #2nd ability
|
||||
# if $game_switches[SWITCH_DOUBLE_ABILITIES]
|
||||
# textPos.push([@battler.ability2Name,textX,26,@side==1,
|
||||
# TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true])
|
||||
# pbDrawTextPositions(self.bitmap,textPos)
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
class AbilitySplashDisappearAnimation < PokeBattle_Animation
|
||||
def initialize(sprites,viewport,side)
|
||||
@side = side
|
||||
super(sprites,viewport)
|
||||
end
|
||||
|
||||
def createProcesses
|
||||
return if !@sprites["abilityBar_#{@side}"]
|
||||
bar = addSprite(@sprites["abilityBar_#{@side}"])
|
||||
bar2 = addSprite(@sprites["ability2Bar_#{@side}"]) if @sprites["ability2Bar_#{@side}"]
|
||||
|
||||
dir = (@side==0) ? -1 : 1
|
||||
bar.moveDelta(0,8,dir*Graphics.width/2,0)
|
||||
bar2.moveDelta(0,8,dir*Graphics.width/2,0) if bar2
|
||||
|
||||
bar.setVisible(8,false)
|
||||
bar2.setVisible(8,false) if bar2
|
||||
end
|
||||
end
|
||||
|
||||
class PokeBattle_Scene
|
||||
def pbShowAbilitySplash(battler,secondAbility=false, abilityName=nil)
|
||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
side = battler.index%2
|
||||
if secondAbility
|
||||
pbHideAbilitySplash(battler) if @sprites["ability2Bar_#{side}"].visible
|
||||
else
|
||||
pbHideAbilitySplash(battler) if @sprites["abilityBar_#{side}"].visible
|
||||
end
|
||||
if abilityName
|
||||
@sprites["abilityBar_#{side}"].ability_name = abilityName if !secondAbility
|
||||
@sprites["ability2Bar_#{side}"].ability_name = abilityName if secondAbility
|
||||
end
|
||||
|
||||
|
||||
@sprites["abilityBar_#{side}"].battler = battler
|
||||
@sprites["ability2Bar_#{side}"].battler = battler if @sprites["ability2Bar_#{side}"]
|
||||
|
||||
abilitySplashAnim = AbilitySplashAppearAnimation.new(@sprites,@viewport,side,secondAbility)
|
||||
loop do
|
||||
abilitySplashAnim.update
|
||||
pbUpdate
|
||||
break if abilitySplashAnim.animDone?
|
||||
end
|
||||
abilitySplashAnim.dispose
|
||||
end
|
||||
end
|
||||
|
||||
class PokeBattle_Battle
|
||||
|
||||
def pbShowSecondaryAbilitySplash(battler,delay=false,logTrigger=true)
|
||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
@scene.pbShowAbilitySplash(battler,true)
|
||||
if delay
|
||||
Graphics.frame_rate.times { @scene.pbUpdate } # 1 second
|
||||
end
|
||||
end
|
||||
|
||||
def pbShowPrimaryAbilitySplash(battler,delay=false,logTrigger=true)
|
||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
@scene.pbShowAbilitySplash(battler,false)
|
||||
if delay
|
||||
Graphics.frame_rate.times { @scene.pbUpdate } # 1 second
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
class FusionSelectOptionsScene < PokemonOption_Scene
|
||||
def pbGetOptions(inloadscreen = false)
|
||||
|
||||
options = []
|
||||
if shouldSelectNickname
|
||||
options << EnumOption.new(_INTL("Nickname"), [_INTL(@pokemon1.name), _INTL(@pokemon2.name)],
|
||||
proc { 0 },
|
||||
proc { |value|
|
||||
if value ==0
|
||||
@nickname = @pokemon1.name
|
||||
else
|
||||
@nickname = @pokemon2.name
|
||||
end
|
||||
}, "Select the Pokémon's nickname")
|
||||
end
|
||||
|
||||
if @abilityList != nil
|
||||
options << EnumOption.new(_INTL("Ability"), [_INTL(getAbilityName(@abilityList[0])), _INTL(getAbilityName(@abilityList[1]))],
|
||||
proc { 0 },
|
||||
proc { |value|
|
||||
@selectedAbility=@abilityList[value]
|
||||
}, [getAbilityDescription(@abilityList[0]), getAbilityDescription(@abilityList[1])]
|
||||
)
|
||||
end
|
||||
|
||||
options << EnumOption.new(_INTL("Nature"), [_INTL(getNatureName(@natureList[0])), _INTL(getNatureName(@natureList[1]))],
|
||||
proc { 0 },
|
||||
proc { |value|
|
||||
@selectedNature=@natureList[value]
|
||||
}, [getNatureDescription(@natureList[0]), getNatureDescription(@natureList[1])]
|
||||
)
|
||||
return options
|
||||
end
|
||||
end
|
||||
|
||||
@@ -36,7 +36,16 @@ class ExperimentalOptionsScene < PokemonOption_Scene
|
||||
proc { |value|
|
||||
$game_switches[SWITCH_NO_LEVELS_MODE] = value == 0
|
||||
}, "All Pokémon use their base stats, regardless of levels."
|
||||
)
|
||||
),
|
||||
EnumOption.new(_INTL("Double abilities"), [_INTL("On"), _INTL("Off")],
|
||||
proc {
|
||||
$game_switches[SWITCH_DOUBLE_ABILITIES] ? 0 : 1
|
||||
},
|
||||
proc { |value|
|
||||
$game_switches[SWITCH_DOUBLE_ABILITIES] = value == 0
|
||||
}, "Fused Pokémon have two abilities at the same time"
|
||||
)
|
||||
|
||||
]
|
||||
return options
|
||||
end
|
||||
|
||||
@@ -1517,6 +1517,11 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
|
||||
pokemon.ability_index = pokemon.body_original_ability_index if pokemon.body_original_ability_index
|
||||
poke2.ability_index = pokemon.head_original_ability_index if pokemon.head_original_ability_index
|
||||
|
||||
pokemon.ability2_index=nil
|
||||
pokemon.ability2=nil
|
||||
poke2.ability2_index=nil
|
||||
poke2.ability2=nil
|
||||
|
||||
pokemon.debug_shiny = true if pokemon.debug_shiny && pokemon.body_shiny
|
||||
poke2.debug_shiny = true if pokemon.debug_shiny && poke2.head_shiny
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
EXPORT_EXCEPT_MAP_IDS= [768,722,723,724,720]
|
||||
|
||||
def exportAllMaps
|
||||
for id in 768..784
|
||||
for id in 1..798
|
||||
begin
|
||||
MapExporter.export(id, [:Events]) if !EXPORT_EXCEPT_MAP_IDS.include?(id)
|
||||
rescue
|
||||
|
||||
Reference in New Issue
Block a user