mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Renamed all battle-related classes and modules
This commit is contained in:
@@ -171,3 +171,8 @@ end
|
|||||||
def nil_or_empty?(string)
|
def nil_or_empty?(string)
|
||||||
return string.nil? || !string.is_a?(String) || string.size == 0
|
return string.nil? || !string.is_a?(String) || string.size == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
# This is only here to make the battle classes easier to define later.
|
||||||
|
#===============================================================================
|
||||||
|
class Battle; end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module PokeBattle_BattleCommon
|
module Battle::Common
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Store caught Pokémon
|
# Store caught Pokémon
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
# to edit some code. Mainly this is to change/add coordinates for the
|
# to edit some code. Mainly this is to change/add coordinates for the
|
||||||
# sprites, describe the relationships between Pokémon and trainers, and to
|
# sprites, describe the relationships between Pokémon and trainers, and to
|
||||||
# change messages. The methods that will need editing are as follows:
|
# change messages. The methods that will need editing are as follows:
|
||||||
# class PokeBattle_Battle
|
# class Battle
|
||||||
# def setBattleMode
|
# def setBattleMode
|
||||||
# def pbGetOwnerIndexFromBattlerIndex
|
# def pbGetOwnerIndexFromBattlerIndex
|
||||||
# def pbGetOpposingIndicesInOrder
|
# def pbGetOpposingIndicesInOrder
|
||||||
@@ -26,18 +26,18 @@
|
|||||||
# def pbEORShiftDistantBattlers
|
# def pbEORShiftDistantBattlers
|
||||||
# def pbCanShift?
|
# def pbCanShift?
|
||||||
# def pbEndOfRoundPhase
|
# def pbEndOfRoundPhase
|
||||||
# class TargetMenuDisplay
|
# class Battle::Scene::TargetMenu
|
||||||
# def initialize
|
# def initialize
|
||||||
# class PokemonDataBox
|
# class Battle::Scene::PokemonDataBox
|
||||||
# def initializeDataBoxGraphic
|
# def initializeDataBoxGraphic
|
||||||
# module PokeBattle_SceneConstants
|
# class Battle::Scene
|
||||||
# def self.pbBattlerPosition
|
# def self.pbBattlerPosition
|
||||||
# def self.pbTrainerPosition
|
# def self.pbTrainerPosition
|
||||||
# class Game_Temp
|
# class Game_Temp
|
||||||
# def add_battle_rule
|
# def add_battle_rule
|
||||||
# (There is no guarantee that this list is complete.)
|
# (There is no guarantee that this list is complete.)
|
||||||
|
|
||||||
class PokeBattle_Battle
|
class Battle
|
||||||
attr_reader :scene # Scene object for this battle
|
attr_reader :scene # Scene object for this battle
|
||||||
attr_reader :peer
|
attr_reader :peer
|
||||||
attr_reader :field # Effects common to the whole of a battle
|
attr_reader :field # Effects common to the whole of a battle
|
||||||
@@ -87,7 +87,7 @@ class PokeBattle_Battle
|
|||||||
attr_accessor :moldBreaker # True if Mold Breaker applies
|
attr_accessor :moldBreaker # True if Mold Breaker applies
|
||||||
attr_reader :struggle # The Struggle move
|
attr_reader :struggle # The Struggle move
|
||||||
|
|
||||||
include PokeBattle_BattleCommon
|
include Battle::Common
|
||||||
|
|
||||||
def pbRandom(x); return rand(x); end
|
def pbRandom(x); return rand(x); end
|
||||||
|
|
||||||
@@ -101,11 +101,11 @@ class PokeBattle_Battle
|
|||||||
raise ArgumentError.new(_INTL("Party 2 has no Pokémon."))
|
raise ArgumentError.new(_INTL("Party 2 has no Pokémon."))
|
||||||
end
|
end
|
||||||
@scene = scene
|
@scene = scene
|
||||||
@peer = PokeBattle_BattlePeer.create
|
@peer = Peer.new
|
||||||
@battleAI = PokeBattle_AI.new(self)
|
@battleAI = AI.new(self)
|
||||||
@field = PokeBattle_ActiveField.new # Whole field (gravity/rooms)
|
@field = ActiveField.new # Whole field (gravity/rooms)
|
||||||
@sides = [PokeBattle_ActiveSide.new, # Player's side
|
@sides = [ActiveSide.new, # Player's side
|
||||||
PokeBattle_ActiveSide.new] # Foe's side
|
ActiveSide.new] # Foe's side
|
||||||
@positions = [] # Battler positions
|
@positions = [] # Battler positions
|
||||||
@battlers = []
|
@battlers = []
|
||||||
@sideSizes = [1,1] # Single battle, 1v1
|
@sideSizes = [1,1] # Single battle, 1v1
|
||||||
@@ -165,9 +165,9 @@ class PokeBattle_Battle
|
|||||||
@runCommand = 0
|
@runCommand = 0
|
||||||
@nextPickupUse = 0
|
@nextPickupUse = 0
|
||||||
if GameData::Move.exists?(:STRUGGLE)
|
if GameData::Move.exists?(:STRUGGLE)
|
||||||
@struggle = PokeBattle_Move.from_pokemon_move(self, Pokemon::Move.new(:STRUGGLE))
|
@struggle = Move.from_pokemon_move(self, Pokemon::Move.new(:STRUGGLE))
|
||||||
else
|
else
|
||||||
@struggle = PokeBattle_Struggle.new(self, nil)
|
@struggle = Move::Struggle.new(self, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -651,7 +651,7 @@ class PokeBattle_Battle
|
|||||||
|
|
||||||
def pbSetSeen(battler)
|
def pbSetSeen(battler)
|
||||||
return if !battler || !@internalBattle
|
return if !battler || !@internalBattle
|
||||||
if battler.is_a?(PokeBattle_Battler)
|
if battler.is_a?(Battler)
|
||||||
pbPlayer.pokedex.register(battler.displaySpecies, battler.displayGender,
|
pbPlayer.pokedex.register(battler.displaySpecies, battler.displayGender,
|
||||||
battler.displayForm, battler.shiny?)
|
battler.displayForm, battler.shiny?)
|
||||||
else
|
else
|
||||||
@@ -661,7 +661,7 @@ class PokeBattle_Battle
|
|||||||
|
|
||||||
def pbSetCaught(battler)
|
def pbSetCaught(battler)
|
||||||
return if !battler || !@internalBattle
|
return if !battler || !@internalBattle
|
||||||
if battler.is_a?(PokeBattle_Battler)
|
if battler.is_a?(Battler)
|
||||||
pbPlayer.pokedex.register_caught(battler.displaySpecies)
|
pbPlayer.pokedex.register_caught(battler.displaySpecies)
|
||||||
else
|
else
|
||||||
pbPlayer.pokedex.register_caught(battler.species)
|
pbPlayer.pokedex.register_caught(battler.species)
|
||||||
@@ -670,7 +670,7 @@ class PokeBattle_Battle
|
|||||||
|
|
||||||
def pbSetDefeated(battler)
|
def pbSetDefeated(battler)
|
||||||
return if !battler || !@internalBattle
|
return if !battler || !@internalBattle
|
||||||
if battler.is_a?(PokeBattle_Battler)
|
if battler.is_a?(Battler)
|
||||||
pbPlayer.pokedex.register_defeated(battler.displaySpecies)
|
pbPlayer.pokedex.register_defeated(battler.displaySpecies)
|
||||||
else
|
else
|
||||||
pbPlayer.pokedex.register_defeated(battler.species)
|
pbPlayer.pokedex.register_defeated(battler.species)
|
||||||
@@ -819,7 +819,7 @@ class PokeBattle_Battle
|
|||||||
|
|
||||||
def pbShowAbilitySplash(battler,delay=false,logTrigger=true)
|
def pbShowAbilitySplash(battler,delay=false,logTrigger=true)
|
||||||
PBDebug.log("[Ability triggered] #{battler.pbThis}'s #{battler.abilityName}") if logTrigger
|
PBDebug.log("[Ability triggered] #{battler.pbThis}'s #{battler.abilityName}") if logTrigger
|
||||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
return if !Scene::USE_ABILITY_SPLASH
|
||||||
@scene.pbShowAbilitySplash(battler)
|
@scene.pbShowAbilitySplash(battler)
|
||||||
if delay
|
if delay
|
||||||
Graphics.frame_rate.times { @scene.pbUpdate } # 1 second
|
Graphics.frame_rate.times { @scene.pbUpdate } # 1 second
|
||||||
@@ -827,12 +827,12 @@ class PokeBattle_Battle
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbHideAbilitySplash(battler)
|
def pbHideAbilitySplash(battler)
|
||||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
return if !Scene::USE_ABILITY_SPLASH
|
||||||
@scene.pbHideAbilitySplash(battler)
|
@scene.pbHideAbilitySplash(battler)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbReplaceAbilitySplash(battler)
|
def pbReplaceAbilitySplash(battler)
|
||||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
return if !Scene::USE_ABILITY_SPLASH
|
||||||
@scene.pbReplaceAbilitySplash(battler)
|
@scene.pbReplaceAbilitySplash(battler)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
class BattleAbortedException < Exception; end
|
class BattleAbortedException < Exception; end
|
||||||
|
|
||||||
def pbAbort
|
def pbAbort
|
||||||
@@ -106,10 +106,10 @@ class PokeBattle_Battle
|
|||||||
if !@battlers[idxBattler].nil?
|
if !@battlers[idxBattler].nil?
|
||||||
raise _INTL("Battler index {1} already exists",idxBattler)
|
raise _INTL("Battler index {1} already exists",idxBattler)
|
||||||
end
|
end
|
||||||
@battlers[idxBattler] = PokeBattle_Battler.new(self,idxBattler)
|
@battlers[idxBattler] = Battler.new(self,idxBattler)
|
||||||
@positions[idxBattler] = PokeBattle_ActivePosition.new
|
@positions[idxBattler] = ActivePosition.new
|
||||||
pbClearChoice(idxBattler)
|
pbClearChoice(idxBattler)
|
||||||
@successStates[idxBattler] = PokeBattle_SuccessState.new
|
@successStates[idxBattler] = SuccessState.new
|
||||||
@battlers[idxBattler].pbInitialize(pkmn,idxParty)
|
@battlers[idxBattler].pbInitialize(pkmn,idxParty)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Gaining Experience
|
# Gaining Experience
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -240,7 +240,7 @@ class PokeBattle_Battle
|
|||||||
pkmn.learn_move(newMove)
|
pkmn.learn_move(newMove)
|
||||||
pbDisplay(_INTL("{1} learned {2}!",pkmnName,moveName)) { pbSEPlay("Pkmn move learnt") }
|
pbDisplay(_INTL("{1} learned {2}!",pkmnName,moveName)) { pbSEPlay("Pkmn move learnt") }
|
||||||
if battler
|
if battler
|
||||||
battler.moves.push(PokeBattle_Move.from_pokemon_move(self, pkmn.moves.last))
|
battler.moves.push(Move.from_pokemon_move(self, pkmn.moves.last))
|
||||||
battler.pbCheckFormOnMovesetChange
|
battler.pbCheckFormOnMovesetChange
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
@@ -254,7 +254,7 @@ class PokeBattle_Battle
|
|||||||
if forgetMove>=0
|
if forgetMove>=0
|
||||||
oldMoveName = pkmn.moves[forgetMove].name
|
oldMoveName = pkmn.moves[forgetMove].name
|
||||||
pkmn.moves[forgetMove] = Pokemon::Move.new(newMove) # Replaces current/total PP
|
pkmn.moves[forgetMove] = Pokemon::Move.new(newMove) # Replaces current/total PP
|
||||||
battler.moves[forgetMove] = PokeBattle_Move.from_pokemon_move(self, pkmn.moves[forgetMove]) if battler
|
battler.moves[forgetMove] = Move.from_pokemon_move(self, pkmn.moves[forgetMove]) if battler
|
||||||
pbDisplayPaused(_INTL("1, 2, and... ... ... Ta-da!")) { pbSEPlay("Battle ball drop") }
|
pbDisplayPaused(_INTL("1, 2, and... ... ... Ta-da!")) { pbSEPlay("Battle ball drop") }
|
||||||
pbDisplayPaused(_INTL("{1} forgot how to use {2}. And...",pkmnName,oldMoveName))
|
pbDisplayPaused(_INTL("{1} forgot how to use {2}. And...",pkmnName,oldMoveName))
|
||||||
pbDisplay(_INTL("{1} learned {2}!",pkmnName,moveName)) { pbSEPlay("Pkmn move learnt") }
|
pbDisplay(_INTL("{1} learned {2}!",pkmnName,moveName)) { pbSEPlay("Pkmn move learnt") }
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Choosing a move/target
|
# Choosing a move/target
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -45,7 +45,7 @@ class PokeBattle_Battle
|
|||||||
encoreMove = battler.moves[idxEncoredMove]
|
encoreMove = battler.moves[idxEncoredMove]
|
||||||
@choices[idxBattler][0] = :UseMove # "Use move"
|
@choices[idxBattler][0] = :UseMove # "Use move"
|
||||||
@choices[idxBattler][1] = idxEncoredMove # Index of move to be used
|
@choices[idxBattler][1] = idxEncoredMove # Index of move to be used
|
||||||
@choices[idxBattler][2] = encoreMove # PokeBattle_Move object
|
@choices[idxBattler][2] = encoreMove # Battle::Move object
|
||||||
@choices[idxBattler][3] = -1 # No target chosen yet
|
@choices[idxBattler][3] = -1 # No target chosen yet
|
||||||
return true if singleBattle?
|
return true if singleBattle?
|
||||||
if pbOwnedByPlayer?(idxBattler)
|
if pbOwnedByPlayer?(idxBattler)
|
||||||
@@ -62,7 +62,7 @@ class PokeBattle_Battle
|
|||||||
end
|
end
|
||||||
@choices[idxBattler][0] = :UseMove # "Use move"
|
@choices[idxBattler][0] = :UseMove # "Use move"
|
||||||
@choices[idxBattler][1] = -1 # Index of move to be used
|
@choices[idxBattler][1] = -1 # Index of move to be used
|
||||||
@choices[idxBattler][2] = @struggle # Struggle PokeBattle_Move object
|
@choices[idxBattler][2] = @struggle # Struggle Battle::Move object
|
||||||
@choices[idxBattler][3] = -1 # No target chosen yet
|
@choices[idxBattler][3] = -1 # No target chosen yet
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -73,7 +73,7 @@ class PokeBattle_Battle
|
|||||||
return false if !pbCanChooseMove?(idxBattler,idxMove,showMessages)
|
return false if !pbCanChooseMove?(idxBattler,idxMove,showMessages)
|
||||||
@choices[idxBattler][0] = :UseMove # "Use move"
|
@choices[idxBattler][0] = :UseMove # "Use move"
|
||||||
@choices[idxBattler][1] = idxMove # Index of move to be used
|
@choices[idxBattler][1] = idxMove # Index of move to be used
|
||||||
@choices[idxBattler][2] = move # PokeBattle_Move object
|
@choices[idxBattler][2] = move # Battle::Move object
|
||||||
@choices[idxBattler][3] = -1 # No target chosen yet
|
@choices[idxBattler][3] = -1 # No target chosen yet
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Choosing Pokémon to switch
|
# Choosing Pokémon to switch
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Choosing to use an item
|
# Choosing to use an item
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Running from battle
|
# Running from battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Shifting a battler to another position in a battle larger than double
|
# Shifting a battler to another position in a battle larger than double
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Clear commands
|
# Clear commands
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Attack phase actions
|
# Attack phase actions
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battle
|
class Battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Decrement effect counters
|
# Decrement effect counters
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -224,7 +224,7 @@ class PokeBattle_Battle
|
|||||||
party = pbParty(pos.effects[PBEffects::FutureSightUserIndex])
|
party = pbParty(pos.effects[PBEffects::FutureSightUserIndex])
|
||||||
pkmn = party[pos.effects[PBEffects::FutureSightUserPartyIndex]]
|
pkmn = party[pos.effects[PBEffects::FutureSightUserPartyIndex]]
|
||||||
if pkmn && pkmn.able?
|
if pkmn && pkmn.able?
|
||||||
moveUser = PokeBattle_Battler.new(self,pos.effects[PBEffects::FutureSightUserIndex])
|
moveUser = Battler.new(self,pos.effects[PBEffects::FutureSightUserIndex])
|
||||||
moveUser.pbInitDummyPokemon(pkmn,pos.effects[PBEffects::FutureSightUserPartyIndex])
|
moveUser.pbInitDummyPokemon(pkmn,pos.effects[PBEffects::FutureSightUserPartyIndex])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -360,7 +360,7 @@ class PokeBattle_Battle
|
|||||||
pbCommonAnimation(anim_name, b) if anim_name
|
pbCommonAnimation(anim_name, b) if anim_name
|
||||||
pbShowAbilitySplash(b)
|
pbShowAbilitySplash(b)
|
||||||
b.pbRecoverHP(b.totalhp/8)
|
b.pbRecoverHP(b.totalhp/8)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Scene::USE_ABILITY_SPLASH
|
||||||
pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
|
pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
|
||||||
else
|
else
|
||||||
pbDisplay(_INTL("{1}'s {2} restored its HP.",b.pbThis,b.abilityName))
|
pbDisplay(_INTL("{1}'s {2} restored its HP.",b.pbThis,b.abilityName))
|
||||||
@@ -1,186 +0,0 @@
|
|||||||
begin
|
|
||||||
module PBEffects
|
|
||||||
#===========================================================================
|
|
||||||
# These effects apply to a battler
|
|
||||||
#===========================================================================
|
|
||||||
AquaRing = 0
|
|
||||||
Attract = 1
|
|
||||||
BanefulBunker = 2
|
|
||||||
BeakBlast = 3
|
|
||||||
Bide = 4
|
|
||||||
BideDamage = 5
|
|
||||||
BideTarget = 6
|
|
||||||
BurnUp = 7
|
|
||||||
Charge = 8
|
|
||||||
ChoiceBand = 9
|
|
||||||
Confusion = 10
|
|
||||||
Counter = 11
|
|
||||||
CounterTarget = 12
|
|
||||||
Curse = 13
|
|
||||||
Dancer = 14
|
|
||||||
DefenseCurl = 15
|
|
||||||
DestinyBond = 16
|
|
||||||
DestinyBondPrevious = 17
|
|
||||||
DestinyBondTarget = 18
|
|
||||||
Disable = 19
|
|
||||||
DisableMove = 20
|
|
||||||
Electrify = 21
|
|
||||||
Embargo = 22
|
|
||||||
Encore = 23
|
|
||||||
EncoreMove = 24
|
|
||||||
Endure = 25
|
|
||||||
FirstPledge = 26
|
|
||||||
FlashFire = 27
|
|
||||||
Flinch = 28
|
|
||||||
FocusEnergy = 29
|
|
||||||
FocusPunch = 30
|
|
||||||
FollowMe = 31
|
|
||||||
Foresight = 32
|
|
||||||
FuryCutter = 33
|
|
||||||
GastroAcid = 34
|
|
||||||
GemConsumed = 35
|
|
||||||
Grudge = 36
|
|
||||||
HealBlock = 37
|
|
||||||
HelpingHand = 38
|
|
||||||
HyperBeam = 39
|
|
||||||
Illusion = 40
|
|
||||||
Imprison = 41
|
|
||||||
Ingrain = 42
|
|
||||||
Instruct = 43
|
|
||||||
Instructed = 44
|
|
||||||
JawLock = 994
|
|
||||||
KingsShield = 45
|
|
||||||
LaserFocus = 46
|
|
||||||
LeechSeed = 47
|
|
||||||
LockOn = 48
|
|
||||||
LockOnPos = 49
|
|
||||||
MagicBounce = 50
|
|
||||||
MagicCoat = 51
|
|
||||||
MagnetRise = 52
|
|
||||||
MeanLook = 53
|
|
||||||
MeFirst = 54
|
|
||||||
Metronome = 55
|
|
||||||
MicleBerry = 56
|
|
||||||
Minimize = 57
|
|
||||||
MiracleEye = 58
|
|
||||||
MirrorCoat = 59
|
|
||||||
MirrorCoatTarget = 60
|
|
||||||
MoveNext = 61
|
|
||||||
MudSport = 62
|
|
||||||
Nightmare = 63
|
|
||||||
NoRetreat = 990
|
|
||||||
Obstruct = 992
|
|
||||||
Octolock = 993
|
|
||||||
Outrage = 64
|
|
||||||
ParentalBond = 65
|
|
||||||
PerishSong = 66
|
|
||||||
PerishSongUser = 67
|
|
||||||
PickupItem = 68
|
|
||||||
PickupUse = 69
|
|
||||||
Pinch = 70 # Battle Palace only
|
|
||||||
Powder = 71
|
|
||||||
PowerTrick = 72
|
|
||||||
Prankster = 73
|
|
||||||
PriorityAbility = 74
|
|
||||||
PriorityItem = 75
|
|
||||||
Protect = 76
|
|
||||||
ProtectRate = 77
|
|
||||||
Pursuit = 78
|
|
||||||
Quash = 79
|
|
||||||
Rage = 80
|
|
||||||
RagePowder = 81 # Used along with FollowMe
|
|
||||||
Rollout = 82
|
|
||||||
Roost = 83
|
|
||||||
ShellTrap = 84
|
|
||||||
SkyDrop = 85
|
|
||||||
SlowStart = 86
|
|
||||||
SmackDown = 87
|
|
||||||
Snatch = 88
|
|
||||||
SpikyShield = 89
|
|
||||||
Spotlight = 90
|
|
||||||
Stockpile = 91
|
|
||||||
StockpileDef = 92
|
|
||||||
StockpileSpDef = 93
|
|
||||||
Substitute = 94
|
|
||||||
TarShot = 991
|
|
||||||
Taunt = 95
|
|
||||||
Telekinesis = 96
|
|
||||||
ThroatChop = 97
|
|
||||||
Torment = 98
|
|
||||||
Toxic = 99
|
|
||||||
Transform = 100
|
|
||||||
TransformSpecies = 101
|
|
||||||
Trapping = 102 # Trapping move
|
|
||||||
TrappingMove = 103
|
|
||||||
TrappingUser = 104
|
|
||||||
Truant = 105
|
|
||||||
TwoTurnAttack = 106
|
|
||||||
Type3 = 107
|
|
||||||
Unburden = 108
|
|
||||||
Uproar = 109
|
|
||||||
WaterSport = 110
|
|
||||||
WeightChange = 111
|
|
||||||
Yawn = 112
|
|
||||||
|
|
||||||
#===========================================================================
|
|
||||||
# These effects apply to a battler position
|
|
||||||
#===========================================================================
|
|
||||||
FutureSightCounter = 0
|
|
||||||
FutureSightMove = 1
|
|
||||||
FutureSightUserIndex = 2
|
|
||||||
FutureSightUserPartyIndex = 3
|
|
||||||
HealingWish = 4
|
|
||||||
LunarDance = 5
|
|
||||||
Wish = 6
|
|
||||||
WishAmount = 7
|
|
||||||
WishMaker = 8
|
|
||||||
|
|
||||||
#===========================================================================
|
|
||||||
# These effects apply to a side
|
|
||||||
#===========================================================================
|
|
||||||
AuroraVeil = 0
|
|
||||||
CraftyShield = 1
|
|
||||||
EchoedVoiceCounter = 2
|
|
||||||
EchoedVoiceUsed = 3
|
|
||||||
LastRoundFainted = 4
|
|
||||||
LightScreen = 5
|
|
||||||
LuckyChant = 6
|
|
||||||
MatBlock = 7
|
|
||||||
Mist = 8
|
|
||||||
QuickGuard = 9
|
|
||||||
Rainbow = 10
|
|
||||||
Reflect = 11
|
|
||||||
Round = 12
|
|
||||||
Safeguard = 13
|
|
||||||
SeaOfFire = 14
|
|
||||||
Spikes = 15
|
|
||||||
StealthRock = 16
|
|
||||||
StickyWeb = 17
|
|
||||||
Swamp = 18
|
|
||||||
Tailwind = 19
|
|
||||||
ToxicSpikes = 20
|
|
||||||
WideGuard = 21
|
|
||||||
|
|
||||||
#===========================================================================
|
|
||||||
# These effects apply to the battle (i.e. both sides)
|
|
||||||
#===========================================================================
|
|
||||||
AmuletCoin = 0
|
|
||||||
FairyLock = 1
|
|
||||||
FusionBolt = 2
|
|
||||||
FusionFlare = 3
|
|
||||||
Gravity = 4
|
|
||||||
HappyHour = 5
|
|
||||||
IonDeluge = 6
|
|
||||||
MagicRoom = 7
|
|
||||||
MudSportField = 8
|
|
||||||
PayDay = 9
|
|
||||||
TrickRoom = 10
|
|
||||||
WaterSportField = 11
|
|
||||||
WonderRoom = 12
|
|
||||||
end
|
|
||||||
|
|
||||||
rescue Exception
|
|
||||||
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
|
|
||||||
raise $!
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
# Fundamental to this object
|
# Fundamental to this object
|
||||||
attr_reader :battle
|
attr_reader :battle
|
||||||
attr_accessor :index
|
attr_accessor :index
|
||||||
@@ -517,7 +517,7 @@ class PokeBattle_Battler
|
|||||||
if hasActiveAbility?(:MAGICGUARD)
|
if hasActiveAbility?(:MAGICGUARD)
|
||||||
if showMsg
|
if showMsg
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,abilityName))
|
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,abilityName))
|
||||||
@@ -571,7 +571,7 @@ class PokeBattle_Battler
|
|||||||
if hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
|
if hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
|
||||||
if showMsg
|
if showMsg
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,abilityName))
|
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,abilityName))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Creating a battler
|
# Creating a battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -9,7 +9,7 @@ class PokeBattle_Battler
|
|||||||
@dummy = false
|
@dummy = false
|
||||||
@stages = {}
|
@stages = {}
|
||||||
@effects = []
|
@effects = []
|
||||||
@damageState = PokeBattle_DamageState.new
|
@damageState = Battle::DamageState.new
|
||||||
pbInitBlank
|
pbInitBlank
|
||||||
pbInitEffects(false)
|
pbInitEffects(false)
|
||||||
end
|
end
|
||||||
@@ -95,7 +95,7 @@ class PokeBattle_Battler
|
|||||||
@participants = [] # Participants earn Exp. if this battler is defeated
|
@participants = [] # Participants earn Exp. if this battler is defeated
|
||||||
@moves = []
|
@moves = []
|
||||||
pkmn.moves.each_with_index do |m,i|
|
pkmn.moves.each_with_index do |m,i|
|
||||||
@moves[i] = PokeBattle_Move.from_pokemon_move(@battle,m)
|
@moves[i] = Battle::Move.from_pokemon_move(@battle,m)
|
||||||
end
|
end
|
||||||
@iv = {}
|
@iv = {}
|
||||||
GameData::Stat.each_main { |s| @iv[s.id] = pkmn.iv[s.id] }
|
GameData::Stat.each_main { |s| @iv[s.id] = pkmn.iv[s.id] }
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Change HP
|
# Change HP
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -122,7 +122,7 @@ class PokeBattle_Battler
|
|||||||
# Change type
|
# Change type
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbChangeTypes(newType)
|
def pbChangeTypes(newType)
|
||||||
if newType.is_a?(PokeBattle_Battler)
|
if newType.is_a?(Battle::Battler)
|
||||||
newTypes = newType.pbTypes
|
newTypes = newType.pbTypes
|
||||||
newTypes.push(:NORMAL) if newTypes.length == 0
|
newTypes.push(:NORMAL) if newTypes.length == 0
|
||||||
newType3 = newType.effects[PBEffects::Type3]
|
newType3 = newType.effects[PBEffects::Type3]
|
||||||
@@ -313,7 +313,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
@moves.clear
|
@moves.clear
|
||||||
target.moves.each_with_index do |m,i|
|
target.moves.each_with_index do |m,i|
|
||||||
@moves[i] = PokeBattle_Move.from_pokemon_move(@battle, Pokemon::Move.new(m.id))
|
@moves[i] = Battle::Move.from_pokemon_move(@battle, Pokemon::Move.new(m.id))
|
||||||
@moves[i].pp = 5
|
@moves[i].pp = 5
|
||||||
@moves[i].total_pp = 5
|
@moves[i].total_pp = 5
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Generalised checks for whether a status problem can be inflicted
|
# Generalised checks for whether a status problem can be inflicted
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -121,7 +121,7 @@ class PokeBattle_Battler
|
|||||||
if showMessages
|
if showMessages
|
||||||
@battle.pbShowAbilitySplash(immAlly || self)
|
@battle.pbShowAbilitySplash(immAlly || self)
|
||||||
msg = ""
|
msg = ""
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
case newStatus
|
case newStatus
|
||||||
when :SLEEP then msg = _INTL("{1} stays awake!", pbThis)
|
when :SLEEP then msg = _INTL("{1} stays awake!", pbThis)
|
||||||
when :POISON then msg = _INTL("{1} cannot be poisoned!", pbThis)
|
when :POISON then msg = _INTL("{1} cannot be poisoned!", pbThis)
|
||||||
@@ -458,7 +458,7 @@ class PokeBattle_Battler
|
|||||||
if hasActiveAbility?(:OWNTEMPO)
|
if hasActiveAbility?(:OWNTEMPO)
|
||||||
if showMessages
|
if showMessages
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} doesn't become confused!",pbThis))
|
@battle.pbDisplay(_INTL("{1} doesn't become confused!",pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} prevents confusion!",pbThis,abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} prevents confusion!",pbThis,abilityName))
|
||||||
@@ -520,7 +520,7 @@ class PokeBattle_Battler
|
|||||||
if hasActiveAbility?([:AROMAVEIL,:OBLIVIOUS])
|
if hasActiveAbility?([:AROMAVEIL,:OBLIVIOUS])
|
||||||
if showMessages
|
if showMessages
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} prevents romance!",pbThis,abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} prevents romance!",pbThis,abilityName))
|
||||||
@@ -533,7 +533,7 @@ class PokeBattle_Battler
|
|||||||
next if !b.hasActiveAbility?(:AROMAVEIL)
|
next if !b.hasActiveAbility?(:AROMAVEIL)
|
||||||
if showMessages
|
if showMessages
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} prevents romance!",b.pbThis,b.abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} prevents romance!",b.pbThis,b.abilityName))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Increase stat stages
|
# Increase stat stages
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -97,8 +97,8 @@ class PokeBattle_Battler
|
|||||||
return false if fainted?
|
return false if fainted?
|
||||||
ret = false
|
ret = false
|
||||||
@battle.pbShowAbilitySplash(user) if splashAnim
|
@battle.pbShowAbilitySplash(user) if splashAnim
|
||||||
if pbCanRaiseStatStage?(stat,user,nil,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if pbCanRaiseStatStage?(stat,user,nil,Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
ret = pbRaiseStatStage(stat,increment,user)
|
ret = pbRaiseStatStage(stat,increment,user)
|
||||||
else
|
else
|
||||||
ret = pbRaiseStatStageByCause(stat,increment,user,user.abilityName)
|
ret = pbRaiseStatStageByCause(stat,increment,user,user.abilityName)
|
||||||
@@ -194,7 +194,7 @@ class PokeBattle_Battler
|
|||||||
user && user.index != @index && !statStageAtMin?(stat)
|
user && user.index != @index && !statStageAtMin?(stat)
|
||||||
if mirrorArmorSplash < 2
|
if mirrorArmorSplash < 2
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} activated!", pbThis, abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} activated!", pbThis, abilityName))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -234,7 +234,7 @@ class PokeBattle_Battler
|
|||||||
if hasActiveAbility?(:MIRRORARMOR) && !ignoreMirrorArmor &&
|
if hasActiveAbility?(:MIRRORARMOR) && !ignoreMirrorArmor &&
|
||||||
user && user.index != @index && !statStageAtMin?(stat)
|
user && user.index != @index && !statStageAtMin?(stat)
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} activated!", pbThis, abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} activated!", pbThis, abilityName))
|
||||||
end
|
end
|
||||||
ret = false
|
ret = false
|
||||||
@@ -272,9 +272,9 @@ class PokeBattle_Battler
|
|||||||
def pbLowerStatStageByAbility(stat,increment,user,splashAnim=true,checkContact=false)
|
def pbLowerStatStageByAbility(stat,increment,user,splashAnim=true,checkContact=false)
|
||||||
ret = false
|
ret = false
|
||||||
@battle.pbShowAbilitySplash(user) if splashAnim
|
@battle.pbShowAbilitySplash(user) if splashAnim
|
||||||
if pbCanLowerStatStage?(stat,user,nil,PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if pbCanLowerStatStage?(stat,user,nil,Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
(!checkContact || affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH))
|
(!checkContact || affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH))
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
ret = pbLowerStatStage(stat,increment,user)
|
ret = pbLowerStatStage(stat,increment,user)
|
||||||
else
|
else
|
||||||
ret = pbLowerStatStageByCause(stat,increment,user,user.abilityName)
|
ret = pbLowerStatStageByCause(stat,increment,user,user.abilityName)
|
||||||
@@ -288,7 +288,7 @@ class PokeBattle_Battler
|
|||||||
return false if fainted?
|
return false if fainted?
|
||||||
# NOTE: Substitute intentially blocks Intimidate even if self has Contrary.
|
# NOTE: Substitute intentially blocks Intimidate even if self has Contrary.
|
||||||
if @effects[PBEffects::Substitute]>0
|
if @effects[PBEffects::Substitute]>0
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is protected by its substitute!",pbThis))
|
@battle.pbDisplay(_INTL("{1} is protected by its substitute!",pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s substitute protected it from {2}'s {3}!",
|
@battle.pbDisplay(_INTL("{1}'s substitute protected it from {2}'s {3}!",
|
||||||
@@ -298,7 +298,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
if Settings::MECHANICS_GENERATION >= 8 && hasActiveAbility?([:OBLIVIOUS, :OWNTEMPO, :INNERFOCUS, :SCRAPPY])
|
if Settings::MECHANICS_GENERATION >= 8 && hasActiveAbility?([:OBLIVIOUS, :OWNTEMPO, :INNERFOCUS, :SCRAPPY])
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!", pbThis, GameData::Stat.get(:ATTACK).name))
|
@battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!", pbThis, GameData::Stat.get(:ATTACK).name))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!", pbThis, abilityName,
|
@battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!", pbThis, abilityName,
|
||||||
@@ -307,7 +307,7 @@ class PokeBattle_Battler
|
|||||||
@battle.pbHideAbilitySplash(self)
|
@battle.pbHideAbilitySplash(self)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
return pbLowerStatStageByAbility(:ATTACK,1,user,false)
|
return pbLowerStatStageByAbility(:ATTACK,1,user,false)
|
||||||
end
|
end
|
||||||
# NOTE: These checks exist to ensure appropriate messages are shown if
|
# NOTE: These checks exist to ensure appropriate messages are shown if
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Ability effects
|
# Ability effects
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -185,7 +185,7 @@ class PokeBattle_Battler
|
|||||||
next if !b.item || b.unlosableItem?(b.item)
|
next if !b.item || b.unlosableItem?(b.item)
|
||||||
next if unlosableItem?(b.item)
|
next if unlosableItem?(b.item)
|
||||||
@battle.pbShowAbilitySplash(b)
|
@battle.pbShowAbilitySplash(b)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} shared its {2} with {3}!",
|
@battle.pbDisplay(_INTL("{1} shared its {2} with {3}!",
|
||||||
b.pbThis,b.itemName,pbThis(true)))
|
b.pbThis,b.itemName,pbThis(true)))
|
||||||
else
|
else
|
||||||
@@ -208,7 +208,7 @@ class PokeBattle_Battler
|
|||||||
if hasActiveAbility?(:CHEEKPOUCH) && GameData::Item.get(item_to_use).is_berry? && canHeal?
|
if hasActiveAbility?(:CHEEKPOUCH) && GameData::Item.get(item_to_use).is_berry? && canHeal?
|
||||||
@battle.pbShowAbilitySplash(self)
|
@battle.pbShowAbilitySplash(self)
|
||||||
pbRecoverHP(@totalhp / 3)
|
pbRecoverHP(@totalhp / 3)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1}'s HP was restored.", pbThis))
|
@battle.pbDisplay(_INTL("{1}'s HP was restored.", pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} restored its HP.", pbThis, abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} restored its HP.", pbThis, abilityName))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Turn processing
|
# Turn processing
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -125,7 +125,7 @@ class PokeBattle_Battler
|
|||||||
|
|
||||||
def pbConfusionDamage(msg)
|
def pbConfusionDamage(msg)
|
||||||
@damageState.reset
|
@damageState.reset
|
||||||
confusionMove = PokeBattle_Confusion.new(@battle,nil)
|
confusionMove = Battle::Move::Confusion.new(@battle,nil)
|
||||||
confusionMove.calcType = confusionMove.pbCalcType(self) # nil
|
confusionMove.calcType = confusionMove.pbCalcType(self) # nil
|
||||||
@damageState.typeMod = confusionMove.pbCalcTypeMod(confusionMove.calcType,self,self) # 8
|
@damageState.typeMod = confusionMove.pbCalcTypeMod(confusionMove.calcType,self,self) # 8
|
||||||
confusionMove.pbCheckDamageAbsorption(self,self)
|
confusionMove.pbCheckDamageAbsorption(self,self)
|
||||||
@@ -151,7 +151,7 @@ class PokeBattle_Battler
|
|||||||
if idxMove>=0
|
if idxMove>=0
|
||||||
choice[2] = @moves[idxMove]
|
choice[2] = @moves[idxMove]
|
||||||
else
|
else
|
||||||
choice[2] = PokeBattle_Move.from_pokemon_move(@battle, Pokemon::Move.new(moveID))
|
choice[2] = Battle::Move.from_pokemon_move(@battle, Pokemon::Move.new(moveID))
|
||||||
choice[2].pp = -1
|
choice[2].pp = -1
|
||||||
end
|
end
|
||||||
choice[3] = target # Target (-1 means no target yet)
|
choice[3] = target # Target (-1 means no target yet)
|
||||||
@@ -170,7 +170,7 @@ class PokeBattle_Battler
|
|||||||
pbBeginTurn(choice)
|
pbBeginTurn(choice)
|
||||||
# Force the use of certain moves if they're already being used
|
# Force the use of certain moves if they're already being used
|
||||||
if usingMultiTurnAttack?
|
if usingMultiTurnAttack?
|
||||||
choice[2] = PokeBattle_Move.from_pokemon_move(@battle, Pokemon::Move.new(@currentMove))
|
choice[2] = Battle::Move.from_pokemon_move(@battle, Pokemon::Move.new(@currentMove))
|
||||||
specialUsage = true
|
specialUsage = true
|
||||||
elsif @effects[PBEffects::Encore]>0 && choice[1]>=0 &&
|
elsif @effects[PBEffects::Encore]>0 && choice[1]>=0 &&
|
||||||
@battle.pbCanShowCommands?(@index)
|
@battle.pbCanShowCommands?(@index)
|
||||||
@@ -555,7 +555,7 @@ class PokeBattle_Battler
|
|||||||
preTarget = user.index if nextUser.opposes?(user) || !nextUser.opposes?(preTarget)
|
preTarget = user.index if nextUser.opposes?(user) || !nextUser.opposes?(preTarget)
|
||||||
@battle.pbShowAbilitySplash(nextUser,true)
|
@battle.pbShowAbilitySplash(nextUser,true)
|
||||||
@battle.pbHideAbilitySplash(nextUser)
|
@battle.pbHideAbilitySplash(nextUser)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} kept the dance going with {2}!",
|
@battle.pbDisplay(_INTL("{1} kept the dance going with {2}!",
|
||||||
nextUser.pbThis,nextUser.abilityName))
|
nextUser.pbThis,nextUser.abilityName))
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Get move's user
|
# Get move's user
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -156,7 +156,7 @@ class PokeBattle_Battler
|
|||||||
@battle.pbShowAbilitySplash(b)
|
@battle.pbShowAbilitySplash(b)
|
||||||
targets.clear
|
targets.clear
|
||||||
pbAddTarget(targets,user,b,move,nearOnly)
|
pbAddTarget(targets,user,b,move,nearOnly)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} took the attack!",b.pbThis))
|
@battle.pbDisplay(_INTL("{1} took the attack!",b.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} took the attack with its {2}!",b.pbThis,b.abilityName))
|
@battle.pbDisplay(_INTL("{1} took the attack with its {2}!",b.pbThis,b.abilityName))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Decide whether the trainer is allowed to tell the Pokémon to use the given
|
# Decide whether the trainer is allowed to tell the Pokémon to use the given
|
||||||
# move. Called when choosing a command for the round.
|
# move. Called when choosing a command for the round.
|
||||||
@@ -455,7 +455,7 @@ class PokeBattle_Battler
|
|||||||
if target.hasActiveAbility?(:LEVITATE) && !@battle.moldBreaker
|
if target.hasActiveAbility?(:LEVITATE) && !@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} avoided the attack!", target.pbThis))
|
@battle.pbDisplay(_INTL("{1} avoided the attack!", target.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} avoided the attack with {2}!", target.pbThis, target.abilityName))
|
@battle.pbDisplay(_INTL("{1} avoided the attack with {2}!", target.pbThis, target.abilityName))
|
||||||
@@ -488,7 +488,7 @@ class PokeBattle_Battler
|
|||||||
if target.hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
|
if target.hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
@battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("It doesn't affect {1} because of its {2}.", target.pbThis(true), target.abilityName))
|
@battle.pbDisplay(_INTL("It doesn't affect {1} because of its {2}.", target.pbThis(true), target.abilityName))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Effect per hit
|
# Effect per hit
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -18,7 +18,7 @@ class PokeBattle_Battler
|
|||||||
# target Cramorant attacking the user) and the ability splash
|
# target Cramorant attacking the user) and the ability splash
|
||||||
# shouldn't be shown.
|
# shouldn't be shown.
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if user.takesIndirectDamage?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
@battle.scene.pbDamageAnimation(user)
|
@battle.scene.pbDamageAnimation(user)
|
||||||
user.pbReduceHP(user.totalhp / 4, false)
|
user.pbReduceHP(user.totalhp / 4, false)
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Move
|
class Battle::Move
|
||||||
attr_reader :battle
|
attr_reader :battle
|
||||||
attr_reader :realMove
|
attr_reader :realMove
|
||||||
attr_accessor :id
|
attr_accessor :id
|
||||||
@@ -44,17 +44,21 @@ class PokeBattle_Move
|
|||||||
@snatched = false
|
@snatched = false
|
||||||
end
|
end
|
||||||
|
|
||||||
# This is the code actually used to generate a PokeBattle_Move object. The
|
# This is the code actually used to generate a Battle::Move object. The
|
||||||
# object generated is a subclass of this one which depends on the move's
|
# object generated is a subclass of this one which depends on the move's
|
||||||
# function code (found in the script section PokeBattle_MoveEffect).
|
# function code.
|
||||||
def PokeBattle_Move.from_pokemon_move(battle, move)
|
def self.from_pokemon_move(battle, move)
|
||||||
validate move => Pokemon::Move
|
validate move => Pokemon::Move
|
||||||
moveFunction = move.function_code || "None"
|
code = move.function_code || "None"
|
||||||
className = sprintf("PokeBattle_Move_%s", moveFunction)
|
if code[/^\d/] # Begins with a digit
|
||||||
if Object.const_defined?(className)
|
class_name = sprintf("Battle::Move::Effect%s", code)
|
||||||
return Object.const_get(className).new(battle, move)
|
else
|
||||||
|
class_name = sprintf("Battle::Move::%s", code)
|
||||||
end
|
end
|
||||||
return PokeBattle_UnimplementedMove.new(battle, move)
|
if Object.const_defined?(class_name)
|
||||||
|
return Object.const_get(class_name).new(battle, move)
|
||||||
|
end
|
||||||
|
return Battle::Move::Unimplemented.new(battle, move)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Move
|
class Battle::Move
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Effect methods per move usage
|
# Effect methods per move usage
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -127,7 +127,7 @@ class PokeBattle_Move
|
|||||||
if target.hasActiveAbility?(:AROMAVEIL)
|
if target.hasActiveAbility?(:AROMAVEIL)
|
||||||
if showMessage
|
if showMessage
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",
|
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",
|
||||||
@@ -141,7 +141,7 @@ class PokeBattle_Move
|
|||||||
next if !b.hasActiveAbility?(:AROMAVEIL)
|
next if !b.hasActiveAbility?(:AROMAVEIL)
|
||||||
if showMessage
|
if showMessage
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected because of {2}'s {3}!",
|
@battle.pbDisplay(_INTL("{1} is unaffected because of {2}'s {3}!",
|
||||||
@@ -317,7 +317,7 @@ class PokeBattle_Move
|
|||||||
def pbEndureKOMessage(target)
|
def pbEndureKOMessage(target)
|
||||||
if target.damageState.disguise
|
if target.damageState.disguise
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("Its disguise served it as a decoy!"))
|
@battle.pbDisplay(_INTL("Its disguise served it as a decoy!"))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s disguise served it as a decoy!",target.pbThis))
|
@battle.pbDisplay(_INTL("{1}'s disguise served it as a decoy!",target.pbThis))
|
||||||
@@ -327,7 +327,7 @@ class PokeBattle_Move
|
|||||||
target.pbReduceHP(target.totalhp / 8, false) if Settings::MECHANICS_GENERATION >= 8
|
target.pbReduceHP(target.totalhp / 8, false) if Settings::MECHANICS_GENERATION >= 8
|
||||||
elsif target.damageState.iceFace
|
elsif target.damageState.iceFace
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} activated!", target.pbThis, target.abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} activated!", target.pbThis, target.abilityName))
|
||||||
end
|
end
|
||||||
target.pbChangeForm(1, _INTL("{1} transformed!", target.pbThis))
|
target.pbChangeForm(1, _INTL("{1} transformed!", target.pbThis))
|
||||||
@@ -336,7 +336,7 @@ class PokeBattle_Move
|
|||||||
@battle.pbDisplay(_INTL("{1} endured the hit!",target.pbThis))
|
@battle.pbDisplay(_INTL("{1} endured the hit!",target.pbThis))
|
||||||
elsif target.damageState.sturdy
|
elsif target.damageState.sturdy
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} endured the hit!",target.pbThis))
|
@battle.pbDisplay(_INTL("{1} endured the hit!",target.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} hung on with Sturdy!",target.pbThis))
|
@battle.pbDisplay(_INTL("{1} hung on with Sturdy!",target.pbThis))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Move
|
class Battle::Move
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Move's type calculation
|
# Move's type calculation
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -335,7 +335,7 @@ class PokeBattle_Move
|
|||||||
if user.effects[PBEffects::MeFirst]
|
if user.effects[PBEffects::MeFirst]
|
||||||
multipliers[:base_damage_multiplier] *= 1.5
|
multipliers[:base_damage_multiplier] *= 1.5
|
||||||
end
|
end
|
||||||
if user.effects[PBEffects::HelpingHand] && !self.is_a?(PokeBattle_Confusion)
|
if user.effects[PBEffects::HelpingHand] && !self.is_a?(Battle::Move::Confusion)
|
||||||
multipliers[:base_damage_multiplier] *= 1.5
|
multipliers[:base_damage_multiplier] *= 1.5
|
||||||
end
|
end
|
||||||
if user.effects[PBEffects::Charge]>0 && type == :ELECTRIC
|
if user.effects[PBEffects::Charge]>0 && type == :ELECTRIC
|
||||||
@@ -420,7 +420,7 @@ class PokeBattle_Move
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Random variance
|
# Random variance
|
||||||
if !self.is_a?(PokeBattle_Confusion)
|
if !self.is_a?(Battle::Move::Confusion)
|
||||||
random = 85+@battle.pbRandom(16)
|
random = 85+@battle.pbRandom(16)
|
||||||
multipliers[:final_damage_multiplier] *= random / 100.0
|
multipliers[:final_damage_multiplier] *= random / 100.0
|
||||||
end
|
end
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
|
# DO NOT USE ANY CLASS NAMES IN HERE AS FUNCTION CODES!
|
||||||
|
# These are base classes for other classes to build on; those other classes are
|
||||||
|
# named after function codes, so use those instead.
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Superclass that handles moves using a non-existent function code.
|
# Superclass that handles moves using a non-existent function code.
|
||||||
# Damaging moves just do damage with no additional effect.
|
# Damaging moves just do damage with no additional effect.
|
||||||
# Status moves always fail.
|
# Status moves always fail.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_UnimplementedMove < PokeBattle_Move
|
class Battle::Move::Unimplemented < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if statusMove?
|
if statusMove?
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -18,7 +22,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Pseudomove for confusion damage.
|
# Pseudomove for confusion damage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Confusion < PokeBattle_Move
|
class Battle::Move::Confusion < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@battle = battle
|
@battle = battle
|
||||||
@realMove = move
|
@realMove = move
|
||||||
@@ -48,9 +52,8 @@ end
|
|||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Implements the move Struggle.
|
# Implements the move Struggle.
|
||||||
# For cases where the real move named Struggle is not defined.
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Struggle < PokeBattle_Move
|
class Battle::Move::Struggle < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@battle = battle
|
@battle = battle
|
||||||
@realMove = nil # Not associated with a move
|
@realMove = nil # Not associated with a move
|
||||||
@@ -87,7 +90,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Generic status problem-inflicting classes.
|
# Generic status problem-inflicting classes.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_SleepMove < PokeBattle_Move
|
class Battle::Move::SleepMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -108,7 +111,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_PoisonMove < PokeBattle_Move
|
class Battle::Move::PoisonMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -134,7 +137,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_ParalysisMove < PokeBattle_Move
|
class Battle::Move::ParalysisMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -155,7 +158,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_BurnMove < PokeBattle_Move
|
class Battle::Move::BurnMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -176,7 +179,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_FreezeMove < PokeBattle_Move
|
class Battle::Move::FreezeMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -200,7 +203,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Other problem-causing classes.
|
# Other problem-causing classes.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_FlinchMove < PokeBattle_Move
|
class Battle::Move::FlinchMove < Battle::Move
|
||||||
def flinchingMove?; return true; end
|
def flinchingMove?; return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -216,7 +219,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_ConfuseMove < PokeBattle_Move
|
class Battle::Move::ConfuseMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -241,7 +244,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Generic user's stat increase/decrease classes.
|
# Generic user's stat increase/decrease classes.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_StatUpMove < PokeBattle_Move
|
class Battle::Move::StatUpMove < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -263,7 +266,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_MultiStatUpMove < PokeBattle_Move
|
class Battle::Move::MultiStatUpMove < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -305,7 +308,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_StatDownMove < PokeBattle_Move
|
class Battle::Move::StatDownMove < Battle::Move
|
||||||
def pbEffectWhenDealingDamage(user,target)
|
def pbEffectWhenDealingDamage(user,target)
|
||||||
return if @battle.pbAllFainted?(target.idxOwnSide)
|
return if @battle.pbAllFainted?(target.idxOwnSide)
|
||||||
showAnim = true
|
showAnim = true
|
||||||
@@ -323,7 +326,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Generic target's stat increase/decrease classes.
|
# Generic target's stat increase/decrease classes.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_TargetStatDownMove < PokeBattle_Move
|
class Battle::Move::TargetStatDownMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -345,7 +348,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_TargetMultiStatDownMove < PokeBattle_Move
|
class Battle::Move::TargetMultiStatDownMove < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -394,7 +397,7 @@ class PokeBattle_TargetMultiStatDownMove < PokeBattle_Move
|
|||||||
end
|
end
|
||||||
if failed
|
if failed
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} activated!", target.pbThis, target.abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} activated!", target.pbThis, target.abilityName))
|
||||||
end
|
end
|
||||||
user.pbCanLowerStatStage?(@statDown[0], target, self, true, false, true) # Show fail message
|
user.pbCanLowerStatStage?(@statDown[0], target, self, true, false, true) # Show fail message
|
||||||
@@ -434,7 +437,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Fixed damage-inflicting move.
|
# Fixed damage-inflicting move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_FixedDamageMove < PokeBattle_Move
|
class Battle::Move::FixedDamageMove < Battle::Move
|
||||||
def pbFixedDamage(user,target); return 1; end
|
def pbFixedDamage(user,target); return 1; end
|
||||||
|
|
||||||
def pbCalcDamage(user,target,numTargets=1)
|
def pbCalcDamage(user,target,numTargets=1)
|
||||||
@@ -449,7 +452,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Two turn move.
|
# Two turn move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_TwoTurnMove < PokeBattle_Move
|
class Battle::Move::TwoTurnMove < Battle::Move
|
||||||
attr_reader :chargingTurn
|
attr_reader :chargingTurn
|
||||||
|
|
||||||
def chargingTurnMove?; return true; end
|
def chargingTurnMove?; return true; end
|
||||||
@@ -538,7 +541,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Healing move.
|
# Healing move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_HealingMove < PokeBattle_Move
|
class Battle::Move::HealingMove < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def pbHealAmount(user); return 1; end
|
def pbHealAmount(user); return 1; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
@@ -563,7 +566,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Recoil move.
|
# Recoil move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_RecoilMove < PokeBattle_Move
|
class Battle::Move::RecoilMove < Battle::Move
|
||||||
def recoilMove?; return true; end
|
def recoilMove?; return true; end
|
||||||
def pbRecoilDamage(user,target); return 1; end
|
def pbRecoilDamage(user,target); return 1; end
|
||||||
|
|
||||||
@@ -584,7 +587,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Protect move.
|
# Protect move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_ProtectMove < PokeBattle_Move
|
class Battle::Move::ProtectMove < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@sidedEffect = false
|
@sidedEffect = false
|
||||||
@@ -646,7 +649,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Weather-inducing move.
|
# Weather-inducing move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_WeatherMove < PokeBattle_Move
|
class Battle::Move::WeatherMove < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@weatherType = :None
|
@weatherType = :None
|
||||||
@@ -680,7 +683,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Pledge move.
|
# Pledge move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_PledgeMove < PokeBattle_Move
|
class Battle::Move::PledgeMove < Battle::Move
|
||||||
def pbOnStartUse(user,targets)
|
def pbOnStartUse(user,targets)
|
||||||
@pledgeSetup = false
|
@pledgeSetup = false
|
||||||
@pledgeCombo = false
|
@pledgeCombo = false
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# No additional effect.
|
# No additional effect.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_None < PokeBattle_Move
|
class Battle::Move::None < Battle::Move
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Does absolutely nothing. Shows a special message. (Celebrate)
|
# Does absolutely nothing. Shows a special message. (Celebrate)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoesNothingCongratuations < PokeBattle_Move
|
class Battle::Move::DoesNothingCongratuations < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
if user.wild?
|
if user.wild?
|
||||||
@battle.pbDisplay(_INTL("Congratulations from {1}!",user.pbThis(true)))
|
@battle.pbDisplay(_INTL("Congratulations from {1}!",user.pbThis(true)))
|
||||||
@@ -20,7 +20,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Does absolutely nothing. (Hold Hands)
|
# Does absolutely nothing. (Hold Hands)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoesNothingFailsIfNoAlly < PokeBattle_Move
|
class Battle::Move::DoesNothingFailsIfNoAlly < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -35,7 +35,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Does absolutely nothing. (Splash)
|
# Does absolutely nothing. (Splash)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoesNothingUnusableInGravity < PokeBattle_Move
|
class Battle::Move::DoesNothingUnusableInGravity < Battle::Move
|
||||||
def unusableInGravity?; return true; end
|
def unusableInGravity?; return true; end
|
||||||
|
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
@@ -43,12 +43,6 @@ class PokeBattle_Move_DoesNothingUnusableInGravity < PokeBattle_Move
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
|
||||||
# Struggle, if defined as a move in moves.txt. Typically it won't be.
|
|
||||||
#===============================================================================
|
|
||||||
class PokeBattle_Move_Struggle < PokeBattle_Struggle
|
|
||||||
end
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Scatters coins that the player picks up after winning the battle. (Pay Day)
|
# Scatters coins that the player picks up after winning the battle. (Pay Day)
|
||||||
# NOTE: In Gen 6+, if the user levels up after this move is used, the amount of
|
# NOTE: In Gen 6+, if the user levels up after this move is used, the amount of
|
||||||
@@ -56,7 +50,7 @@ end
|
|||||||
# when it used the move. I think this is silly, so I haven't coded this
|
# when it used the move. I think this is silly, so I haven't coded this
|
||||||
# effect.
|
# effect.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AddMoneyGainedFromBattle < PokeBattle_Move
|
class Battle::Move::AddMoneyGainedFromBattle < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
if user.pbOwnedByPlayer?
|
if user.pbOwnedByPlayer?
|
||||||
@battle.field.effects[PBEffects::PayDay] += 5*user.level
|
@battle.field.effects[PBEffects::PayDay] += 5*user.level
|
||||||
@@ -68,7 +62,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Doubles the prize money the player gets after winning the battle. (Happy Hour)
|
# Doubles the prize money the player gets after winning the battle. (Happy Hour)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoubleMoneyGainedFromBattle < PokeBattle_Move
|
class Battle::Move::DoubleMoneyGainedFromBattle < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
@battle.field.effects[PBEffects::HappyHour] = true if !user.opposes?
|
@battle.field.effects[PBEffects::HappyHour] = true if !user.opposes?
|
||||||
@battle.pbDisplay(_INTL("Everyone is caught up in the happy atmosphere!"))
|
@battle.pbDisplay(_INTL("Everyone is caught up in the happy atmosphere!"))
|
||||||
@@ -78,7 +72,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Fails if this isn't the user's first turn. (First Impression)
|
# Fails if this isn't the user's first turn. (First Impression)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FailsIfNotUserFirstTurn < PokeBattle_Move
|
class Battle::Move::FailsIfNotUserFirstTurn < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.turnCount > 1
|
if user.turnCount > 1
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -91,7 +85,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Fails unless user has already used all other moves it knows. (Last Resort)
|
# Fails unless user has already used all other moves it knows. (Last Resort)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FailsIfUserHasUnusedMove < PokeBattle_Move
|
class Battle::Move::FailsIfUserHasUnusedMove < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
hasThisMove = false
|
hasThisMove = false
|
||||||
hasOtherMoves = false
|
hasOtherMoves = false
|
||||||
@@ -112,7 +106,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Fails unless user has consumed a berry at some point. (Belch)
|
# Fails unless user has consumed a berry at some point. (Belch)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FailsIfUserNotConsumedBerry < PokeBattle_Move
|
class Battle::Move::FailsIfUserNotConsumedBerry < Battle::Move
|
||||||
def pbCanChooseMove?(user,commandPhase,showMessages)
|
def pbCanChooseMove?(user,commandPhase,showMessages)
|
||||||
if !user.belched?
|
if !user.belched?
|
||||||
if showMessages
|
if showMessages
|
||||||
@@ -137,7 +131,7 @@ end
|
|||||||
# Fails if the target is not holding an item, or if the target is affected by
|
# Fails if the target is not holding an item, or if the target is affected by
|
||||||
# Magic Room/Klutz. (Poltergeist)
|
# Magic Room/Klutz. (Poltergeist)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FailsIfTargetHasNoItem < PokeBattle_Move
|
class Battle::Move::FailsIfTargetHasNoItem < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if !target.item || !target.itemActive?
|
if !target.item || !target.itemActive?
|
||||||
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
||||||
@@ -151,7 +145,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Only damages Pokémon that share a type with the user. (Synchronoise)
|
# Only damages Pokémon that share a type with the user. (Synchronoise)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FailsUnlessTargetSharesTypeWithUser < PokeBattle_Move
|
class Battle::Move::FailsUnlessTargetSharesTypeWithUser < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
userTypes = user.pbTypes(true)
|
userTypes = user.pbTypes(true)
|
||||||
targetTypes = target.pbTypes(true)
|
targetTypes = target.pbTypes(true)
|
||||||
@@ -172,7 +166,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Fails if user was hit by a damaging move this round. (Focus Punch)
|
# Fails if user was hit by a damaging move this round. (Focus Punch)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FailsIfUserDamagedThisTurn < PokeBattle_Move
|
class Battle::Move::FailsIfUserDamagedThisTurn < Battle::Move
|
||||||
def pbDisplayChargeMessage(user)
|
def pbDisplayChargeMessage(user)
|
||||||
user.effects[PBEffects::FocusPunch] = true
|
user.effects[PBEffects::FocusPunch] = true
|
||||||
@battle.pbCommonAnimation("FocusPunch",user)
|
@battle.pbCommonAnimation("FocusPunch",user)
|
||||||
@@ -196,7 +190,7 @@ end
|
|||||||
# Fails if the target didn't chose a damaging move to use this round, or has
|
# Fails if the target didn't chose a damaging move to use this round, or has
|
||||||
# already moved. (Sucker Punch)
|
# already moved. (Sucker Punch)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FailsIfTargetActed < PokeBattle_Move
|
class Battle::Move::FailsIfTargetActed < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if @battle.choices[target.index][0]!=:UseMove
|
if @battle.choices[target.index][0]!=:UseMove
|
||||||
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
||||||
@@ -217,7 +211,7 @@ end
|
|||||||
# If attack misses, user takes crash damage of 1/2 of max HP.
|
# If attack misses, user takes crash damage of 1/2 of max HP.
|
||||||
# (High Jump Kick, Jump Kick)
|
# (High Jump Kick, Jump Kick)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CrashDamageIfFailsUnusableInGravity < PokeBattle_Move
|
class Battle::Move::CrashDamageIfFailsUnusableInGravity < Battle::Move
|
||||||
def recoilMove?; return true; end
|
def recoilMove?; return true; end
|
||||||
def unusableInGravity?; return true; end
|
def unusableInGravity?; return true; end
|
||||||
|
|
||||||
@@ -234,7 +228,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Starts sunny weather. (Sunny Day)
|
# Starts sunny weather. (Sunny Day)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartSunWeather < PokeBattle_WeatherMove
|
class Battle::Move::StartSunWeather < Battle::Move::WeatherMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@weatherType = :Sun
|
@weatherType = :Sun
|
||||||
@@ -244,7 +238,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Starts rainy weather. (Rain Dance)
|
# Starts rainy weather. (Rain Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartRainWeather < PokeBattle_WeatherMove
|
class Battle::Move::StartRainWeather < Battle::Move::WeatherMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@weatherType = :Rain
|
@weatherType = :Rain
|
||||||
@@ -254,7 +248,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Starts sandstorm weather. (Sandstorm)
|
# Starts sandstorm weather. (Sandstorm)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartSandstormWeather < PokeBattle_WeatherMove
|
class Battle::Move::StartSandstormWeather < Battle::Move::WeatherMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@weatherType = :Sandstorm
|
@weatherType = :Sandstorm
|
||||||
@@ -264,7 +258,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Starts hail weather. (Hail)
|
# Starts hail weather. (Hail)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartHailWeather < PokeBattle_WeatherMove
|
class Battle::Move::StartHailWeather < Battle::Move::WeatherMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@weatherType = :Hail
|
@weatherType = :Hail
|
||||||
@@ -276,7 +270,7 @@ end
|
|||||||
# prevents Pokémon from falling asleep. Affects non-airborne Pokémon only.
|
# prevents Pokémon from falling asleep. Affects non-airborne Pokémon only.
|
||||||
# (Electric Terrain)
|
# (Electric Terrain)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartElectricTerrain < PokeBattle_Move
|
class Battle::Move::StartElectricTerrain < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.field.terrain == :Electric
|
if @battle.field.terrain == :Electric
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -295,7 +289,7 @@ end
|
|||||||
# Pokémon at the end of each round. Affects non-airborne Pokémon only.
|
# Pokémon at the end of each round. Affects non-airborne Pokémon only.
|
||||||
# (Grassy Terrain)
|
# (Grassy Terrain)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartGrassyTerrain < PokeBattle_Move
|
class Battle::Move::StartGrassyTerrain < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.field.terrain == :Grassy
|
if @battle.field.terrain == :Grassy
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -314,7 +308,7 @@ end
|
|||||||
# protects Pokémon from status problems. Affects non-airborne Pokémon only.
|
# protects Pokémon from status problems. Affects non-airborne Pokémon only.
|
||||||
# (Misty Terrain)
|
# (Misty Terrain)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartMistyTerrain < PokeBattle_Move
|
class Battle::Move::StartMistyTerrain < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.field.terrain == :Misty
|
if @battle.field.terrain == :Misty
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -333,7 +327,7 @@ end
|
|||||||
# prevents Pokémon from being hit by >0 priority moves. Affects non-airborne
|
# prevents Pokémon from being hit by >0 priority moves. Affects non-airborne
|
||||||
# Pokémon only. (Psychic Terrain)
|
# Pokémon only. (Psychic Terrain)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartPsychicTerrain < PokeBattle_Move
|
class Battle::Move::StartPsychicTerrain < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.field.terrain == :Psychic
|
if @battle.field.terrain == :Psychic
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -351,7 +345,7 @@ end
|
|||||||
# Removes the current terrain. Fails if there is no terrain in effect.
|
# Removes the current terrain. Fails if there is no terrain in effect.
|
||||||
# (Steel Roller)
|
# (Steel Roller)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RemoveTerrain < PokeBattle_Move
|
class Battle::Move::RemoveTerrain < Battle::Move
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
if @battle.field.terrain == :None
|
if @battle.field.terrain == :None
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -378,7 +372,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Entry hazard. Lays spikes on the opposing side (max. 3 layers). (Spikes)
|
# Entry hazard. Lays spikes on the opposing side (max. 3 layers). (Spikes)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AddSpikesToFoeSide < PokeBattle_Move
|
class Battle::Move::AddSpikesToFoeSide < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -400,7 +394,7 @@ end
|
|||||||
# Entry hazard. Lays poison spikes on the opposing side (max. 2 layers).
|
# Entry hazard. Lays poison spikes on the opposing side (max. 2 layers).
|
||||||
# (Toxic Spikes)
|
# (Toxic Spikes)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AddToxicSpikesToFoeSide < PokeBattle_Move
|
class Battle::Move::AddToxicSpikesToFoeSide < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -421,7 +415,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Entry hazard. Lays stealth rocks on the opposing side. (Stealth Rock)
|
# Entry hazard. Lays stealth rocks on the opposing side. (Stealth Rock)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AddStealthRocksToFoeSide < PokeBattle_Move
|
class Battle::Move::AddStealthRocksToFoeSide < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -442,7 +436,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Entry hazard. Lays stealth rocks on the opposing side. (Sticky Web)
|
# Entry hazard. Lays stealth rocks on the opposing side. (Sticky Web)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AddStickyWebToFoeSide < PokeBattle_Move
|
class Battle::Move::AddStickyWebToFoeSide < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -464,7 +458,7 @@ end
|
|||||||
# All effects that apply to one side of the field are swapped to the opposite
|
# All effects that apply to one side of the field are swapped to the opposite
|
||||||
# side. (Court Change)
|
# side. (Court Change)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SwapSideEffects < PokeBattle_Move
|
class Battle::Move::SwapSideEffects < Battle::Move
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@number_effects = [
|
@number_effects = [
|
||||||
@@ -526,7 +520,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User turns 1/4 of max HP into a substitute. (Substitute)
|
# User turns 1/4 of max HP into a substitute. (Substitute)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserMakeSubstitute < PokeBattle_Move
|
class Battle::Move::UserMakeSubstitute < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -560,7 +554,7 @@ end
|
|||||||
# Removes trapping moves, entry hazards and Leech Seed on user/user's side.
|
# Removes trapping moves, entry hazards and Leech Seed on user/user's side.
|
||||||
# Raises user's Speed by 1 stage (Gen 8+). (Rapid Spin)
|
# Raises user's Speed by 1 stage (Gen 8+). (Rapid Spin)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RemoveUserBindingAndEntryHazards < PokeBattle_StatUpMove
|
class Battle::Move::RemoveUserBindingAndEntryHazards < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPEED, 1]
|
@statUp = [:SPEED, 1]
|
||||||
@@ -606,7 +600,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Attacks 2 rounds in the future. (Doom Desire, Future Sight)
|
# Attacks 2 rounds in the future. (Doom Desire, Future Sight)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AttackTwoTurnsLater < PokeBattle_Move
|
class Battle::Move::AttackTwoTurnsLater < Battle::Move
|
||||||
def targetsPosition?; return true; end
|
def targetsPosition?; return true; end
|
||||||
|
|
||||||
def pbDamagingMove? # Stops damage being dealt in the setting-up turn
|
def pbDamagingMove? # Stops damage being dealt in the setting-up turn
|
||||||
@@ -655,7 +649,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User switches places with its ally. (Ally Switch)
|
# User switches places with its ally. (Ally Switch)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserSwapsPositionsWithAlly < PokeBattle_Move
|
class Battle::Move::UserSwapsPositionsWithAlly < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
numTargets = 0
|
numTargets = 0
|
||||||
@idxAlly = -1
|
@idxAlly = -1
|
||||||
@@ -688,7 +682,7 @@ end
|
|||||||
# If a Pokémon makes contact with the user before it uses this move, the
|
# If a Pokémon makes contact with the user before it uses this move, the
|
||||||
# attacker is burned. (Beak Blast)
|
# attacker is burned. (Beak Blast)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BurnAttackerBeforeUserActs < PokeBattle_Move
|
class Battle::Move::BurnAttackerBeforeUserActs < Battle::Move
|
||||||
def pbDisplayChargeMessage(user)
|
def pbDisplayChargeMessage(user)
|
||||||
user.effects[PBEffects::BeakBlast] = true
|
user.effects[PBEffects::BeakBlast] = true
|
||||||
@battle.pbCommonAnimation("BeakBlast",user)
|
@battle.pbCommonAnimation("BeakBlast",user)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack by 1 stage.
|
# Increases the user's Attack by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAttack1 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserAttack1 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1]
|
@statUp = [:ATTACK,1]
|
||||||
@@ -11,7 +11,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack by 2 stages. (Swords Dance)
|
# Increases the user's Attack by 2 stages. (Swords Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAttack2 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserAttack2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,2]
|
@statUp = [:ATTACK,2]
|
||||||
@@ -22,7 +22,7 @@ end
|
|||||||
# If this move KO's the target, increases the user's Attack by 2 stages.
|
# If this move KO's the target, increases the user's Attack by 2 stages.
|
||||||
# (Fell Stinger (Gen 6-))
|
# (Fell Stinger (Gen 6-))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAttack2IfTargetFaints < PokeBattle_Move
|
class Battle::Move::RaiseUserAttack2IfTargetFaints < Battle::Move
|
||||||
def pbEffectAfterAllHits(user, target)
|
def pbEffectAfterAllHits(user, target)
|
||||||
return if !target.damageState.fainted
|
return if !target.damageState.fainted
|
||||||
return if !user.pbCanRaiseStatStage?(:ATTACK, user, self)
|
return if !user.pbCanRaiseStatStage?(:ATTACK, user, self)
|
||||||
@@ -33,7 +33,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack by 3 stages.
|
# Increases the user's Attack by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAttack3 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserAttack3 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK, 3]
|
@statUp = [:ATTACK, 3]
|
||||||
@@ -44,7 +44,7 @@ end
|
|||||||
# If this move KO's the target, increases the user's Attack by 3 stages.
|
# If this move KO's the target, increases the user's Attack by 3 stages.
|
||||||
# (Fell Stinger (Gen 7+))
|
# (Fell Stinger (Gen 7+))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAttack3IfTargetFaints < PokeBattle_Move
|
class Battle::Move::RaiseUserAttack3IfTargetFaints < Battle::Move
|
||||||
def pbEffectAfterAllHits(user,target)
|
def pbEffectAfterAllHits(user,target)
|
||||||
return if !target.damageState.fainted
|
return if !target.damageState.fainted
|
||||||
return if !user.pbCanRaiseStatStage?(:ATTACK,user,self)
|
return if !user.pbCanRaiseStatStage?(:ATTACK,user,self)
|
||||||
@@ -56,7 +56,7 @@ end
|
|||||||
# Reduces the user's HP by half of max, and sets its Attack to maximum.
|
# Reduces the user's HP by half of max, and sets its Attack to maximum.
|
||||||
# (Belly Drum)
|
# (Belly Drum)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_MaxUserAttackLoseHalfOfTotalHP < PokeBattle_Move
|
class Battle::Move::MaxUserAttackLoseHalfOfTotalHP < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -91,7 +91,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Defense by 1 stage. (Harden, Steel Wing, Withdraw)
|
# Increases the user's Defense by 1 stage. (Harden, Steel Wing, Withdraw)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserDefense1 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserDefense1 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:DEFENSE,1]
|
@statUp = [:DEFENSE,1]
|
||||||
@@ -101,7 +101,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Defense by 1 stage. User curls up. (Defense Curl)
|
# Increases the user's Defense by 1 stage. User curls up. (Defense Curl)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserDefense1CurlUpUser < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserDefense1CurlUpUser < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:DEFENSE,1]
|
@statUp = [:DEFENSE,1]
|
||||||
@@ -116,7 +116,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Defense by 2 stages. (Acid Armor, Barrier, Iron Defense)
|
# Increases the user's Defense by 2 stages. (Acid Armor, Barrier, Iron Defense)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserDefense2 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserDefense2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:DEFENSE,2]
|
@statUp = [:DEFENSE,2]
|
||||||
@@ -126,7 +126,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Defense by 3 stages. (Cotton Guard)
|
# Increases the user's Defense by 3 stages. (Cotton Guard)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserDefense3 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserDefense3 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:DEFENSE,3]
|
@statUp = [:DEFENSE,3]
|
||||||
@@ -136,7 +136,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Special Attack by 1 stage. (Charge Beam, Fiery Dance)
|
# Increases the user's Special Attack by 1 stage. (Charge Beam, Fiery Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpAtk1 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpAtk1 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_ATTACK,1]
|
@statUp = [:SPECIAL_ATTACK,1]
|
||||||
@@ -146,7 +146,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Special Attack by 2 stages. (Nasty Plot)
|
# Increases the user's Special Attack by 2 stages. (Nasty Plot)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpAtk2 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpAtk2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_ATTACK,2]
|
@statUp = [:SPECIAL_ATTACK,2]
|
||||||
@@ -156,7 +156,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Special Attack by 3 stages. (Tail Glow)
|
# Increases the user's Special Attack by 3 stages. (Tail Glow)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpAtk3 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpAtk3 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_ATTACK,3]
|
@statUp = [:SPECIAL_ATTACK,3]
|
||||||
@@ -166,7 +166,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Special Defense by 1 stage.
|
# Increases the user's Special Defense by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpDef1 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpDef1 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_DEFENSE, 1]
|
@statUp = [:SPECIAL_DEFENSE, 1]
|
||||||
@@ -177,7 +177,7 @@ end
|
|||||||
# Increases the user's Special Defense by 1 stage.
|
# Increases the user's Special Defense by 1 stage.
|
||||||
# Charges up user's next attack if it is Electric-type. (Charge)
|
# Charges up user's next attack if it is Electric-type. (Charge)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpDef1PowerUpElectricMove < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpDef1PowerUpElectricMove < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_DEFENSE,1]
|
@statUp = [:SPECIAL_DEFENSE,1]
|
||||||
@@ -193,7 +193,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Special Defense by 2 stages. (Amnesia)
|
# Increases the user's Special Defense by 2 stages. (Amnesia)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpDef2 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpDef2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_DEFENSE,2]
|
@statUp = [:SPECIAL_DEFENSE,2]
|
||||||
@@ -203,7 +203,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Special Defense by 3 stages.
|
# Increases the user's Special Defense by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpDef3 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpDef3 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_DEFENSE, 3]
|
@statUp = [:SPECIAL_DEFENSE, 3]
|
||||||
@@ -213,7 +213,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Speed by 1 stage. (Flame Charge)
|
# Increases the user's Speed by 1 stage. (Flame Charge)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpeed1 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpeed1 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPEED,1]
|
@statUp = [:SPEED,1]
|
||||||
@@ -223,7 +223,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Speed by 2 stages. (Agility, Rock Polish)
|
# Increases the user's Speed by 2 stages. (Agility, Rock Polish)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpeed2 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpeed2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPEED,2]
|
@statUp = [:SPEED,2]
|
||||||
@@ -234,7 +234,7 @@ end
|
|||||||
# Increases the user's Speed by 2 stages. Lowers user's weight by 100kg.
|
# Increases the user's Speed by 2 stages. Lowers user's weight by 100kg.
|
||||||
# (Autotomize)
|
# (Autotomize)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpeed2LowerUserWeight < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpeed2LowerUserWeight < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPEED,2]
|
@statUp = [:SPEED,2]
|
||||||
@@ -252,7 +252,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Speed by 3 stages.
|
# Increases the user's Speed by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpeed3 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserSpeed3 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPEED, 3]
|
@statUp = [:SPEED, 3]
|
||||||
@@ -262,7 +262,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's accuracy by 1 stage.
|
# Increases the user's accuracy by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAccuracy1 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserAccuracy1 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:ACCURACY, 1]
|
@statUp = [:ACCURACY, 1]
|
||||||
@@ -272,7 +272,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's accuracy by 2 stages.
|
# Increases the user's accuracy by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAccuracy2 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserAccuracy2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:ACCURACY, 2]
|
@statUp = [:ACCURACY, 2]
|
||||||
@@ -282,7 +282,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's accuracy by 3 stages.
|
# Increases the user's accuracy by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAccuracy3 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserAccuracy3 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:ACCURACY, 3]
|
@statUp = [:ACCURACY, 3]
|
||||||
@@ -292,7 +292,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's evasion by 1 stage. (Double Team)
|
# Increases the user's evasion by 1 stage. (Double Team)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserEvasion1 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserEvasion1 < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:EVASION,1]
|
@statUp = [:EVASION,1]
|
||||||
@@ -302,7 +302,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's evasion by 2 stages.
|
# Increases the user's evasion by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserEvasion2 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserEvasion2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:EVASION, 2]
|
@statUp = [:EVASION, 2]
|
||||||
@@ -312,7 +312,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's evasion by 2 stages. Minimizes the user. (Minimize)
|
# Increases the user's evasion by 2 stages. Minimizes the user. (Minimize)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserEvasion2MinimizeUser < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserEvasion2MinimizeUser < Battle::Move::StatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:EVASION,2]
|
@statUp = [:EVASION,2]
|
||||||
@@ -327,7 +327,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's evasion by 3 stages.
|
# Increases the user's evasion by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserEvasion3 < PokeBattle_StatUpMove
|
class Battle::Move::RaiseUserEvasion3 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:EVASION, 3]
|
@statUp = [:EVASION, 3]
|
||||||
@@ -337,7 +337,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's critical hit rate. (Focus Energy)
|
# Increases the user's critical hit rate. (Focus Energy)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserCriticalHitRate2 < PokeBattle_Move
|
class Battle::Move::RaiseUserCriticalHitRate2 < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -357,7 +357,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack and Defense by 1 stage each. (Bulk Up)
|
# Increases the user's Attack and Defense by 1 stage each. (Bulk Up)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAtkDef1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserAtkDef1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1,:DEFENSE,1]
|
@statUp = [:ATTACK,1,:DEFENSE,1]
|
||||||
@@ -367,7 +367,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack, Defense and accuracy by 1 stage each. (Coil)
|
# Increases the user's Attack, Defense and accuracy by 1 stage each. (Coil)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAtkDefAcc1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserAtkDefAcc1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1,:DEFENSE,1,:ACCURACY,1]
|
@statUp = [:ATTACK,1,:DEFENSE,1,:ACCURACY,1]
|
||||||
@@ -377,7 +377,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack and Special Attack by 1 stage each. (Work Up)
|
# Increases the user's Attack and Special Attack by 1 stage each. (Work Up)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAtkSpAtk1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserAtkSpAtk1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
@statUp = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
||||||
@@ -388,7 +388,7 @@ end
|
|||||||
# Increases the user's Attack and Sp. Attack by 1 stage each.
|
# Increases the user's Attack and Sp. Attack by 1 stage each.
|
||||||
# In sunny weather, increases are 2 stages each instead. (Growth)
|
# In sunny weather, increases are 2 stages each instead. (Growth)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAtkSpAtk1Or2InSun < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserAtkSpAtk1Or2InSun < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
@statUp = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
||||||
@@ -406,7 +406,7 @@ end
|
|||||||
# Increases the user's Attack, Speed and Special Attack by 2 stages each.
|
# Increases the user's Attack, Speed and Special Attack by 2 stages each.
|
||||||
# (Shell Smash)
|
# (Shell Smash)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2 < PokeBattle_Move
|
class Battle::Move::LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2 < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -457,7 +457,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack and Speed by 1 stage each. (Dragon Dance)
|
# Increases the user's Attack and Speed by 1 stage each. (Dragon Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAtkSpd1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserAtkSpd1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1,:SPEED,1]
|
@statUp = [:ATTACK,1,:SPEED,1]
|
||||||
@@ -467,7 +467,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Speed by 2 stages, and its Attack by 1 stage. (Shift Gear)
|
# Increases the user's Speed by 2 stages, and its Attack by 1 stage. (Shift Gear)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAtk1Spd2 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserAtk1Spd2 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPEED,2,:ATTACK,1]
|
@statUp = [:SPEED,2,:ATTACK,1]
|
||||||
@@ -477,7 +477,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Attack and accuracy by 1 stage each. (Hone Claws)
|
# Increases the user's Attack and accuracy by 1 stage each. (Hone Claws)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAtkAcc1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserAtkAcc1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1,:ACCURACY,1]
|
@statUp = [:ATTACK,1,:ACCURACY,1]
|
||||||
@@ -488,7 +488,7 @@ end
|
|||||||
# Increases the user's Defense and Special Defense by 1 stage each.
|
# Increases the user's Defense and Special Defense by 1 stage each.
|
||||||
# (Cosmic Power, Defend Order)
|
# (Cosmic Power, Defend Order)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserDefSpDef1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserDefSpDef1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:DEFENSE,1,:SPECIAL_DEFENSE,1]
|
@statUp = [:DEFENSE,1,:SPECIAL_DEFENSE,1]
|
||||||
@@ -498,7 +498,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's Sp. Attack and Sp. Defense by 1 stage each. (Calm Mind)
|
# Increases the user's Sp. Attack and Sp. Defense by 1 stage each. (Calm Mind)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpAtkSpDef1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserSpAtkSpDef1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1]
|
@statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1]
|
||||||
@@ -509,7 +509,7 @@ end
|
|||||||
# Increases the user's Sp. Attack, Sp. Defense and Speed by 1 stage each.
|
# Increases the user's Sp. Attack, Sp. Defense and Speed by 1 stage each.
|
||||||
# (Quiver Dance)
|
# (Quiver Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserSpAtkSpDefSpd1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserSpAtkSpDefSpd1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1]
|
@statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1]
|
||||||
@@ -520,7 +520,7 @@ end
|
|||||||
# Increases the user's Attack, Defense, Speed, Special Attack and Special Defense
|
# Increases the user's Attack, Defense, Speed, Special Attack and Special Defense
|
||||||
# by 1 stage each. (Ancient Power, Ominous Wind, Silver Wind)
|
# by 1 stage each. (Ancient Power, Ominous Wind, Silver Wind)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserMainStats1 < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserMainStats1 < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statUp = [:ATTACK,1,:DEFENSE,1,:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1]
|
@statUp = [:ATTACK,1,:DEFENSE,1,:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1]
|
||||||
@@ -532,7 +532,7 @@ end
|
|||||||
# Speed by 1 stage each, and reduces the user's HP by a third of its total HP.
|
# Speed by 1 stage each, and reduces the user's HP by a third of its total HP.
|
||||||
# Fails if it can't do either effect. (Clangorous Soul)
|
# Fails if it can't do either effect. (Clangorous Soul)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserMainStats1LoseThirdOfTotalHP < PokeBattle_MultiStatUpMove
|
class Battle::Move::RaiseUserMainStats1LoseThirdOfTotalHP < Battle::Move::MultiStatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [
|
@statUp = [
|
||||||
@@ -568,7 +568,7 @@ end
|
|||||||
# still switch out if holding Shed Shell or Eject Button, or if affected by a
|
# still switch out if holding Shed Shell or Eject Button, or if affected by a
|
||||||
# Red Card. (No Retreat)
|
# Red Card. (No Retreat)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserMainStats1TrapUserInBattle < PokeBattle_Move_RaiseUserMainStats1
|
class Battle::Move::RaiseUserMainStats1TrapUserInBattle < Battle::Move::RaiseUserMainStats1
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
if user.effects[PBEffects::NoRetreat]
|
if user.effects[PBEffects::NoRetreat]
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -591,7 +591,7 @@ end
|
|||||||
# (Handled in Battler's pbProcessMoveAgainstTarget): Ups rager's Attack by 1
|
# (Handled in Battler's pbProcessMoveAgainstTarget): Ups rager's Attack by 1
|
||||||
# stage each time it loses HP due to a move.
|
# stage each time it loses HP due to a move.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartRaiseUserAtk1WhenDamaged < PokeBattle_Move
|
class Battle::Move::StartRaiseUserAtk1WhenDamaged < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
user.effects[PBEffects::Rage] = true
|
user.effects[PBEffects::Rage] = true
|
||||||
end
|
end
|
||||||
@@ -600,7 +600,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Attack by 1 stage.
|
# Decreases the user's Attack by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserAttack1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserAttack1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK, 1]
|
@statDown = [:ATTACK, 1]
|
||||||
@@ -610,7 +610,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Attack by 2 stages.
|
# Decreases the user's Attack by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserAttack2 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserAttack2 < Battle::Move::StatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK, 2]
|
@statDown = [:ATTACK, 2]
|
||||||
@@ -620,7 +620,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Defense by 1 stage. (Clanging Scales)
|
# Decreases the user's Defense by 1 stage. (Clanging Scales)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserDefense1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserDefense1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:DEFENSE,1]
|
@statDown = [:DEFENSE,1]
|
||||||
@@ -630,7 +630,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Defense by 2 stages.
|
# Decreases the user's Defense by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserDefense2 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserDefense2 < Battle::Move::StatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:DEFENSE, 2]
|
@statDown = [:DEFENSE, 2]
|
||||||
@@ -640,7 +640,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Special Attack by 1 stage.
|
# Decreases the user's Special Attack by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserSpAtk1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserSpAtk1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_ATTACK, 1]
|
@statDown = [:SPECIAL_ATTACK, 1]
|
||||||
@@ -650,7 +650,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Special Attack by 2 stages.
|
# Decreases the user's Special Attack by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserSpAtk2 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserSpAtk2 < Battle::Move::StatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_ATTACK,2]
|
@statDown = [:SPECIAL_ATTACK,2]
|
||||||
@@ -660,7 +660,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Special Defense by 1 stage.
|
# Decreases the user's Special Defense by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserSpDef1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserSpDef1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_DEFENSE, 1]
|
@statDown = [:SPECIAL_DEFENSE, 1]
|
||||||
@@ -670,7 +670,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Special Defense by 2 stages.
|
# Decreases the user's Special Defense by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserSpDef2 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserSpDef2 < Battle::Move::StatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_DEFENSE, 2]
|
@statDown = [:SPECIAL_DEFENSE, 2]
|
||||||
@@ -680,7 +680,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Speed by 1 stage. (Hammer Arm, Ice Hammer)
|
# Decreases the user's Speed by 1 stage. (Hammer Arm, Ice Hammer)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserSpeed1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserSpeed1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED,1]
|
@statDown = [:SPEED,1]
|
||||||
@@ -690,7 +690,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Speed by 2 stages.
|
# Decreases the user's Speed by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserSpeed2 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserSpeed2 < Battle::Move::StatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED, 2]
|
@statDown = [:SPEED, 2]
|
||||||
@@ -700,7 +700,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the user's Attack and Defense by 1 stage each. (Superpower)
|
# Decreases the user's Attack and Defense by 1 stage each. (Superpower)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserAtkDef1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserAtkDef1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK,1,:DEFENSE,1]
|
@statDown = [:ATTACK,1,:DEFENSE,1]
|
||||||
@@ -711,7 +711,7 @@ end
|
|||||||
# Decreases the user's Defense and Special Defense by 1 stage each.
|
# Decreases the user's Defense and Special Defense by 1 stage each.
|
||||||
# (Close Combat, Dragon Ascent)
|
# (Close Combat, Dragon Ascent)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserDefSpDef1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserDefSpDef1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:DEFENSE,1,:SPECIAL_DEFENSE,1]
|
@statDown = [:DEFENSE,1,:SPECIAL_DEFENSE,1]
|
||||||
@@ -724,7 +724,7 @@ end
|
|||||||
# Decreases the user's Defense, Special Defense and Speed by 1 stage each.
|
# Decreases the user's Defense, Special Defense and Speed by 1 stage each.
|
||||||
# (V-create)
|
# (V-create)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerUserDefSpDefSpd1 < PokeBattle_StatDownMove
|
class Battle::Move::LowerUserDefSpDefSpd1 < Battle::Move::StatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED,1,:DEFENSE,1,:SPECIAL_DEFENSE,1]
|
@statDown = [:SPEED,1,:DEFENSE,1,:SPECIAL_DEFENSE,1]
|
||||||
@@ -734,7 +734,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the user's and allies' Attack by 1 stage. (Howl (Gen 8+))
|
# Increases the user's and allies' Attack by 1 stage. (Howl (Gen 8+))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseTargetAttack1 < PokeBattle_Move
|
class Battle::Move::RaiseTargetAttack1 < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
@@ -771,7 +771,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the target's Attack by 2 stages. Confuses the target. (Swagger)
|
# Increases the target's Attack by 2 stages. Confuses the target. (Swagger)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseTargetAttack2ConfuseTarget < PokeBattle_Move
|
class Battle::Move::RaiseTargetAttack2ConfuseTarget < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -800,7 +800,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the target's Special Attack by 1 stage. Confuses the target. (Flatter)
|
# Increases the target's Special Attack by 1 stage. Confuses the target. (Flatter)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseTargetSpAtk1ConfuseTarget < PokeBattle_Move
|
class Battle::Move::RaiseTargetSpAtk1ConfuseTarget < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -829,7 +829,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases target's Special Defense by 1 stage. (Aromatic Mist)
|
# Increases target's Special Defense by 1 stage. (Aromatic Mist)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseTargetSpDef1 < PokeBattle_Move
|
class Battle::Move::RaiseTargetSpDef1 < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -845,7 +845,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases one random stat of the target by 2 stages (except HP). (Acupressure)
|
# Increases one random stat of the target by 2 stages (except HP). (Acupressure)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseTargetRandomStat2 < PokeBattle_Move
|
class Battle::Move::RaiseTargetRandomStat2 < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@statArray = []
|
@statArray = []
|
||||||
GameData::Stat.each_battle do |s|
|
GameData::Stat.each_battle do |s|
|
||||||
@@ -867,7 +867,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Increases the target's Attack and Special Attack by 2 stages each. (Decorate)
|
# Increases the target's Attack and Special Attack by 2 stages each. (Decorate)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseTargetAtkSpAtk2 < PokeBattle_Move
|
class Battle::Move::RaiseTargetAtkSpAtk2 < Battle::Move
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
failed = true
|
failed = true
|
||||||
targets.each do |b|
|
targets.each do |b|
|
||||||
@@ -896,7 +896,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Attack by 1 stage.
|
# Decreases the target's Attack by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAttack1 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetAttack1 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK,1]
|
@statDown = [:ATTACK,1]
|
||||||
@@ -906,7 +906,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Attack by 1 stage. Bypasses target's Substitute. (Play Nice)
|
# Decreases the target's Attack by 1 stage. Bypasses target's Substitute. (Play Nice)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAttack1BypassSubstitute < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetAttack1BypassSubstitute < Battle::Move::TargetStatDownMove
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -918,7 +918,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Attack by 2 stages. (Charm, Feather Dance)
|
# Decreases the target's Attack by 2 stages. (Charm, Feather Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAttack2 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetAttack2 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK,2]
|
@statDown = [:ATTACK,2]
|
||||||
@@ -928,7 +928,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Attack by 3 stages.
|
# Decreases the target's Attack by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAttack3 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetAttack3 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK, 3]
|
@statDown = [:ATTACK, 3]
|
||||||
@@ -938,7 +938,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Defense by 1 stage.
|
# Decreases the target's Defense by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetDefense1 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetDefense1 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:DEFENSE,1]
|
@statDown = [:DEFENSE,1]
|
||||||
@@ -949,7 +949,7 @@ end
|
|||||||
# Decreases the target's Defense by 1 stage. Power is doubled if Gravity is in
|
# Decreases the target's Defense by 1 stage. Power is doubled if Gravity is in
|
||||||
# effect. (Grav Apple)
|
# effect. (Grav Apple)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetDefense1DoublePowerInGravity < PokeBattle_Move_LowerTargetDefense1
|
class Battle::Move::LowerTargetDefense1DoublePowerInGravity < Battle::Move::LowerTargetDefense1
|
||||||
def pbBaseDamage(baseDmg, user, target)
|
def pbBaseDamage(baseDmg, user, target)
|
||||||
baseDmg *= 2 if @battle.field.effects[PBEffects::Gravity] > 0
|
baseDmg *= 2 if @battle.field.effects[PBEffects::Gravity] > 0
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -959,7 +959,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Defense by 2 stages. (Screech)
|
# Decreases the target's Defense by 2 stages. (Screech)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetDefense2 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetDefense2 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:DEFENSE,2]
|
@statDown = [:DEFENSE,2]
|
||||||
@@ -969,7 +969,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Defense by 3 stages.
|
# Decreases the target's Defense by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetDefense3 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetDefense3 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:DEFENSE, 3]
|
@statDown = [:DEFENSE, 3]
|
||||||
@@ -979,7 +979,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Special Attack by 1 stage.
|
# Decreases the target's Special Attack by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpAtk1 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpAtk1 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_ATTACK,1]
|
@statDown = [:SPECIAL_ATTACK,1]
|
||||||
@@ -989,7 +989,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Special Attack by 2 stages. (Eerie Impulse)
|
# Decreases the target's Special Attack by 2 stages. (Eerie Impulse)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpAtk2 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpAtk2 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_ATTACK,2]
|
@statDown = [:SPECIAL_ATTACK,2]
|
||||||
@@ -1000,7 +1000,7 @@ end
|
|||||||
# Decreases the target's Special Attack by 2 stages. Only works on the opposite
|
# Decreases the target's Special Attack by 2 stages. Only works on the opposite
|
||||||
# gender. (Captivate)
|
# gender. (Captivate)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpAtk2IfCanAttract < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpAtk2IfCanAttract < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_ATTACK,2]
|
@statDown = [:SPECIAL_ATTACK,2]
|
||||||
@@ -1016,7 +1016,7 @@ class PokeBattle_Move_LowerTargetSpAtk2IfCanAttract < PokeBattle_TargetStatDownM
|
|||||||
if target.hasActiveAbility?(:OBLIVIOUS) && !@battle.moldBreaker
|
if target.hasActiveAbility?(:OBLIVIOUS) && !@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} prevents romance!", target.pbThis, target.abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} prevents romance!", target.pbThis, target.abilityName))
|
||||||
@@ -1038,7 +1038,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Special Attack by 3 stages.
|
# Decreases the target's Special Attack by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpAtk3 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpAtk3 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_ATTACK, 3]
|
@statDown = [:SPECIAL_ATTACK, 3]
|
||||||
@@ -1048,7 +1048,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Special Defense by 1 stage.
|
# Decreases the target's Special Defense by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpDef1 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpDef1 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_DEFENSE,1]
|
@statDown = [:SPECIAL_DEFENSE,1]
|
||||||
@@ -1058,7 +1058,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Special Defense by 2 stages.
|
# Decreases the target's Special Defense by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpDef2 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpDef2 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_DEFENSE,2]
|
@statDown = [:SPECIAL_DEFENSE,2]
|
||||||
@@ -1068,7 +1068,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Special Defense by 3 stages.
|
# Decreases the target's Special Defense by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpDef3 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpDef3 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPECIAL_DEFENSE, 3]
|
@statDown = [:SPECIAL_DEFENSE, 3]
|
||||||
@@ -1078,7 +1078,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Speed by 1 stage.
|
# Decreases the target's Speed by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpeed1 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpeed1 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED,1]
|
@statDown = [:SPEED,1]
|
||||||
@@ -1089,7 +1089,7 @@ end
|
|||||||
# Decreases the target's Speed by 1 stage. Power is halved in Grassy Terrain.
|
# Decreases the target's Speed by 1 stage. Power is halved in Grassy Terrain.
|
||||||
# (Bulldoze)
|
# (Bulldoze)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpeed1WeakerInGrassyTerrain < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpeed1WeakerInGrassyTerrain < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED,1]
|
@statDown = [:SPEED,1]
|
||||||
@@ -1106,7 +1106,7 @@ end
|
|||||||
# Fire moves used against the target (this effect does not stack). Fails if
|
# Fire moves used against the target (this effect does not stack). Fails if
|
||||||
# neither of these effects can be applied. (Tar Shot)
|
# neither of these effects can be applied. (Tar Shot)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpeed1MakeTargetWeakerToFire < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpeed1MakeTargetWeakerToFire < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED,1]
|
@statDown = [:SPEED,1]
|
||||||
@@ -1129,7 +1129,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Speed by 2 stages. (Cotton Spore, Scary Face, String Shot)
|
# Decreases the target's Speed by 2 stages. (Cotton Spore, Scary Face, String Shot)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpeed2 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpeed2 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED, 2]
|
@statDown = [:SPEED, 2]
|
||||||
@@ -1139,7 +1139,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Speed by 3 stages.
|
# Decreases the target's Speed by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetSpeed3 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetSpeed3 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:SPEED, 3]
|
@statDown = [:SPEED, 3]
|
||||||
@@ -1149,7 +1149,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's accuracy by 1 stage.
|
# Decreases the target's accuracy by 1 stage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAccuracy1 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetAccuracy1 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:ACCURACY,1]
|
@statDown = [:ACCURACY,1]
|
||||||
@@ -1159,7 +1159,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's accuracy by 2 stages.
|
# Decreases the target's accuracy by 2 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAccuracy2 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetAccuracy2 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:ACCURACY, 2]
|
@statDown = [:ACCURACY, 2]
|
||||||
@@ -1169,7 +1169,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's accuracy by 3 stages.
|
# Decreases the target's accuracy by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAccuracy3 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetAccuracy3 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:ACCURACY, 3]
|
@statDown = [:ACCURACY, 3]
|
||||||
@@ -1179,7 +1179,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's evasion by 1 stage. (Sweet Scent (Gen 5-))
|
# Decreases the target's evasion by 1 stage. (Sweet Scent (Gen 5-))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetEvasion1 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetEvasion1 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:EVASION, 1]
|
@statDown = [:EVASION, 1]
|
||||||
@@ -1190,7 +1190,7 @@ end
|
|||||||
# Decreases the target's evasion by 1 stage. Ends all barriers and entry
|
# Decreases the target's evasion by 1 stage. Ends all barriers and entry
|
||||||
# hazards for the target's side OR on both sides. (Defog)
|
# hazards for the target's side OR on both sides. (Defog)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetEvasion1RemoveSideEffects < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetEvasion1RemoveSideEffects < Battle::Move::TargetStatDownMove
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -1290,7 +1290,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's evasion by 2 stages. (Sweet Scent (Gen 6+))
|
# Decreases the target's evasion by 2 stages. (Sweet Scent (Gen 6+))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetEvasion2 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetEvasion2 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:EVASION, 2]
|
@statDown = [:EVASION, 2]
|
||||||
@@ -1300,7 +1300,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's evasion by 3 stages.
|
# Decreases the target's evasion by 3 stages.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetEvasion3 < PokeBattle_TargetStatDownMove
|
class Battle::Move::LowerTargetEvasion3 < Battle::Move::TargetStatDownMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statDown = [:EVASION, 3]
|
@statDown = [:EVASION, 3]
|
||||||
@@ -1310,7 +1310,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Attack and Defense by 1 stage each. (Tickle)
|
# Decreases the target's Attack and Defense by 1 stage each. (Tickle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAtkDef1 < PokeBattle_TargetMultiStatDownMove
|
class Battle::Move::LowerTargetAtkDef1 < Battle::Move::TargetMultiStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK,1,:DEFENSE,1]
|
@statDown = [:ATTACK,1,:DEFENSE,1]
|
||||||
@@ -1320,7 +1320,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Decreases the target's Attack and Special Attack by 1 stage each. (Noble Roar)
|
# Decreases the target's Attack and Special Attack by 1 stage each. (Noble Roar)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAtkSpAtk1 < PokeBattle_TargetMultiStatDownMove
|
class Battle::Move::LowerTargetAtkSpAtk1 < Battle::Move::TargetMultiStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
@statDown = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
||||||
@@ -1331,7 +1331,7 @@ end
|
|||||||
# Decreases the Attack, Special Attack and Speed of all poisoned targets by 1
|
# Decreases the Attack, Special Attack and Speed of all poisoned targets by 1
|
||||||
# stage each. (Venom Drench)
|
# stage each. (Venom Drench)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerPoisonedTargetAtkSpAtkSpd1 < PokeBattle_Move
|
class Battle::Move::LowerPoisonedTargetAtkSpAtkSpd1 < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -1367,7 +1367,7 @@ class PokeBattle_Move_LowerPoisonedTargetAtkSpAtkSpd1 < PokeBattle_Move
|
|||||||
end
|
end
|
||||||
if failed
|
if failed
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} activated!", target.pbThis, target.abilityName))
|
@battle.pbDisplay(_INTL("{1}'s {2} activated!", target.pbThis, target.abilityName))
|
||||||
end
|
end
|
||||||
user.pbCanLowerStatStage?(@statDown[0], target, self, true, false, true) # Show fail message
|
user.pbCanLowerStatStage?(@statDown[0], target, self, true, false, true) # Show fail message
|
||||||
@@ -1399,7 +1399,7 @@ end
|
|||||||
# Raises the Attack and Defense of all user's allies by 1 stage each. Bypasses
|
# Raises the Attack and Defense of all user's allies by 1 stage each. Bypasses
|
||||||
# protections, including Crafty Shield. Fails if there is no ally. (Coaching)
|
# protections, including Crafty Shield. Fails if there is no ally. (Coaching)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseUserAndAlliesAtkDef1 < PokeBattle_Move
|
class Battle::Move::RaiseUserAndAlliesAtkDef1 < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -1448,7 +1448,7 @@ end
|
|||||||
# aren't protected by their substitute/ability/etc., but they are in Gen
|
# aren't protected by their substitute/ability/etc., but they are in Gen
|
||||||
# 6+). We achieve this by not targeting any battlers in Gen 5, since
|
# 6+). We achieve this by not targeting any battlers in Gen 5, since
|
||||||
# pbSuccessCheckAgainstTarget is only called for targeted battlers.
|
# pbSuccessCheckAgainstTarget is only called for targeted battlers.
|
||||||
class PokeBattle_Move_RaisePlusMinusUserAndAlliesAtkSpAtk1 < PokeBattle_Move
|
class Battle::Move::RaisePlusMinusUserAndAlliesAtkSpAtk1 < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -1503,7 +1503,7 @@ end
|
|||||||
# aren't protected by their substitute/ability/etc., but they are in Gen
|
# aren't protected by their substitute/ability/etc., but they are in Gen
|
||||||
# 6+). We achieve this by not targeting any battlers in Gen 5, since
|
# 6+). We achieve this by not targeting any battlers in Gen 5, since
|
||||||
# pbSuccessCheckAgainstTarget is only called for targeted battlers.
|
# pbSuccessCheckAgainstTarget is only called for targeted battlers.
|
||||||
class PokeBattle_Move_RaisePlusMinusUserAndAlliesDefSpDef1 < PokeBattle_Move
|
class Battle::Move::RaisePlusMinusUserAndAlliesDefSpDef1 < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -1551,7 +1551,7 @@ end
|
|||||||
# Increases the Attack and Special Attack of all Grass-type Pokémon in battle by
|
# Increases the Attack and Special Attack of all Grass-type Pokémon in battle by
|
||||||
# 1 stage each. Doesn't affect airborne Pokémon. (Rototiller)
|
# 1 stage each. Doesn't affect airborne Pokémon. (Rototiller)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseGroundedGrassBattlersAtkSpAtk1 < PokeBattle_Move
|
class Battle::Move::RaiseGroundedGrassBattlersAtkSpAtk1 < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@validTargets = []
|
@validTargets = []
|
||||||
@battle.allBattlers.each do |b|
|
@battle.allBattlers.each do |b|
|
||||||
@@ -1593,7 +1593,7 @@ end
|
|||||||
# Increases the Defense of all Grass-type Pokémon on the field by 1 stage each.
|
# Increases the Defense of all Grass-type Pokémon on the field by 1 stage each.
|
||||||
# (Flower Shield)
|
# (Flower Shield)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RaiseGrassBattlersDef1 < PokeBattle_Move
|
class Battle::Move::RaiseGrassBattlersDef1 < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@validTargets = []
|
@validTargets = []
|
||||||
@battle.allBattlers.each do |b|
|
@battle.allBattlers.each do |b|
|
||||||
@@ -1623,7 +1623,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User and target swap their Attack and Special Attack stat stages. (Power Swap)
|
# User and target swap their Attack and Special Attack stat stages. (Power Swap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetSwapAtkSpAtkStages < PokeBattle_Move
|
class Battle::Move::UserTargetSwapAtkSpAtkStages < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -1646,7 +1646,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User and target swap their Defense and Special Defense stat stages. (Guard Swap)
|
# User and target swap their Defense and Special Defense stat stages. (Guard Swap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetSwapDefSpDefStages < PokeBattle_Move
|
class Battle::Move::UserTargetSwapDefSpDefStages < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -1669,7 +1669,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User and target swap all their stat stages. (Heart Swap)
|
# User and target swap all their stat stages. (Heart Swap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetSwapStatStages < PokeBattle_Move
|
class Battle::Move::UserTargetSwapStatStages < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -1692,7 +1692,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User copies the target's stat stages. (Psych Up)
|
# User copies the target's stat stages. (Psych Up)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserCopyTargetStatStages < PokeBattle_Move
|
class Battle::Move::UserCopyTargetStatStages < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -1718,7 +1718,7 @@ end
|
|||||||
# and target's positive stat stages become 0, before damage calculation.
|
# and target's positive stat stages become 0, before damage calculation.
|
||||||
# (Spectral Thief)
|
# (Spectral Thief)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserStealTargetPositiveStatStages < PokeBattle_Move
|
class Battle::Move::UserStealTargetPositiveStatStages < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbCalcDamage(user,target,numTargets=1)
|
def pbCalcDamage(user,target,numTargets=1)
|
||||||
@@ -1745,7 +1745,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Reverses all stat changes of the target. (Topsy-Turvy)
|
# Reverses all stat changes of the target. (Topsy-Turvy)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_InvertTargetStatStages < PokeBattle_Move
|
class Battle::Move::InvertTargetStatStages < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -1773,7 +1773,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Resets all target's stat stages to 0. (Clear Smog)
|
# Resets all target's stat stages to 0. (Clear Smog)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ResetTargetStatStages < PokeBattle_Move
|
class Battle::Move::ResetTargetStatStages < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
if target.damageState.calcDamage>0 && !target.damageState.substitute &&
|
if target.damageState.calcDamage>0 && !target.damageState.substitute &&
|
||||||
target.hasAlteredStatStages?
|
target.hasAlteredStatStages?
|
||||||
@@ -1786,7 +1786,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Resets all stat stages for all battlers to 0. (Haze)
|
# Resets all stat stages for all battlers to 0. (Haze)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ResetAllBattlersStatStages < PokeBattle_Move
|
class Battle::Move::ResetAllBattlersStatStages < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.allBattlers.none? { |b| b.hasAlteredStatStages? }
|
if @battle.allBattlers.none? { |b| b.hasAlteredStatStages? }
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -1804,7 +1804,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 5 rounds, user's and ally's stat stages cannot be lowered by foes. (Mist)
|
# For 5 rounds, user's and ally's stat stages cannot be lowered by foes. (Mist)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartUserSideImmunityToStatStageLowering < PokeBattle_Move
|
class Battle::Move::StartUserSideImmunityToStatStageLowering < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -1824,7 +1824,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Swaps the user's Attack and Defense stats. (Power Trick)
|
# Swaps the user's Attack and Defense stats. (Power Trick)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserSwapBaseAtkDef < PokeBattle_Move
|
class Battle::Move::UserSwapBaseAtkDef < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
@@ -1837,7 +1837,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User and target swap their Speed stats (not their stat stages). (Speed Swap)
|
# User and target swap their Speed stats (not their stat stages). (Speed Swap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetSwapBaseSpeed < PokeBattle_Move
|
class Battle::Move::UserTargetSwapBaseSpeed < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -1850,7 +1850,7 @@ end
|
|||||||
# Averages the user's and target's Attack.
|
# Averages the user's and target's Attack.
|
||||||
# Averages the user's and target's Special Attack. (Power Split)
|
# Averages the user's and target's Special Attack. (Power Split)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetAverageBaseAtkSpAtk < PokeBattle_Move
|
class Battle::Move::UserTargetAverageBaseAtkSpAtk < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
newatk = ((user.attack+target.attack)/2).floor
|
newatk = ((user.attack+target.attack)/2).floor
|
||||||
newspatk = ((user.spatk+target.spatk)/2).floor
|
newspatk = ((user.spatk+target.spatk)/2).floor
|
||||||
@@ -1864,7 +1864,7 @@ end
|
|||||||
# Averages the user's and target's Defense.
|
# Averages the user's and target's Defense.
|
||||||
# Averages the user's and target's Special Defense. (Guard Split)
|
# Averages the user's and target's Special Defense. (Guard Split)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetAverageBaseDefSpDef < PokeBattle_Move
|
class Battle::Move::UserTargetAverageBaseDefSpDef < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
newdef = ((user.defense+target.defense)/2).floor
|
newdef = ((user.defense+target.defense)/2).floor
|
||||||
newspdef = ((user.spdef+target.spdef)/2).floor
|
newspdef = ((user.spdef+target.spdef)/2).floor
|
||||||
@@ -1877,7 +1877,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Averages the user's and target's current HP. (Pain Split)
|
# Averages the user's and target's current HP. (Pain Split)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetAverageHP < PokeBattle_Move
|
class Battle::Move::UserTargetAverageHP < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
newHP = (user.hp+target.hp)/2
|
newHP = (user.hp+target.hp)/2
|
||||||
if user.hp>newHP
|
if user.hp>newHP
|
||||||
@@ -1899,7 +1899,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 4 rounds, doubles the Speed of all battlers on the user's side. (Tailwind)
|
# For 4 rounds, doubles the Speed of all battlers on the user's side. (Tailwind)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartUserSideDoubleSpeed < PokeBattle_Move
|
class Battle::Move::StartUserSideDoubleSpeed < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -1920,7 +1920,7 @@ end
|
|||||||
# For 5 rounds, swaps all battlers' base Defense with base Special Defense.
|
# For 5 rounds, swaps all battlers' base Defense with base Special Defense.
|
||||||
# (Wonder Room)
|
# (Wonder Room)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartSwapAllBattlersBaseDefensiveStats < PokeBattle_Move
|
class Battle::Move::StartSwapAllBattlersBaseDefensiveStats < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
if @battle.field.effects[PBEffects::WonderRoom]>0
|
if @battle.field.effects[PBEffects::WonderRoom]>0
|
||||||
@battle.field.effects[PBEffects::WonderRoom] = 0
|
@battle.field.effects[PBEffects::WonderRoom] = 0
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Puts the target to sleep.
|
# Puts the target to sleep.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SleepTarget < PokeBattle_SleepMove
|
class Battle::Move::SleepTarget < Battle::Move::SleepMove
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Puts the target to sleep. Fails if user is not Darkrai. (Dark Void (Gen 7+))
|
# Puts the target to sleep. Fails if user is not Darkrai. (Dark Void (Gen 7+))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SleepTargetIfUserDarkrai < PokeBattle_SleepMove
|
class Battle::Move::SleepTargetIfUserDarkrai < Battle::Move::SleepMove
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI
|
if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI
|
||||||
@battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis))
|
@battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis))
|
||||||
@@ -21,7 +21,7 @@ end
|
|||||||
# Puts the target to sleep. Changes the user's form if the user is Meloetta.
|
# Puts the target to sleep. Changes the user's form if the user is Meloetta.
|
||||||
# (Relic Song)
|
# (Relic Song)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SleepTargetChangeUserMeloettaForm < PokeBattle_SleepMove
|
class Battle::Move::SleepTargetChangeUserMeloettaForm < Battle::Move::SleepMove
|
||||||
def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers)
|
def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers)
|
||||||
return if numHits==0
|
return if numHits==0
|
||||||
return if user.fainted? || user.effects[PBEffects::Transform]
|
return if user.fainted? || user.effects[PBEffects::Transform]
|
||||||
@@ -35,7 +35,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Makes the target drowsy; it falls asleep at the end of the next turn. (Yawn)
|
# Makes the target drowsy; it falls asleep at the end of the next turn. (Yawn)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SleepTargetNextTurn < PokeBattle_Move
|
class Battle::Move::SleepTargetNextTurn < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -56,13 +56,13 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Poisons the target.
|
# Poisons the target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PoisonTarget < PokeBattle_PoisonMove
|
class Battle::Move::PoisonTarget < Battle::Move::PoisonMove
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Poisons the target and decreases its Speed by 1 stage. (Toxic Thread)
|
# Poisons the target and decreases its Speed by 1 stage. (Toxic Thread)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PoisonTargetLowerTargetSpeed1 < PokeBattle_Move
|
class Battle::Move::PoisonTargetLowerTargetSpeed1 < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -85,7 +85,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Badly poisons the target. (Poison Fang, Toxic)
|
# Badly poisons the target. (Poison Fang, Toxic)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BadPoisonTarget < PokeBattle_PoisonMove
|
class Battle::Move::BadPoisonTarget < Battle::Move::PoisonMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@toxic = true
|
@toxic = true
|
||||||
@@ -99,14 +99,14 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Paralyzes the target.
|
# Paralyzes the target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ParalyzeTarget < PokeBattle_ParalysisMove
|
class Battle::Move::ParalyzeTarget < Battle::Move::ParalysisMove
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Paralyzes the target. Doesn't affect target if move's type has no effect on
|
# Paralyzes the target. Doesn't affect target if move's type has no effect on
|
||||||
# it. (Thunder Wave)
|
# it. (Thunder Wave)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ParalyzeTargetIfNotTypeImmune < PokeBattle_ParalysisMove
|
class Battle::Move::ParalyzeTargetIfNotTypeImmune < Battle::Move::ParalysisMove
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if Effectiveness.ineffective?(target.damageState.typeMod)
|
if Effectiveness.ineffective?(target.damageState.typeMod)
|
||||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message
|
@battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message
|
||||||
@@ -120,7 +120,7 @@ end
|
|||||||
# Paralyzes the target. Does double damage and has perfect accuracy if target is
|
# Paralyzes the target. Does double damage and has perfect accuracy if target is
|
||||||
# Minimized. (Body Slam (Gen 6+))
|
# Minimized. (Body Slam (Gen 6+))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ParalyzeTargetTrampleMinimize < PokeBattle_ParalysisMove
|
class Battle::Move::ParalyzeTargetTrampleMinimize < Battle::Move::ParalysisMove
|
||||||
def tramplesMinimize?(param=1)
|
def tramplesMinimize?(param=1)
|
||||||
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||||
return true if param==2 # Double damage
|
return true if param==2 # Double damage
|
||||||
@@ -132,7 +132,7 @@ end
|
|||||||
# Paralyzes the target. Accuracy perfect in rain, 50% in sunshine. Hits some
|
# Paralyzes the target. Accuracy perfect in rain, 50% in sunshine. Hits some
|
||||||
# semi-invulnerable targets. (Thunder)
|
# semi-invulnerable targets. (Thunder)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ParalyzeTargetAlwaysHitsInRainHitsTargetInSky < PokeBattle_ParalysisMove
|
class Battle::Move::ParalyzeTargetAlwaysHitsInRainHitsTargetInSky < Battle::Move::ParalysisMove
|
||||||
def hitsFlyingTargets?; return true; end
|
def hitsFlyingTargets?; return true; end
|
||||||
|
|
||||||
def pbBaseAccuracy(user,target)
|
def pbBaseAccuracy(user,target)
|
||||||
@@ -149,7 +149,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Paralyzes the target. May cause the target to flinch. (Thunder Fang)
|
# Paralyzes the target. May cause the target to flinch. (Thunder Fang)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ParalyzeFlinchTarget < PokeBattle_Move
|
class Battle::Move::ParalyzeFlinchTarget < Battle::Move
|
||||||
def flinchingMove?; return true; end
|
def flinchingMove?; return true; end
|
||||||
|
|
||||||
def pbAdditionalEffect(user,target)
|
def pbAdditionalEffect(user,target)
|
||||||
@@ -166,14 +166,14 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Burns the target.
|
# Burns the target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BurnTarget < PokeBattle_BurnMove
|
class Battle::Move::BurnTarget < Battle::Move::BurnMove
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Burns the target if any of its stats were increased this round.
|
# Burns the target if any of its stats were increased this round.
|
||||||
# (Burning Jealousy)
|
# (Burning Jealousy)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BurnTargetIfTargetStatsRaisedThisTurn < PokeBattle_BurnMove
|
class Battle::Move::BurnTargetIfTargetStatsRaisedThisTurn < Battle::Move::BurnMove
|
||||||
def pbAdditionalEffect(user, target)
|
def pbAdditionalEffect(user, target)
|
||||||
super if target.statsRaisedThisRound
|
super if target.statsRaisedThisRound
|
||||||
end
|
end
|
||||||
@@ -182,7 +182,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Burns the target. May cause the target to flinch. (Fire Fang)
|
# Burns the target. May cause the target to flinch. (Fire Fang)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BurnFlinchTarget < PokeBattle_Move
|
class Battle::Move::BurnFlinchTarget < Battle::Move
|
||||||
def flinchingMove?; return true; end
|
def flinchingMove?; return true; end
|
||||||
|
|
||||||
def pbAdditionalEffect(user,target)
|
def pbAdditionalEffect(user,target)
|
||||||
@@ -199,13 +199,13 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Freezes the target.
|
# Freezes the target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FreezeTarget < PokeBattle_FreezeMove
|
class Battle::Move::FreezeTarget < Battle::Move::FreezeMove
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Freezes the target. Effectiveness against Water-type is 2x. (Freeze-Dry)
|
# Freezes the target. Effectiveness against Water-type is 2x. (Freeze-Dry)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FreezeTargetSuperEffectiveAgainstWater < PokeBattle_FreezeMove
|
class Battle::Move::FreezeTargetSuperEffectiveAgainstWater < Battle::Move::FreezeMove
|
||||||
def pbCalcTypeModSingle(moveType,defType,user,target)
|
def pbCalcTypeModSingle(moveType,defType,user,target)
|
||||||
return Effectiveness::SUPER_EFFECTIVE_ONE if defType == :WATER
|
return Effectiveness::SUPER_EFFECTIVE_ONE if defType == :WATER
|
||||||
return super
|
return super
|
||||||
@@ -215,7 +215,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Freezes the target. Accuracy perfect in hail. (Blizzard)
|
# Freezes the target. Accuracy perfect in hail. (Blizzard)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FreezeTargetAlwaysHitsInHail < PokeBattle_FreezeMove
|
class Battle::Move::FreezeTargetAlwaysHitsInHail < Battle::Move::FreezeMove
|
||||||
def pbBaseAccuracy(user,target)
|
def pbBaseAccuracy(user,target)
|
||||||
return 0 if target.effectiveWeather == :Hail
|
return 0 if target.effectiveWeather == :Hail
|
||||||
return super
|
return super
|
||||||
@@ -225,7 +225,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Freezes the target. May cause the target to flinch. (Ice Fang)
|
# Freezes the target. May cause the target to flinch. (Ice Fang)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FreezeFlinchTarget < PokeBattle_Move
|
class Battle::Move::FreezeFlinchTarget < Battle::Move
|
||||||
def flinchingMove?; return true; end
|
def flinchingMove?; return true; end
|
||||||
|
|
||||||
def pbAdditionalEffect(user,target)
|
def pbAdditionalEffect(user,target)
|
||||||
@@ -242,7 +242,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Burns, freezes or paralyzes the target. (Tri Attack)
|
# Burns, freezes or paralyzes the target. (Tri Attack)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ParalyzeBurnOrFreezeTarget < PokeBattle_Move
|
class Battle::Move::ParalyzeBurnOrFreezeTarget < Battle::Move
|
||||||
def pbAdditionalEffect(user,target)
|
def pbAdditionalEffect(user,target)
|
||||||
return if target.damageState.substitute
|
return if target.damageState.substitute
|
||||||
case @battle.pbRandom(3)
|
case @battle.pbRandom(3)
|
||||||
@@ -256,7 +256,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User passes its status problem to the target. (Psycho Shift)
|
# User passes its status problem to the target. (Psycho Shift)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_GiveUserStatusToTarget < PokeBattle_Move
|
class Battle::Move::GiveUserStatusToTarget < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.status == :NONE
|
if user.status == :NONE
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -302,7 +302,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Cures user of burn, poison and paralysis. (Refresh)
|
# Cures user of burn, poison and paralysis. (Refresh)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CureUserBurnPoisonParalysis < PokeBattle_Move
|
class Battle::Move::CureUserBurnPoisonParalysis < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -337,7 +337,7 @@ end
|
|||||||
# aren't protected by their substitute/ability/etc., but they are in Gen
|
# aren't protected by their substitute/ability/etc., but they are in Gen
|
||||||
# 6+). We achieve this by not targeting any battlers in Gen 5, since
|
# 6+). We achieve this by not targeting any battlers in Gen 5, since
|
||||||
# pbSuccessCheckAgainstTarget is only called for targeted battlers.
|
# pbSuccessCheckAgainstTarget is only called for targeted battlers.
|
||||||
class PokeBattle_Move_CureUserPartyStatus < PokeBattle_Move
|
class Battle::Move::CureUserPartyStatus < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
def worksWithNoTargets?; return true; end
|
def worksWithNoTargets?; return true; end
|
||||||
|
|
||||||
@@ -416,7 +416,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Cures the target's burn. (Sparkling Aria)
|
# Cures the target's burn. (Sparkling Aria)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CureTargetBurn < PokeBattle_Move
|
class Battle::Move::CureTargetBurn < Battle::Move
|
||||||
def pbAdditionalEffect(user,target)
|
def pbAdditionalEffect(user,target)
|
||||||
return if target.fainted? || target.damageState.substitute
|
return if target.fainted? || target.damageState.substitute
|
||||||
return if target.status != :BURN
|
return if target.status != :BURN
|
||||||
@@ -428,7 +428,7 @@ end
|
|||||||
# Safeguards the user's side from being inflicted with status problems.
|
# Safeguards the user's side from being inflicted with status problems.
|
||||||
# (Safeguard)
|
# (Safeguard)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartUserSideImmunityToInflictedStatus < PokeBattle_Move
|
class Battle::Move::StartUserSideImmunityToInflictedStatus < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -448,14 +448,14 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Causes the target to flinch.
|
# Causes the target to flinch.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FlinchTarget < PokeBattle_FlinchMove
|
class Battle::Move::FlinchTarget < Battle::Move::FlinchMove
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Causes the target to flinch. Does double damage and has perfect accuracy if
|
# Causes the target to flinch. Does double damage and has perfect accuracy if
|
||||||
# the target is Minimized. (Dragon Rush (Gen 6+), Steamroller, Stomp)
|
# the target is Minimized. (Dragon Rush (Gen 6+), Steamroller, Stomp)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FlinchTargetTrampleMinimize < PokeBattle_FlinchMove
|
class Battle::Move::FlinchTargetTrampleMinimize < Battle::Move::FlinchMove
|
||||||
def tramplesMinimize?(param=1)
|
def tramplesMinimize?(param=1)
|
||||||
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||||
return true if param==2 # Double damage
|
return true if param==2 # Double damage
|
||||||
@@ -466,7 +466,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Causes the target to flinch. Fails if the user is not asleep. (Snore)
|
# Causes the target to flinch. Fails if the user is not asleep. (Snore)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FlinchTargetFailsIfUserNotAsleep < PokeBattle_FlinchMove
|
class Battle::Move::FlinchTargetFailsIfUserNotAsleep < Battle::Move::FlinchMove
|
||||||
def usableWhenAsleep?; return true; end
|
def usableWhenAsleep?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -482,7 +482,7 @@ end
|
|||||||
# Causes the target to flinch. Fails if this isn't the user's first turn.
|
# Causes the target to flinch. Fails if this isn't the user's first turn.
|
||||||
# (Fake Out)
|
# (Fake Out)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FlinchTargetFailsIfNotUserFirstTurn < PokeBattle_FlinchMove
|
class Battle::Move::FlinchTargetFailsIfNotUserFirstTurn < Battle::Move::FlinchMove
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.turnCount > 1
|
if user.turnCount > 1
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -496,7 +496,7 @@ end
|
|||||||
# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some
|
# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some
|
||||||
# semi-invulnerable targets. May make the target flinch. (Twister)
|
# semi-invulnerable targets. May make the target flinch. (Twister)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FlinchTargetDoublePowerIfTargetInSky < PokeBattle_FlinchMove
|
class Battle::Move::FlinchTargetDoublePowerIfTargetInSky < Battle::Move::FlinchMove
|
||||||
def hitsFlyingTargets?; return true; end
|
def hitsFlyingTargets?; return true; end
|
||||||
|
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
@@ -511,14 +511,14 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Confuses the target.
|
# Confuses the target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ConfuseTarget < PokeBattle_ConfuseMove
|
class Battle::Move::ConfuseTarget < Battle::Move::ConfuseMove
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Confuses the target. Accuracy perfect in rain, 50% in sunshine. Hits some
|
# Confuses the target. Accuracy perfect in rain, 50% in sunshine. Hits some
|
||||||
# semi-invulnerable targets. (Hurricane)
|
# semi-invulnerable targets. (Hurricane)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ConfuseTargetAlwaysHitsInRainHitsTargetInSky < PokeBattle_ConfuseMove
|
class Battle::Move::ConfuseTargetAlwaysHitsInRainHitsTargetInSky < Battle::Move::ConfuseMove
|
||||||
def hitsFlyingTargets?; return true; end
|
def hitsFlyingTargets?; return true; end
|
||||||
|
|
||||||
def pbBaseAccuracy(user,target)
|
def pbBaseAccuracy(user,target)
|
||||||
@@ -535,7 +535,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Attracts the target. (Attract)
|
# Attracts the target. (Attract)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AttractTarget < PokeBattle_Move
|
class Battle::Move::AttractTarget < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Changes user's type depending on the environment. (Camouflage)
|
# Changes user's type depending on the environment. (Camouflage)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetUserTypesBasedOnEnvironment < PokeBattle_Move
|
class Battle::Move::SetUserTypesBasedOnEnvironment < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -637,7 +637,7 @@ end
|
|||||||
# Changes user's type to a random one that resists/is immune to the last move
|
# Changes user's type to a random one that resists/is immune to the last move
|
||||||
# used by the target. (Conversion 2)
|
# used by the target. (Conversion 2)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetUserTypesToResistLastAttack < PokeBattle_Move
|
class Battle::Move::SetUserTypesToResistLastAttack < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
@@ -678,7 +678,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User copes target's types. (Reflect Type)
|
# User copes target's types. (Reflect Type)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetUserTypesToTargetTypes < PokeBattle_Move
|
class Battle::Move::SetUserTypesToTargetTypes < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -715,7 +715,7 @@ end
|
|||||||
# already has (even partially), OR changes to the user's first move's type.
|
# already has (even partially), OR changes to the user's first move's type.
|
||||||
# (Conversion)
|
# (Conversion)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetUserTypesToUserMoveType < PokeBattle_Move
|
class Battle::Move::SetUserTypesToUserMoveType < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -749,7 +749,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# The target's types become Psychic. (Magic Powder)
|
# The target's types become Psychic. (Magic Powder)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetTargetTypesToPsychic < PokeBattle_Move
|
class Battle::Move::SetTargetTypesToPsychic < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -771,7 +771,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target becomes Water type. (Soak)
|
# Target becomes Water type. (Soak)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetTargetTypesToWater < PokeBattle_Move
|
class Battle::Move::SetTargetTypesToWater < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -793,7 +793,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Gives target the Ghost type. (Trick-or-Treat)
|
# Gives target the Ghost type. (Trick-or-Treat)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AddGhostTypeToTarget < PokeBattle_Move
|
class Battle::Move::AddGhostTypeToTarget < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -814,7 +814,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Gives target the Grass type. (Forest's Curse)
|
# Gives target the Grass type. (Forest's Curse)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AddGrassTypeToTarget < PokeBattle_Move
|
class Battle::Move::AddGrassTypeToTarget < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -835,7 +835,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User loses their Fire type. Fails if user is not Fire-type. (Burn Up)
|
# User loses their Fire type. Fails if user is not Fire-type. (Burn Up)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserLosesFireType < PokeBattle_Move
|
class Battle::Move::UserLosesFireType < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !user.pbHasType?(:FIRE)
|
if !user.pbHasType?(:FIRE)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -855,7 +855,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target's ability becomes Simple. (Simple Beam)
|
# Target's ability becomes Simple. (Simple Beam)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetTargetAbilityToSimple < PokeBattle_Move
|
class Battle::Move::SetTargetAbilityToSimple < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -889,7 +889,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target's ability becomes Insomnia. (Worry Seed)
|
# Target's ability becomes Insomnia. (Worry Seed)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetTargetAbilityToInsomnia < PokeBattle_Move
|
class Battle::Move::SetTargetAbilityToInsomnia < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -923,7 +923,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User copies target's ability. (Role Play)
|
# User copies target's ability. (Role Play)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetUserAbilityToTargetAbility < PokeBattle_Move
|
class Battle::Move::SetUserAbilityToTargetAbility < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -963,7 +963,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target copies user's ability. (Entrainment)
|
# Target copies user's ability. (Entrainment)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetTargetAbilityToUserAbility < PokeBattle_Move
|
class Battle::Move::SetTargetAbilityToUserAbility < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -1002,7 +1002,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User and target swap abilities. (Skill Swap)
|
# User and target swap abilities. (Skill Swap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetSwapAbilities < PokeBattle_Move
|
class Battle::Move::UserTargetSwapAbilities < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -1051,7 +1051,7 @@ class PokeBattle_Move_UserTargetSwapAbilities < PokeBattle_Move
|
|||||||
@battle.pbReplaceAbilitySplash(user)
|
@battle.pbReplaceAbilitySplash(user)
|
||||||
@battle.pbReplaceAbilitySplash(target)
|
@battle.pbReplaceAbilitySplash(target)
|
||||||
end
|
end
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} swapped Abilities with its target!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} swapped Abilities with its target!",user.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} swapped its {2} Ability with its target's {3} Ability!",
|
@battle.pbDisplay(_INTL("{1} swapped its {2} Ability with its target's {3} Ability!",
|
||||||
@@ -1071,7 +1071,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target's ability is negated. (Gastro Acid)
|
# Target's ability is negated. (Gastro Acid)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_NegateTargetAbility < PokeBattle_Move
|
class Battle::Move::NegateTargetAbility < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -1094,7 +1094,7 @@ end
|
|||||||
# Negates the target's ability while it remains on the field, if it has already
|
# Negates the target's ability while it remains on the field, if it has already
|
||||||
# performed its action this round. (Core Enforcer)
|
# performed its action this round. (Core Enforcer)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_NegateTargetAbilityIfTargetActed < PokeBattle_Move
|
class Battle::Move::NegateTargetAbilityIfTargetActed < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
return if target.damageState.substitute || target.effects[PBEffects::GastroAcid]
|
return if target.damageState.substitute || target.effects[PBEffects::GastroAcid]
|
||||||
return if target.unstoppableAbility?
|
return if target.unstoppableAbility?
|
||||||
@@ -1112,7 +1112,7 @@ end
|
|||||||
# Ignores all abilities that alter this move's success or damage.
|
# Ignores all abilities that alter this move's success or damage.
|
||||||
# (Moongeist Beam, Sunsteel Strike)
|
# (Moongeist Beam, Sunsteel Strike)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_IgnoreTargetAbility < PokeBattle_Move
|
class Battle::Move::IgnoreTargetAbility < Battle::Move
|
||||||
def pbChangeUsageCounters(user,specialUsage)
|
def pbChangeUsageCounters(user,specialUsage)
|
||||||
super
|
super
|
||||||
@battle.moldBreaker = true if !specialUsage
|
@battle.moldBreaker = true if !specialUsage
|
||||||
@@ -1122,7 +1122,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 5 rounds, user becomes airborne. (Magnet Rise)
|
# For 5 rounds, user becomes airborne. (Magnet Rise)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartUserAirborne < PokeBattle_Move
|
class Battle::Move::StartUserAirborne < Battle::Move
|
||||||
def unusableInGravity?; return true; end
|
def unusableInGravity?; return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -1145,7 +1145,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 3 rounds, target becomes airborne and can always be hit. (Telekinesis)
|
# For 3 rounds, target becomes airborne and can always be hit. (Telekinesis)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartTargetAirborneAndAlwaysHitByMoves < PokeBattle_Move
|
class Battle::Move::StartTargetAirborneAndAlwaysHitByMoves < Battle::Move
|
||||||
def unusableInGravity?; return true; end
|
def unusableInGravity?; return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -1176,7 +1176,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Hits airborne semi-invulnerable targets. (Sky Uppercut)
|
# Hits airborne semi-invulnerable targets. (Sky Uppercut)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitsTargetInSky < PokeBattle_Move
|
class Battle::Move::HitsTargetInSky < Battle::Move
|
||||||
def hitsFlyingTargets?; return true; end
|
def hitsFlyingTargets?; return true; end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1184,7 +1184,7 @@ end
|
|||||||
# Grounds the target while it remains active. Hits some semi-invulnerable
|
# Grounds the target while it remains active. Hits some semi-invulnerable
|
||||||
# targets. (Smack Down, Thousand Arrows)
|
# targets. (Smack Down, Thousand Arrows)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitsTargetInSkyGroundsTarget < PokeBattle_Move
|
class Battle::Move::HitsTargetInSkyGroundsTarget < Battle::Move
|
||||||
def hitsFlyingTargets?; return true; end
|
def hitsFlyingTargets?; return true; end
|
||||||
|
|
||||||
def pbCalcTypeModSingle(moveType,defType,user,target)
|
def pbCalcTypeModSingle(moveType,defType,user,target)
|
||||||
@@ -1215,7 +1215,7 @@ end
|
|||||||
# For 5 rounds, increases gravity on the field. Pokémon cannot become airborne.
|
# For 5 rounds, increases gravity on the field. Pokémon cannot become airborne.
|
||||||
# (Gravity)
|
# (Gravity)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartGravity < PokeBattle_Move
|
class Battle::Move::StartGravity < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.field.effects[PBEffects::Gravity]>0
|
if @battle.field.effects[PBEffects::Gravity]>0
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -1253,7 +1253,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User transforms into the target. (Transform)
|
# User transforms into the target. (Transform)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TransformUserIntoTarget < PokeBattle_Move
|
class Battle::Move::TransformUserIntoTarget < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.effects[PBEffects::Transform]
|
if user.effects[PBEffects::Transform]
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Inflicts a fixed 20HP damage. (Sonic Boom)
|
# Inflicts a fixed 20HP damage. (Sonic Boom)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FixedDamage20 < PokeBattle_FixedDamageMove
|
class Battle::Move::FixedDamage20 < Battle::Move::FixedDamageMove
|
||||||
def pbFixedDamage(user,target)
|
def pbFixedDamage(user,target)
|
||||||
return 20
|
return 20
|
||||||
end
|
end
|
||||||
@@ -10,7 +10,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Inflicts a fixed 40HP damage. (Dragon Rage)
|
# Inflicts a fixed 40HP damage. (Dragon Rage)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FixedDamage40 < PokeBattle_FixedDamageMove
|
class Battle::Move::FixedDamage40 < Battle::Move::FixedDamageMove
|
||||||
def pbFixedDamage(user,target)
|
def pbFixedDamage(user,target)
|
||||||
return 40
|
return 40
|
||||||
end
|
end
|
||||||
@@ -19,7 +19,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Halves the target's current HP. (Nature's Madness, Super Fang)
|
# Halves the target's current HP. (Nature's Madness, Super Fang)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FixedDamageHalfTargetHP < PokeBattle_FixedDamageMove
|
class Battle::Move::FixedDamageHalfTargetHP < Battle::Move::FixedDamageMove
|
||||||
def pbFixedDamage(user,target)
|
def pbFixedDamage(user,target)
|
||||||
return (target.hp/2.0).round
|
return (target.hp/2.0).round
|
||||||
end
|
end
|
||||||
@@ -28,7 +28,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Inflicts damage equal to the user's level. (Night Shade, Seismic Toss)
|
# Inflicts damage equal to the user's level. (Night Shade, Seismic Toss)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FixedDamageUserLevel < PokeBattle_FixedDamageMove
|
class Battle::Move::FixedDamageUserLevel < Battle::Move::FixedDamageMove
|
||||||
def pbFixedDamage(user,target)
|
def pbFixedDamage(user,target)
|
||||||
return user.level
|
return user.level
|
||||||
end
|
end
|
||||||
@@ -37,7 +37,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Inflicts damage between 0.5 and 1.5 times the user's level. (Psywave)
|
# Inflicts damage between 0.5 and 1.5 times the user's level. (Psywave)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FixedDamageUserLevelRandom < PokeBattle_FixedDamageMove
|
class Battle::Move::FixedDamageUserLevelRandom < Battle::Move::FixedDamageMove
|
||||||
def pbFixedDamage(user,target)
|
def pbFixedDamage(user,target)
|
||||||
min = (user.level/2).floor
|
min = (user.level/2).floor
|
||||||
max = (user.level*3/2).floor
|
max = (user.level*3/2).floor
|
||||||
@@ -48,7 +48,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Inflicts damage to bring the target's HP down to equal the user's HP. (Endeavor)
|
# Inflicts damage to bring the target's HP down to equal the user's HP. (Endeavor)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetHPToUserHP < PokeBattle_FixedDamageMove
|
class Battle::Move::LowerTargetHPToUserHP < Battle::Move::FixedDamageMove
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if user.hp>=target.hp
|
if user.hp>=target.hp
|
||||||
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
||||||
@@ -67,7 +67,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# OHKO. Accuracy increases by difference between levels of user and target.
|
# OHKO. Accuracy increases by difference between levels of user and target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_OHKO < PokeBattle_FixedDamageMove
|
class Battle::Move::OHKO < Battle::Move::FixedDamageMove
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if target.level>user.level
|
if target.level>user.level
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message
|
@battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message
|
||||||
@@ -76,7 +76,7 @@ class PokeBattle_Move_OHKO < PokeBattle_FixedDamageMove
|
|||||||
if target.hasActiveAbility?(:STURDY) && !@battle.moldBreaker
|
if target.hasActiveAbility?(:STURDY) && !@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true)))
|
@battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!",
|
@battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!",
|
||||||
@@ -111,7 +111,7 @@ end
|
|||||||
# Lower accuracy when used by a non-Ice-type Pokémon. Doesn't affect Ice-type
|
# Lower accuracy when used by a non-Ice-type Pokémon. Doesn't affect Ice-type
|
||||||
# Pokémon. (Sheer Cold (Gen 7+))
|
# Pokémon. (Sheer Cold (Gen 7+))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_OHKOIce < PokeBattle_Move_OHKO
|
class Battle::Move::OHKOIce < Battle::Move::OHKO
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if target.pbHasType?(:ICE)
|
if target.pbHasType?(:ICE)
|
||||||
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
||||||
@@ -131,14 +131,14 @@ end
|
|||||||
# OHKO. Accuracy increases by difference between levels of user and target. Hits
|
# OHKO. Accuracy increases by difference between levels of user and target. Hits
|
||||||
# targets that are semi-invulnerable underground. (Fissure)
|
# targets that are semi-invulnerable underground. (Fissure)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_OHKOHitsUndergroundTarget < PokeBattle_Move_OHKO
|
class Battle::Move::OHKOHitsUndergroundTarget < Battle::Move::OHKO
|
||||||
def hitsDiggingTargets?; return true; end
|
def hitsDiggingTargets?; return true; end
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# The target's ally loses 1/16 of its max HP. (Flame Burst)
|
# The target's ally loses 1/16 of its max HP. (Flame Burst)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DamageTargetAlly < PokeBattle_Move
|
class Battle::Move::DamageTargetAlly < Battle::Move
|
||||||
def pbEffectWhenDealingDamage(user,target)
|
def pbEffectWhenDealingDamage(user,target)
|
||||||
hitAlly = []
|
hitAlly = []
|
||||||
target.allAllies.each do |b|
|
target.allAllies.each do |b|
|
||||||
@@ -164,7 +164,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases with the user's HP. (Eruption, Water Spout)
|
# Power increases with the user's HP. (Eruption, Water Spout)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithUserHP < PokeBattle_Move
|
class Battle::Move::PowerHigherWithUserHP < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
return [150*user.hp/user.totalhp,1].max
|
return [150*user.hp/user.totalhp,1].max
|
||||||
end
|
end
|
||||||
@@ -173,7 +173,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases the less HP the user has. (Flail, Reversal)
|
# Power increases the less HP the user has. (Flail, Reversal)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerLowerWithUserHP < PokeBattle_Move
|
class Battle::Move::PowerLowerWithUserHP < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
ret = 20
|
ret = 20
|
||||||
n = 48*user.hp/user.totalhp
|
n = 48*user.hp/user.totalhp
|
||||||
@@ -195,7 +195,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases with the target's HP. (Crush Grip, Wring Out)
|
# Power increases with the target's HP. (Crush Grip, Wring Out)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithTargetHP < PokeBattle_Move
|
class Battle::Move::PowerHigherWithTargetHP < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
return [120*target.hp/target.totalhp,1].max
|
return [120*target.hp/target.totalhp,1].max
|
||||||
end
|
end
|
||||||
@@ -204,7 +204,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases with the user's happiness. (Return)
|
# Power increases with the user's happiness. (Return)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithUserHappiness < PokeBattle_Move
|
class Battle::Move::PowerHigherWithUserHappiness < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
return [(user.happiness*2/5).floor,1].max
|
return [(user.happiness*2/5).floor,1].max
|
||||||
end
|
end
|
||||||
@@ -213,7 +213,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power decreases with the user's happiness. (Frustration)
|
# Power decreases with the user's happiness. (Frustration)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerLowerWithUserHappiness < PokeBattle_Move
|
class Battle::Move::PowerLowerWithUserHappiness < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
return [((255-user.happiness)*2/5).floor,1].max
|
return [((255-user.happiness)*2/5).floor,1].max
|
||||||
end
|
end
|
||||||
@@ -223,7 +223,7 @@ end
|
|||||||
# Power increases with the user's positive stat changes (ignores negative ones).
|
# Power increases with the user's positive stat changes (ignores negative ones).
|
||||||
# (Power Trip, Stored Power)
|
# (Power Trip, Stored Power)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithUserPositiveStatStages < PokeBattle_Move
|
class Battle::Move::PowerHigherWithUserPositiveStatStages < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
mult = 1
|
mult = 1
|
||||||
GameData::Stat.each_battle { |s| mult += user.stages[s.id] if user.stages[s.id] > 0 }
|
GameData::Stat.each_battle { |s| mult += user.stages[s.id] if user.stages[s.id] > 0 }
|
||||||
@@ -235,7 +235,7 @@ end
|
|||||||
# Power increases with the target's positive stat changes (ignores negative ones).
|
# Power increases with the target's positive stat changes (ignores negative ones).
|
||||||
# (Punishment)
|
# (Punishment)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithTargetPositiveStatStages < PokeBattle_Move
|
class Battle::Move::PowerHigherWithTargetPositiveStatStages < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
mult = 3
|
mult = 3
|
||||||
GameData::Stat.each_battle { |s| mult += target.stages[s.id] if target.stages[s.id] > 0 }
|
GameData::Stat.each_battle { |s| mult += target.stages[s.id] if target.stages[s.id] > 0 }
|
||||||
@@ -246,7 +246,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases the quicker the user is than the target. (Electro Ball)
|
# Power increases the quicker the user is than the target. (Electro Ball)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithUserFasterThanTarget < PokeBattle_Move
|
class Battle::Move::PowerHigherWithUserFasterThanTarget < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
ret = 40
|
ret = 40
|
||||||
n = user.pbSpeed/target.pbSpeed
|
n = user.pbSpeed/target.pbSpeed
|
||||||
@@ -266,7 +266,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases the quicker the target is than the user. (Gyro Ball)
|
# Power increases the quicker the target is than the user. (Gyro Ball)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithTargetFasterThanUser < PokeBattle_Move
|
class Battle::Move::PowerHigherWithTargetFasterThanUser < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
return [[(25*target.pbSpeed/user.pbSpeed).floor,150].min,1].max
|
return [[(25*target.pbSpeed/user.pbSpeed).floor,150].min,1].max
|
||||||
end
|
end
|
||||||
@@ -275,7 +275,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases the less PP this move has. (Trump Card)
|
# Power increases the less PP this move has. (Trump Card)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithLessPP < PokeBattle_Move
|
class Battle::Move::PowerHigherWithLessPP < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
dmgs = [200,80,60,50,40]
|
dmgs = [200,80,60,50,40]
|
||||||
ppLeft = [@pp,dmgs.length-1].min # PP is reduced before the move is used
|
ppLeft = [@pp,dmgs.length-1].min # PP is reduced before the move is used
|
||||||
@@ -286,7 +286,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power increases the heavier the target is. (Grass Knot, Low Kick)
|
# Power increases the heavier the target is. (Grass Knot, Low Kick)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithTargetWeight < PokeBattle_Move
|
class Battle::Move::PowerHigherWithTargetWeight < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
ret = 20
|
ret = 20
|
||||||
weight = target.pbWeight
|
weight = target.pbWeight
|
||||||
@@ -309,7 +309,7 @@ end
|
|||||||
# Power increases the heavier the user is than the target. (Heat Crash, Heavy Slam)
|
# Power increases the heavier the user is than the target. (Heat Crash, Heavy Slam)
|
||||||
# Does double damage and has perfect accuracy if the target is Minimized.
|
# Does double damage and has perfect accuracy if the target is Minimized.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithUserHeavierThanTarget < PokeBattle_Move
|
class Battle::Move::PowerHigherWithUserHeavierThanTarget < Battle::Move
|
||||||
def tramplesMinimize?(param=1)
|
def tramplesMinimize?(param=1)
|
||||||
return true if Settings::MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage
|
return true if Settings::MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage
|
||||||
return super
|
return super
|
||||||
@@ -334,7 +334,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power doubles for each consecutive use. (Fury Cutter)
|
# Power doubles for each consecutive use. (Fury Cutter)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithConsecutiveUse < PokeBattle_Move
|
class Battle::Move::PowerHigherWithConsecutiveUse < Battle::Move
|
||||||
def pbChangeUsageCounters(user,specialUsage)
|
def pbChangeUsageCounters(user,specialUsage)
|
||||||
oldVal = user.effects[PBEffects::FuryCutter]
|
oldVal = user.effects[PBEffects::FuryCutter]
|
||||||
super
|
super
|
||||||
@@ -354,7 +354,7 @@ end
|
|||||||
# Power is multiplied by the number of consecutive rounds in which this move was
|
# Power is multiplied by the number of consecutive rounds in which this move was
|
||||||
# used by any Pokémon on the user's side. (Echoed Voice)
|
# used by any Pokémon on the user's side. (Echoed Voice)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerHigherWithConsecutiveUseOnUserSide < PokeBattle_Move
|
class Battle::Move::PowerHigherWithConsecutiveUseOnUserSide < Battle::Move
|
||||||
def pbChangeUsageCounters(user,specialUsage)
|
def pbChangeUsageCounters(user,specialUsage)
|
||||||
oldVal = user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter]
|
oldVal = user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter]
|
||||||
super
|
super
|
||||||
@@ -373,7 +373,7 @@ end
|
|||||||
# Power is chosen at random. Power is doubled if the target is using Dig. Hits
|
# Power is chosen at random. Power is doubled if the target is using Dig. Hits
|
||||||
# some semi-invulnerable targets. (Magnitude)
|
# some semi-invulnerable targets. (Magnitude)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RandomPowerDoublePowerIfTargetUnderground < PokeBattle_Move
|
class Battle::Move::RandomPowerDoublePowerIfTargetUnderground < Battle::Move
|
||||||
def hitsDiggingTargets?; return true; end
|
def hitsDiggingTargets?; return true; end
|
||||||
|
|
||||||
def pbOnStartUse(user,targets)
|
def pbOnStartUse(user,targets)
|
||||||
@@ -406,7 +406,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the target's HP is down to 1/2 or less. (Brine)
|
# Power is doubled if the target's HP is down to 1/2 or less. (Brine)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetHPLessThanHalf < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetHPLessThanHalf < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
baseDmg *= 2 if target.hp<=target.totalhp/2
|
baseDmg *= 2 if target.hp<=target.totalhp/2
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -417,7 +417,7 @@ end
|
|||||||
# Power is doubled if the user is burned, poisoned or paralyzed. (Facade)
|
# Power is doubled if the user is burned, poisoned or paralyzed. (Facade)
|
||||||
# Burn's halving of Attack is negated (new mechanics).
|
# Burn's halving of Attack is negated (new mechanics).
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfUserPoisonedBurnedParalyzed < PokeBattle_Move
|
class Battle::Move::DoublePowerIfUserPoisonedBurnedParalyzed < Battle::Move
|
||||||
def damageReducedByBurn?; return Settings::MECHANICS_GENERATION <= 5; end
|
def damageReducedByBurn?; return Settings::MECHANICS_GENERATION <= 5; end
|
||||||
|
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
@@ -429,7 +429,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the target is asleep. Wakes the target up. (Wake-Up Slap)
|
# Power is doubled if the target is asleep. Wakes the target up. (Wake-Up Slap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetAsleepCureTarget < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetAsleepCureTarget < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
if target.asleep? &&
|
if target.asleep? &&
|
||||||
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
||||||
@@ -449,7 +449,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the target is poisoned. (Venoshock)
|
# Power is doubled if the target is poisoned. (Venoshock)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetPoisoned < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetPoisoned < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
if target.poisoned? &&
|
if target.poisoned? &&
|
||||||
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
||||||
@@ -465,7 +465,7 @@ end
|
|||||||
# Power is doubled if the target is paralyzed. Cures the target of paralysis.
|
# Power is doubled if the target is paralyzed. Cures the target of paralysis.
|
||||||
# (Smelling Salts)
|
# (Smelling Salts)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetParalyzedCureTarget < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetParalyzedCureTarget < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
if target.paralyzed? &&
|
if target.paralyzed? &&
|
||||||
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
||||||
@@ -485,7 +485,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the target has a status problem. (Hex)
|
# Power is doubled if the target has a status problem. (Hex)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetStatusProblem < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetStatusProblem < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
if target.pbHasAnyStatus? &&
|
if target.pbHasAnyStatus? &&
|
||||||
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
||||||
@@ -498,7 +498,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the user has no held item. (Acrobatics)
|
# Power is doubled if the user has no held item. (Acrobatics)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfUserHasNoItem < PokeBattle_Move
|
class Battle::Move::DoublePowerIfUserHasNoItem < Battle::Move
|
||||||
def pbBaseDamageMultiplier(damageMult,user,target)
|
def pbBaseDamageMultiplier(damageMult,user,target)
|
||||||
damageMult *= 2 if !user.item || user.effects[PBEffects::GemConsumed]
|
damageMult *= 2 if !user.item || user.effects[PBEffects::GemConsumed]
|
||||||
return damageMult
|
return damageMult
|
||||||
@@ -509,7 +509,7 @@ end
|
|||||||
# Power is doubled if the target is using Dive. Hits some semi-invulnerable
|
# Power is doubled if the target is using Dive. Hits some semi-invulnerable
|
||||||
# targets. (Surf)
|
# targets. (Surf)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetUnderwater < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetUnderwater < Battle::Move
|
||||||
def hitsDivingTargets?; return true; end
|
def hitsDivingTargets?; return true; end
|
||||||
|
|
||||||
def pbModifyDamage(damageMult,user,target)
|
def pbModifyDamage(damageMult,user,target)
|
||||||
@@ -522,7 +522,7 @@ end
|
|||||||
# Power is doubled if the target is using Dig. Power is halved if Grassy Terrain
|
# Power is doubled if the target is using Dig. Power is halved if Grassy Terrain
|
||||||
# is in effect. Hits some semi-invulnerable targets. (Earthquake)
|
# is in effect. Hits some semi-invulnerable targets. (Earthquake)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetUnderground < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetUnderground < Battle::Move
|
||||||
def hitsDiggingTargets?; return true; end
|
def hitsDiggingTargets?; return true; end
|
||||||
|
|
||||||
def pbModifyDamage(damageMult,user,target)
|
def pbModifyDamage(damageMult,user,target)
|
||||||
@@ -536,7 +536,7 @@ end
|
|||||||
# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some
|
# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some
|
||||||
# semi-invulnerable targets. (Gust)
|
# semi-invulnerable targets. (Gust)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetInSky < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetInSky < Battle::Move
|
||||||
def hitsFlyingTargets?; return true; end
|
def hitsFlyingTargets?; return true; end
|
||||||
|
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
@@ -551,7 +551,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if Electric Terrain applies. (Rising Voltage)
|
# Power is doubled if Electric Terrain applies. (Rising Voltage)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerInElectricTerrain < PokeBattle_Move
|
class Battle::Move::DoublePowerInElectricTerrain < Battle::Move
|
||||||
def pbBaseDamage(baseDmg, user, target)
|
def pbBaseDamage(baseDmg, user, target)
|
||||||
baseDmg *= 2 if @battle.field.terrain == :Electric && target.affectedByTerrain?
|
baseDmg *= 2 if @battle.field.terrain == :Electric && target.affectedByTerrain?
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -561,7 +561,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the user's last move failed. (Stomping Tantrum)
|
# Power is doubled if the user's last move failed. (Stomping Tantrum)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfUserLastMoveFailed < PokeBattle_Move
|
class Battle::Move::DoublePowerIfUserLastMoveFailed < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
baseDmg *= 2 if user.lastRoundMoveFailed
|
baseDmg *= 2 if user.lastRoundMoveFailed
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -571,7 +571,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if a user's teammate fainted last round. (Retaliate)
|
# Power is doubled if a user's teammate fainted last round. (Retaliate)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfAllyFaintedLastTurn < PokeBattle_Move
|
class Battle::Move::DoublePowerIfAllyFaintedLastTurn < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
lrf = user.pbOwnSide.effects[PBEffects::LastRoundFainted]
|
lrf = user.pbOwnSide.effects[PBEffects::LastRoundFainted]
|
||||||
baseDmg *= 2 if lrf>=0 && lrf==@battle.turnCount-1
|
baseDmg *= 2 if lrf>=0 && lrf==@battle.turnCount-1
|
||||||
@@ -583,7 +583,7 @@ end
|
|||||||
# Power is doubled if the user has lost HP due to the target's move this round.
|
# Power is doubled if the user has lost HP due to the target's move this round.
|
||||||
# (Avalanche, Revenge)
|
# (Avalanche, Revenge)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfUserLostHPThisTurn < PokeBattle_Move
|
class Battle::Move::DoublePowerIfUserLostHPThisTurn < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
baseDmg *= 2 if user.lastAttacker.include?(target.index)
|
baseDmg *= 2 if user.lastAttacker.include?(target.index)
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -593,7 +593,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the target has already lost HP this round. (Assurance)
|
# Power is doubled if the target has already lost HP this round. (Assurance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetLostHPThisTurn < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetLostHPThisTurn < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
baseDmg *= 2 if target.tookDamageThisRound
|
baseDmg *= 2 if target.tookDamageThisRound
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -603,7 +603,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if any of the user's stats were lowered this round. (Lash Out)
|
# Power is doubled if any of the user's stats were lowered this round. (Lash Out)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfUserStatsLoweredThisTurn < PokeBattle_Move
|
class Battle::Move::DoublePowerIfUserStatsLoweredThisTurn < Battle::Move
|
||||||
def pbBaseDamage(baseDmg, user, target)
|
def pbBaseDamage(baseDmg, user, target)
|
||||||
baseDmg *= 2 if user.statsLoweredThisRound
|
baseDmg *= 2 if user.statsLoweredThisRound
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -613,7 +613,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if the target has already moved this round. (Payback)
|
# Power is doubled if the target has already moved this round. (Payback)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetActed < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetActed < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
if @battle.choices[target.index][0]!=:None &&
|
if @battle.choices[target.index][0]!=:None &&
|
||||||
((@battle.choices[target.index][0]!=:UseMove &&
|
((@battle.choices[target.index][0]!=:UseMove &&
|
||||||
@@ -628,7 +628,7 @@ end
|
|||||||
# Power is doubled if the user moves before the target, or if the target
|
# Power is doubled if the user moves before the target, or if the target
|
||||||
# switched in this round. (Bolt Beak, Fishious Rend)
|
# switched in this round. (Bolt Beak, Fishious Rend)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerIfTargetNotActed < PokeBattle_Move
|
class Battle::Move::DoublePowerIfTargetNotActed < Battle::Move
|
||||||
def pbBaseDamage(baseDmg, user, target)
|
def pbBaseDamage(baseDmg, user, target)
|
||||||
if @battle.choices[target.index][0] == :None || # Switched in
|
if @battle.choices[target.index][0] == :None || # Switched in
|
||||||
([:UseMove, :Shift].include?(@battle.choices[target.index][0]) && !target.movedThisRound?)
|
([:UseMove, :Shift].include?(@battle.choices[target.index][0]) && !target.movedThisRound?)
|
||||||
@@ -641,7 +641,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# This attack is always a critical hit. (Frost Breath, Storm Throw)
|
# This attack is always a critical hit. (Frost Breath, Storm Throw)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AlwaysCriticalHit < PokeBattle_Move
|
class Battle::Move::AlwaysCriticalHit < Battle::Move
|
||||||
def pbCritialOverride(user,target); return 1; end
|
def pbCritialOverride(user,target); return 1; end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -649,7 +649,7 @@ end
|
|||||||
# Until the end of the next round, the user's moves will always be critical hits.
|
# Until the end of the next round, the user's moves will always be critical hits.
|
||||||
# (Laser Focus)
|
# (Laser Focus)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_EnsureNextCriticalHit < PokeBattle_Move
|
class Battle::Move::EnsureNextCriticalHit < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
@@ -661,7 +661,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 5 rounds, foes' attacks cannot become critical hits. (Lucky Chant)
|
# For 5 rounds, foes' attacks cannot become critical hits. (Lucky Chant)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartPreventCriticalHitsAgainstUserSide < PokeBattle_Move
|
class Battle::Move::StartPreventCriticalHitsAgainstUserSide < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -682,14 +682,14 @@ end
|
|||||||
# If target would be KO'd by this attack, it survives with 1HP instead.
|
# If target would be KO'd by this attack, it survives with 1HP instead.
|
||||||
# (False Swipe, Hold Back)
|
# (False Swipe, Hold Back)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CannotMakeTargetFaint < PokeBattle_Move
|
class Battle::Move::CannotMakeTargetFaint < Battle::Move
|
||||||
def nonLethal?(user,target); return true; end
|
def nonLethal?(user,target); return true; end
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# If user would be KO'd this round, it survives with 1HP instead. (Endure)
|
# If user would be KO'd this round, it survives with 1HP instead. (Endure)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserEnduresFaintingThisTurn < PokeBattle_ProtectMove
|
class Battle::Move::UserEnduresFaintingThisTurn < Battle::Move::ProtectMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@effect = PBEffects::Endure
|
@effect = PBEffects::Endure
|
||||||
@@ -703,7 +703,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Weakens Electric attacks. (Mud Sport)
|
# Weakens Electric attacks. (Mud Sport)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartWeakenElectricMoves < PokeBattle_Move
|
class Battle::Move::StartWeakenElectricMoves < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if Settings::MECHANICS_GENERATION >= 6
|
if Settings::MECHANICS_GENERATION >= 6
|
||||||
if @battle.field.effects[PBEffects::MudSportField]>0
|
if @battle.field.effects[PBEffects::MudSportField]>0
|
||||||
@@ -732,7 +732,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Weakens Fire attacks. (Water Sport)
|
# Weakens Fire attacks. (Water Sport)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartWeakenFireMoves < PokeBattle_Move
|
class Battle::Move::StartWeakenFireMoves < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if Settings::MECHANICS_GENERATION >= 6
|
if Settings::MECHANICS_GENERATION >= 6
|
||||||
if @battle.field.effects[PBEffects::WaterSportField]>0
|
if @battle.field.effects[PBEffects::WaterSportField]>0
|
||||||
@@ -762,7 +762,7 @@ end
|
|||||||
# For 5 rounds, lowers power of physical attacks against the user's side.
|
# For 5 rounds, lowers power of physical attacks against the user's side.
|
||||||
# (Reflect)
|
# (Reflect)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartWeakenPhysicalDamageAgainstUserSide < PokeBattle_Move
|
class Battle::Move::StartWeakenPhysicalDamageAgainstUserSide < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -783,7 +783,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 5 rounds, lowers power of special attacks against the user's side. (Light Screen)
|
# For 5 rounds, lowers power of special attacks against the user's side. (Light Screen)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartWeakenSpecialDamageAgainstUserSide < PokeBattle_Move
|
class Battle::Move::StartWeakenSpecialDamageAgainstUserSide < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -805,7 +805,7 @@ end
|
|||||||
# For 5 rounds, lowers power of attacks against the user's side. Fails if
|
# For 5 rounds, lowers power of attacks against the user's side. Fails if
|
||||||
# weather is not hail. (Aurora Veil)
|
# weather is not hail. (Aurora Veil)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartWeakenDamageAgainstUserSideIfHail < PokeBattle_Move
|
class Battle::Move::StartWeakenDamageAgainstUserSideIfHail < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -832,7 +832,7 @@ end
|
|||||||
# Ends the opposing side's Light Screen, Reflect and Aurora Break. (Brick Break,
|
# Ends the opposing side's Light Screen, Reflect and Aurora Break. (Brick Break,
|
||||||
# Psychic Fangs)
|
# Psychic Fangs)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RemoveScreens < PokeBattle_Move
|
class Battle::Move::RemoveScreens < Battle::Move
|
||||||
def ignoresReflect?; return true; end
|
def ignoresReflect?; return true; end
|
||||||
|
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
@@ -863,7 +863,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User is protected against moves with the "B" flag this round. (Detect, Protect)
|
# User is protected against moves with the "B" flag this round. (Detect, Protect)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUser < PokeBattle_ProtectMove
|
class Battle::Move::ProtectUser < Battle::Move::ProtectMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@effect = PBEffects::Protect
|
@effect = PBEffects::Protect
|
||||||
@@ -875,7 +875,7 @@ end
|
|||||||
# makes contact with the user while this effect applies, that Pokémon is
|
# makes contact with the user while this effect applies, that Pokémon is
|
||||||
# poisoned. (Baneful Bunker)
|
# poisoned. (Baneful Bunker)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserBanefulBunker < PokeBattle_ProtectMove
|
class Battle::Move::ProtectUserBanefulBunker < Battle::Move::ProtectMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@effect = PBEffects::BanefulBunker
|
@effect = PBEffects::BanefulBunker
|
||||||
@@ -886,7 +886,7 @@ end
|
|||||||
# User is protected against damaging moves this round. Decreases the Attack of
|
# User is protected against damaging moves this round. Decreases the Attack of
|
||||||
# the user of a stopped contact move by 2 stages. (King's Shield)
|
# the user of a stopped contact move by 2 stages. (King's Shield)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserFromDamagingMovesKingsShield < PokeBattle_ProtectMove
|
class Battle::Move::ProtectUserFromDamagingMovesKingsShield < Battle::Move::ProtectMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@effect = PBEffects::KingsShield
|
@effect = PBEffects::KingsShield
|
||||||
@@ -899,7 +899,7 @@ end
|
|||||||
# Defense of the Pokémon using that move by 2 stages. Contributes to Protect's
|
# Defense of the Pokémon using that move by 2 stages. Contributes to Protect's
|
||||||
# counter. (Obstruct)
|
# counter. (Obstruct)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserFromDamagingMovesObstruct < PokeBattle_ProtectMove
|
class Battle::Move::ProtectUserFromDamagingMovesObstruct < Battle::Move::ProtectMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@effect = PBEffects::Obstruct
|
@effect = PBEffects::Obstruct
|
||||||
@@ -910,7 +910,7 @@ end
|
|||||||
# User is protected against moves that target it this round. Damages the user of
|
# User is protected against moves that target it this round. Damages the user of
|
||||||
# a stopped contact move by 1/8 of its max HP. (Spiky Shield)
|
# a stopped contact move by 1/8 of its max HP. (Spiky Shield)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserFromTargetingMovesSpikyShield < PokeBattle_ProtectMove
|
class Battle::Move::ProtectUserFromTargetingMovesSpikyShield < Battle::Move::ProtectMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@effect = PBEffects::SpikyShield
|
@effect = PBEffects::SpikyShield
|
||||||
@@ -920,7 +920,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# This round, the user's side is unaffected by damaging moves. (Mat Block)
|
# This round, the user's side is unaffected by damaging moves. (Mat Block)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserSideFromDamagingMovesIfUserFirstTurn < PokeBattle_Move
|
class Battle::Move::ProtectUserSideFromDamagingMovesIfUserFirstTurn < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -941,7 +941,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User's side is protected against status moves this round. (Crafty Shield)
|
# User's side is protected against status moves this round. (Crafty Shield)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserSideFromStatusMoves < PokeBattle_Move
|
class Battle::Move::ProtectUserSideFromStatusMoves < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.pbOwnSide.effects[PBEffects::CraftyShield]
|
if user.pbOwnSide.effects[PBEffects::CraftyShield]
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -961,7 +961,7 @@ end
|
|||||||
# User's side is protected against moves with priority greater than 0 this round.
|
# User's side is protected against moves with priority greater than 0 this round.
|
||||||
# (Quick Guard)
|
# (Quick Guard)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserSideFromPriorityMoves < PokeBattle_ProtectMove
|
class Battle::Move::ProtectUserSideFromPriorityMoves < Battle::Move::ProtectMove
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -975,7 +975,7 @@ end
|
|||||||
# User's side is protected against moves that target multiple battlers this round.
|
# User's side is protected against moves that target multiple battlers this round.
|
||||||
# (Wide Guard)
|
# (Wide Guard)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ProtectUserSideFromMultiTargetDamagingMoves < PokeBattle_ProtectMove
|
class Battle::Move::ProtectUserSideFromMultiTargetDamagingMoves < Battle::Move::ProtectMove
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -988,7 +988,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Ends target's protections immediately. (Feint)
|
# Ends target's protections immediately. (Feint)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RemoveProtections < PokeBattle_Move
|
class Battle::Move::RemoveProtections < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
target.effects[PBEffects::BanefulBunker] = false
|
target.effects[PBEffects::BanefulBunker] = false
|
||||||
target.effects[PBEffects::KingsShield] = false
|
target.effects[PBEffects::KingsShield] = false
|
||||||
@@ -1005,7 +1005,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Ends target's protections immediately. (Hyperspace Hole)
|
# Ends target's protections immediately. (Hyperspace Hole)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RemoveProtectionsBypassSubstitute < PokeBattle_Move
|
class Battle::Move::RemoveProtectionsBypassSubstitute < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -1025,7 +1025,7 @@ end
|
|||||||
# Decreases the user's Defense by 1 stage. Ends target's protections
|
# Decreases the user's Defense by 1 stage. Ends target's protections
|
||||||
# immediately. (Hyperspace Fury)
|
# immediately. (Hyperspace Fury)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HoopaRemoveProtectionsBypassSubstituteLowerUserDef1 < PokeBattle_StatDownMove
|
class Battle::Move::HoopaRemoveProtectionsBypassSubstituteLowerUserDef1 < Battle::Move::StatDownMove
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -1060,7 +1060,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User takes recoil damage equal to 1/4 of the damage this move dealt.
|
# User takes recoil damage equal to 1/4 of the damage this move dealt.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RecoilQuarterOfDamageDealt < PokeBattle_RecoilMove
|
class Battle::Move::RecoilQuarterOfDamageDealt < Battle::Move::RecoilMove
|
||||||
def pbRecoilDamage(user,target)
|
def pbRecoilDamage(user,target)
|
||||||
return (target.damageState.totalHPLost/4.0).round
|
return (target.damageState.totalHPLost/4.0).round
|
||||||
end
|
end
|
||||||
@@ -1069,7 +1069,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User takes recoil damage equal to 1/3 of the damage this move dealt.
|
# User takes recoil damage equal to 1/3 of the damage this move dealt.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RecoilThirdOfDamageDealt < PokeBattle_RecoilMove
|
class Battle::Move::RecoilThirdOfDamageDealt < Battle::Move::RecoilMove
|
||||||
def pbRecoilDamage(user,target)
|
def pbRecoilDamage(user,target)
|
||||||
return (target.damageState.totalHPLost/3.0).round
|
return (target.damageState.totalHPLost/3.0).round
|
||||||
end
|
end
|
||||||
@@ -1079,7 +1079,7 @@ end
|
|||||||
# User takes recoil damage equal to 1/3 of the damage this move dealt.
|
# User takes recoil damage equal to 1/3 of the damage this move dealt.
|
||||||
# May paralyze the target. (Volt Tackle)
|
# May paralyze the target. (Volt Tackle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RecoilThirdOfDamageDealtParalyzeTarget < PokeBattle_RecoilMove
|
class Battle::Move::RecoilThirdOfDamageDealtParalyzeTarget < Battle::Move::RecoilMove
|
||||||
def pbRecoilDamage(user,target)
|
def pbRecoilDamage(user,target)
|
||||||
return (target.damageState.totalHPLost/3.0).round
|
return (target.damageState.totalHPLost/3.0).round
|
||||||
end
|
end
|
||||||
@@ -1094,7 +1094,7 @@ end
|
|||||||
# User takes recoil damage equal to 1/3 of the damage this move dealt.
|
# User takes recoil damage equal to 1/3 of the damage this move dealt.
|
||||||
# May burn the target. (Flare Blitz)
|
# May burn the target. (Flare Blitz)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RecoilThirdOfDamageDealtBurnTarget < PokeBattle_RecoilMove
|
class Battle::Move::RecoilThirdOfDamageDealtBurnTarget < Battle::Move::RecoilMove
|
||||||
def pbRecoilDamage(user,target)
|
def pbRecoilDamage(user,target)
|
||||||
return (target.damageState.totalHPLost/3.0).round
|
return (target.damageState.totalHPLost/3.0).round
|
||||||
end
|
end
|
||||||
@@ -1109,7 +1109,7 @@ end
|
|||||||
# User takes recoil damage equal to 1/2 of the damage this move dealt.
|
# User takes recoil damage equal to 1/2 of the damage this move dealt.
|
||||||
# (Head Smash, Light of Ruin)
|
# (Head Smash, Light of Ruin)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RecoilHalfOfDamageDealt < PokeBattle_RecoilMove
|
class Battle::Move::RecoilHalfOfDamageDealt < Battle::Move::RecoilMove
|
||||||
def pbRecoilDamage(user,target)
|
def pbRecoilDamage(user,target)
|
||||||
return (target.damageState.totalHPLost/2.0).round
|
return (target.damageState.totalHPLost/2.0).round
|
||||||
end
|
end
|
||||||
@@ -1120,7 +1120,7 @@ end
|
|||||||
# the target. Does double damage and has perfect accuracy if the target is
|
# the target. Does double damage and has perfect accuracy if the target is
|
||||||
# Minimized. (Flying Press)
|
# Minimized. (Flying Press)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_EffectivenessIncludesFlyingType < PokeBattle_Move
|
class Battle::Move::EffectivenessIncludesFlyingType < Battle::Move
|
||||||
def tramplesMinimize?(param=1)
|
def tramplesMinimize?(param=1)
|
||||||
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||||
return true if param==2 # Double damage
|
return true if param==2 # Double damage
|
||||||
@@ -1143,7 +1143,7 @@ end
|
|||||||
# if it is a physical move. Has a different animation depending on the move's
|
# if it is a physical move. Has a different animation depending on the move's
|
||||||
# category. (Shell Side Arm)
|
# category. (Shell Side Arm)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CategoryDependsOnHigherDamagePoisonTarget < PokeBattle_PoisonMove
|
class Battle::Move::CategoryDependsOnHigherDamagePoisonTarget < Battle::Move::PoisonMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@calcCategory = 1
|
@calcCategory = 1
|
||||||
@@ -1189,7 +1189,7 @@ end
|
|||||||
# physical if user's Attack is higher than its Special Attack (after applying
|
# physical if user's Attack is higher than its Special Attack (after applying
|
||||||
# stat stages), and special otherwise. (Photon Geyser)
|
# stat stages), and special otherwise. (Photon Geyser)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CategoryDependsOnHigherDamageIgnoreTargetAbility < PokeBattle_Move_IgnoreTargetAbility
|
class Battle::Move::CategoryDependsOnHigherDamageIgnoreTargetAbility < Battle::Move::IgnoreTargetAbility
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@calcCategory = 1
|
@calcCategory = 1
|
||||||
@@ -1219,7 +1219,7 @@ end
|
|||||||
# are applied normally, applying the user's Attack modifiers and not the user's
|
# are applied normally, applying the user's Attack modifiers and not the user's
|
||||||
# Defence modifiers. (Body Press)
|
# Defence modifiers. (Body Press)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseUserBaseDefenseInsteadOfUserBaseAttack < PokeBattle_Move
|
class Battle::Move::UseUserBaseDefenseInsteadOfUserBaseAttack < Battle::Move
|
||||||
def pbGetAttackStats(user, target)
|
def pbGetAttackStats(user, target)
|
||||||
return user.defense, user.stages[:DEFENSE] + 6
|
return user.defense, user.stages[:DEFENSE] + 6
|
||||||
end
|
end
|
||||||
@@ -1229,7 +1229,7 @@ end
|
|||||||
# Target's Attack is used instead of user's Attack for this move's calculations.
|
# Target's Attack is used instead of user's Attack for this move's calculations.
|
||||||
# (Foul Play)
|
# (Foul Play)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseTargetAttackInsteadOfUserAttack < PokeBattle_Move
|
class Battle::Move::UseTargetAttackInsteadOfUserAttack < Battle::Move
|
||||||
def pbGetAttackStats(user,target)
|
def pbGetAttackStats(user,target)
|
||||||
if specialMove?
|
if specialMove?
|
||||||
return target.spatk, target.stages[:SPECIAL_ATTACK]+6
|
return target.spatk, target.stages[:SPECIAL_ATTACK]+6
|
||||||
@@ -1242,7 +1242,7 @@ end
|
|||||||
# Target's Defense is used instead of its Special Defense for this move's
|
# Target's Defense is used instead of its Special Defense for this move's
|
||||||
# calculations. (Psyshock, Psystrike, Secret Sword)
|
# calculations. (Psyshock, Psystrike, Secret Sword)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseTargetDefenseInsteadOfTargetSpDef < PokeBattle_Move
|
class Battle::Move::UseTargetDefenseInsteadOfTargetSpDef < Battle::Move
|
||||||
def pbGetDefenseStats(user,target)
|
def pbGetDefenseStats(user,target)
|
||||||
return target.defense, target.stages[:DEFENSE]+6
|
return target.defense, target.stages[:DEFENSE]+6
|
||||||
end
|
end
|
||||||
@@ -1252,7 +1252,7 @@ end
|
|||||||
# User's attack next round against the target will definitely hit.
|
# User's attack next round against the target will definitely hit.
|
||||||
# (Lock-On, Mind Reader)
|
# (Lock-On, Mind Reader)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_EnsureNextMoveAlwaysHits < PokeBattle_Move
|
class Battle::Move::EnsureNextMoveAlwaysHits < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
user.effects[PBEffects::LockOn] = 2
|
user.effects[PBEffects::LockOn] = 2
|
||||||
user.effects[PBEffects::LockOnPos] = target.index
|
user.effects[PBEffects::LockOnPos] = target.index
|
||||||
@@ -1264,7 +1264,7 @@ end
|
|||||||
# Target's evasion stat changes are ignored from now on. (Foresight, Odor Sleuth)
|
# Target's evasion stat changes are ignored from now on. (Foresight, Odor Sleuth)
|
||||||
# Normal and Fighting moves have normal effectiveness against the Ghost-type target.
|
# Normal and Fighting moves have normal effectiveness against the Ghost-type target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartNegateTargetEvasionStatStageAndGhostImmunity < PokeBattle_Move
|
class Battle::Move::StartNegateTargetEvasionStatStageAndGhostImmunity < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -1278,7 +1278,7 @@ end
|
|||||||
# Target's evasion stat changes are ignored from now on. (Miracle Eye)
|
# Target's evasion stat changes are ignored from now on. (Miracle Eye)
|
||||||
# Psychic moves have normal effectiveness against the Dark-type target.
|
# Psychic moves have normal effectiveness against the Dark-type target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartNegateTargetEvasionStatStageAndDarkImmunity < PokeBattle_Move
|
class Battle::Move::StartNegateTargetEvasionStatStageAndDarkImmunity < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -1292,7 +1292,7 @@ end
|
|||||||
# This move ignores target's Defense, Special Defense and evasion stat changes.
|
# This move ignores target's Defense, Special Defense and evasion stat changes.
|
||||||
# (Chip Away, Darkest Lariat, Sacred Sword)
|
# (Chip Away, Darkest Lariat, Sacred Sword)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_IgnoreTargetDefSpDefEvaStatStages < PokeBattle_Move
|
class Battle::Move::IgnoreTargetDefSpDefEvaStatStages < Battle::Move
|
||||||
def pbCalcAccuracyMultipliers(user,target,multipliers)
|
def pbCalcAccuracyMultipliers(user,target,multipliers)
|
||||||
super
|
super
|
||||||
modifiers[:evasion_stage] = 0
|
modifiers[:evasion_stage] = 0
|
||||||
@@ -1307,7 +1307,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# This move's type is the same as the user's first type. (Revelation Dance)
|
# This move's type is the same as the user's first type. (Revelation Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeIsUserFirstType < PokeBattle_Move
|
class Battle::Move::TypeIsUserFirstType < Battle::Move
|
||||||
def pbBaseType(user)
|
def pbBaseType(user)
|
||||||
userTypes = user.pbTypes(true)
|
userTypes = user.pbTypes(true)
|
||||||
return userTypes[0]
|
return userTypes[0]
|
||||||
@@ -1317,7 +1317,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power and type depends on the user's IVs. (Hidden Power)
|
# Power and type depends on the user's IVs. (Hidden Power)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeDependsOnUserIVs < PokeBattle_Move
|
class Battle::Move::TypeDependsOnUserIVs < Battle::Move
|
||||||
def pbBaseType(user)
|
def pbBaseType(user)
|
||||||
hp = pbHiddenPower(user)
|
hp = pbHiddenPower(user)
|
||||||
return hp[0]
|
return hp[0]
|
||||||
@@ -1368,7 +1368,7 @@ end
|
|||||||
# Power and type depend on the user's held berry. Destroys the berry.
|
# Power and type depend on the user's held berry. Destroys the berry.
|
||||||
# (Natural Gift)
|
# (Natural Gift)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeAndPowerDependOnUserBerry < PokeBattle_Move
|
class Battle::Move::TypeAndPowerDependOnUserBerry < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@typeArray = {
|
@typeArray = {
|
||||||
@@ -1465,7 +1465,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Type depends on the user's held Plate. (Judgment)
|
# Type depends on the user's held Plate. (Judgment)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeDependsOnUserPlate < PokeBattle_Move
|
class Battle::Move::TypeDependsOnUserPlate < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@itemTypes = {
|
@itemTypes = {
|
||||||
@@ -1505,7 +1505,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Type depends on the user's held Memory. (Multi-Attack)
|
# Type depends on the user's held Memory. (Multi-Attack)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeDependsOnUserMemory < PokeBattle_Move
|
class Battle::Move::TypeDependsOnUserMemory < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@itemTypes = {
|
@itemTypes = {
|
||||||
@@ -1545,7 +1545,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Type depends on the user's held Drive. (Techno Blast)
|
# Type depends on the user's held Drive. (Techno Blast)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeDependsOnUserDrive < PokeBattle_Move
|
class Battle::Move::TypeDependsOnUserDrive < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@itemTypes = {
|
@itemTypes = {
|
||||||
@@ -1584,7 +1584,7 @@ end
|
|||||||
# form (Electric if Full Belly, Dark if Hangry). Fails if the user is not
|
# form (Electric if Full Belly, Dark if Hangry). Fails if the user is not
|
||||||
# Morpeko (works if transformed into Morpeko). (Aura Wheel)
|
# Morpeko (works if transformed into Morpeko). (Aura Wheel)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeDependsOnUserMorpekoFormRaiseUserSpeed1 < PokeBattle_Move_RaiseUserSpeed1
|
class Battle::Move::TypeDependsOnUserMorpekoFormRaiseUserSpeed1 < Battle::Move::RaiseUserSpeed1
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
if !user.isSpecies?(:MORPEKO) && user.effects[PBEffects::TransformSpecies] != :MORPEKO
|
if !user.isSpecies?(:MORPEKO) && user.effects[PBEffects::TransformSpecies] != :MORPEKO
|
||||||
@battle.pbDisplay(_INTL("But {1} can't use the move!", user.pbThis))
|
@battle.pbDisplay(_INTL("But {1} can't use the move!", user.pbThis))
|
||||||
@@ -1602,7 +1602,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled in weather. Type changes depending on the weather. (Weather Ball)
|
# Power is doubled in weather. Type changes depending on the weather. (Weather Ball)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeAndPowerDependOnWeather < PokeBattle_Move
|
class Battle::Move::TypeAndPowerDependOnWeather < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
baseDmg *= 2 if user.effectiveWeather != :None
|
baseDmg *= 2 if user.effectiveWeather != :None
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -1637,7 +1637,7 @@ end
|
|||||||
# Power is doubled if a terrain applies and user is grounded; also, this move's
|
# Power is doubled if a terrain applies and user is grounded; also, this move's
|
||||||
# type and animation depends on the terrain. (Terrain Pulse)
|
# type and animation depends on the terrain. (Terrain Pulse)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TypeAndPowerDependOnTerrain < PokeBattle_Move
|
class Battle::Move::TypeAndPowerDependOnTerrain < Battle::Move
|
||||||
def pbBaseDamage(baseDmg, user, target)
|
def pbBaseDamage(baseDmg, user, target)
|
||||||
baseDmg *= 2 if @battle.field.terrain != :None && user.affectedByTerrain?
|
baseDmg *= 2 if @battle.field.terrain != :None && user.affectedByTerrain?
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -1671,7 +1671,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target's moves become Electric-type for the rest of the round. (Electrify)
|
# Target's moves become Electric-type for the rest of the round. (Electrify)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TargetMovesBecomeElectric < PokeBattle_Move
|
class Battle::Move::TargetMovesBecomeElectric < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if target.effects[PBEffects::Electrify]
|
if target.effects[PBEffects::Electrify]
|
||||||
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
||||||
@@ -1691,7 +1691,7 @@ end
|
|||||||
# All Normal-type moves become Electric-type for the rest of the round.
|
# All Normal-type moves become Electric-type for the rest of the round.
|
||||||
# (Ion Deluge, Plasma Fists)
|
# (Ion Deluge, Plasma Fists)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_NormalMovesBecomeElectric < PokeBattle_Move
|
class Battle::Move::NormalMovesBecomeElectric < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
return false if damagingMove?
|
return false if damagingMove?
|
||||||
if @battle.field.effects[PBEffects::IonDeluge]
|
if @battle.field.effects[PBEffects::IonDeluge]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Hits twice.
|
# Hits twice.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitTwoTimes < PokeBattle_Move
|
class Battle::Move::HitTwoTimes < Battle::Move
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
def pbNumHits(user,targets); return 2; end
|
def pbNumHits(user,targets); return 2; end
|
||||||
end
|
end
|
||||||
@@ -9,7 +9,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Hits twice. May poison the target on each hit. (Twineedle)
|
# Hits twice. May poison the target on each hit. (Twineedle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitTwoTimesPoisonTarget < PokeBattle_PoisonMove
|
class Battle::Move::HitTwoTimesPoisonTarget < Battle::Move::PoisonMove
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
def pbNumHits(user,targets); return 2; end
|
def pbNumHits(user,targets); return 2; end
|
||||||
end
|
end
|
||||||
@@ -18,7 +18,7 @@ end
|
|||||||
# Hits twice. Causes the target to flinch. Does double damage and has perfect
|
# Hits twice. Causes the target to flinch. Does double damage and has perfect
|
||||||
# accuracy if the target is Minimized. (Double Iron Bash)
|
# accuracy if the target is Minimized. (Double Iron Bash)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitTwoTimesFlinchTarget < PokeBattle_FlinchMove
|
class Battle::Move::HitTwoTimesFlinchTarget < Battle::Move::FlinchMove
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
def pbNumHits(user,targets); return 2; end
|
def pbNumHits(user,targets); return 2; end
|
||||||
def tramplesMinimize?(param=1); return Settings::MECHANICS_GENERATION <= 7; end
|
def tramplesMinimize?(param=1); return Settings::MECHANICS_GENERATION <= 7; end
|
||||||
@@ -35,7 +35,7 @@ end
|
|||||||
# check in turn). This is considered unimportant, and since correcting it
|
# check in turn). This is considered unimportant, and since correcting it
|
||||||
# would involve extensive code rewrites, it is being ignored.
|
# would involve extensive code rewrites, it is being ignored.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitTwoTimesTargetThenTargetAlly < PokeBattle_Move
|
class Battle::Move::HitTwoTimesTargetThenTargetAlly < Battle::Move
|
||||||
def pbNumHits(user, targets); return 1; end
|
def pbNumHits(user, targets); return 1; end
|
||||||
def pbRepeatHit?; return true; end
|
def pbRepeatHit?; return true; end
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ end
|
|||||||
# Hits 3 times. Power is multiplied by the hit number. (Triple Kick)
|
# Hits 3 times. Power is multiplied by the hit number. (Triple Kick)
|
||||||
# An accuracy check is performed for each hit.
|
# An accuracy check is performed for each hit.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitThreeTimesPowersUpWithEachHit < PokeBattle_Move
|
class Battle::Move::HitThreeTimesPowersUpWithEachHit < Battle::Move
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
def pbNumHits(user,targets); return 3; end
|
def pbNumHits(user,targets); return 3; end
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ end
|
|||||||
# Hits 3 times in a row. If each hit could be a critical hit, it will definitely
|
# Hits 3 times in a row. If each hit could be a critical hit, it will definitely
|
||||||
# be a critical hit. (Surging Strikes)
|
# be a critical hit. (Surging Strikes)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitThreeTimesAlwaysCriticalHit < PokeBattle_Move
|
class Battle::Move::HitThreeTimesAlwaysCriticalHit < Battle::Move
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
def pbNumHits(user, targets); return 3; end
|
def pbNumHits(user, targets); return 3; end
|
||||||
def pbCritialOverride(user, target); return 1; end
|
def pbCritialOverride(user, target); return 1; end
|
||||||
@@ -100,7 +100,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Hits 2-5 times.
|
# Hits 2-5 times.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitTwoToFiveTimes < PokeBattle_Move
|
class Battle::Move::HitTwoToFiveTimes < Battle::Move
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
|
|
||||||
def pbNumHits(user,targets)
|
def pbNumHits(user,targets)
|
||||||
@@ -120,7 +120,7 @@ end
|
|||||||
# Hits 2-5 times. If the user is Ash Greninja, powers up and hits 3 times.
|
# Hits 2-5 times. If the user is Ash Greninja, powers up and hits 3 times.
|
||||||
# (Water Shuriken)
|
# (Water Shuriken)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitTwoToFiveTimesOrThreeForAshGreninja < PokeBattle_Move_HitTwoToFiveTimes
|
class Battle::Move::HitTwoToFiveTimesOrThreeForAshGreninja < Battle::Move::HitTwoToFiveTimes
|
||||||
def pbNumHits(user,targets)
|
def pbNumHits(user,targets)
|
||||||
return 3 if user.isSpecies?(:GRENINJA) && user.form == 2
|
return 3 if user.isSpecies?(:GRENINJA) && user.form == 2
|
||||||
return super
|
return super
|
||||||
@@ -136,7 +136,7 @@ end
|
|||||||
# Hits 2-5 times in a row. If the move does not fail, increases the user's Speed
|
# Hits 2-5 times in a row. If the move does not fail, increases the user's Speed
|
||||||
# by 1 stage and decreases the user's Defense by 1 stage. (Scale Shot)
|
# by 1 stage and decreases the user's Defense by 1 stage. (Scale Shot)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1 < PokeBattle_Move
|
class Battle::Move::HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1 < Battle::Move
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
|
|
||||||
def pbNumHits(user, targets)
|
def pbNumHits(user, targets)
|
||||||
@@ -167,7 +167,7 @@ end
|
|||||||
# Base power of each hit depends on the base Attack stat for the species of that
|
# Base power of each hit depends on the base Attack stat for the species of that
|
||||||
# hit's participant. (Beat Up)
|
# hit's participant. (Beat Up)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitOncePerUserTeamMember < PokeBattle_Move
|
class Battle::Move::HitOncePerUserTeamMember < Battle::Move
|
||||||
def multiHitMove?; return true; end
|
def multiHitMove?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -197,7 +197,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Attacks first turn, skips second turn (if successful).
|
# Attacks first turn, skips second turn (if successful).
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AttackAndSkipNextTurn < PokeBattle_Move
|
class Battle::Move::AttackAndSkipNextTurn < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
user.effects[PBEffects::HyperBeam] = 2
|
user.effects[PBEffects::HyperBeam] = 2
|
||||||
user.currentMove = @id
|
user.currentMove = @id
|
||||||
@@ -207,7 +207,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Two turn attack. Skips first turn, attacks second turn. (Razor Wind)
|
# Two turn attack. Skips first turn, attacks second turn. (Razor Wind)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttack < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttack < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@battle.pbDisplay(_INTL("{1} whipped up a whirlwind!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} whipped up a whirlwind!",user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -217,7 +217,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. (Solar Beam, Solar Blade)
|
# Two turn attack. Skips first turn, attacks second turn. (Solar Beam, Solar Blade)
|
||||||
# Power halved in all weather except sunshine. In sunshine, takes 1 turn instead.
|
# Power halved in all weather except sunshine. In sunshine, takes 1 turn instead.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackOneTurnInSun < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackOneTurnInSun < Battle::Move::TwoTurnMove
|
||||||
def pbIsChargingTurn?(user)
|
def pbIsChargingTurn?(user)
|
||||||
ret = super
|
ret = super
|
||||||
if !user.effects[PBEffects::TwoTurnAttack]
|
if !user.effects[PBEffects::TwoTurnAttack]
|
||||||
@@ -245,7 +245,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. (Freeze Shock)
|
# Two turn attack. Skips first turn, attacks second turn. (Freeze Shock)
|
||||||
# May paralyze the target.
|
# May paralyze the target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackParalyzeTarget < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackParalyzeTarget < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@battle.pbDisplay(_INTL("{1} became cloaked in a freezing light!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} became cloaked in a freezing light!",user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -260,7 +260,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. (Ice Burn)
|
# Two turn attack. Skips first turn, attacks second turn. (Ice Burn)
|
||||||
# May burn the target.
|
# May burn the target.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackBurnTarget < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackBurnTarget < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@battle.pbDisplay(_INTL("{1} became cloaked in freezing air!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} became cloaked in freezing air!",user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -275,7 +275,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. (Sky Attack)
|
# Two turn attack. Skips first turn, attacks second turn. (Sky Attack)
|
||||||
# May make the target flinch.
|
# May make the target flinch.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackFlinchTarget < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackFlinchTarget < Battle::Move::TwoTurnMove
|
||||||
def flinchingMove?; return true; end
|
def flinchingMove?; return true; end
|
||||||
|
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@@ -292,7 +292,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, and increases the user's Special Attack,
|
# Two turn attack. Skips first turn, and increases the user's Special Attack,
|
||||||
# Special Defense and Speed by 2 stages each in the second turn. (Geomancy)
|
# Special Defense and Speed by 2 stages each in the second turn. (Geomancy)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackRaiseUserSpAtkSpDefSpd2 < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackRaiseUserSpAtkSpDefSpd2 < Battle::Move::TwoTurnMove
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
return false if user.effects[PBEffects::TwoTurnAttack] # Charging turn
|
return false if user.effects[PBEffects::TwoTurnAttack] # Charging turn
|
||||||
if !user.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) &&
|
if !user.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) &&
|
||||||
@@ -324,7 +324,7 @@ end
|
|||||||
# Two turn attack. Ups user's Defense by 1 stage first turn, attacks second turn.
|
# Two turn attack. Ups user's Defense by 1 stage first turn, attacks second turn.
|
||||||
# (Skull Bash)
|
# (Skull Bash)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackChargeRaiseUserDefense1 < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackChargeRaiseUserDefense1 < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@battle.pbDisplay(_INTL("{1} tucked in its head!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} tucked in its head!",user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -340,7 +340,7 @@ end
|
|||||||
# Two-turn attack. On the first turn, increases the user's Special Attack by 1
|
# Two-turn attack. On the first turn, increases the user's Special Attack by 1
|
||||||
# stage. On the second turn, does damage. (Meteor Beam)
|
# stage. On the second turn, does damage. (Meteor Beam)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackChargeRaiseUserSpAtk1 < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackChargeRaiseUserSpAtk1 < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user, targets)
|
def pbChargingTurnMessage(user, targets)
|
||||||
@battle.pbDisplay(_INTL("{1} is overflowing with space power!", user.pbThis))
|
@battle.pbDisplay(_INTL("{1} is overflowing with space power!", user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -356,7 +356,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. (Dig)
|
# Two turn attack. Skips first turn, attacks second turn. (Dig)
|
||||||
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackInvulnerableUnderground < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackInvulnerableUnderground < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@battle.pbDisplay(_INTL("{1} burrowed its way under the ground!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} burrowed its way under the ground!",user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -366,7 +366,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. (Dive)
|
# Two turn attack. Skips first turn, attacks second turn. (Dive)
|
||||||
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackInvulnerableUnderwater < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackInvulnerableUnderwater < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@battle.pbDisplay(_INTL("{1} hid underwater!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} hid underwater!",user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -376,7 +376,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. (Fly)
|
# Two turn attack. Skips first turn, attacks second turn. (Fly)
|
||||||
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackInvulnerableInSky < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackInvulnerableInSky < Battle::Move::TwoTurnMove
|
||||||
def unusableInGravity?; return true; end
|
def unusableInGravity?; return true; end
|
||||||
|
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@@ -389,7 +389,7 @@ end
|
|||||||
# May paralyze the target.
|
# May paralyze the target.
|
||||||
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackInvulnerableInSkyParalyzeTarget < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackInvulnerableInSkyParalyzeTarget < Battle::Move::TwoTurnMove
|
||||||
def unusableInGravity?; return true; end
|
def unusableInGravity?; return true; end
|
||||||
|
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@@ -408,7 +408,7 @@ end
|
|||||||
# Target is also semi-invulnerable during use, and can't take any action.
|
# Target is also semi-invulnerable during use, and can't take any action.
|
||||||
# Doesn't damage airborne Pokémon (but still makes them unable to move during).
|
# Doesn't damage airborne Pokémon (but still makes them unable to move during).
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackInvulnerableInSkyTargetCannotAct < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackInvulnerableInSkyTargetCannotAct < Battle::Move::TwoTurnMove
|
||||||
def unusableInGravity?; return true; end
|
def unusableInGravity?; return true; end
|
||||||
|
|
||||||
def pbIsChargingTurn?(user)
|
def pbIsChargingTurn?(user)
|
||||||
@@ -471,7 +471,7 @@ end
|
|||||||
# Two turn attack. Skips first turn, attacks second turn. Is invulnerable during
|
# Two turn attack. Skips first turn, attacks second turn. Is invulnerable during
|
||||||
# use. Ends target's protections upon hit. (Shadow Force, Phantom Force)
|
# use. Ends target's protections upon hit. (Shadow Force, Phantom Force)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TwoTurnAttackInvulnerableRemoveProtections < PokeBattle_TwoTurnMove
|
class Battle::Move::TwoTurnAttackInvulnerableRemoveProtections < Battle::Move::TwoTurnMove
|
||||||
def pbChargingTurnMessage(user,targets)
|
def pbChargingTurnMessage(user,targets)
|
||||||
@battle.pbDisplay(_INTL("{1} vanished instantly!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} vanished instantly!",user.pbThis))
|
||||||
end
|
end
|
||||||
@@ -496,7 +496,7 @@ end
|
|||||||
# Soundproof. I think this is an oversight, so I've let Soundproof Pokémon
|
# Soundproof. I think this is an oversight, so I've let Soundproof Pokémon
|
||||||
# be unaffected by Uproar waking/non-sleeping effects.
|
# be unaffected by Uproar waking/non-sleeping effects.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_MultiTurnAttackPreventSleeping < PokeBattle_Move
|
class Battle::Move::MultiTurnAttackPreventSleeping < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
return if user.effects[PBEffects::Uproar]>0
|
return if user.effects[PBEffects::Uproar]>0
|
||||||
user.effects[PBEffects::Uproar] = 3
|
user.effects[PBEffects::Uproar] = 3
|
||||||
@@ -514,7 +514,7 @@ end
|
|||||||
# User must use this move for 1 or 2 more rounds. At end, user becomes confused.
|
# User must use this move for 1 or 2 more rounds. At end, user becomes confused.
|
||||||
# (Outrage, Petal Dange, Thrash)
|
# (Outrage, Petal Dange, Thrash)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_MultiTurnAttackConfuseUserAtEnd < PokeBattle_Move
|
class Battle::Move::MultiTurnAttackConfuseUserAtEnd < Battle::Move
|
||||||
def pbEffectAfterAllHits(user,target)
|
def pbEffectAfterAllHits(user,target)
|
||||||
if !target.damageState.unaffected && user.effects[PBEffects::Outrage]==0
|
if !target.damageState.unaffected && user.effects[PBEffects::Outrage]==0
|
||||||
user.effects[PBEffects::Outrage] = 2+@battle.pbRandom(2)
|
user.effects[PBEffects::Outrage] = 2+@battle.pbRandom(2)
|
||||||
@@ -533,7 +533,7 @@ end
|
|||||||
# User must use this move for 4 more rounds. Power doubles each round.
|
# User must use this move for 4 more rounds. Power doubles each round.
|
||||||
# Power is also doubled if user has curled up. (Ice Ball, Rollout)
|
# Power is also doubled if user has curled up. (Ice Ball, Rollout)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_MultiTurnAttackPowersUpEachTurn < PokeBattle_Move
|
class Battle::Move::MultiTurnAttackPowersUpEachTurn < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
shift = (5 - user.effects[PBEffects::Rollout]) # 0-4, where 0 is most powerful
|
shift = (5 - user.effects[PBEffects::Rollout]) # 0-4, where 0 is most powerful
|
||||||
shift = 0 if user.effects[PBEffects::Rollout] == 0 # For first turn
|
shift = 0 if user.effects[PBEffects::Rollout] == 0 # For first turn
|
||||||
@@ -556,7 +556,7 @@ end
|
|||||||
# total direct damage it took while biding to the last battler that damaged it.
|
# total direct damage it took while biding to the last battler that damaged it.
|
||||||
# (Bide)
|
# (Bide)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_MultiTurnAttackBideThenReturnDoubleDamage < PokeBattle_FixedDamageMove
|
class Battle::Move::MultiTurnAttackBideThenReturnDoubleDamage < Battle::Move::FixedDamageMove
|
||||||
def pbAddTarget(targets,user)
|
def pbAddTarget(targets,user)
|
||||||
return if user.effects[PBEffects::Bide]!=1 # Not the attack turn
|
return if user.effects[PBEffects::Bide]!=1 # Not the attack turn
|
||||||
idxTarget = user.effects[PBEffects::BideTarget]
|
idxTarget = user.effects[PBEffects::BideTarget]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Heals user to full HP. User falls asleep for 2 more rounds. (Rest)
|
# Heals user to full HP. User falls asleep for 2 more rounds. (Rest)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserFullyAndFallAsleep < PokeBattle_HealingMove
|
class Battle::Move::HealUserFullyAndFallAsleep < Battle::Move::HealingMove
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.asleep?
|
if user.asleep?
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -25,7 +25,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Heals user by 1/2 of its max HP.
|
# Heals user by 1/2 of its max HP.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserHalfOfTotalHP < PokeBattle_HealingMove
|
class Battle::Move::HealUserHalfOfTotalHP < Battle::Move::HealingMove
|
||||||
def pbHealAmount(user)
|
def pbHealAmount(user)
|
||||||
return (user.totalhp/2.0).round
|
return (user.totalhp/2.0).round
|
||||||
end
|
end
|
||||||
@@ -35,7 +35,7 @@ end
|
|||||||
# Heals user by an amount depending on the weather. (Moonlight, Morning Sun,
|
# Heals user by an amount depending on the weather. (Moonlight, Morning Sun,
|
||||||
# Synthesis)
|
# Synthesis)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserDependingOnWeather < PokeBattle_HealingMove
|
class Battle::Move::HealUserDependingOnWeather < Battle::Move::HealingMove
|
||||||
def pbOnStartUse(user,targets)
|
def pbOnStartUse(user,targets)
|
||||||
case user.effectiveWeather
|
case user.effectiveWeather
|
||||||
when :Sun, :HarshSun
|
when :Sun, :HarshSun
|
||||||
@@ -55,7 +55,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Heals user by 1/2 of its max HP, or 2/3 of its max HP in a sandstorm. (Shore Up)
|
# Heals user by 1/2 of its max HP, or 2/3 of its max HP in a sandstorm. (Shore Up)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserDependingOnSandstorm < PokeBattle_HealingMove
|
class Battle::Move::HealUserDependingOnSandstorm < Battle::Move::HealingMove
|
||||||
def pbHealAmount(user)
|
def pbHealAmount(user)
|
||||||
return (user.totalhp * 2 / 3.0).round if user.effectiveWeather == :Sandstorm
|
return (user.totalhp * 2 / 3.0).round if user.effectiveWeather == :Sandstorm
|
||||||
return (user.totalhp / 2.0).round
|
return (user.totalhp / 2.0).round
|
||||||
@@ -66,7 +66,7 @@ end
|
|||||||
# Heals user by 1/2 of its max HP. (Roost)
|
# Heals user by 1/2 of its max HP. (Roost)
|
||||||
# User roosts, and its Flying type is ignored for attacks used against it.
|
# User roosts, and its Flying type is ignored for attacks used against it.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserHalfOfTotalHPLoseFlyingTypeThisTurn < PokeBattle_HealingMove
|
class Battle::Move::HealUserHalfOfTotalHPLoseFlyingTypeThisTurn < Battle::Move::HealingMove
|
||||||
def pbHealAmount(user)
|
def pbHealAmount(user)
|
||||||
return (user.totalhp/2.0).round
|
return (user.totalhp/2.0).round
|
||||||
end
|
end
|
||||||
@@ -81,7 +81,7 @@ end
|
|||||||
# Cures the target's permanent status problems. Heals user by 1/2 of its max HP.
|
# Cures the target's permanent status problems. Heals user by 1/2 of its max HP.
|
||||||
# (Purify)
|
# (Purify)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CureTargetStatusHealUserHalfOfTotalHP < PokeBattle_HealingMove
|
class Battle::Move::CureTargetStatusHealUserHalfOfTotalHP < Battle::Move::HealingMove
|
||||||
def canSnatch?; return false; end # Because it affects a target
|
def canSnatch?; return false; end # Because it affects a target
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ end
|
|||||||
# target's Attack stat (after applying stat stages, before this move decreases
|
# target's Attack stat (after applying stat stages, before this move decreases
|
||||||
# it). (Strength Sap)
|
# it). (Strength Sap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserByTargetAttackLowerTargetAttack1 < PokeBattle_Move
|
class Battle::Move::HealUserByTargetAttackLowerTargetAttack1 < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User gains half the HP it inflicts as damage.
|
# User gains half the HP it inflicts as damage.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserByHalfOfDamageDone < PokeBattle_Move
|
class Battle::Move::HealUserByHalfOfDamageDone < Battle::Move
|
||||||
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -172,7 +172,7 @@ end
|
|||||||
# User gains half the HP it inflicts as damage. Fails if target is not asleep.
|
# User gains half the HP it inflicts as damage. Fails if target is not asleep.
|
||||||
# (Dream Eater)
|
# (Dream Eater)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserByHalfOfDamageDoneIfTargetAsleep < PokeBattle_Move
|
class Battle::Move::HealUserByHalfOfDamageDoneIfTargetAsleep < Battle::Move
|
||||||
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -193,7 +193,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User gains 3/4 the HP it inflicts as damage. (Draining Kiss, Oblivion Wing)
|
# User gains 3/4 the HP it inflicts as damage. (Draining Kiss, Oblivion Wing)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserByThreeQuartersOfDamageDone < PokeBattle_Move
|
class Battle::Move::HealUserByThreeQuartersOfDamageDone < Battle::Move
|
||||||
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -206,7 +206,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# The user and its allies gain 25% of their total HP. (Life Dew)
|
# The user and its allies gain 25% of their total HP. (Life Dew)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserAndAlliesQuarterOfTotalHP < PokeBattle_Move
|
class Battle::Move::HealUserAndAlliesQuarterOfTotalHP < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
@@ -231,7 +231,7 @@ end
|
|||||||
# The user and its allies gain 25% of their total HP and are cured of their
|
# The user and its allies gain 25% of their total HP and are cured of their
|
||||||
# permanent status problems. (Jungle Healing)
|
# permanent status problems. (Jungle Healing)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserAndAlliesQuarterOfTotalHPCureStatus < PokeBattle_Move
|
class Battle::Move::HealUserAndAlliesQuarterOfTotalHPCureStatus < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
@@ -273,7 +273,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Heals target by 1/2 of its max HP. (Heal Pulse)
|
# Heals target by 1/2 of its max HP. (Heal Pulse)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealTargetHalfOfTotalHP < PokeBattle_Move
|
class Battle::Move::HealTargetHalfOfTotalHP < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ end
|
|||||||
# Heals target by 1/2 of its max HP, or 2/3 of its max HP in Grassy Terrain.
|
# Heals target by 1/2 of its max HP, or 2/3 of its max HP in Grassy Terrain.
|
||||||
# (Floral Healing)
|
# (Floral Healing)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealTargetDependingOnGrassyTerrain < PokeBattle_Move
|
class Battle::Move::HealTargetDependingOnGrassyTerrain < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ end
|
|||||||
# Battler in user's position is healed by 1/2 of its max HP, at the end of the
|
# Battler in user's position is healed by 1/2 of its max HP, at the end of the
|
||||||
# next round. (Wish)
|
# next round. (Wish)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserPositionNextTurn < PokeBattle_Move
|
class Battle::Move::HealUserPositionNextTurn < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ end
|
|||||||
# Rings the user. Ringed Pokémon gain 1/16 of max HP at the end of each round.
|
# Rings the user. Ringed Pokémon gain 1/16 of max HP at the end of each round.
|
||||||
# (Aqua Ring)
|
# (Aqua Ring)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartHealUserEachTurn < PokeBattle_Move
|
class Battle::Move::StartHealUserEachTurn < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -373,7 +373,7 @@ end
|
|||||||
# Ingrains the user. Ingrained Pokémon gain 1/16 of max HP at the end of each
|
# Ingrains the user. Ingrained Pokémon gain 1/16 of max HP at the end of each
|
||||||
# round, and cannot flee or switch out. (Ingrain)
|
# round, and cannot flee or switch out. (Ingrain)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartHealUserEachTurnTrapUserInBattle < PokeBattle_Move
|
class Battle::Move::StartHealUserEachTurnTrapUserInBattle < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -393,7 +393,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target will lose 1/4 of max HP at end of each round, while asleep. (Nightmare)
|
# Target will lose 1/4 of max HP at end of each round, while asleep. (Nightmare)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartDamageTargetEachTurnIfTargetAsleep < PokeBattle_Move
|
class Battle::Move::StartDamageTargetEachTurnIfTargetAsleep < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
if !target.asleep? || target.effects[PBEffects::Nightmare]
|
if !target.asleep? || target.effects[PBEffects::Nightmare]
|
||||||
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
||||||
@@ -412,7 +412,7 @@ end
|
|||||||
# Seeds the target. Seeded Pokémon lose 1/8 of max HP at the end of each round,
|
# Seeds the target. Seeded Pokémon lose 1/8 of max HP at the end of each round,
|
||||||
# and the Pokémon in the user's position gains the same amount. (Leech Seed)
|
# and the Pokémon in the user's position gains the same amount. (Leech Seed)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartLeechSeedTarget < PokeBattle_Move
|
class Battle::Move::StartLeechSeedTarget < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -442,7 +442,7 @@ end
|
|||||||
# The user takes damage equal to 1/2 of its total HP, even if the target is
|
# The user takes damage equal to 1/2 of its total HP, even if the target is
|
||||||
# unaffected (this is not recoil damage). (Steel Beam)
|
# unaffected (this is not recoil damage). (Steel Beam)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserLosesHalfOfTotalHP < PokeBattle_Move
|
class Battle::Move::UserLosesHalfOfTotalHP < Battle::Move
|
||||||
def pbEffectAfterAllHits(user, target)
|
def pbEffectAfterAllHits(user, target)
|
||||||
return if !user.takesIndirectDamage?
|
return if !user.takesIndirectDamage?
|
||||||
amt = (user.totalhp / 2.0).ceil
|
amt = (user.totalhp / 2.0).ceil
|
||||||
@@ -456,7 +456,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Damages user by 1/2 of its max HP, even if this move misses. (Mind Blown)
|
# Damages user by 1/2 of its max HP, even if this move misses. (Mind Blown)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserLosesHalfOfTotalHPExplosive < PokeBattle_Move
|
class Battle::Move::UserLosesHalfOfTotalHPExplosive < Battle::Move
|
||||||
def worksWithNoTargets?; return true; end
|
def worksWithNoTargets?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -464,7 +464,7 @@ class PokeBattle_Move_UserLosesHalfOfTotalHPExplosive < PokeBattle_Move
|
|||||||
bearer = @battle.pbCheckGlobalAbility(:DAMP)
|
bearer = @battle.pbCheckGlobalAbility(:DAMP)
|
||||||
if bearer!=nil
|
if bearer!=nil
|
||||||
@battle.pbShowAbilitySplash(bearer)
|
@battle.pbShowAbilitySplash(bearer)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name))
|
@battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!",
|
@battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!",
|
||||||
@@ -487,7 +487,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User faints, even if the move does nothing else. (Explosion, Self-Destruct)
|
# User faints, even if the move does nothing else. (Explosion, Self-Destruct)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserFaintsExplosive < PokeBattle_Move
|
class Battle::Move::UserFaintsExplosive < Battle::Move
|
||||||
def worksWithNoTargets?; return true; end
|
def worksWithNoTargets?; return true; end
|
||||||
def pbNumHits(user,targets); return 1; end
|
def pbNumHits(user,targets); return 1; end
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ class PokeBattle_Move_UserFaintsExplosive < PokeBattle_Move
|
|||||||
bearer = @battle.pbCheckGlobalAbility(:DAMP)
|
bearer = @battle.pbCheckGlobalAbility(:DAMP)
|
||||||
if bearer!=nil
|
if bearer!=nil
|
||||||
@battle.pbShowAbilitySplash(bearer)
|
@battle.pbShowAbilitySplash(bearer)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name))
|
@battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!",
|
@battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!",
|
||||||
@@ -520,7 +520,7 @@ end
|
|||||||
# User faints. If Misty Terrain applies, base power is multiplied by 1.5.
|
# User faints. If Misty Terrain applies, base power is multiplied by 1.5.
|
||||||
# (Misty Explosion)
|
# (Misty Explosion)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserFaintsPowersUpInMistyTerrainExplosive < PokeBattle_Move_UserFaintsExplosive
|
class Battle::Move::UserFaintsPowersUpInMistyTerrainExplosive < Battle::Move::UserFaintsExplosive
|
||||||
def pbBaseDamage(baseDmg, user, target)
|
def pbBaseDamage(baseDmg, user, target)
|
||||||
baseDmg = baseDmg * 3 / 2 if @battle.field.terrain == :Misty
|
baseDmg = baseDmg * 3 / 2 if @battle.field.terrain == :Misty
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -531,7 +531,7 @@ end
|
|||||||
# Inflicts fixed damage equal to user's current HP. (Final Gambit)
|
# Inflicts fixed damage equal to user's current HP. (Final Gambit)
|
||||||
# User faints (if successful).
|
# User faints (if successful).
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserFaintsFixedDamageUserHP < PokeBattle_FixedDamageMove
|
class Battle::Move::UserFaintsFixedDamageUserHP < Battle::Move::FixedDamageMove
|
||||||
def pbNumHits(user,targets); return 1; end
|
def pbNumHits(user,targets); return 1; end
|
||||||
|
|
||||||
def pbOnStartUse(user,targets)
|
def pbOnStartUse(user,targets)
|
||||||
@@ -553,7 +553,7 @@ end
|
|||||||
# Decreases the target's Attack and Special Attack by 2 stages each. (Memento)
|
# Decreases the target's Attack and Special Attack by 2 stages each. (Memento)
|
||||||
# User faints (if successful).
|
# User faints (if successful).
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserFaintsLowerTargetAtkSpAtk2 < PokeBattle_TargetMultiStatDownMove
|
class Battle::Move::UserFaintsLowerTargetAtkSpAtk2 < Battle::Move::TargetMultiStatDownMove
|
||||||
def canMagicCoat?; return false; end
|
def canMagicCoat?; return false; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -578,7 +578,7 @@ end
|
|||||||
# User faints. The Pokémon that replaces the user is fully healed (HP and
|
# User faints. The Pokémon that replaces the user is fully healed (HP and
|
||||||
# status). Fails if user won't be replaced. (Healing Wish)
|
# status). Fails if user won't be replaced. (Healing Wish)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserFaintsHealAndCureReplacement < PokeBattle_Move
|
class Battle::Move::UserFaintsHealAndCureReplacement < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -602,7 +602,7 @@ end
|
|||||||
# User faints. The Pokémon that replaces the user is fully healed (HP, PP and
|
# User faints. The Pokémon that replaces the user is fully healed (HP, PP and
|
||||||
# status). Fails if user won't be replaced. (Lunar Dance)
|
# status). Fails if user won't be replaced. (Lunar Dance)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserFaintsHealAndCureReplacementRestorePP < PokeBattle_Move
|
class Battle::Move::UserFaintsHealAndCureReplacementRestorePP < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -625,7 +625,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# All current battlers will perish after 3 more rounds. (Perish Song)
|
# All current battlers will perish after 3 more rounds. (Perish Song)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartPerishCountsForAllBattlers < PokeBattle_Move
|
class Battle::Move::StartPerishCountsForAllBattlers < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
failed = true
|
failed = true
|
||||||
targets.each do |b|
|
targets.each do |b|
|
||||||
@@ -659,7 +659,7 @@ end
|
|||||||
# If user is KO'd before it next moves, the battler that caused it also faints.
|
# If user is KO'd before it next moves, the battler that caused it also faints.
|
||||||
# (Destiny Bond)
|
# (Destiny Bond)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AttackerFaintsIfUserFaints < PokeBattle_Move
|
class Battle::Move::AttackerFaintsIfUserFaints < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious]
|
if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious]
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -678,7 +678,7 @@ end
|
|||||||
# If user is KO'd before it next moves, the attack that caused it loses all PP.
|
# If user is KO'd before it next moves, the attack that caused it loses all PP.
|
||||||
# (Grudge)
|
# (Grudge)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SetAttackerMovePPTo0IfUserFaints < PokeBattle_Move
|
class Battle::Move::SetAttackerMovePPTo0IfUserFaints < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
user.effects[PBEffects::Grudge] = true
|
user.effects[PBEffects::Grudge] = true
|
||||||
@battle.pbDisplay(_INTL("{1} wants its target to bear a grudge!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} wants its target to bear a grudge!",user.pbThis))
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# User steals the target's item, if the user has none itself. (Covet, Thief)
|
# User steals the target's item, if the user has none itself. (Covet, Thief)
|
||||||
# Items stolen from wild Pokémon are kept after the battle.
|
# Items stolen from wild Pokémon are kept after the battle.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTakesTargetItem < PokeBattle_Move
|
class Battle::Move::UserTakesTargetItem < Battle::Move
|
||||||
def pbEffectAfterAllHits(user,target)
|
def pbEffectAfterAllHits(user,target)
|
||||||
return if user.wild? # Wild Pokémon can't thieve
|
return if user.wild? # Wild Pokémon can't thieve
|
||||||
return if user.fainted?
|
return if user.fainted?
|
||||||
@@ -29,7 +29,7 @@ end
|
|||||||
# User gives its item to the target. The item remains given after wild battles.
|
# User gives its item to the target. The item remains given after wild battles.
|
||||||
# (Bestow)
|
# (Bestow)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TargetTakesUserItem < PokeBattle_Move
|
class Battle::Move::TargetTakesUserItem < Battle::Move
|
||||||
def ignoresSubstitute?(user)
|
def ignoresSubstitute?(user)
|
||||||
return true if Settings::MECHANICS_GENERATION >= 6
|
return true if Settings::MECHANICS_GENERATION >= 6
|
||||||
return super
|
return super
|
||||||
@@ -70,7 +70,7 @@ end
|
|||||||
# User and target swap items. They remain swapped after wild battles.
|
# User and target swap items. They remain swapped after wild battles.
|
||||||
# (Switcheroo, Trick)
|
# (Switcheroo, Trick)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserTargetSwapItems < PokeBattle_Move
|
class Battle::Move::UserTargetSwapItems < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.wild?
|
if user.wild?
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -94,7 +94,7 @@ class PokeBattle_Move_UserTargetSwapItems < PokeBattle_Move
|
|||||||
if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true)))
|
@battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!",
|
@battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!",
|
||||||
@@ -133,7 +133,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User recovers the last item it held and consumed. (Recycle)
|
# User recovers the last item it held and consumed. (Recycle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RestoreUserConsumedItem < PokeBattle_Move
|
class Battle::Move::RestoreUserConsumedItem < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -165,7 +165,7 @@ end
|
|||||||
# Target drops its item. It regains the item at the end of the battle. (Knock Off)
|
# Target drops its item. It regains the item at the end of the battle. (Knock Off)
|
||||||
# If target has a losable item, damage is multiplied by 1.5.
|
# If target has a losable item, damage is multiplied by 1.5.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RemoveTargetItem < PokeBattle_Move
|
class Battle::Move::RemoveTargetItem < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
if Settings::MECHANICS_GENERATION >= 6 &&
|
if Settings::MECHANICS_GENERATION >= 6 &&
|
||||||
target.item && !target.unlosableItem?(target.item)
|
target.item && !target.unlosableItem?(target.item)
|
||||||
@@ -191,7 +191,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target's berry/Gem is destroyed. (Incinerate)
|
# Target's berry/Gem is destroyed. (Incinerate)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DestroyTargetBerryOrGem < PokeBattle_Move
|
class Battle::Move::DestroyTargetBerryOrGem < Battle::Move
|
||||||
def pbEffectWhenDealingDamage(user,target)
|
def pbEffectWhenDealingDamage(user,target)
|
||||||
return if target.damageState.substitute || target.damageState.berryWeakened
|
return if target.damageState.substitute || target.damageState.berryWeakened
|
||||||
return if !target.item || (!target.item.is_berry? &&
|
return if !target.item || (!target.item.is_berry? &&
|
||||||
@@ -207,7 +207,7 @@ end
|
|||||||
# item, the item is unlosable, the target has Sticky Hold, or the target is
|
# item, the item is unlosable, the target has Sticky Hold, or the target is
|
||||||
# behind a substitute. (Corrosive Gas)
|
# behind a substitute. (Corrosive Gas)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CorrodeTargetItem < PokeBattle_Move
|
class Battle::Move::CorrodeTargetItem < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -219,7 +219,7 @@ class PokeBattle_Move_CorrodeTargetItem < PokeBattle_Move
|
|||||||
if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis))
|
@battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",
|
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",
|
||||||
@@ -247,7 +247,7 @@ end
|
|||||||
# For 5 rounds, the target cannnot use its held item, its held item has no
|
# For 5 rounds, the target cannnot use its held item, its held item has no
|
||||||
# effect, and no items can be used on it. (Embargo)
|
# effect, and no items can be used on it. (Embargo)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartTargetCannotUseItem < PokeBattle_Move
|
class Battle::Move::StartTargetCannotUseItem < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -268,7 +268,7 @@ end
|
|||||||
# For 5 rounds, all held items cannot be used in any way and have no effect.
|
# For 5 rounds, all held items cannot be used in any way and have no effect.
|
||||||
# Held items can still change hands, but can't be thrown. (Magic Room)
|
# Held items can still change hands, but can't be thrown. (Magic Room)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartNegateHeldItems < PokeBattle_Move
|
class Battle::Move::StartNegateHeldItems < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
if @battle.field.effects[PBEffects::MagicRoom]>0
|
if @battle.field.effects[PBEffects::MagicRoom]>0
|
||||||
@battle.field.effects[PBEffects::MagicRoom] = 0
|
@battle.field.effects[PBEffects::MagicRoom] = 0
|
||||||
@@ -291,7 +291,7 @@ end
|
|||||||
# Room apply. Fails if the user is not holding a berry. This move cannot be
|
# Room apply. Fails if the user is not holding a berry. This move cannot be
|
||||||
# chosen to be used if the user is not holding a berry. (Stuff Cheeks)
|
# chosen to be used if the user is not holding a berry. (Stuff Cheeks)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserConsumeBerryRaiseDefense2 < PokeBattle_StatUpMove
|
class Battle::Move::UserConsumeBerryRaiseDefense2 < Battle::Move::StatUpMove
|
||||||
def initialize(battle, move)
|
def initialize(battle, move)
|
||||||
super
|
super
|
||||||
@statUp = [:DEFENSE, 2]
|
@statUp = [:DEFENSE, 2]
|
||||||
@@ -337,7 +337,7 @@ end
|
|||||||
# and they will not consume their berry. (Teatime)
|
# and they will not consume their berry. (Teatime)
|
||||||
# TODO: This isn't quite right for the messages shown when a berry is consumed.
|
# TODO: This isn't quite right for the messages shown when a berry is consumed.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AllBattlersConsumeBerry < PokeBattle_Move
|
class Battle::Move::AllBattlersConsumeBerry < Battle::Move
|
||||||
def pbMoveFailed?(user, targets)
|
def pbMoveFailed?(user, targets)
|
||||||
failed = true
|
failed = true
|
||||||
targets.each do |b|
|
targets.each do |b|
|
||||||
@@ -373,7 +373,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User consumes target's berry and gains its effect. (Bug Bite, Pluck)
|
# User consumes target's berry and gains its effect. (Bug Bite, Pluck)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserConsumeTargetBerry < PokeBattle_Move
|
class Battle::Move::UserConsumeTargetBerry < Battle::Move
|
||||||
def pbEffectAfterAllHits(user,target)
|
def pbEffectAfterAllHits(user,target)
|
||||||
return if user.fainted? || target.fainted?
|
return if user.fainted? || target.fainted?
|
||||||
return if target.damageState.unaffected || target.damageState.substitute
|
return if target.damageState.unaffected || target.damageState.substitute
|
||||||
@@ -390,7 +390,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User flings its item at the target. Power/effect depend on the item. (Fling)
|
# User flings its item at the target. Power/effect depend on the item. (Fling)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ThrowUserItemAtTarget < PokeBattle_Move
|
class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
# 80 => all Mega Stones
|
# 80 => all Mega Stones
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# This round, user becomes the target of attacks that have single targets.
|
# This round, user becomes the target of attacks that have single targets.
|
||||||
# (Follow Me, Rage Powder)
|
# (Follow Me, Rage Powder)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RedirectAllMovesToUser < PokeBattle_Move
|
class Battle::Move::RedirectAllMovesToUser < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
user.effects[PBEffects::FollowMe] = 1
|
user.effects[PBEffects::FollowMe] = 1
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
@@ -18,7 +18,7 @@ end
|
|||||||
# This round, target becomes the target of attacks that have single targets.
|
# This round, target becomes the target of attacks that have single targets.
|
||||||
# (Spotlight)
|
# (Spotlight)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RedirectAllMovesToTarget < PokeBattle_Move
|
class Battle::Move::RedirectAllMovesToTarget < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
@@ -34,7 +34,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Unaffected by moves and abilities that would redirect this move. (Snipe Shot)
|
# Unaffected by moves and abilities that would redirect this move. (Snipe Shot)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CannotBeRedirected < PokeBattle_Move
|
class Battle::Move::CannotBeRedirected < Battle::Move
|
||||||
def cannotRedirect?; return true; end
|
def cannotRedirect?; return true; end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ end
|
|||||||
# NOTE: Apparently a Normal Gem should be consumed even if this move will heal,
|
# NOTE: Apparently a Normal Gem should be consumed even if this move will heal,
|
||||||
# but I think that's silly so I've omitted that effect.
|
# but I think that's silly so I've omitted that effect.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RandomlyDamageOrHealTarget < PokeBattle_Move
|
class Battle::Move::RandomlyDamageOrHealTarget < Battle::Move
|
||||||
def pbOnStartUse(user,targets)
|
def pbOnStartUse(user,targets)
|
||||||
@presentDmg = 0 # 0 = heal, >0 = damage
|
@presentDmg = 0 # 0 = heal, >0 = damage
|
||||||
r = @battle.pbRandom(100)
|
r = @battle.pbRandom(100)
|
||||||
@@ -90,7 +90,7 @@ end
|
|||||||
# Damages target if target is a foe, or heals target by 1/2 of its max HP if
|
# Damages target if target is a foe, or heals target by 1/2 of its max HP if
|
||||||
# target is an ally. (Pollen Puff)
|
# target is an ally. (Pollen Puff)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealAllyOrDamageFoe < PokeBattle_Move
|
class Battle::Move::HealAllyOrDamageFoe < Battle::Move
|
||||||
def pbTarget(user)
|
def pbTarget(user)
|
||||||
return GameData::Target.get(:NearFoe) if user.effects[PBEffects::HealBlock]>0
|
return GameData::Target.get(:NearFoe) if user.effects[PBEffects::HealBlock]>0
|
||||||
return super
|
return super
|
||||||
@@ -137,7 +137,7 @@ end
|
|||||||
# User is not Ghost: Decreases the user's Speed by 1 stage, and increases the
|
# User is not Ghost: Decreases the user's Speed by 1 stage, and increases the
|
||||||
# user's Attack and Defense by 1 stage each. (Curse)
|
# user's Attack and Defense by 1 stage each. (Curse)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 < PokeBattle_Move
|
class Battle::Move::CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbTarget(user)
|
def pbTarget(user)
|
||||||
@@ -202,7 +202,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Effect depends on the environment. (Secret Power)
|
# Effect depends on the environment. (Secret Power)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_EffectDependsOnEnvironment < PokeBattle_Move
|
class Battle::Move::EffectDependsOnEnvironment < Battle::Move
|
||||||
def flinchingMove?; return [6,10,12].include?(@secretPower); end
|
def flinchingMove?; return [6,10,12].include?(@secretPower); end
|
||||||
|
|
||||||
def pbOnStartUse(user,targets)
|
def pbOnStartUse(user,targets)
|
||||||
@@ -315,7 +315,7 @@ end
|
|||||||
# 1.5 (in addition to Psychic Terrain's multiplier) and it targets all opposing
|
# 1.5 (in addition to Psychic Terrain's multiplier) and it targets all opposing
|
||||||
# Pokémon. (Expanding Force)
|
# Pokémon. (Expanding Force)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HitsAllFoesAndPowersUpInPsychicTerrain < PokeBattle_Move
|
class Battle::Move::HitsAllFoesAndPowersUpInPsychicTerrain < Battle::Move
|
||||||
def pbTarget(user)
|
def pbTarget(user)
|
||||||
if @battle.field.terrain == :Psychic && user.affectedByTerrain?
|
if @battle.field.terrain == :Psychic && user.affectedByTerrain?
|
||||||
return GameData::Target.get(:AllNearFoes)
|
return GameData::Target.get(:AllNearFoes)
|
||||||
@@ -335,7 +335,7 @@ end
|
|||||||
# Powders the foe. This round, if it uses a Fire move, it loses 1/4 of its max
|
# Powders the foe. This round, if it uses a Fire move, it loses 1/4 of its max
|
||||||
# HP instead. (Powder)
|
# HP instead. (Powder)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TargetNextFireMoveDamagesTarget < PokeBattle_Move
|
class Battle::Move::TargetNextFireMoveDamagesTarget < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if Fusion Flare has already been used this round. (Fusion Bolt)
|
# Power is doubled if Fusion Flare has already been used this round. (Fusion Bolt)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerAfterFusionFlare < PokeBattle_Move
|
class Battle::Move::DoublePowerAfterFusionFlare < Battle::Move
|
||||||
def pbChangeUsageCounters(user,specialUsage)
|
def pbChangeUsageCounters(user,specialUsage)
|
||||||
@doublePower = @battle.field.effects[PBEffects::FusionFlare]
|
@doublePower = @battle.field.effects[PBEffects::FusionFlare]
|
||||||
super
|
super
|
||||||
@@ -381,7 +381,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Power is doubled if Fusion Bolt has already been used this round. (Fusion Flare)
|
# Power is doubled if Fusion Bolt has already been used this round. (Fusion Flare)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DoublePowerAfterFusionBolt < PokeBattle_Move
|
class Battle::Move::DoublePowerAfterFusionBolt < Battle::Move
|
||||||
def pbChangeUsageCounters(user,specialUsage)
|
def pbChangeUsageCounters(user,specialUsage)
|
||||||
@doublePower = @battle.field.effects[PBEffects::FusionBolt]
|
@doublePower = @battle.field.effects[PBEffects::FusionBolt]
|
||||||
super
|
super
|
||||||
@@ -406,7 +406,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Powers up the ally's attack this round by 1.5. (Helping Hand)
|
# Powers up the ally's attack this round by 1.5. (Helping Hand)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerUpAllyMove < PokeBattle_Move
|
class Battle::Move::PowerUpAllyMove < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -428,7 +428,7 @@ end
|
|||||||
# Counters a physical move used against the user this round, with 2x the power.
|
# Counters a physical move used against the user this round, with 2x the power.
|
||||||
# (Counter)
|
# (Counter)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CounterPhysicalDamage < PokeBattle_FixedDamageMove
|
class Battle::Move::CounterPhysicalDamage < Battle::Move::FixedDamageMove
|
||||||
def pbAddTarget(targets,user)
|
def pbAddTarget(targets,user)
|
||||||
t = user.effects[PBEffects::CounterTarget]
|
t = user.effects[PBEffects::CounterTarget]
|
||||||
return if t<0 || !user.opposes?(t)
|
return if t<0 || !user.opposes?(t)
|
||||||
@@ -454,7 +454,7 @@ end
|
|||||||
# Counters a specical move used against the user this round, with 2x the power.
|
# Counters a specical move used against the user this round, with 2x the power.
|
||||||
# (Mirror Coat)
|
# (Mirror Coat)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CounterSpecialDamage < PokeBattle_FixedDamageMove
|
class Battle::Move::CounterSpecialDamage < Battle::Move::FixedDamageMove
|
||||||
def pbAddTarget(targets,user)
|
def pbAddTarget(targets,user)
|
||||||
t = user.effects[PBEffects::MirrorCoatTarget]
|
t = user.effects[PBEffects::MirrorCoatTarget]
|
||||||
return if t<0 || !user.opposes?(t)
|
return if t<0 || !user.opposes?(t)
|
||||||
@@ -480,7 +480,7 @@ end
|
|||||||
# Counters the last damaging move used against the user this round, with 1.5x
|
# Counters the last damaging move used against the user this round, with 1.5x
|
||||||
# the power. (Metal Burst)
|
# the power. (Metal Burst)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_CounterDamagePlusHalf < PokeBattle_FixedDamageMove
|
class Battle::Move::CounterDamagePlusHalf < Battle::Move::FixedDamageMove
|
||||||
def pbAddTarget(targets,user)
|
def pbAddTarget(targets,user)
|
||||||
return if user.lastFoeAttacker.length==0
|
return if user.lastFoeAttacker.length==0
|
||||||
lastAttacker = user.lastFoeAttacker.last
|
lastAttacker = user.lastFoeAttacker.last
|
||||||
@@ -507,7 +507,7 @@ end
|
|||||||
# Increases the user's Defense and Special Defense by 1 stage each. Ups the
|
# Increases the user's Defense and Special Defense by 1 stage each. Ups the
|
||||||
# user's stockpile by 1 (max. 3). (Stockpile)
|
# user's stockpile by 1 (max. 3). (Stockpile)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserAddStockpileRaiseDefSpDef1 < PokeBattle_Move
|
class Battle::Move::UserAddStockpileRaiseDefSpDef1 < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -541,7 +541,7 @@ end
|
|||||||
# Power is 100 multiplied by the user's stockpile (X). Resets the stockpile to
|
# Power is 100 multiplied by the user's stockpile (X). Resets the stockpile to
|
||||||
# 0. Decreases the user's Defense and Special Defense by X stages each. (Spit Up)
|
# 0. Decreases the user's Defense and Special Defense by X stages each. (Spit Up)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PowerDependsOnUserStockpile < PokeBattle_Move
|
class Battle::Move::PowerDependsOnUserStockpile < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.effects[PBEffects::Stockpile]==0
|
if user.effects[PBEffects::Stockpile]==0
|
||||||
@battle.pbDisplay(_INTL("But it failed to spit up a thing!"))
|
@battle.pbDisplay(_INTL("But it failed to spit up a thing!"))
|
||||||
@@ -580,7 +580,7 @@ end
|
|||||||
# Heals user depending on the user's stockpile (X). Resets the stockpile to 0.
|
# Heals user depending on the user's stockpile (X). Resets the stockpile to 0.
|
||||||
# Decreases the user's Defense and Special Defense by X stages each. (Swallow)
|
# Decreases the user's Defense and Special Defense by X stages each. (Swallow)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HealUserDependingOnUserStockpile < PokeBattle_Move
|
class Battle::Move::HealUserDependingOnUserStockpile < Battle::Move
|
||||||
def healingMove?; return true; end
|
def healingMove?; return true; end
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
@@ -631,7 +631,7 @@ end
|
|||||||
# If the move is a combo, power is doubled and causes either a sea of fire or a
|
# If the move is a combo, power is doubled and causes either a sea of fire or a
|
||||||
# swamp on the opposing side.
|
# swamp on the opposing side.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_GrassPledge < PokeBattle_PledgeMove
|
class Battle::Move::GrassPledge < Battle::Move::PledgeMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
# [Function code to combo with, effect, override type, override animation]
|
# [Function code to combo with, effect, override type, override animation]
|
||||||
@@ -645,7 +645,7 @@ end
|
|||||||
# If the move is a combo, power is doubled and causes either a rainbow on the
|
# If the move is a combo, power is doubled and causes either a rainbow on the
|
||||||
# user's side or a sea of fire on the opposing side.
|
# user's side or a sea of fire on the opposing side.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FirePledge < PokeBattle_PledgeMove
|
class Battle::Move::FirePledge < Battle::Move::PledgeMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
# [Function code to combo with, effect, override type, override animation]
|
# [Function code to combo with, effect, override type, override animation]
|
||||||
@@ -659,7 +659,7 @@ end
|
|||||||
# If the move is a combo, power is doubled and causes either a swamp on the
|
# If the move is a combo, power is doubled and causes either a swamp on the
|
||||||
# opposing side or a rainbow on the user's side.
|
# opposing side or a rainbow on the user's side.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_WaterPledge < PokeBattle_PledgeMove
|
class Battle::Move::WaterPledge < Battle::Move::PledgeMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
# [Function code to combo with, effect, override type, override animation]
|
# [Function code to combo with, effect, override type, override animation]
|
||||||
@@ -671,7 +671,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Uses the last move that was used. (Copycat)
|
# Uses the last move that was used. (Copycat)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseLastMoveUsed < PokeBattle_Move
|
class Battle::Move::UseLastMoveUsed < Battle::Move
|
||||||
def callsAnotherMove?; return true; end
|
def callsAnotherMove?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -760,7 +760,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Uses the last move that the target used. (Mirror Move)
|
# Uses the last move that the target used. (Mirror Move)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseLastMoveUsedByTarget < PokeBattle_Move
|
class Battle::Move::UseLastMoveUsedByTarget < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def callsAnotherMove?; return true; end
|
def callsAnotherMove?; return true; end
|
||||||
|
|
||||||
@@ -786,7 +786,7 @@ end
|
|||||||
# Uses the move the target was about to use this round, with 1.5x power.
|
# Uses the move the target was about to use this round, with 1.5x power.
|
||||||
# (Me First)
|
# (Me First)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseMoveTargetIsAboutToUse < PokeBattle_Move
|
class Battle::Move::UseMoveTargetIsAboutToUse < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def callsAnotherMove?; return true; end
|
def callsAnotherMove?; return true; end
|
||||||
|
|
||||||
@@ -831,7 +831,7 @@ end
|
|||||||
# where it targets the user. It makes more sense for it to target another
|
# where it targets the user. It makes more sense for it to target another
|
||||||
# Pokémon.
|
# Pokémon.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseMoveDependingOnEnvironment < PokeBattle_Move
|
class Battle::Move::UseMoveDependingOnEnvironment < Battle::Move
|
||||||
def callsAnotherMove?; return true; end
|
def callsAnotherMove?; return true; end
|
||||||
|
|
||||||
def pbOnStartUse(user,targets)
|
def pbOnStartUse(user,targets)
|
||||||
@@ -891,7 +891,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Uses a random move that exists. (Metronome)
|
# Uses a random move that exists. (Metronome)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseRandomMove < PokeBattle_Move
|
class Battle::Move::UseRandomMove < Battle::Move
|
||||||
def callsAnotherMove?; return true; end
|
def callsAnotherMove?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -1006,7 +1006,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Uses a random move known by any non-user Pokémon in the user's party. (Assist)
|
# Uses a random move known by any non-user Pokémon in the user's party. (Assist)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseRandomMoveFromUserParty < PokeBattle_Move
|
class Battle::Move::UseRandomMoveFromUserParty < Battle::Move
|
||||||
def callsAnotherMove?; return true; end
|
def callsAnotherMove?; return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -1120,7 +1120,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Uses a random move the user knows. Fails if user is not asleep. (Sleep Talk)
|
# Uses a random move the user knows. Fails if user is not asleep. (Sleep Talk)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UseRandomUserMoveIfAsleep < PokeBattle_Move
|
class Battle::Move::UseRandomUserMoveIfAsleep < Battle::Move
|
||||||
def usableWhenAsleep?; return true; end
|
def usableWhenAsleep?; return true; end
|
||||||
def callsAnotherMove?; return true; end
|
def callsAnotherMove?; return true; end
|
||||||
|
|
||||||
@@ -1189,7 +1189,7 @@ end
|
|||||||
# This round, reflects all moves with the "C" flag targeting the user back at
|
# This round, reflects all moves with the "C" flag targeting the user back at
|
||||||
# their origin. (Magic Coat)
|
# their origin. (Magic Coat)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BounceBackProblemCausingStatusMoves < PokeBattle_Move
|
class Battle::Move::BounceBackProblemCausingStatusMoves < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
user.effects[PBEffects::MagicCoat] = true
|
user.effects[PBEffects::MagicCoat] = true
|
||||||
@battle.pbDisplay(_INTL("{1} shrouded itself with Magic Coat!",user.pbThis))
|
@battle.pbDisplay(_INTL("{1} shrouded itself with Magic Coat!",user.pbThis))
|
||||||
@@ -1199,7 +1199,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# This round, snatches all used moves with the "D" flag. (Snatch)
|
# This round, snatches all used moves with the "D" flag. (Snatch)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StealAndUseBeneficialStatusMove < PokeBattle_Move
|
class Battle::Move::StealAndUseBeneficialStatusMove < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
user.effects[PBEffects::Snatch] = 1
|
user.effects[PBEffects::Snatch] = 1
|
||||||
@battle.allBattlers.each do |b|
|
@battle.allBattlers.each do |b|
|
||||||
@@ -1214,7 +1214,7 @@ end
|
|||||||
# This move turns into the last move used by the target, until user switches
|
# This move turns into the last move used by the target, until user switches
|
||||||
# out. (Mimic)
|
# out. (Mimic)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ReplaceMoveThisBattleWithTargetLastMoveUsed < PokeBattle_Move
|
class Battle::Move::ReplaceMoveThisBattleWithTargetLastMoveUsed < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -1254,7 +1254,7 @@ class PokeBattle_Move_ReplaceMoveThisBattleWithTargetLastMoveUsed < PokeBattle_M
|
|||||||
user.eachMoveWithIndex do |m,i|
|
user.eachMoveWithIndex do |m,i|
|
||||||
next if m.id!=@id
|
next if m.id!=@id
|
||||||
newMove = Pokemon::Move.new(target.lastRegularMoveUsed)
|
newMove = Pokemon::Move.new(target.lastRegularMoveUsed)
|
||||||
user.moves[i] = PokeBattle_Move.from_pokemon_move(@battle,newMove)
|
user.moves[i] = Battle::Move.from_pokemon_move(@battle,newMove)
|
||||||
@battle.pbDisplay(_INTL("{1} learned {2}!",user.pbThis,newMove.name))
|
@battle.pbDisplay(_INTL("{1} learned {2}!",user.pbThis,newMove.name))
|
||||||
user.pbCheckFormOnMovesetChange
|
user.pbCheckFormOnMovesetChange
|
||||||
break
|
break
|
||||||
@@ -1265,7 +1265,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# This move permanently turns into the last move used by the target. (Sketch)
|
# This move permanently turns into the last move used by the target. (Sketch)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_ReplaceMoveWithTargetLastMoveUsed < PokeBattle_Move
|
class Battle::Move::ReplaceMoveWithTargetLastMoveUsed < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -1302,7 +1302,7 @@ class PokeBattle_Move_ReplaceMoveWithTargetLastMoveUsed < PokeBattle_Move
|
|||||||
next if m.id!=@id
|
next if m.id!=@id
|
||||||
newMove = Pokemon::Move.new(target.lastRegularMoveUsed)
|
newMove = Pokemon::Move.new(target.lastRegularMoveUsed)
|
||||||
user.pokemon.moves[i] = newMove
|
user.pokemon.moves[i] = newMove
|
||||||
user.moves[i] = PokeBattle_Move.from_pokemon_move(@battle,newMove)
|
user.moves[i] = Battle::Move.from_pokemon_move(@battle,newMove)
|
||||||
@battle.pbDisplay(_INTL("{1} learned {2}!",user.pbThis,newMove.name))
|
@battle.pbDisplay(_INTL("{1} learned {2}!",user.pbThis,newMove.name))
|
||||||
user.pbCheckFormOnMovesetChange
|
user.pbCheckFormOnMovesetChange
|
||||||
break
|
break
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User flees from battle. (Teleport (Gen 7-))
|
# User flees from battle. (Teleport (Gen 7-))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_FleeFromBattle < PokeBattle_Move
|
class Battle::Move::FleeFromBattle < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !@battle.pbCanRun?(user.index)
|
if !@battle.pbCanRun?(user.index)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -20,7 +20,7 @@ end
|
|||||||
# User switches out. If user is a wild Pokémon, ends the battle instead.
|
# User switches out. If user is a wild Pokémon, ends the battle instead.
|
||||||
# (Teleport (Gen 8+))
|
# (Teleport (Gen 8+))
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SwitchOutUserStatusMove < PokeBattle_Move
|
class Battle::Move::SwitchOutUserStatusMove < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if user.wild?
|
if user.wild?
|
||||||
if !@battle.pbCanRun?(user.index)
|
if !@battle.pbCanRun?(user.index)
|
||||||
@@ -61,7 +61,7 @@ end
|
|||||||
# After inflicting damage, user switches out. Ignores trapping moves.
|
# After inflicting damage, user switches out. Ignores trapping moves.
|
||||||
# (U-turn, Volt Switch)
|
# (U-turn, Volt Switch)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SwitchOutUserDamagingMove < PokeBattle_Move
|
class Battle::Move::SwitchOutUserDamagingMove < Battle::Move
|
||||||
def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers)
|
def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers)
|
||||||
return if user.fainted? || numHits==0 || @battle.pbAllFainted?(user.idxOpposingSide)
|
return if user.fainted? || numHits==0 || @battle.pbAllFainted?(user.idxOpposingSide)
|
||||||
targetSwitched = true
|
targetSwitched = true
|
||||||
@@ -88,7 +88,7 @@ end
|
|||||||
# Decreases the target's Attack and Special Attack by 1 stage each. Then, user
|
# Decreases the target's Attack and Special Attack by 1 stage each. Then, user
|
||||||
# switches out. Ignores trapping moves. (Parting Shot)
|
# switches out. Ignores trapping moves. (Parting Shot)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerTargetAtkSpAtk1SwitchOutUser < PokeBattle_TargetMultiStatDownMove
|
class Battle::Move::LowerTargetAtkSpAtk1SwitchOutUser < Battle::Move::TargetMultiStatDownMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@statDown = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
@statDown = [:ATTACK,1,:SPECIAL_ATTACK,1]
|
||||||
@@ -120,7 +120,7 @@ end
|
|||||||
# User switches out. Various effects affecting the user are passed to the
|
# User switches out. Various effects affecting the user are passed to the
|
||||||
# replacement. (Baton Pass)
|
# replacement. (Baton Pass)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SwitchOutUserPassOnEffects < PokeBattle_Move
|
class Battle::Move::SwitchOutUserPassOnEffects < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !@battle.pbCanChooseNonActive?(user.index)
|
if !@battle.pbCanChooseNonActive?(user.index)
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -150,7 +150,7 @@ end
|
|||||||
# In trainer battles, target switches out.
|
# In trainer battles, target switches out.
|
||||||
# For status moves. (Roar, Whirlwind)
|
# For status moves. (Roar, Whirlwind)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SwitchOutTargetStatusMove < PokeBattle_Move
|
class Battle::Move::SwitchOutTargetStatusMove < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ class PokeBattle_Move_SwitchOutTargetStatusMove < PokeBattle_Move
|
|||||||
if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
|
if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("{1} anchors itself!", target.pbThis))
|
@battle.pbDisplay(_INTL("{1} anchors itself!", target.pbThis))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("{1} anchors itself with {2}!", target.pbThis, target.abilityName))
|
@battle.pbDisplay(_INTL("{1} anchors itself with {2}!", target.pbThis, target.abilityName))
|
||||||
@@ -223,7 +223,7 @@ end
|
|||||||
# In trainer battles, target switches out.
|
# In trainer battles, target switches out.
|
||||||
# For damaging moves. (Circle Throw, Dragon Tail)
|
# For damaging moves. (Circle Throw, Dragon Tail)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_SwitchOutTargetDamagingMove < PokeBattle_Move
|
class Battle::Move::SwitchOutTargetDamagingMove < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
if @battle.wildBattle? && target.level<=user.level && @battle.canRun &&
|
if @battle.wildBattle? && target.level<=user.level && @battle.canRun &&
|
||||||
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
(target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user))
|
||||||
@@ -254,7 +254,7 @@ end
|
|||||||
# Trapping move. Traps for 5 or 6 rounds. Trapped Pokémon lose 1/16 of max HP
|
# Trapping move. Traps for 5 or 6 rounds. Trapped Pokémon lose 1/16 of max HP
|
||||||
# at end of each round.
|
# at end of each round.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BindTarget < PokeBattle_Move
|
class Battle::Move::BindTarget < Battle::Move
|
||||||
def pbEffectAgainstTarget(user,target)
|
def pbEffectAgainstTarget(user,target)
|
||||||
return if target.fainted? || target.damageState.substitute
|
return if target.fainted? || target.damageState.substitute
|
||||||
return if target.effects[PBEffects::Trapping]>0
|
return if target.effects[PBEffects::Trapping]>0
|
||||||
@@ -295,7 +295,7 @@ end
|
|||||||
# at end of each round. (Whirlpool)
|
# at end of each round. (Whirlpool)
|
||||||
# Power is doubled if target is using Dive. Hits some semi-invulnerable targets.
|
# Power is doubled if target is using Dive. Hits some semi-invulnerable targets.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_BindTargetDoublePowerIfTargetUnderwater < PokeBattle_Move_BindTarget
|
class Battle::Move::BindTargetDoublePowerIfTargetUnderwater < Battle::Move::BindTarget
|
||||||
def hitsDivingTargets?; return true; end
|
def hitsDivingTargets?; return true; end
|
||||||
|
|
||||||
def pbModifyDamage(damageMult,user,target)
|
def pbModifyDamage(damageMult,user,target)
|
||||||
@@ -308,7 +308,7 @@ end
|
|||||||
# Target can no longer switch out or flee, as long as the user remains active.
|
# Target can no longer switch out or flee, as long as the user remains active.
|
||||||
# (Anchor Shot, Block, Mean Look, Spider Web, Spirit Shackle, Thousand Waves)
|
# (Anchor Shot, Block, Mean Look, Spider Web, Spirit Shackle, Thousand Waves)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TrapTargetInBattle < PokeBattle_Move
|
class Battle::Move::TrapTargetInBattle < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -344,7 +344,7 @@ end
|
|||||||
# At the end of each round, the target's Defense and Special Defense are lowered
|
# At the end of each round, the target's Defense and Special Defense are lowered
|
||||||
# by 1 stage each. (Octolock)
|
# by 1 stage each. (Octolock)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TrapTargetInBattleLowerTargetDefSpDef1EachTurn < PokeBattle_Move
|
class Battle::Move::TrapTargetInBattleLowerTargetDefSpDef1EachTurn < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
return false if damagingMove?
|
return false if damagingMove?
|
||||||
if target.effects[PBEffects::Octolock] >= 0
|
if target.effects[PBEffects::Octolock] >= 0
|
||||||
@@ -369,7 +369,7 @@ end
|
|||||||
# isn't applied if either Pokémon is already prevented from switching out or
|
# isn't applied if either Pokémon is already prevented from switching out or
|
||||||
# fleeing. (Jaw Lock)
|
# fleeing. (Jaw Lock)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TrapUserAndTargetInBattle < PokeBattle_Move
|
class Battle::Move::TrapUserAndTargetInBattle < Battle::Move
|
||||||
def pbAdditionalEffect(user, target)
|
def pbAdditionalEffect(user, target)
|
||||||
return if user.fainted? || target.fainted? || target.damageState.substitute
|
return if user.fainted? || target.fainted? || target.damageState.substitute
|
||||||
return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
|
return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
|
||||||
@@ -383,7 +383,7 @@ end
|
|||||||
# No Pokémon can switch out or flee until the end of the next round, as long as
|
# No Pokémon can switch out or flee until the end of the next round, as long as
|
||||||
# the user remains active. (Fairy Lock)
|
# the user remains active. (Fairy Lock)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TrapAllBattlersInBattleForOneTurn < PokeBattle_Move
|
class Battle::Move::TrapAllBattlersInBattleForOneTurn < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.field.effects[PBEffects::FairyLock]>0
|
if @battle.field.effects[PBEffects::FairyLock]>0
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -403,7 +403,7 @@ end
|
|||||||
# is doubled in that case. (Pursuit)
|
# is doubled in that case. (Pursuit)
|
||||||
# (Handled in Battle's pbAttackPhase): Makes this attack happen before switching.
|
# (Handled in Battle's pbAttackPhase): Makes this attack happen before switching.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_PursueSwitchingFoe < PokeBattle_Move
|
class Battle::Move::PursueSwitchingFoe < Battle::Move
|
||||||
def pbAccuracyCheck(user,target)
|
def pbAccuracyCheck(user,target)
|
||||||
return true if @battle.switching
|
return true if @battle.switching
|
||||||
return super
|
return super
|
||||||
@@ -419,7 +419,7 @@ end
|
|||||||
# Fails if user has not been hit by an opponent's physical move this round.
|
# Fails if user has not been hit by an opponent's physical move this round.
|
||||||
# (Shell Trap)
|
# (Shell Trap)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UsedAfterUserTakesPhysicalDamage < PokeBattle_Move
|
class Battle::Move::UsedAfterUserTakesPhysicalDamage < Battle::Move
|
||||||
def pbDisplayChargeMessage(user)
|
def pbDisplayChargeMessage(user)
|
||||||
user.effects[PBEffects::ShellTrap] = true
|
user.effects[PBEffects::ShellTrap] = true
|
||||||
@battle.pbCommonAnimation("ShellTrap",user)
|
@battle.pbCommonAnimation("ShellTrap",user)
|
||||||
@@ -447,7 +447,7 @@ end
|
|||||||
# Power is doubled if a user's ally has already used this move this round. (Round)
|
# Power is doubled if a user's ally has already used this move this round. (Round)
|
||||||
# If an ally is about to use the same move, make it go next, ignoring priority.
|
# If an ally is about to use the same move, make it go next, ignoring priority.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UsedAfterAllyRoundWithDoublePower < PokeBattle_Move
|
class Battle::Move::UsedAfterAllyRoundWithDoublePower < Battle::Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
baseDmg *= 2 if user.pbOwnSide.effects[PBEffects::Round]
|
baseDmg *= 2 if user.pbOwnSide.effects[PBEffects::Round]
|
||||||
return baseDmg
|
return baseDmg
|
||||||
@@ -468,7 +468,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target moves immediately after the user, ignoring priority/speed. (After You)
|
# Target moves immediately after the user, ignoring priority/speed. (After You)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TargetActsNext < PokeBattle_Move
|
class Battle::Move::TargetActsNext < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -498,7 +498,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target moves last this round, ignoring priority/speed. (Quash)
|
# Target moves last this round, ignoring priority/speed. (Quash)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TargetActsLast < PokeBattle_Move
|
class Battle::Move::TargetActsLast < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
return true if pbMoveFailedTargetAlreadyMoved?(target, show_message)
|
return true if pbMoveFailedTargetAlreadyMoved?(target, show_message)
|
||||||
# Target isn't going to use a move
|
# Target isn't going to use a move
|
||||||
@@ -540,7 +540,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# The target uses its most recent move again. (Instruct)
|
# The target uses its most recent move again. (Instruct)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_TargetUsesItsLastUsedMoveAgain < PokeBattle_Move
|
class Battle::Move::TargetUsesItsLastUsedMoveAgain < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
|
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
@@ -627,7 +627,7 @@ end
|
|||||||
# For 5 rounds, for each priority bracket, slow Pokémon move before fast ones.
|
# For 5 rounds, for each priority bracket, slow Pokémon move before fast ones.
|
||||||
# (Trick Room)
|
# (Trick Room)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartSlowerBattlersActFirst < PokeBattle_Move
|
class Battle::Move::StartSlowerBattlersActFirst < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
if @battle.field.effects[PBEffects::TrickRoom]>0
|
if @battle.field.effects[PBEffects::TrickRoom]>0
|
||||||
@battle.field.effects[PBEffects::TrickRoom] = 0
|
@battle.field.effects[PBEffects::TrickRoom] = 0
|
||||||
@@ -647,7 +647,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# If Grassy Terrain applies, priority is increased by 1. (Grassy Glide)
|
# If Grassy Terrain applies, priority is increased by 1. (Grassy Glide)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_HigherPriorityInGrassyTerrain < PokeBattle_Move
|
class Battle::Move::HigherPriorityInGrassyTerrain < Battle::Move
|
||||||
def pbPriority(user)
|
def pbPriority(user)
|
||||||
ret = super
|
ret = super
|
||||||
ret += 1 if @battle.field.terrain == :Grass && user.affectedByTerrain?
|
ret += 1 if @battle.field.terrain == :Grass && user.affectedByTerrain?
|
||||||
@@ -659,7 +659,7 @@ end
|
|||||||
# Decreases the PP of the last attack used by the target by 3 (or as much as
|
# Decreases the PP of the last attack used by the target by 3 (or as much as
|
||||||
# possible). (Eerie Spell)
|
# possible). (Eerie Spell)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerPPOfTargetLastMoveBy3 < PokeBattle_Move
|
class Battle::Move::LowerPPOfTargetLastMoveBy3 < Battle::Move
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed)
|
last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed)
|
||||||
if !last_move || last_move.pp == 0 || last_move.total_pp <= 0
|
if !last_move || last_move.pp == 0 || last_move.total_pp <= 0
|
||||||
@@ -681,7 +681,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target's last move used loses 4 PP. (Spite)
|
# Target's last move used loses 4 PP. (Spite)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_LowerPPOfTargetLastMoveBy4 < PokeBattle_Move
|
class Battle::Move::LowerPPOfTargetLastMoveBy4 < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -706,7 +706,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 5 rounds, disables the last move the target used. (Disable)
|
# For 5 rounds, disables the last move the target used. (Disable)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DisableTargetLastMoveUsed < PokeBattle_Move
|
class Battle::Move::DisableTargetLastMoveUsed < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -742,7 +742,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# The target can no longer use the same move twice in a row. (Torment)
|
# The target can no longer use the same move twice in a row. (Torment)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DisableTargetUsingSameMoveConsecutively < PokeBattle_Move
|
class Battle::Move::DisableTargetUsingSameMoveConsecutively < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -765,7 +765,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 4 rounds, the target must use the same move each round. (Encore)
|
# For 4 rounds, the target must use the same move each round. (Encore)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DisableTargetUsingDifferentMove < PokeBattle_Move
|
class Battle::Move::DisableTargetUsingDifferentMove < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -836,7 +836,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 4 rounds, disables the target's non-damaging moves. (Taunt)
|
# For 4 rounds, disables the target's non-damaging moves. (Taunt)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DisableTargetStatusMoves < PokeBattle_Move
|
class Battle::Move::DisableTargetStatusMoves < Battle::Move
|
||||||
def ignoresSubstitute?(user); return true; end
|
def ignoresSubstitute?(user); return true; end
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
@@ -850,7 +850,7 @@ class PokeBattle_Move_DisableTargetStatusMoves < PokeBattle_Move
|
|||||||
!@battle.moldBreaker
|
!@battle.moldBreaker
|
||||||
if show_message
|
if show_message
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
else
|
else
|
||||||
@battle.pbDisplay(_INTL("But it failed because of {1}'s {2}!",
|
@battle.pbDisplay(_INTL("But it failed because of {1}'s {2}!",
|
||||||
@@ -873,7 +873,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# For 5 rounds, disables the target's healing moves. (Heal Block)
|
# For 5 rounds, disables the target's healing moves. (Heal Block)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DisableTargetHealingMoves < PokeBattle_Move
|
class Battle::Move::DisableTargetHealingMoves < Battle::Move
|
||||||
def canMagicCoat?; return true; end
|
def canMagicCoat?; return true; end
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -895,7 +895,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Target cannot use sound-based moves for 2 more rounds. (Throat Chop)
|
# Target cannot use sound-based moves for 2 more rounds. (Throat Chop)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DisableTargetSoundMoves < PokeBattle_Move
|
class Battle::Move::DisableTargetSoundMoves < Battle::Move
|
||||||
def pbAdditionalEffect(user,target)
|
def pbAdditionalEffect(user,target)
|
||||||
return if target.fainted? || target.damageState.substitute
|
return if target.fainted? || target.damageState.substitute
|
||||||
@battle.pbDisplay(_INTL("The effects of {1} prevent {2} from using certain moves!",
|
@battle.pbDisplay(_INTL("The effects of {1} prevent {2} from using certain moves!",
|
||||||
@@ -907,7 +907,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Disables all target's moves that the user also knows. (Imprison)
|
# Disables all target's moves that the user also knows. (Imprison)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_DisableTargetMovesKnownByUser < PokeBattle_Move
|
class Battle::Move::DisableTargetMovesKnownByUser < Battle::Move
|
||||||
def canSnatch?; return true; end
|
def canSnatch?; return true; end
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -1,16 +1,77 @@
|
|||||||
# Battle scene (the visuals of the battle)
|
# Battle scene (the visuals of the battle)
|
||||||
class PokeBattle_Scene
|
class Battle::Scene
|
||||||
attr_accessor :abortable # For non-interactive battles, can quit immediately
|
attr_accessor :abortable # For non-interactive battles, can quit immediately
|
||||||
attr_reader :viewport
|
attr_reader :viewport
|
||||||
attr_reader :sprites
|
attr_reader :sprites
|
||||||
|
|
||||||
|
USE_ABILITY_SPLASH = (Settings::MECHANICS_GENERATION >= 5)
|
||||||
|
MESSAGE_PAUSE_TIME = 1.0 # In seconds
|
||||||
|
# Text colors
|
||||||
|
MESSAGE_BASE_COLOR = Color.new(80, 80, 88)
|
||||||
|
MESSAGE_SHADOW_COLOR = Color.new(160, 160, 168)
|
||||||
|
# The number of party balls to show in each side's lineup.
|
||||||
|
NUM_BALLS = Settings::MAX_PARTY_SIZE
|
||||||
|
# Centre bottom of the player's side base graphic
|
||||||
|
PLAYER_BASE_X = 128
|
||||||
|
PLAYER_BASE_Y = Settings::SCREEN_HEIGHT - 80
|
||||||
|
# Centre middle of the foe's side base graphic
|
||||||
|
FOE_BASE_X = Settings::SCREEN_WIDTH - 128
|
||||||
|
FOE_BASE_Y = (Settings::SCREEN_HEIGHT * 3 / 4) - 112
|
||||||
|
# Default focal points of user and target in animations - do not change!
|
||||||
|
# Is the centre middle of each sprite
|
||||||
|
FOCUSUSER_X = 128
|
||||||
|
FOCUSUSER_Y = 224
|
||||||
|
FOCUSTARGET_X = 384
|
||||||
|
FOCUSTARGET_Y = 96
|
||||||
|
# Menu types
|
||||||
BLANK = 0
|
BLANK = 0
|
||||||
MESSAGE_BOX = 1
|
MESSAGE_BOX = 1
|
||||||
COMMAND_BOX = 2
|
COMMAND_BOX = 2
|
||||||
FIGHT_BOX = 3
|
FIGHT_BOX = 3
|
||||||
TARGET_BOX = 4
|
TARGET_BOX = 4
|
||||||
|
|
||||||
MESSAGE_PAUSE_TIME = (Graphics.frame_rate*1.0).floor # 1 second
|
# Returns where the centre bottom of a battler's sprite should be, given its
|
||||||
|
# index and the number of battlers on its side, assuming the battler has
|
||||||
|
# metrics of 0 (those are added later).
|
||||||
|
def self.pbBattlerPosition(index, sideSize = 1)
|
||||||
|
# Start at the centre of the base for the appropriate side
|
||||||
|
if (index & 1) == 0
|
||||||
|
ret = [PLAYER_BASE_X, PLAYER_BASE_Y]
|
||||||
|
else
|
||||||
|
ret = [FOE_BASE_X, FOE_BASE_Y]
|
||||||
|
end
|
||||||
|
# Shift depending on index (no shifting needed for sideSize of 1)
|
||||||
|
case sideSize
|
||||||
|
when 2
|
||||||
|
ret[0] += [-48, 48, 32, -32][index]
|
||||||
|
ret[1] += [ 0, 0, 16, -16][index]
|
||||||
|
when 3
|
||||||
|
ret[0] += [-80, 80, 0, 0, 80, -80][index]
|
||||||
|
ret[1] += [ 0, 0, 8, -8, 16, -16][index]
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
|
# Returns where the centre bottom of a trainer's sprite should be, given its
|
||||||
|
# side (0/1), index and the number of trainers on its side.
|
||||||
|
def self.pbTrainerPosition(side, index = 0, sideSize = 1)
|
||||||
|
# Start at the centre of the base for the appropriate side
|
||||||
|
if side == 0
|
||||||
|
ret = [PLAYER_BASE_X, PLAYER_BASE_Y - 16]
|
||||||
|
else
|
||||||
|
ret = [FOE_BASE_X, FOE_BASE_Y + 6]
|
||||||
|
end
|
||||||
|
# Shift depending on index (no shifting needed for sideSize of 1)
|
||||||
|
case sideSize
|
||||||
|
when 2
|
||||||
|
ret[0] += [-48, 48, 32, -32][2 * index + side]
|
||||||
|
ret[1] += [ 0, 0, 0, -16][2 * index + side]
|
||||||
|
when 3
|
||||||
|
ret[0] += [-80, 80, 0, 0, 80, -80][2 * index + side]
|
||||||
|
ret[1] += [ 0, 0, 0, -8, 0, -16][2 * index + side]
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Updating and refreshing
|
# Updating and refreshing
|
||||||
@@ -102,8 +163,10 @@ class PokeBattle_Scene
|
|||||||
return if !@briefMessage
|
return if !@briefMessage
|
||||||
pbShowWindow(MESSAGE_BOX)
|
pbShowWindow(MESSAGE_BOX)
|
||||||
cw = @sprites["messageWindow"]
|
cw = @sprites["messageWindow"]
|
||||||
MESSAGE_PAUSE_TIME.times do
|
timer = 0.0
|
||||||
|
while timer < MESSAGE_PAUSE_TIME
|
||||||
pbUpdate(cw)
|
pbUpdate(cw)
|
||||||
|
timer += Graphics.delta_s
|
||||||
end
|
end
|
||||||
cw.text = ""
|
cw.text = ""
|
||||||
cw.visible = false
|
cw.visible = false
|
||||||
@@ -119,7 +182,7 @@ class PokeBattle_Scene
|
|||||||
cw.setText(msg)
|
cw.setText(msg)
|
||||||
PBDebug.log(msg)
|
PBDebug.log(msg)
|
||||||
yielded = false
|
yielded = false
|
||||||
i = 0
|
timer = 0.0
|
||||||
loop do
|
loop do
|
||||||
pbUpdate(cw)
|
pbUpdate(cw)
|
||||||
if !cw.busy?
|
if !cw.busy?
|
||||||
@@ -133,12 +196,12 @@ class PokeBattle_Scene
|
|||||||
@briefMessage = true
|
@briefMessage = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if i>=MESSAGE_PAUSE_TIME # Autoclose after 1 second
|
if timer >= MESSAGE_PAUSE_TIME # Autoclose after 1 second
|
||||||
cw.text = ""
|
cw.text = ""
|
||||||
cw.visible = false
|
cw.visible = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
i += 1
|
timer += Graphics.delta_s
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) || @abortable
|
if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) || @abortable
|
||||||
if cw.busy?
|
if cw.busy?
|
||||||
@@ -165,7 +228,7 @@ class PokeBattle_Scene
|
|||||||
cw.text = _INTL("{1}\1",msg)
|
cw.text = _INTL("{1}\1",msg)
|
||||||
PBDebug.log(msg)
|
PBDebug.log(msg)
|
||||||
yielded = false
|
yielded = false
|
||||||
i = 0
|
timer = 0.0
|
||||||
loop do
|
loop do
|
||||||
pbUpdate(cw)
|
pbUpdate(cw)
|
||||||
if !cw.busy?
|
if !cw.busy?
|
||||||
@@ -174,12 +237,12 @@ class PokeBattle_Scene
|
|||||||
yielded = true
|
yielded = true
|
||||||
end
|
end
|
||||||
if !@battleEnd
|
if !@battleEnd
|
||||||
if i>=MESSAGE_PAUSE_TIME*3 # Autoclose after 3 seconds
|
if timer >= MESSAGE_PAUSE_TIME * 3 # Autoclose after 3 seconds
|
||||||
cw.text = ""
|
cw.text = ""
|
||||||
cw.visible = false
|
cw.visible = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
i += 1
|
timer += Graphics.delta_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) || @abortable
|
if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) || @abortable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Scene
|
class Battle::Scene
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Create the battle scene and its elements
|
# Create the battle scene and its elements
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -35,16 +35,16 @@ class PokeBattle_Scene
|
|||||||
16,Graphics.height-96+2,Graphics.width-32,96,@viewport)
|
16,Graphics.height-96+2,Graphics.width-32,96,@viewport)
|
||||||
msgWindow.z = 200
|
msgWindow.z = 200
|
||||||
msgWindow.opacity = 0
|
msgWindow.opacity = 0
|
||||||
msgWindow.baseColor = PokeBattle_SceneConstants::MESSAGE_BASE_COLOR
|
msgWindow.baseColor = MESSAGE_BASE_COLOR
|
||||||
msgWindow.shadowColor = PokeBattle_SceneConstants::MESSAGE_SHADOW_COLOR
|
msgWindow.shadowColor = MESSAGE_SHADOW_COLOR
|
||||||
msgWindow.letterbyletter = true
|
msgWindow.letterbyletter = true
|
||||||
@sprites["messageWindow"] = msgWindow
|
@sprites["messageWindow"] = msgWindow
|
||||||
# Create command window
|
# Create command window
|
||||||
@sprites["commandWindow"] = CommandMenuDisplay.new(@viewport,200)
|
@sprites["commandWindow"] = CommandMenu.new(@viewport,200)
|
||||||
# Create fight window
|
# Create fight window
|
||||||
@sprites["fightWindow"] = FightMenuDisplay.new(@viewport,200)
|
@sprites["fightWindow"] = FightMenu.new(@viewport,200)
|
||||||
# Create targeting window
|
# Create targeting window
|
||||||
@sprites["targetWindow"] = TargetMenuDisplay.new(@viewport,200,@battle.sideSizes)
|
@sprites["targetWindow"] = TargetMenu.new(@viewport,200,@battle.sideSizes)
|
||||||
pbShowWindow(MESSAGE_BOX)
|
pbShowWindow(MESSAGE_BOX)
|
||||||
# The party lineup graphics (bar and balls) for both sides
|
# The party lineup graphics (bar and balls) for both sides
|
||||||
for side in 0...2
|
for side in 0...2
|
||||||
@@ -53,13 +53,13 @@ class PokeBattle_Scene
|
|||||||
partyBar.z = 120
|
partyBar.z = 120
|
||||||
partyBar.mirror = true if side==0 # Player's lineup bar only
|
partyBar.mirror = true if side==0 # Player's lineup bar only
|
||||||
partyBar.visible = false
|
partyBar.visible = false
|
||||||
for i in 0...PokeBattle_SceneConstants::NUM_BALLS
|
for i in 0...NUM_BALLS
|
||||||
ball = pbAddSprite("partyBall_#{side}_#{i}",0,0,nil,@viewport)
|
ball = pbAddSprite("partyBall_#{side}_#{i}",0,0,nil,@viewport)
|
||||||
ball.z = 121
|
ball.z = 121
|
||||||
ball.visible = false
|
ball.visible = false
|
||||||
end
|
end
|
||||||
# Ability splash bars
|
# Ability splash bars
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if USE_ABILITY_SPLASH
|
||||||
@sprites["abilityBar_#{side}"] = AbilitySplashBar.new(side,@viewport)
|
@sprites["abilityBar_#{side}"] = AbilitySplashBar.new(side,@viewport)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -137,7 +137,7 @@ class PokeBattle_Scene
|
|||||||
bg.z = 0
|
bg.z = 0
|
||||||
bg.mirror = true
|
bg.mirror = true
|
||||||
for side in 0...2
|
for side in 0...2
|
||||||
baseX, baseY = PokeBattle_SceneConstants.pbBattlerPosition(side)
|
baseX, baseY = Battle::Scene.pbBattlerPosition(side)
|
||||||
base = pbAddSprite("base_#{side}",baseX,baseY,
|
base = pbAddSprite("base_#{side}",baseX,baseY,
|
||||||
(side==0) ? playerBase : enemyBase,@viewport)
|
(side==0) ? playerBase : enemyBase,@viewport)
|
||||||
base.z = 1
|
base.z = 1
|
||||||
@@ -156,7 +156,7 @@ class PokeBattle_Scene
|
|||||||
else # Partner trainer's sprite
|
else # Partner trainer's sprite
|
||||||
trainerFile = GameData::TrainerType.back_sprite_filename(trainerType)
|
trainerFile = GameData::TrainerType.back_sprite_filename(trainerType)
|
||||||
end
|
end
|
||||||
spriteX, spriteY = PokeBattle_SceneConstants.pbTrainerPosition(0,idxTrainer,numTrainers)
|
spriteX, spriteY = Battle::Scene.pbTrainerPosition(0,idxTrainer,numTrainers)
|
||||||
trainer = pbAddSprite("player_#{idxTrainer+1}",spriteX,spriteY,trainerFile,@viewport)
|
trainer = pbAddSprite("player_#{idxTrainer+1}",spriteX,spriteY,trainerFile,@viewport)
|
||||||
return if !trainer.bitmap
|
return if !trainer.bitmap
|
||||||
# Alter position of sprite
|
# Alter position of sprite
|
||||||
@@ -171,7 +171,7 @@ class PokeBattle_Scene
|
|||||||
|
|
||||||
def pbCreateTrainerFrontSprite(idxTrainer,trainerType,numTrainers=1)
|
def pbCreateTrainerFrontSprite(idxTrainer,trainerType,numTrainers=1)
|
||||||
trainerFile = GameData::TrainerType.front_sprite_filename(trainerType)
|
trainerFile = GameData::TrainerType.front_sprite_filename(trainerType)
|
||||||
spriteX, spriteY = PokeBattle_SceneConstants.pbTrainerPosition(1,idxTrainer,numTrainers)
|
spriteX, spriteY = Battle::Scene.pbTrainerPosition(1,idxTrainer,numTrainers)
|
||||||
trainer = pbAddSprite("trainer_#{idxTrainer+1}",spriteX,spriteY,trainerFile,@viewport)
|
trainer = pbAddSprite("trainer_#{idxTrainer+1}",spriteX,spriteY,trainerFile,@viewport)
|
||||||
return if !trainer.bitmap
|
return if !trainer.bitmap
|
||||||
# Alter position of sprite
|
# Alter position of sprite
|
||||||
@@ -182,9 +182,9 @@ class PokeBattle_Scene
|
|||||||
|
|
||||||
def pbCreatePokemonSprite(idxBattler)
|
def pbCreatePokemonSprite(idxBattler)
|
||||||
sideSize = @battle.pbSideSize(idxBattler)
|
sideSize = @battle.pbSideSize(idxBattler)
|
||||||
batSprite = PokemonBattlerSprite.new(@viewport,sideSize,idxBattler,@animations)
|
batSprite = BattlerSprite.new(@viewport,sideSize,idxBattler,@animations)
|
||||||
@sprites["pokemon_#{idxBattler}"] = batSprite
|
@sprites["pokemon_#{idxBattler}"] = batSprite
|
||||||
shaSprite = PokemonBattlerShadowSprite.new(@viewport,sideSize,idxBattler)
|
shaSprite = BattlerShadowSprite.new(@viewport,sideSize,idxBattler)
|
||||||
shaSprite.visible = false
|
shaSprite.visible = false
|
||||||
@sprites["shadow_#{idxBattler}"] = shaSprite
|
@sprites["shadow_#{idxBattler}"] = shaSprite
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Scene
|
class Battle::Scene
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# The player chooses a main command for a Pokémon
|
# The player chooses a main command for a Pokémon
|
||||||
# Return values: -1=Cancel, 0=Fight, 1=Bag, 2=Pokémon, 3=Run, 4=Call
|
# Return values: -1=Cancel, 0=Fight, 1=Bag, 2=Pokémon, 3=Run, 4=Call
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
class PokeBattle_Scene
|
class Battle::Scene
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Animates the battle intro
|
# Animates the battle intro
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbBattleIntroAnimation
|
def pbBattleIntroAnimation
|
||||||
# Make everything appear
|
# Make everything appear
|
||||||
introAnim = BattleIntroAnimation.new(@sprites,@viewport,@battle)
|
introAnim = Animation::Intro.new(@sprites,@viewport,@battle)
|
||||||
loop do
|
loop do
|
||||||
introAnim.update
|
introAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -30,12 +30,12 @@ class PokeBattle_Scene
|
|||||||
for i in 0...@battle.sideSizes[1]
|
for i in 0...@battle.sideSizes[1]
|
||||||
idxBattler = 2*i+1
|
idxBattler = 2*i+1
|
||||||
next if !@battle.battlers[idxBattler]
|
next if !@battle.battlers[idxBattler]
|
||||||
dataBoxAnim = DataBoxAppearAnimation.new(@sprites,@viewport,idxBattler)
|
dataBoxAnim = Animation::DataBoxAppear.new(@sprites,@viewport,idxBattler)
|
||||||
@animations.push(dataBoxAnim)
|
@animations.push(dataBoxAnim)
|
||||||
end
|
end
|
||||||
# Set up wild Pokémon returning to normal colour and playing intro
|
# Set up wild Pokémon returning to normal colour and playing intro
|
||||||
# animations (including cry)
|
# animations (including cry)
|
||||||
@animations.push(BattleIntroAnimation2.new(@sprites,@viewport,@battle.sideSizes[1]))
|
@animations.push(Animation::Intro2.new(@sprites,@viewport,@battle.sideSizes[1]))
|
||||||
# Play all the animations
|
# Play all the animations
|
||||||
while inPartyAnimation?
|
while inPartyAnimation?
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -58,7 +58,7 @@ class PokeBattle_Scene
|
|||||||
# Animates a party lineup appearing for the given side
|
# Animates a party lineup appearing for the given side
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbShowPartyLineup(side,fullAnim=false)
|
def pbShowPartyLineup(side,fullAnim=false)
|
||||||
@animations.push(LineupAppearAnimation.new(@sprites,@viewport,
|
@animations.push(Animation::LineupAppear.new(@sprites,@viewport,
|
||||||
side,@battle.pbParty(side),@battle.pbPartyStarts(side),fullAnim))
|
side,@battle.pbParty(side),@battle.pbPartyStarts(side),fullAnim))
|
||||||
if !fullAnim
|
if !fullAnim
|
||||||
while inPartyAnimation?
|
while inPartyAnimation?
|
||||||
@@ -74,7 +74,7 @@ class PokeBattle_Scene
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbShowOpponent(idxTrainer)
|
def pbShowOpponent(idxTrainer)
|
||||||
# Set up trainer appearing animation
|
# Set up trainer appearing animation
|
||||||
appearAnim = TrainerAppearAnimation.new(@sprites,@viewport,idxTrainer)
|
appearAnim = Animation::TrainerAppear.new(@sprites,@viewport,idxTrainer)
|
||||||
@animations.push(appearAnim)
|
@animations.push(appearAnim)
|
||||||
# Play the animation
|
# Play the animation
|
||||||
while inPartyAnimation?
|
while inPartyAnimation?
|
||||||
@@ -99,9 +99,9 @@ class PokeBattle_Scene
|
|||||||
# Make all trainers and party lineups disappear (player-side trainers may
|
# Make all trainers and party lineups disappear (player-side trainers may
|
||||||
# animate throwing a Poké Ball)
|
# animate throwing a Poké Ball)
|
||||||
if @battle.opposes?(sendOuts[0][0])
|
if @battle.opposes?(sendOuts[0][0])
|
||||||
fadeAnim = TrainerFadeAnimation.new(@sprites,@viewport,startBattle)
|
fadeAnim = Animation::TrainerFade.new(@sprites,@viewport,startBattle)
|
||||||
else
|
else
|
||||||
fadeAnim = PlayerFadeAnimation.new(@sprites,@viewport,startBattle)
|
fadeAnim = Animation::PlayerFade.new(@sprites,@viewport,startBattle)
|
||||||
end
|
end
|
||||||
# For each battler being sent out, set the battler's sprite and create two
|
# For each battler being sent out, set the battler's sprite and create two
|
||||||
# animations (the Poké Ball moving and battler appearing from it, and its
|
# animations (the Poké Ball moving and battler appearing from it, and its
|
||||||
@@ -112,15 +112,15 @@ class PokeBattle_Scene
|
|||||||
pbChangePokemon(b[0],pkmn)
|
pbChangePokemon(b[0],pkmn)
|
||||||
pbRefresh
|
pbRefresh
|
||||||
if @battle.opposes?(b[0])
|
if @battle.opposes?(b[0])
|
||||||
sendOutAnim = PokeballTrainerSendOutAnimation.new(@sprites,@viewport,
|
sendOutAnim = Animation::PokeballTrainerSendOut.new(@sprites,@viewport,
|
||||||
@battle.pbGetOwnerIndexFromBattlerIndex(b[0])+1,
|
@battle.pbGetOwnerIndexFromBattlerIndex(b[0])+1,
|
||||||
@battle.battlers[b[0]],startBattle,i)
|
@battle.battlers[b[0]],startBattle,i)
|
||||||
else
|
else
|
||||||
sendOutAnim = PokeballPlayerSendOutAnimation.new(@sprites,@viewport,
|
sendOutAnim = Animation::PokeballPlayerSendOut.new(@sprites,@viewport,
|
||||||
@battle.pbGetOwnerIndexFromBattlerIndex(b[0])+1,
|
@battle.pbGetOwnerIndexFromBattlerIndex(b[0])+1,
|
||||||
@battle.battlers[b[0]],startBattle,i)
|
@battle.battlers[b[0]],startBattle,i)
|
||||||
end
|
end
|
||||||
dataBoxAnim = DataBoxAppearAnimation.new(@sprites,@viewport,b[0])
|
dataBoxAnim = Animation::DataBoxAppear.new(@sprites,@viewport,b[0])
|
||||||
sendOutAnims.push([sendOutAnim,dataBoxAnim,false])
|
sendOutAnims.push([sendOutAnim,dataBoxAnim,false])
|
||||||
end
|
end
|
||||||
# Play all animations
|
# Play all animations
|
||||||
@@ -159,7 +159,7 @@ class PokeBattle_Scene
|
|||||||
def pbRecall(idxBattler)
|
def pbRecall(idxBattler)
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
# Recall animation
|
# Recall animation
|
||||||
recallAnim = BattlerRecallAnimation.new(@sprites,@viewport,idxBattler)
|
recallAnim = Animation::BattlerRecall.new(@sprites,@viewport,idxBattler)
|
||||||
loop do
|
loop do
|
||||||
recallAnim.update if recallAnim
|
recallAnim.update if recallAnim
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -167,7 +167,7 @@ class PokeBattle_Scene
|
|||||||
end
|
end
|
||||||
recallAnim.dispose
|
recallAnim.dispose
|
||||||
# Data box disappear animation
|
# Data box disappear animation
|
||||||
dataBoxAnim = DataBoxDisappearAnimation.new(@sprites,@viewport,idxBattler)
|
dataBoxAnim = Animation::DataBoxDisappear.new(@sprites,@viewport,idxBattler)
|
||||||
loop do
|
loop do
|
||||||
dataBoxAnim.update
|
dataBoxAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -180,11 +180,11 @@ class PokeBattle_Scene
|
|||||||
# Ability splash bar animations
|
# Ability splash bar animations
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbShowAbilitySplash(battler)
|
def pbShowAbilitySplash(battler)
|
||||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
return if !USE_ABILITY_SPLASH
|
||||||
side = battler.index%2
|
side = battler.index%2
|
||||||
pbHideAbilitySplash(battler) if @sprites["abilityBar_#{side}"].visible
|
pbHideAbilitySplash(battler) if @sprites["abilityBar_#{side}"].visible
|
||||||
@sprites["abilityBar_#{side}"].battler = battler
|
@sprites["abilityBar_#{side}"].battler = battler
|
||||||
abilitySplashAnim = AbilitySplashAppearAnimation.new(@sprites,@viewport,side)
|
abilitySplashAnim = Animation::AbilitySplashAppear.new(@sprites,@viewport,side)
|
||||||
loop do
|
loop do
|
||||||
abilitySplashAnim.update
|
abilitySplashAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -194,10 +194,10 @@ class PokeBattle_Scene
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbHideAbilitySplash(battler)
|
def pbHideAbilitySplash(battler)
|
||||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
return if !USE_ABILITY_SPLASH
|
||||||
side = battler.index%2
|
side = battler.index%2
|
||||||
return if !@sprites["abilityBar_#{side}"].visible
|
return if !@sprites["abilityBar_#{side}"].visible
|
||||||
abilitySplashAnim = AbilitySplashDisappearAnimation.new(@sprites,@viewport,side)
|
abilitySplashAnim = Animation::AbilitySplashDisappear.new(@sprites,@viewport,side)
|
||||||
loop do
|
loop do
|
||||||
abilitySplashAnim.update
|
abilitySplashAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -207,7 +207,7 @@ class PokeBattle_Scene
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbReplaceAbilitySplash(battler)
|
def pbReplaceAbilitySplash(battler)
|
||||||
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
return if !USE_ABILITY_SPLASH
|
||||||
pbShowAbilitySplash(battler)
|
pbShowAbilitySplash(battler)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ class PokeBattle_Scene
|
|||||||
def pbDamageAnimation(battler,effectiveness=0)
|
def pbDamageAnimation(battler,effectiveness=0)
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
# Damage animation
|
# Damage animation
|
||||||
damageAnim = BattlerDamageAnimation.new(@sprites,@viewport,battler.index,effectiveness)
|
damageAnim = Animation::BattlerDamage.new(@sprites,@viewport,battler.index,effectiveness)
|
||||||
loop do
|
loop do
|
||||||
damageAnim.update
|
damageAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -249,7 +249,7 @@ class PokeBattle_Scene
|
|||||||
# Set up animations
|
# Set up animations
|
||||||
damageAnims = []
|
damageAnims = []
|
||||||
targets.each do |t|
|
targets.each do |t|
|
||||||
anim = BattlerDamageAnimation.new(@sprites,@viewport,t[0].index,t[2])
|
anim = Animation::BattlerDamage.new(@sprites,@viewport,t[0].index,t[2])
|
||||||
damageAnims.push(anim)
|
damageAnims.push(anim)
|
||||||
@sprites["dataBox_#{t[0].index}"].animateHP(t[1],t[0].hp,t[0].totalhp)
|
@sprites["dataBox_#{t[0].index}"].animateHP(t[1],t[0].hp,t[0].totalhp)
|
||||||
end
|
end
|
||||||
@@ -309,8 +309,8 @@ class PokeBattle_Scene
|
|||||||
def pbFaintBattler(battler)
|
def pbFaintBattler(battler)
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
# Pokémon plays cry and drops down, data box disappears
|
# Pokémon plays cry and drops down, data box disappears
|
||||||
faintAnim = BattlerFaintAnimation.new(@sprites,@viewport,battler.index,@battle)
|
faintAnim = Animation::BattlerFaint.new(@sprites,@viewport,battler.index,@battle)
|
||||||
dataBoxAnim = DataBoxDisappearAnimation.new(@sprites,@viewport,battler.index)
|
dataBoxAnim = Animation::DataBoxDisappear.new(@sprites,@viewport,battler.index)
|
||||||
loop do
|
loop do
|
||||||
faintAnim.update
|
faintAnim.update
|
||||||
dataBoxAnim.update
|
dataBoxAnim.update
|
||||||
@@ -326,7 +326,7 @@ class PokeBattle_Scene
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbThrow(ball,shakes,critical,targetBattler,showPlayer=false)
|
def pbThrow(ball,shakes,critical,targetBattler,showPlayer=false)
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
captureAnim = PokeballThrowCaptureAnimation.new(@sprites,@viewport,
|
captureAnim = Animation::PokeballThrowCapture.new(@sprites,@viewport,
|
||||||
ball,shakes,critical,@battle.battlers[targetBattler],showPlayer)
|
ball,shakes,critical,@battle.battlers[targetBattler],showPlayer)
|
||||||
loop do
|
loop do
|
||||||
captureAnim.update
|
captureAnim.update
|
||||||
@@ -350,12 +350,12 @@ class PokeBattle_Scene
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbHideCaptureBall(idxBattler)
|
def pbHideCaptureBall(idxBattler)
|
||||||
# NOTE: It's not really worth writing a whole PokeBattle_Animation class for
|
# NOTE: It's not really worth writing a whole Battle::Scene::Animation class
|
||||||
# making the capture ball fade out.
|
# for making the capture ball fade out.
|
||||||
ball = @sprites["captureBall"]
|
ball = @sprites["captureBall"]
|
||||||
return if !ball
|
return if !ball
|
||||||
# Data box disappear animation
|
# Data box disappear animation
|
||||||
dataBoxAnim = DataBoxDisappearAnimation.new(@sprites,@viewport,idxBattler)
|
dataBoxAnim = Animation::DataBoxDisappear.new(@sprites,@viewport,idxBattler)
|
||||||
loop do
|
loop do
|
||||||
dataBoxAnim.update
|
dataBoxAnim.update
|
||||||
ball.opacity -= 12*20/Graphics.frame_rate if ball.opacity>0
|
ball.opacity -= 12*20/Graphics.frame_rate if ball.opacity>0
|
||||||
@@ -367,7 +367,7 @@ class PokeBattle_Scene
|
|||||||
|
|
||||||
def pbThrowAndDeflect(ball,idxBattler)
|
def pbThrowAndDeflect(ball,idxBattler)
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
throwAnim = PokeballThrowDeflectAnimation.new(@sprites,@viewport,
|
throwAnim = Animation::PokeballThrowDeflect.new(@sprites,@viewport,
|
||||||
ball,@battle.battlers[idxBattler])
|
ball,@battle.battlers[idxBattler])
|
||||||
loop do
|
loop do
|
||||||
throwAnim.update
|
throwAnim.update
|
||||||
@@ -533,10 +533,8 @@ class PokeBattle_Scene
|
|||||||
targetHeight = userHeight
|
targetHeight = userHeight
|
||||||
end
|
end
|
||||||
animPlayer.setLineTransform(
|
animPlayer.setLineTransform(
|
||||||
PokeBattle_SceneConstants::FOCUSUSER_X,PokeBattle_SceneConstants::FOCUSUSER_Y,
|
FOCUSUSER_X, FOCUSUSER_Y, FOCUSTARGET_X, FOCUSTARGET_Y,
|
||||||
PokeBattle_SceneConstants::FOCUSTARGET_X,PokeBattle_SceneConstants::FOCUSTARGET_Y,
|
oldUserX, oldUserY - userHeight / 2, oldTargetX, oldTargetY - targetHeight / 2)
|
||||||
oldUserX,oldUserY-userHeight/2,
|
|
||||||
oldTargetX,oldTargetY-targetHeight/2)
|
|
||||||
# Play the animation
|
# Play the animation
|
||||||
animPlayer.start
|
animPlayer.start
|
||||||
loop do
|
loop do
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Base class for all three menu classes below
|
# Base class for all three menu classes below
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattleMenuBase
|
class Battle::Scene::MenuBase
|
||||||
attr_accessor :x
|
attr_accessor :x
|
||||||
attr_accessor :y
|
attr_accessor :y
|
||||||
attr_reader :z
|
attr_reader :z
|
||||||
@@ -11,8 +11,8 @@ class BattleMenuBase
|
|||||||
attr_reader :mode
|
attr_reader :mode
|
||||||
# NOTE: Button width is half the width of the graphic containing them all.
|
# NOTE: Button width is half the width of the graphic containing them all.
|
||||||
BUTTON_HEIGHT = 46
|
BUTTON_HEIGHT = 46
|
||||||
TEXT_BASE_COLOR = PokeBattle_SceneConstants::MESSAGE_BASE_COLOR
|
TEXT_BASE_COLOR = Battle::Scene::MESSAGE_BASE_COLOR
|
||||||
TEXT_SHADOW_COLOR = PokeBattle_SceneConstants::MESSAGE_SHADOW_COLOR
|
TEXT_SHADOW_COLOR = Battle::Scene::MESSAGE_SHADOW_COLOR
|
||||||
|
|
||||||
def initialize(viewport=nil)
|
def initialize(viewport=nil)
|
||||||
@x = 0
|
@x = 0
|
||||||
@@ -95,7 +95,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Command menu (Fight/Pokémon/Bag/Run)
|
# Command menu (Fight/Pokémon/Bag/Run)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class CommandMenuDisplay < BattleMenuBase
|
class Battle::Scene::CommandMenu < Battle::Scene::MenuBase
|
||||||
# If true, displays graphics from Graphics/Pictures/Battle/overlay_command.png
|
# If true, displays graphics from Graphics/Pictures/Battle/overlay_command.png
|
||||||
# and Graphics/Pictures/Battle/cursor_command.png.
|
# and Graphics/Pictures/Battle/cursor_command.png.
|
||||||
# If false, just displays text and the command window over the graphic
|
# If false, just displays text and the command window over the graphic
|
||||||
@@ -199,7 +199,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Fight menu (choose a move)
|
# Fight menu (choose a move)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class FightMenuDisplay < BattleMenuBase
|
class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
||||||
attr_reader :battler
|
attr_reader :battler
|
||||||
attr_reader :shiftMode
|
attr_reader :shiftMode
|
||||||
|
|
||||||
@@ -442,7 +442,7 @@ end
|
|||||||
# NOTE: Unlike the command and fight menus, this one doesn't have a textbox-only
|
# NOTE: Unlike the command and fight menus, this one doesn't have a textbox-only
|
||||||
# version.
|
# version.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class TargetMenuDisplay < BattleMenuBase
|
class Battle::Scene::TargetMenu < Battle::Scene::MenuBase
|
||||||
attr_accessor :mode
|
attr_accessor :mode
|
||||||
|
|
||||||
# Lists of which button graphics to use in different situations/types of battle.
|
# Lists of which button graphics to use in different situations/types of battle.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Data box for regular battles
|
# Data box for regular battles
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokemonDataBox < SpriteWrapper
|
class Battle::Scene::PokemonDataBox < SpriteWrapper
|
||||||
attr_reader :battler
|
attr_reader :battler
|
||||||
attr_accessor :selected
|
attr_accessor :selected
|
||||||
attr_reader :animatingHP
|
attr_reader :animatingHP
|
||||||
@@ -379,7 +379,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Splash bar to announce a triggered ability
|
# Splash bar to announce a triggered ability
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class AbilitySplashBar < SpriteWrapper
|
class Battle::Scene::AbilitySplashBar < SpriteWrapper
|
||||||
attr_reader :battler
|
attr_reader :battler
|
||||||
|
|
||||||
TEXT_BASE_COLOR = Color.new(0,0,0)
|
TEXT_BASE_COLOR = Color.new(0,0,0)
|
||||||
@@ -473,7 +473,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Pokémon sprite (used in battle)
|
# Pokémon sprite (used in battle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokemonBattlerSprite < RPG::Sprite
|
class Battle::Scene::BattlerSprite < RPG::Sprite
|
||||||
attr_reader :pkmn
|
attr_reader :pkmn
|
||||||
attr_accessor :index
|
attr_accessor :index
|
||||||
attr_accessor :selected
|
attr_accessor :selected
|
||||||
@@ -542,7 +542,7 @@ class PokemonBattlerSprite < RPG::Sprite
|
|||||||
self.z = 50-5*(@index+1)/2
|
self.z = 50-5*(@index+1)/2
|
||||||
end
|
end
|
||||||
# Set original position
|
# Set original position
|
||||||
p = PokeBattle_SceneConstants.pbBattlerPosition(@index,@sideSize)
|
p = Battle::Scene.pbBattlerPosition(@index,@sideSize)
|
||||||
@spriteX = p[0]
|
@spriteX = p[0]
|
||||||
@spriteY = p[1]
|
@spriteY = p[1]
|
||||||
# Apply metrics
|
# Apply metrics
|
||||||
@@ -601,7 +601,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shadow sprite for Pokémon (used in battle)
|
# Shadow sprite for Pokémon (used in battle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokemonBattlerShadowSprite < RPG::Sprite
|
class Battle::Scene::BattlerShadowSprite < RPG::Sprite
|
||||||
attr_reader :pkmn
|
attr_reader :pkmn
|
||||||
attr_accessor :index
|
attr_accessor :index
|
||||||
attr_accessor :selected
|
attr_accessor :selected
|
||||||
@@ -637,7 +637,7 @@ class PokemonBattlerShadowSprite < RPG::Sprite
|
|||||||
pbSetOrigin
|
pbSetOrigin
|
||||||
self.z = 3
|
self.z = 3
|
||||||
# Set original position
|
# Set original position
|
||||||
p = PokeBattle_SceneConstants.pbBattlerPosition(@index,@sideSize)
|
p = Battle::Scene.pbBattlerPosition(@index,@sideSize)
|
||||||
self.x = p[0]
|
self.x = p[0]
|
||||||
self.y = p[1]
|
self.y = p[1]
|
||||||
# Apply metrics
|
# Apply metrics
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_Animation
|
class Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport)
|
def initialize(sprites,viewport)
|
||||||
@sprites = sprites
|
@sprites = sprites
|
||||||
@viewport = viewport
|
@viewport = viewport
|
||||||
@@ -60,7 +60,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
module PokeBattle_BallAnimationMixin
|
module Battle::Scene::Animation::BallAnimationMixin
|
||||||
# Returns the color that the Pokémon turns when it goes into or out of its
|
# Returns the color that the Pokémon turns when it goes into or out of its
|
||||||
# Poké Ball.
|
# Poké Ball.
|
||||||
def getBattlerColorFromPokeBall(poke_ball)
|
def getBattlerColorFromPokeBall(poke_ball)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows the battle scene fading in while elements slide around into place
|
# Shows the battle scene fading in while elements slide around into place
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattleIntroAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::Intro < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,battle)
|
def initialize(sprites,viewport,battle)
|
||||||
@battle = battle
|
@battle = battle
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -63,7 +63,7 @@ end
|
|||||||
# Shows wild Pokémon fading back to their normal color, and triggers their intro
|
# Shows wild Pokémon fading back to their normal color, and triggers their intro
|
||||||
# animations
|
# animations
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattleIntroAnimation2 < PokeBattle_Animation
|
class Battle::Scene::Animation::Intro2 < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,sideSize)
|
def initialize(sprites,viewport,sideSize)
|
||||||
@sideSize = sideSize
|
@sideSize = sideSize
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -85,7 +85,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Makes a side's party bar and balls appear
|
# Makes a side's party bar and balls appear
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class LineupAppearAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::LineupAppear < Battle::Scene::Animation
|
||||||
BAR_DISPLAY_WIDTH = 248
|
BAR_DISPLAY_WIDTH = 248
|
||||||
|
|
||||||
def initialize(sprites,viewport,side,party,partyStarts,fullAnim)
|
def initialize(sprites,viewport,side,party,partyStarts,fullAnim)
|
||||||
@@ -117,7 +117,7 @@ class LineupAppearAnimation < PokeBattle_Animation
|
|||||||
bar.y = barY
|
bar.y = barY
|
||||||
bar.opacity = 255
|
bar.opacity = 255
|
||||||
bar.visible = false
|
bar.visible = false
|
||||||
for i in 0...PokeBattle_SceneConstants::NUM_BALLS
|
for i in 0...Battle::Scene::NUM_BALLS
|
||||||
ball = sprites["partyBall_#{@side}_#{i}"]
|
ball = sprites["partyBall_#{@side}_#{i}"]
|
||||||
ball.x = ballX
|
ball.x = ballX
|
||||||
ball.y = ballY
|
ball.y = ballY
|
||||||
@@ -136,7 +136,7 @@ class LineupAppearAnimation < PokeBattle_Animation
|
|||||||
end
|
end
|
||||||
# Opposing lineup
|
# Opposing lineup
|
||||||
# NOTE: This doesn't work well for 4+ opposing trainers.
|
# NOTE: This doesn't work well for 4+ opposing trainers.
|
||||||
ballsPerTrainer = PokeBattle_SceneConstants::NUM_BALLS/@partyStarts.length # 6/3/2
|
ballsPerTrainer = Battle::Scene::NUM_BALLS/@partyStarts.length # 6/3/2
|
||||||
startsIndex = idxBall/ballsPerTrainer
|
startsIndex = idxBall/ballsPerTrainer
|
||||||
teamIndex = idxBall%ballsPerTrainer
|
teamIndex = idxBall%ballsPerTrainer
|
||||||
ret = @partyStarts[startsIndex]+teamIndex
|
ret = @partyStarts[startsIndex]+teamIndex
|
||||||
@@ -154,7 +154,7 @@ class LineupAppearAnimation < PokeBattle_Animation
|
|||||||
bar.setDelta(0,dir*Graphics.width/2,0)
|
bar.setDelta(0,dir*Graphics.width/2,0)
|
||||||
bar.moveDelta(0,8,-dir*Graphics.width/2,0)
|
bar.moveDelta(0,8,-dir*Graphics.width/2,0)
|
||||||
delay = bar.totalDuration
|
delay = bar.totalDuration
|
||||||
for i in 0...PokeBattle_SceneConstants::NUM_BALLS
|
for i in 0...Battle::Scene::NUM_BALLS
|
||||||
createBall(i,(@fullAnim) ? delay+i*2 : 0,dir)
|
createBall(i,(@fullAnim) ? delay+i*2 : 0,dir)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -186,7 +186,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Makes a Pokémon's data box appear
|
# Makes a Pokémon's data box appear
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class DataBoxAppearAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::DataBoxAppear < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,idxBox)
|
def initialize(sprites,viewport,idxBox)
|
||||||
@idxBox = idxBox
|
@idxBox = idxBox
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -207,7 +207,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Makes a Pokémon's data box disappear
|
# Makes a Pokémon's data box disappear
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class DataBoxDisappearAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::DataBoxDisappear < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,idxBox)
|
def initialize(sprites,viewport,idxBox)
|
||||||
@idxBox = idxBox
|
@idxBox = idxBox
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -227,7 +227,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Makes a Pokémon's ability bar appear
|
# Makes a Pokémon's ability bar appear
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class AbilitySplashAppearAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::AbilitySplashAppear < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,side)
|
def initialize(sprites,viewport,side)
|
||||||
@side = side
|
@side = side
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -247,7 +247,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Makes a Pokémon's ability bar disappear
|
# Makes a Pokémon's ability bar disappear
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class AbilitySplashDisappearAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::AbilitySplashDisappear < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,side)
|
def initialize(sprites,viewport,side)
|
||||||
@side = side
|
@side = side
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -269,7 +269,7 @@ end
|
|||||||
# trainer slide off to the right first if it is on-screen.
|
# trainer slide off to the right first if it is on-screen.
|
||||||
# Used at the end of battle.
|
# Used at the end of battle.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class TrainerAppearAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::TrainerAppear < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,idxTrainer)
|
def initialize(sprites,viewport,idxTrainer)
|
||||||
@idxTrainer = idxTrainer
|
@idxTrainer = idxTrainer
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -286,7 +286,7 @@ class TrainerAppearAnimation < PokeBattle_Animation
|
|||||||
end
|
end
|
||||||
# Make new trainer sprite move on-screen
|
# Make new trainer sprite move on-screen
|
||||||
if @sprites["trainer_#{@idxTrainer+1}"]
|
if @sprites["trainer_#{@idxTrainer+1}"]
|
||||||
trainerX, trainerY = PokeBattle_SceneConstants.pbTrainerPosition(1)
|
trainerX, trainerY = Battle::Scene.pbTrainerPosition(1)
|
||||||
trainerX += 64+Graphics.width/4
|
trainerX += 64+Graphics.width/4
|
||||||
newTrainer = addSprite(@sprites["trainer_#{@idxTrainer+1}"],PictureOrigin::Bottom)
|
newTrainer = addSprite(@sprites["trainer_#{@idxTrainer+1}"],PictureOrigin::Bottom)
|
||||||
newTrainer.setVisible(delay,true)
|
newTrainer.setVisible(delay,true)
|
||||||
@@ -303,7 +303,7 @@ end
|
|||||||
# Shows the player's/partner's throwing animation (if they have one).
|
# Shows the player's/partner's throwing animation (if they have one).
|
||||||
# Doesn't show the ball thrown or the Pokémon.
|
# Doesn't show the ball thrown or the Pokémon.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PlayerFadeAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::PlayerFade < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,fullAnim=false)
|
def initialize(sprites,viewport,fullAnim=false)
|
||||||
@fullAnim = fullAnim # True at start of battle, false when switching
|
@fullAnim = fullAnim # True at start of battle, false when switching
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -339,7 +339,7 @@ class PlayerFadeAnimation < PokeBattle_Animation
|
|||||||
partyBar.setVisible(delay+12,false)
|
partyBar.setVisible(delay+12,false)
|
||||||
partyBar.setOpacity(delay+12,255)
|
partyBar.setOpacity(delay+12,255)
|
||||||
end
|
end
|
||||||
for i in 0...PokeBattle_SceneConstants::NUM_BALLS
|
for i in 0...Battle::Scene::NUM_BALLS
|
||||||
next if !@sprites["partyBall_0_#{i}"] || !@sprites["partyBall_0_#{i}"].visible
|
next if !@sprites["partyBall_0_#{i}"] || !@sprites["partyBall_0_#{i}"].visible
|
||||||
partyBall = addSprite(@sprites["partyBall_0_#{i}"])
|
partyBall = addSprite(@sprites["partyBall_0_#{i}"])
|
||||||
partyBall.moveDelta(delay+2*i,16,-Graphics.width,0) if @fullAnim
|
partyBall.moveDelta(delay+2*i,16,-Graphics.width,0) if @fullAnim
|
||||||
@@ -356,7 +356,7 @@ end
|
|||||||
# Shows the enemy trainer(s) and the enemy party lineup sliding off screen.
|
# Shows the enemy trainer(s) and the enemy party lineup sliding off screen.
|
||||||
# Doesn't show the ball thrown or the Pokémon.
|
# Doesn't show the ball thrown or the Pokémon.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class TrainerFadeAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::TrainerFade < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,fullAnim=false)
|
def initialize(sprites,viewport,fullAnim=false)
|
||||||
@fullAnim = fullAnim # True at start of battle, false when switching
|
@fullAnim = fullAnim # True at start of battle, false when switching
|
||||||
super(sprites,viewport)
|
super(sprites,viewport)
|
||||||
@@ -384,7 +384,7 @@ class TrainerFadeAnimation < PokeBattle_Animation
|
|||||||
partyBar.setVisible(delay+12,false)
|
partyBar.setVisible(delay+12,false)
|
||||||
partyBar.setOpacity(delay+12,255)
|
partyBar.setOpacity(delay+12,255)
|
||||||
end
|
end
|
||||||
for i in 0...PokeBattle_SceneConstants::NUM_BALLS
|
for i in 0...Battle::Scene::NUM_BALLS
|
||||||
next if !@sprites["partyBall_1_#{i}"] || !@sprites["partyBall_1_#{i}"].visible
|
next if !@sprites["partyBall_1_#{i}"] || !@sprites["partyBall_1_#{i}"].visible
|
||||||
partyBall = addSprite(@sprites["partyBall_1_#{i}"])
|
partyBall = addSprite(@sprites["partyBall_1_#{i}"])
|
||||||
partyBall.moveDelta(delay+2*i,16,Graphics.width,0) if @fullAnim
|
partyBall.moveDelta(delay+2*i,16,Graphics.width,0) if @fullAnim
|
||||||
@@ -401,8 +401,8 @@ end
|
|||||||
# Shows a Pokémon being sent out on the player's side (including by a partner).
|
# Shows a Pokémon being sent out on the player's side (including by a partner).
|
||||||
# Includes the Poké Ball being thrown.
|
# Includes the Poké Ball being thrown.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeballPlayerSendOutAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::PokeballPlayerSendOut < Battle::Scene::Animation
|
||||||
include PokeBattle_BallAnimationMixin
|
include Battle::Scene::Animation::BallAnimationMixin
|
||||||
|
|
||||||
def initialize(sprites,viewport,idxTrainer,battler,startBattle,idxOrder=0)
|
def initialize(sprites,viewport,idxTrainer,battler,startBattle,idxOrder=0)
|
||||||
@idxTrainer = idxTrainer
|
@idxTrainer = idxTrainer
|
||||||
@@ -426,7 +426,7 @@ class PokeballPlayerSendOutAnimation < PokeBattle_Animation
|
|||||||
col = getBattlerColorFromPokeBall(poke_ball)
|
col = getBattlerColorFromPokeBall(poke_ball)
|
||||||
col.alpha = 255
|
col.alpha = 255
|
||||||
# Calculate start and end coordinates for battler sprite movement
|
# Calculate start and end coordinates for battler sprite movement
|
||||||
ballPos = PokeBattle_SceneConstants.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
ballPos = Battle::Scene.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
||||||
battlerStartX = ballPos[0] # Is also where the Ball needs to end
|
battlerStartX = ballPos[0] # Is also where the Ball needs to end
|
||||||
battlerStartY = ballPos[1] # Is also where the Ball needs to end + 18
|
battlerStartY = ballPos[1] # Is also where the Ball needs to end + 18
|
||||||
battlerEndX = batSprite.x
|
battlerEndX = batSprite.x
|
||||||
@@ -480,8 +480,8 @@ end
|
|||||||
# Includes the Poké Ball being "thrown" (although here the Poké Ball just
|
# Includes the Poké Ball being "thrown" (although here the Poké Ball just
|
||||||
# appears in the spot where it opens up rather than being thrown to there).
|
# appears in the spot where it opens up rather than being thrown to there).
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeballTrainerSendOutAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::PokeballTrainerSendOut < Battle::Scene::Animation
|
||||||
include PokeBattle_BallAnimationMixin
|
include Battle::Scene::Animation::BallAnimationMixin
|
||||||
|
|
||||||
def initialize(sprites,viewport,idxTrainer,battler,startBattle,idxOrder)
|
def initialize(sprites,viewport,idxTrainer,battler,startBattle,idxOrder)
|
||||||
@idxTrainer = idxTrainer
|
@idxTrainer = idxTrainer
|
||||||
@@ -503,7 +503,7 @@ class PokeballTrainerSendOutAnimation < PokeBattle_Animation
|
|||||||
col = getBattlerColorFromPokeBall(poke_ball)
|
col = getBattlerColorFromPokeBall(poke_ball)
|
||||||
col.alpha = 255
|
col.alpha = 255
|
||||||
# Calculate start and end coordinates for battler sprite movement
|
# Calculate start and end coordinates for battler sprite movement
|
||||||
ballPos = PokeBattle_SceneConstants.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
ballPos = Battle::Scene.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
||||||
battlerStartX = ballPos[0]
|
battlerStartX = ballPos[0]
|
||||||
battlerStartY = ballPos[1]
|
battlerStartY = ballPos[1]
|
||||||
battlerEndX = batSprite.x
|
battlerEndX = batSprite.x
|
||||||
@@ -549,8 +549,8 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows a Pokémon being recalled into its Poké Ball
|
# Shows a Pokémon being recalled into its Poké Ball
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattlerRecallAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::BattlerRecall < Battle::Scene::Animation
|
||||||
include PokeBattle_BallAnimationMixin
|
include Battle::Scene::Animation::BallAnimationMixin
|
||||||
|
|
||||||
def initialize(sprites,viewport,idxBattler)
|
def initialize(sprites,viewport,idxBattler)
|
||||||
@idxBattler = idxBattler
|
@idxBattler = idxBattler
|
||||||
@@ -566,7 +566,7 @@ class BattlerRecallAnimation < PokeBattle_Animation
|
|||||||
col = getBattlerColorFromPokeBall(poke_ball)
|
col = getBattlerColorFromPokeBall(poke_ball)
|
||||||
col.alpha = 0
|
col.alpha = 0
|
||||||
# Calculate end coordinates for battler sprite movement
|
# Calculate end coordinates for battler sprite movement
|
||||||
ballPos = PokeBattle_SceneConstants.pbBattlerPosition(@idxBattler,batSprite.sideSize)
|
ballPos = Battle::Scene.pbBattlerPosition(@idxBattler,batSprite.sideSize)
|
||||||
battlerEndX = ballPos[0]
|
battlerEndX = ballPos[0]
|
||||||
battlerEndY = ballPos[1]
|
battlerEndY = ballPos[1]
|
||||||
# Set up battler sprite
|
# Set up battler sprite
|
||||||
@@ -598,7 +598,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows a Pokémon flashing after taking damage
|
# Shows a Pokémon flashing after taking damage
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattlerDamageAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::BattlerDamage < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,idxBattler,effectiveness)
|
def initialize(sprites,viewport,idxBattler,effectiveness)
|
||||||
@idxBattler = idxBattler
|
@idxBattler = idxBattler
|
||||||
@effectiveness = effectiveness
|
@effectiveness = effectiveness
|
||||||
@@ -636,7 +636,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows a Pokémon fainting
|
# Shows a Pokémon fainting
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattlerFaintAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::BattlerFaint < Battle::Scene::Animation
|
||||||
def initialize(sprites,viewport,idxBattler,battle)
|
def initialize(sprites,viewport,idxBattler,battle)
|
||||||
@idxBattler = idxBattler
|
@idxBattler = idxBattler
|
||||||
@battle = battle
|
@battle = battle
|
||||||
@@ -651,7 +651,7 @@ class BattlerFaintAnimation < PokeBattle_Animation
|
|||||||
shadow = addSprite(shaSprite,PictureOrigin::Center)
|
shadow = addSprite(shaSprite,PictureOrigin::Center)
|
||||||
# Get approx duration depending on sprite's position/size. Min 20 frames.
|
# Get approx duration depending on sprite's position/size. Min 20 frames.
|
||||||
battlerTop = batSprite.y-batSprite.height
|
battlerTop = batSprite.y-batSprite.height
|
||||||
cropY = PokeBattle_SceneConstants.pbBattlerPosition(@idxBattler,
|
cropY = Battle::Scene.pbBattlerPosition(@idxBattler,
|
||||||
@battle.pbSideSize(@idxBattler))[1]
|
@battle.pbSideSize(@idxBattler))[1]
|
||||||
cropY += 8
|
cropY += 8
|
||||||
duration = (cropY-battlerTop)/8
|
duration = (cropY-battlerTop)/8
|
||||||
@@ -680,8 +680,8 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows the player's Poké Ball being thrown to capture a Pokémon
|
# Shows the player's Poké Ball being thrown to capture a Pokémon
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeballThrowCaptureAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::PokeballThrowCapture < Battle::Scene::Animation
|
||||||
include PokeBattle_BallAnimationMixin
|
include Battle::Scene::Animation::BallAnimationMixin
|
||||||
|
|
||||||
def initialize(sprites,viewport,
|
def initialize(sprites,viewport,
|
||||||
poke_ball,numShakes,critCapture,battler,showingTrainer)
|
poke_ball,numShakes,critCapture,battler,showingTrainer)
|
||||||
@@ -700,7 +700,7 @@ class PokeballThrowCaptureAnimation < PokeBattle_Animation
|
|||||||
batSprite = @sprites["pokemon_#{@battler.index}"]
|
batSprite = @sprites["pokemon_#{@battler.index}"]
|
||||||
shaSprite = @sprites["shadow_#{@battler.index}"]
|
shaSprite = @sprites["shadow_#{@battler.index}"]
|
||||||
traSprite = @sprites["player_1"]
|
traSprite = @sprites["player_1"]
|
||||||
ballPos = PokeBattle_SceneConstants.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
ballPos = Battle::Scene.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
||||||
battlerStartX = batSprite.x
|
battlerStartX = batSprite.x
|
||||||
battlerStartY = batSprite.y
|
battlerStartY = batSprite.y
|
||||||
ballStartX = -6
|
ballStartX = -6
|
||||||
@@ -834,8 +834,8 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows the player throwing a Poké Ball and it being deflected
|
# Shows the player throwing a Poké Ball and it being deflected
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeballThrowDeflectAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::PokeballThrowDeflect < Battle::Scene::Animation
|
||||||
include PokeBattle_BallAnimationMixin
|
include Battle::Scene::Animation::BallAnimationMixin
|
||||||
|
|
||||||
def initialize(sprites,viewport,poke_ball,battler)
|
def initialize(sprites,viewport,poke_ball,battler)
|
||||||
@poke_ball = poke_ball
|
@poke_ball = poke_ball
|
||||||
@@ -846,7 +846,7 @@ class PokeballThrowDeflectAnimation < PokeBattle_Animation
|
|||||||
def createProcesses
|
def createProcesses
|
||||||
# Calculate start and end coordinates for battler sprite movement
|
# Calculate start and end coordinates for battler sprite movement
|
||||||
batSprite = @sprites["pokemon_#{@battler.index}"]
|
batSprite = @sprites["pokemon_#{@battler.index}"]
|
||||||
ballPos = PokeBattle_SceneConstants.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
ballPos = Battle::Scene.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
||||||
ballStartX = -6
|
ballStartX = -6
|
||||||
ballStartY = 246
|
ballStartY = 246
|
||||||
ballMidX = 190 # Unused in arc calculation
|
ballMidX = 190 # Unused in arc calculation
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Used when generating new trainers for battle challenges
|
# Used when generating new trainers for battle challenges
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_DebugSceneNoLogging
|
class Battle::DebugSceneNoLogging
|
||||||
def initialize
|
def initialize
|
||||||
@battle = nil
|
@battle = nil
|
||||||
@lastCmd = [0,0,0,0]
|
@lastCmd = [0,0,0,0]
|
||||||
@@ -17,7 +17,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
def initialize(battle)
|
def initialize(battle)
|
||||||
@battle = battle
|
@battle = battle
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Decide whether the opponent should use an item on the Pokémon
|
# Decide whether the opponent should use an item on the Pokémon
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Decide whether the opponent should switch Pokémon
|
# Decide whether the opponent should switch Pokémon
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Main move-choosing method (moves with higher scores are more likely to be
|
# Main move-choosing method (moves with higher scores are more likely to be
|
||||||
# chosen)
|
# chosen)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Get a score for the given move based on its effect
|
# Get a score for the given move based on its effect
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
#
|
#
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -294,7 +294,7 @@ class PokeBattle_AI
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbRoughDamage(move,user,target,skill,baseDmg)
|
def pbRoughDamage(move,user,target,skill,baseDmg)
|
||||||
# Fixed damage moves
|
# Fixed damage moves
|
||||||
return baseDmg if move.is_a?(PokeBattle_FixedDamageMove)
|
return baseDmg if move.is_a?(Battle::Move::FixedDamageMove)
|
||||||
# Get the move's type
|
# Get the move's type
|
||||||
type = pbRoughType(move,user,skill)
|
type = pbRoughType(move,user,skill)
|
||||||
##### Calculate user's attack stat #####
|
##### Calculate user's attack stat #####
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
module PokeBattle_SceneConstants
|
|
||||||
USE_ABILITY_SPLASH = (Settings::MECHANICS_GENERATION >= 5)
|
|
||||||
# Text colors
|
|
||||||
MESSAGE_BASE_COLOR = Color.new(80, 80, 88)
|
|
||||||
MESSAGE_SHADOW_COLOR = Color.new(160, 160, 168)
|
|
||||||
|
|
||||||
# The number of party balls to show in each side's lineup.
|
|
||||||
NUM_BALLS = Settings::MAX_PARTY_SIZE
|
|
||||||
|
|
||||||
# Centre bottom of the player's side base graphic
|
|
||||||
PLAYER_BASE_X = 128
|
|
||||||
PLAYER_BASE_Y = Settings::SCREEN_HEIGHT - 80
|
|
||||||
|
|
||||||
# Centre middle of the foe's side base graphic
|
|
||||||
FOE_BASE_X = Settings::SCREEN_WIDTH - 128
|
|
||||||
FOE_BASE_Y = (Settings::SCREEN_HEIGHT * 3 / 4) - 112
|
|
||||||
|
|
||||||
# Returns where the centre bottom of a battler's sprite should be, given its
|
|
||||||
# index and the number of battlers on its side, assuming the battler has
|
|
||||||
# metrics of 0 (those are added later).
|
|
||||||
def self.pbBattlerPosition(index, sideSize = 1)
|
|
||||||
# Start at the centre of the base for the appropriate side
|
|
||||||
if (index & 1) == 0
|
|
||||||
ret = [PLAYER_BASE_X, PLAYER_BASE_Y]
|
|
||||||
else
|
|
||||||
ret = [FOE_BASE_X, FOE_BASE_Y]
|
|
||||||
end
|
|
||||||
# Shift depending on index (no shifting needed for sideSize of 1)
|
|
||||||
case sideSize
|
|
||||||
when 2
|
|
||||||
ret[0] += [-48, 48, 32, -32][index]
|
|
||||||
ret[1] += [ 0, 0, 16, -16][index]
|
|
||||||
when 3
|
|
||||||
ret[0] += [-80, 80, 0, 0, 80, -80][index]
|
|
||||||
ret[1] += [ 0, 0, 8, -8, 16, -16][index]
|
|
||||||
end
|
|
||||||
return ret
|
|
||||||
end
|
|
||||||
|
|
||||||
# Returns where the centre bottom of a trainer's sprite should be, given its
|
|
||||||
# side (0/1), index and the number of trainers on its side.
|
|
||||||
def self.pbTrainerPosition(side, index = 0, sideSize = 1)
|
|
||||||
# Start at the centre of the base for the appropriate side
|
|
||||||
if side == 0
|
|
||||||
ret = [PLAYER_BASE_X, PLAYER_BASE_Y - 16]
|
|
||||||
else
|
|
||||||
ret = [FOE_BASE_X, FOE_BASE_Y + 6]
|
|
||||||
end
|
|
||||||
# Shift depending on index (no shifting needed for sideSize of 1)
|
|
||||||
case sideSize
|
|
||||||
when 2
|
|
||||||
ret[0] += [-48, 48, 32, -32][2 * index + side]
|
|
||||||
ret[1] += [ 0, 0, 0, -16][2 * index + side]
|
|
||||||
when 3
|
|
||||||
ret[0] += [-80, 80, 0, 0, 80, -80][2 * index + side]
|
|
||||||
ret[1] += [ 0, 0, 0, -8, 0, -16][2 * index + side]
|
|
||||||
end
|
|
||||||
return ret
|
|
||||||
end
|
|
||||||
|
|
||||||
# Default focal points of user and target in animations - do not change!
|
|
||||||
# Is the centre middle of each sprite
|
|
||||||
FOCUSUSER_X = 128 # 144
|
|
||||||
FOCUSUSER_Y = 224 # 188
|
|
||||||
FOCUSTARGET_X = 384 # 352
|
|
||||||
FOCUSTARGET_Y = 96 # 108, 98
|
|
||||||
end
|
|
||||||
179
Data/Scripts/011_Battle/006_Other battle code/001_PBEffects.rb
Normal file
179
Data/Scripts/011_Battle/006_Other battle code/001_PBEffects.rb
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
module PBEffects
|
||||||
|
#===========================================================================
|
||||||
|
# These effects apply to a battler
|
||||||
|
#===========================================================================
|
||||||
|
AquaRing = 0
|
||||||
|
Attract = 1
|
||||||
|
BanefulBunker = 2
|
||||||
|
BeakBlast = 3
|
||||||
|
Bide = 4
|
||||||
|
BideDamage = 5
|
||||||
|
BideTarget = 6
|
||||||
|
BurnUp = 7
|
||||||
|
Charge = 8
|
||||||
|
ChoiceBand = 9
|
||||||
|
Confusion = 10
|
||||||
|
Counter = 11
|
||||||
|
CounterTarget = 12
|
||||||
|
Curse = 13
|
||||||
|
Dancer = 14
|
||||||
|
DefenseCurl = 15
|
||||||
|
DestinyBond = 16
|
||||||
|
DestinyBondPrevious = 17
|
||||||
|
DestinyBondTarget = 18
|
||||||
|
Disable = 19
|
||||||
|
DisableMove = 20
|
||||||
|
Electrify = 21
|
||||||
|
Embargo = 22
|
||||||
|
Encore = 23
|
||||||
|
EncoreMove = 24
|
||||||
|
Endure = 25
|
||||||
|
FirstPledge = 26
|
||||||
|
FlashFire = 27
|
||||||
|
Flinch = 28
|
||||||
|
FocusEnergy = 29
|
||||||
|
FocusPunch = 30
|
||||||
|
FollowMe = 31
|
||||||
|
Foresight = 32
|
||||||
|
FuryCutter = 33
|
||||||
|
GastroAcid = 34
|
||||||
|
GemConsumed = 35
|
||||||
|
Grudge = 36
|
||||||
|
HealBlock = 37
|
||||||
|
HelpingHand = 38
|
||||||
|
HyperBeam = 39
|
||||||
|
Illusion = 40
|
||||||
|
Imprison = 41
|
||||||
|
Ingrain = 42
|
||||||
|
Instruct = 43
|
||||||
|
Instructed = 44
|
||||||
|
JawLock = 994
|
||||||
|
KingsShield = 45
|
||||||
|
LaserFocus = 46
|
||||||
|
LeechSeed = 47
|
||||||
|
LockOn = 48
|
||||||
|
LockOnPos = 49
|
||||||
|
MagicBounce = 50
|
||||||
|
MagicCoat = 51
|
||||||
|
MagnetRise = 52
|
||||||
|
MeanLook = 53
|
||||||
|
MeFirst = 54
|
||||||
|
Metronome = 55
|
||||||
|
MicleBerry = 56
|
||||||
|
Minimize = 57
|
||||||
|
MiracleEye = 58
|
||||||
|
MirrorCoat = 59
|
||||||
|
MirrorCoatTarget = 60
|
||||||
|
MoveNext = 61
|
||||||
|
MudSport = 62
|
||||||
|
Nightmare = 63
|
||||||
|
NoRetreat = 990
|
||||||
|
Obstruct = 992
|
||||||
|
Octolock = 993
|
||||||
|
Outrage = 64
|
||||||
|
ParentalBond = 65
|
||||||
|
PerishSong = 66
|
||||||
|
PerishSongUser = 67
|
||||||
|
PickupItem = 68
|
||||||
|
PickupUse = 69
|
||||||
|
Pinch = 70 # Battle Palace only
|
||||||
|
Powder = 71
|
||||||
|
PowerTrick = 72
|
||||||
|
Prankster = 73
|
||||||
|
PriorityAbility = 74
|
||||||
|
PriorityItem = 75
|
||||||
|
Protect = 76
|
||||||
|
ProtectRate = 77
|
||||||
|
Pursuit = 78
|
||||||
|
Quash = 79
|
||||||
|
Rage = 80
|
||||||
|
RagePowder = 81 # Used along with FollowMe
|
||||||
|
Rollout = 82
|
||||||
|
Roost = 83
|
||||||
|
ShellTrap = 84
|
||||||
|
SkyDrop = 85
|
||||||
|
SlowStart = 86
|
||||||
|
SmackDown = 87
|
||||||
|
Snatch = 88
|
||||||
|
SpikyShield = 89
|
||||||
|
Spotlight = 90
|
||||||
|
Stockpile = 91
|
||||||
|
StockpileDef = 92
|
||||||
|
StockpileSpDef = 93
|
||||||
|
Substitute = 94
|
||||||
|
TarShot = 991
|
||||||
|
Taunt = 95
|
||||||
|
Telekinesis = 96
|
||||||
|
ThroatChop = 97
|
||||||
|
Torment = 98
|
||||||
|
Toxic = 99
|
||||||
|
Transform = 100
|
||||||
|
TransformSpecies = 101
|
||||||
|
Trapping = 102 # Trapping move
|
||||||
|
TrappingMove = 103
|
||||||
|
TrappingUser = 104
|
||||||
|
Truant = 105
|
||||||
|
TwoTurnAttack = 106
|
||||||
|
Type3 = 107
|
||||||
|
Unburden = 108
|
||||||
|
Uproar = 109
|
||||||
|
WaterSport = 110
|
||||||
|
WeightChange = 111
|
||||||
|
Yawn = 112
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# These effects apply to a battler position
|
||||||
|
#=============================================================================
|
||||||
|
FutureSightCounter = 0
|
||||||
|
FutureSightMove = 1
|
||||||
|
FutureSightUserIndex = 2
|
||||||
|
FutureSightUserPartyIndex = 3
|
||||||
|
HealingWish = 4
|
||||||
|
LunarDance = 5
|
||||||
|
Wish = 6
|
||||||
|
WishAmount = 7
|
||||||
|
WishMaker = 8
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# These effects apply to a side
|
||||||
|
#=============================================================================
|
||||||
|
AuroraVeil = 0
|
||||||
|
CraftyShield = 1
|
||||||
|
EchoedVoiceCounter = 2
|
||||||
|
EchoedVoiceUsed = 3
|
||||||
|
LastRoundFainted = 4
|
||||||
|
LightScreen = 5
|
||||||
|
LuckyChant = 6
|
||||||
|
MatBlock = 7
|
||||||
|
Mist = 8
|
||||||
|
QuickGuard = 9
|
||||||
|
Rainbow = 10
|
||||||
|
Reflect = 11
|
||||||
|
Round = 12
|
||||||
|
Safeguard = 13
|
||||||
|
SeaOfFire = 14
|
||||||
|
Spikes = 15
|
||||||
|
StealthRock = 16
|
||||||
|
StickyWeb = 17
|
||||||
|
Swamp = 18
|
||||||
|
Tailwind = 19
|
||||||
|
ToxicSpikes = 20
|
||||||
|
WideGuard = 21
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# These effects apply to the battle (i.e. both sides)
|
||||||
|
#=============================================================================
|
||||||
|
AmuletCoin = 0
|
||||||
|
FairyLock = 1
|
||||||
|
FusionBolt = 2
|
||||||
|
FusionFlare = 3
|
||||||
|
Gravity = 4
|
||||||
|
HappyHour = 5
|
||||||
|
IonDeluge = 6
|
||||||
|
MagicRoom = 7
|
||||||
|
MudSportField = 8
|
||||||
|
PayDay = 9
|
||||||
|
TrickRoom = 10
|
||||||
|
WaterSportField = 11
|
||||||
|
WonderRoom = 12
|
||||||
|
end
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
#===============================================================================
|
||||||
|
class Battle::ActiveField
|
||||||
|
attr_accessor :effects
|
||||||
|
attr_accessor :defaultWeather
|
||||||
|
attr_accessor :weather
|
||||||
|
attr_accessor :weatherDuration
|
||||||
|
attr_accessor :defaultTerrain
|
||||||
|
attr_accessor :terrain
|
||||||
|
attr_accessor :terrainDuration
|
||||||
|
|
||||||
|
def initialize
|
||||||
|
@effects = []
|
||||||
|
@effects[PBEffects::AmuletCoin] = false
|
||||||
|
@effects[PBEffects::FairyLock] = 0
|
||||||
|
@effects[PBEffects::FusionBolt] = false
|
||||||
|
@effects[PBEffects::FusionFlare] = false
|
||||||
|
@effects[PBEffects::Gravity] = 0
|
||||||
|
@effects[PBEffects::HappyHour] = false
|
||||||
|
@effects[PBEffects::IonDeluge] = false
|
||||||
|
@effects[PBEffects::MagicRoom] = 0
|
||||||
|
@effects[PBEffects::MudSportField] = 0
|
||||||
|
@effects[PBEffects::PayDay] = 0
|
||||||
|
@effects[PBEffects::TrickRoom] = 0
|
||||||
|
@effects[PBEffects::WaterSportField] = 0
|
||||||
|
@effects[PBEffects::WonderRoom] = 0
|
||||||
|
@defaultWeather = :None
|
||||||
|
@weather = :None
|
||||||
|
@weatherDuration = 0
|
||||||
|
@defaultTerrain = :None
|
||||||
|
@terrain = :None
|
||||||
|
@terrainDuration = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
#===============================================================================
|
||||||
|
class Battle::ActiveSide
|
||||||
|
attr_accessor :effects
|
||||||
|
|
||||||
|
def initialize
|
||||||
|
@effects = []
|
||||||
|
@effects[PBEffects::AuroraVeil] = 0
|
||||||
|
@effects[PBEffects::CraftyShield] = false
|
||||||
|
@effects[PBEffects::EchoedVoiceCounter] = 0
|
||||||
|
@effects[PBEffects::EchoedVoiceUsed] = false
|
||||||
|
@effects[PBEffects::LastRoundFainted] = -1
|
||||||
|
@effects[PBEffects::LightScreen] = 0
|
||||||
|
@effects[PBEffects::LuckyChant] = 0
|
||||||
|
@effects[PBEffects::MatBlock] = false
|
||||||
|
@effects[PBEffects::Mist] = 0
|
||||||
|
@effects[PBEffects::QuickGuard] = false
|
||||||
|
@effects[PBEffects::Rainbow] = 0
|
||||||
|
@effects[PBEffects::Reflect] = 0
|
||||||
|
@effects[PBEffects::Round] = false
|
||||||
|
@effects[PBEffects::Safeguard] = 0
|
||||||
|
@effects[PBEffects::SeaOfFire] = 0
|
||||||
|
@effects[PBEffects::Spikes] = 0
|
||||||
|
@effects[PBEffects::StealthRock] = false
|
||||||
|
@effects[PBEffects::StickyWeb] = false
|
||||||
|
@effects[PBEffects::Swamp] = 0
|
||||||
|
@effects[PBEffects::Tailwind] = 0
|
||||||
|
@effects[PBEffects::ToxicSpikes] = 0
|
||||||
|
@effects[PBEffects::WideGuard] = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
#===============================================================================
|
||||||
|
class Battle::ActivePosition
|
||||||
|
attr_accessor :effects
|
||||||
|
|
||||||
|
def initialize
|
||||||
|
@effects = []
|
||||||
|
@effects[PBEffects::FutureSightCounter] = 0
|
||||||
|
@effects[PBEffects::FutureSightMove] = nil
|
||||||
|
@effects[PBEffects::FutureSightUserIndex] = -1
|
||||||
|
@effects[PBEffects::FutureSightUserPartyIndex] = -1
|
||||||
|
@effects[PBEffects::HealingWish] = false
|
||||||
|
@effects[PBEffects::LunarDance] = false
|
||||||
|
@effects[PBEffects::Wish] = 0
|
||||||
|
@effects[PBEffects::WishAmount] = 0
|
||||||
|
@effects[PBEffects::WishMaker] = -1
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
class PokeBattle_DamageState
|
#===============================================================================
|
||||||
|
#
|
||||||
|
#===============================================================================
|
||||||
|
class Battle::DamageState
|
||||||
attr_accessor :typeMod # Type effectiveness
|
attr_accessor :typeMod # Type effectiveness
|
||||||
attr_accessor :unaffected
|
attr_accessor :unaffected
|
||||||
attr_accessor :protected
|
attr_accessor :protected
|
||||||
@@ -1,27 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Unused class.
|
class Battle::Peer
|
||||||
class PokeBattle_NullBattlePeer
|
|
||||||
def pbOnEnteringBattle(battle, battler, pkmn, wild = false); end
|
|
||||||
def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false); end
|
|
||||||
|
|
||||||
def pbStorePokemon(player,pkmn)
|
|
||||||
player.party[player.party.length] = pkmn if !player.party_full?
|
|
||||||
return -1
|
|
||||||
end
|
|
||||||
|
|
||||||
def pbGetStorageCreatorName; return nil; end
|
|
||||||
def pbCurrentBox; return -1; end
|
|
||||||
def pbBoxName(box); return ""; end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
|
||||||
#
|
|
||||||
#===============================================================================
|
|
||||||
class PokeBattle_RealBattlePeer
|
|
||||||
def pbStorePokemon(player,pkmn)
|
def pbStorePokemon(player,pkmn)
|
||||||
if !player.party_full?
|
if !player.party_full?
|
||||||
player.party[player.party.length] = pkmn
|
player.party[player.party.length] = pkmn
|
||||||
@@ -73,13 +53,19 @@ class PokeBattle_RealBattlePeer
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
# Unused class.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_BattlePeer
|
class Battle::NullPeer
|
||||||
def self.create
|
def pbOnEnteringBattle(battle, battler, pkmn, wild = false); end
|
||||||
return PokeBattle_RealBattlePeer.new
|
def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false); end
|
||||||
|
|
||||||
|
def pbStorePokemon(player,pkmn)
|
||||||
|
player.party[player.party.length] = pkmn if !player.party_full?
|
||||||
|
return -1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def pbGetStorageCreatorName; return nil; end
|
||||||
|
def pbCurrentBox; return -1; end
|
||||||
|
def pbBoxName(box); return ""; end
|
||||||
end
|
end
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# This script modifies the battle system to implement battle rules
|
# This script modifies the battle system to implement battle rules
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Battle
|
class Battle
|
||||||
unless @__clauses__aliased
|
unless @__clauses__aliased
|
||||||
alias __clauses__pbDecisionOnDraw pbDecisionOnDraw
|
alias __clauses__pbDecisionOnDraw pbDecisionOnDraw
|
||||||
alias __clauses__pbEndOfRoundPhase pbEndOfRoundPhase
|
alias __clauses__pbEndOfRoundPhase pbEndOfRoundPhase
|
||||||
@@ -53,7 +53,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
unless @__clauses__aliased
|
unless @__clauses__aliased
|
||||||
alias __clauses__pbCanSleep? pbCanSleep?
|
alias __clauses__pbCanSleep? pbCanSleep?
|
||||||
alias __clauses__pbCanSleepYawn? pbCanSleepYawn?
|
alias __clauses__pbCanSleepYawn? pbCanSleepYawn?
|
||||||
@@ -102,7 +102,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_RaiseUserEvasion1 # Double Team
|
class Battle::Move::RaiseUserEvasion1 # Double Team
|
||||||
alias __clauses__pbMoveFailed? pbMoveFailed?
|
alias __clauses__pbMoveFailed? pbMoveFailed?
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -116,7 +116,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_RaiseUserEvasion2MinimizeUser # Minimize
|
class Battle::Move::RaiseUserEvasion2MinimizeUser # Minimize
|
||||||
alias __clauses__pbMoveFailed? pbMoveFailed?
|
alias __clauses__pbMoveFailed? pbMoveFailed?
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
@@ -130,7 +130,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_UserTargetSwapAbilities # Skill Swap
|
class Battle::Move::UserTargetSwapAbilities # Skill Swap
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -144,7 +144,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_FixedDamage20 # Sonic Boom
|
class Battle::Move::FixedDamage20 # Sonic Boom
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -158,7 +158,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_FixedDamage40 # Dragon Rage
|
class Battle::Move::FixedDamage40 # Dragon Rage
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -172,7 +172,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_OHKO
|
class Battle::Move::OHKO
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -186,7 +186,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_OHKOIce
|
class Battle::Move::OHKOIce
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -200,7 +200,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_OHKOHitsUndergroundTarget
|
class Battle::Move::OHKOHitsUndergroundTarget
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -214,7 +214,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_UserFaintsExplosive # Self-Destruct
|
class Battle::Move::UserFaintsExplosive # Self-Destruct
|
||||||
unless @__clauses__aliased
|
unless @__clauses__aliased
|
||||||
alias __clauses__pbMoveFailed? pbMoveFailed?
|
alias __clauses__pbMoveFailed? pbMoveFailed?
|
||||||
@__clauses__aliased = true
|
@__clauses__aliased = true
|
||||||
@@ -246,7 +246,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_StartPerishCountsForAllBattlers # Perish Song
|
class Battle::Move::StartPerishCountsForAllBattlers # Perish Song
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -261,7 +261,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_AttackerFaintsIfUserFaints # Destiny Bond
|
class Battle::Move::AttackerFaintsIfUserFaints # Destiny Bond
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user, target, show_message)
|
def pbFailsAgainstTarget?(user, target, show_message)
|
||||||
@@ -135,8 +135,8 @@ def pbConvertRPGAnimation(animation)
|
|||||||
if animation.position==3 # Screen
|
if animation.position==3 # Screen
|
||||||
point = transformPoint(
|
point = transformPoint(
|
||||||
-160,80,160,-80,
|
-160,80,160,-80,
|
||||||
PokeBattle_SceneConstants::FOCUSUSER_X,PokeBattle_SceneConstants::FOCUSUSER_Y,
|
Battle::Scene::FOCUSUSER_X,Battle::Scene::FOCUSUSER_Y,
|
||||||
PokeBattle_SceneConstants::FOCUSTARGET_X,PokeBattle_SceneConstants::FOCUSTARGET_Y,
|
Battle::Scene::FOCUSTARGET_X,Battle::Scene::FOCUSTARGET_Y,
|
||||||
data[j,1],data[j,2]
|
data[j,1],data[j,2]
|
||||||
)
|
)
|
||||||
cel = pbCreateCel(point[0],point[1],data[j,0])
|
cel = pbCreateCel(point[0],point[1],data[j,0])
|
||||||
@@ -483,15 +483,11 @@ class PBAnimation < Array
|
|||||||
pos = @array.length
|
pos = @array.length
|
||||||
@array[pos] = []
|
@array[pos] = []
|
||||||
# Move's user
|
# Move's user
|
||||||
@array[pos][0] = pbCreateCel(
|
@array[pos][0] = pbCreateCel(Battle::Scene::FOCUSUSER_X, Battle::Scene::FOCUSUSER_Y,-1)
|
||||||
PokeBattle_SceneConstants::FOCUSUSER_X,
|
|
||||||
PokeBattle_SceneConstants::FOCUSUSER_Y,-1)
|
|
||||||
@array[pos][0][AnimFrame::FOCUS] = 2
|
@array[pos][0][AnimFrame::FOCUS] = 2
|
||||||
@array[pos][0][AnimFrame::LOCKED] = 1
|
@array[pos][0][AnimFrame::LOCKED] = 1
|
||||||
# Move's target
|
# Move's target
|
||||||
@array[pos][1] = pbCreateCel(
|
@array[pos][1] = pbCreateCel(Battle::Scene::FOCUSTARGET_X, Battle::Scene::FOCUSTARGET_Y,-2)
|
||||||
PokeBattle_SceneConstants::FOCUSTARGET_X,
|
|
||||||
PokeBattle_SceneConstants::FOCUSTARGET_Y,-2)
|
|
||||||
@array[pos][1][AnimFrame::FOCUS] = 1
|
@array[pos][1][AnimFrame::FOCUS] = 1
|
||||||
@array[pos][1][AnimFrame::LOCKED] = 1
|
@array[pos][1][AnimFrame::LOCKED] = 1
|
||||||
return @array[pos]
|
return @array[pos]
|
||||||
@@ -846,11 +842,11 @@ class PBAnimationPlayerX
|
|||||||
pbSpriteSetAnimFrame(sprite,cel,@usersprite,@targetsprite)
|
pbSpriteSetAnimFrame(sprite,cel,@usersprite,@targetsprite)
|
||||||
case cel[AnimFrame::FOCUS]
|
case cel[AnimFrame::FOCUS]
|
||||||
when 1 # Focused on target
|
when 1 # Focused on target
|
||||||
sprite.x = cel[AnimFrame::X]+@targetOrig[0]-PokeBattle_SceneConstants::FOCUSTARGET_X
|
sprite.x = cel[AnimFrame::X] + @targetOrig[0] - Battle::Scene::FOCUSTARGET_X
|
||||||
sprite.y = cel[AnimFrame::Y]+@targetOrig[1]-PokeBattle_SceneConstants::FOCUSTARGET_Y
|
sprite.y = cel[AnimFrame::Y] + @targetOrig[1] - Battle::Scene::FOCUSTARGET_Y
|
||||||
when 2 # Focused on user
|
when 2 # Focused on user
|
||||||
sprite.x = cel[AnimFrame::X]+@userOrig[0]-PokeBattle_SceneConstants::FOCUSUSER_X
|
sprite.x = cel[AnimFrame::X] + @userOrig[0] - Battle::Scene::FOCUSUSER_X
|
||||||
sprite.y = cel[AnimFrame::Y]+@userOrig[1]-PokeBattle_SceneConstants::FOCUSUSER_Y
|
sprite.y = cel[AnimFrame::Y] + @userOrig[1] - Battle::Scene::FOCUSUSER_Y
|
||||||
when 3 # Focused on user and target
|
when 3 # Focused on user and target
|
||||||
next if !@srcLine || !@dstLine
|
next if !@srcLine || !@dstLine
|
||||||
point = transformPoint(
|
point = transformPoint(
|
||||||
@@ -567,13 +567,13 @@ def pbBattleMoveImmunityStatAbility(user, target, move, moveType, immuneType,
|
|||||||
if show_message
|
if show_message
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if target.pbCanRaiseStatStage?(stat, target)
|
if target.pbCanRaiseStatStage?(stat, target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
target.pbRaiseStatStage(stat, increment, target)
|
target.pbRaiseStatStage(stat, increment, target)
|
||||||
else
|
else
|
||||||
target.pbRaiseStatStageByCause(stat, increment, target, target.abilityName)
|
target.pbRaiseStatStageByCause(stat, increment, target, target.abilityName)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
||||||
@@ -597,13 +597,13 @@ def pbBattleMoveImmunityHealAbility(user, target, move, moveType, immuneType, ba
|
|||||||
if show_message
|
if show_message
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if target.canHeal? && target.pbRecoverHP(target.totalhp / 4) > 0
|
if target.canHeal? && target.pbRecoverHP(target.totalhp / 4) > 0
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s HP was restored.", target.pbThis))
|
battle.pbDisplay(_INTL("{1}'s HP was restored.", target.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.", target.pbThis, target.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.", target.pbThis, target.abilityName))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
||||||
@@ -617,7 +617,7 @@ end
|
|||||||
|
|
||||||
def pbBattleGem(user,type,move,mults,moveType)
|
def pbBattleGem(user,type,move,mults,moveType)
|
||||||
# Pledge moves never consume Gems
|
# Pledge moves never consume Gems
|
||||||
return if move.is_a?(PokeBattle_PledgeMove)
|
return if move.is_a?(Battle::Move::PledgeMove)
|
||||||
return if moveType != type
|
return if moveType != type
|
||||||
user.effects[PBEffects::GemConsumed] = user.item_id
|
user.effects[PBEffects::GemConsumed] = user.item_id
|
||||||
if Settings::MECHANICS_GENERATION >= 6
|
if Settings::MECHANICS_GENERATION >= 6
|
||||||
@@ -646,7 +646,7 @@ def pbBattleWeatherAbility(weather,battler,battle,ignorePrimal=false)
|
|||||||
return if !ignorePrimal && [:HarshSun, :HeavyRain, :StrongWinds].include?(battle.field.weather)
|
return if !ignorePrimal && [:HarshSun, :HeavyRain, :StrongWinds].include?(battle.field.weather)
|
||||||
return if battle.field.weather==weather
|
return if battle.field.weather==weather
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} activated!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} activated!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
fixedDuration = false
|
fixedDuration = false
|
||||||
@@ -91,7 +91,7 @@ BattleHandlers::AbilityOnHPDroppedBelowHalf.add(:EMERGENCYEXIT,
|
|||||||
next false if !battle.pbCanChooseNonActive?(battler.index) # No Pokémon can switch in
|
next false if !battle.pbCanChooseNonActive?(battler.index) # No Pokémon can switch in
|
||||||
battle.pbShowAbilitySplash(battler,true)
|
battle.pbShowAbilitySplash(battler,true)
|
||||||
battle.pbHideAbilitySplash(battler)
|
battle.pbHideAbilitySplash(battler)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} activated!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} activated!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
battle.pbDisplay(_INTL("{1} went back to {2}!",
|
battle.pbDisplay(_INTL("{1} went back to {2}!",
|
||||||
@@ -220,7 +220,7 @@ BattleHandlers::AbilityOnStatusInflicted.add(:SYNCHRONIZE,
|
|||||||
if user.pbCanPoisonSynchronize?(battler)
|
if user.pbCanPoisonSynchronize?(battler)
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} poisoned {3}!",battler.pbThis,battler.abilityName,user.pbThis(true))
|
msg = _INTL("{1}'s {2} poisoned {3}!",battler.pbThis,battler.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
user.pbPoison(nil,msg,(battler.statusCount>0))
|
user.pbPoison(nil,msg,(battler.statusCount>0))
|
||||||
@@ -230,7 +230,7 @@ BattleHandlers::AbilityOnStatusInflicted.add(:SYNCHRONIZE,
|
|||||||
if user.pbCanBurnSynchronize?(battler)
|
if user.pbCanBurnSynchronize?(battler)
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} burned {3}!",battler.pbThis,battler.abilityName,user.pbThis(true))
|
msg = _INTL("{1}'s {2} burned {3}!",battler.pbThis,battler.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
user.pbBurn(nil,msg)
|
user.pbBurn(nil,msg)
|
||||||
@@ -240,7 +240,7 @@ BattleHandlers::AbilityOnStatusInflicted.add(:SYNCHRONIZE,
|
|||||||
if user.pbCanParalyzeSynchronize?(battler)
|
if user.pbCanParalyzeSynchronize?(battler)
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} paralyzed {3}! It may be unable to move!",
|
msg = _INTL("{1}'s {2} paralyzed {3}! It may be unable to move!",
|
||||||
battler.pbThis,battler.abilityName,user.pbThis(true))
|
battler.pbThis,battler.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
@@ -259,8 +259,8 @@ BattleHandlers::StatusCureAbility.add(:IMMUNITY,
|
|||||||
proc { |ability,battler|
|
proc { |ability,battler|
|
||||||
next if battler.status != :POISON
|
next if battler.status != :POISON
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
battler.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",battler.pbThis,battler.abilityName))
|
battler.battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
battler.battle.pbHideAbilitySplash(battler)
|
battler.battle.pbHideAbilitySplash(battler)
|
||||||
@@ -271,8 +271,8 @@ BattleHandlers::StatusCureAbility.add(:INSOMNIA,
|
|||||||
proc { |ability,battler|
|
proc { |ability,battler|
|
||||||
next if battler.status != :SLEEP
|
next if battler.status != :SLEEP
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
battler.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} woke it up!",battler.pbThis,battler.abilityName))
|
battler.battle.pbDisplay(_INTL("{1}'s {2} woke it up!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
battler.battle.pbHideAbilitySplash(battler)
|
battler.battle.pbHideAbilitySplash(battler)
|
||||||
@@ -285,8 +285,8 @@ BattleHandlers::StatusCureAbility.add(:LIMBER,
|
|||||||
proc { |ability,battler|
|
proc { |ability,battler|
|
||||||
next if battler.status != :PARALYSIS
|
next if battler.status != :PARALYSIS
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
battler.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",battler.pbThis,battler.abilityName))
|
battler.battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
battler.battle.pbHideAbilitySplash(battler)
|
battler.battle.pbHideAbilitySplash(battler)
|
||||||
@@ -297,8 +297,8 @@ BattleHandlers::StatusCureAbility.add(:MAGMAARMOR,
|
|||||||
proc { |ability,battler|
|
proc { |ability,battler|
|
||||||
next if battler.status != :FROZEN
|
next if battler.status != :FROZEN
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
battler.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",battler.pbThis,battler.abilityName))
|
battler.battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
battler.battle.pbHideAbilitySplash(battler)
|
battler.battle.pbHideAbilitySplash(battler)
|
||||||
@@ -312,7 +312,7 @@ BattleHandlers::StatusCureAbility.add(:OBLIVIOUS,
|
|||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
if battler.effects[PBEffects::Attract]>=0
|
if battler.effects[PBEffects::Attract]>=0
|
||||||
battler.pbCureAttract
|
battler.pbCureAttract
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1} got over its infatuation.",battler.pbThis))
|
battler.battle.pbDisplay(_INTL("{1} got over its infatuation.",battler.pbThis))
|
||||||
else
|
else
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} cured its infatuation status!",
|
battler.battle.pbDisplay(_INTL("{1}'s {2} cured its infatuation status!",
|
||||||
@@ -321,7 +321,7 @@ BattleHandlers::StatusCureAbility.add(:OBLIVIOUS,
|
|||||||
end
|
end
|
||||||
if battler.effects[PBEffects::Taunt]>0 && Settings::MECHANICS_GENERATION >= 6
|
if battler.effects[PBEffects::Taunt]>0 && Settings::MECHANICS_GENERATION >= 6
|
||||||
battler.effects[PBEffects::Taunt] = 0
|
battler.effects[PBEffects::Taunt] = 0
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s Taunt wore off!",battler.pbThis))
|
battler.battle.pbDisplay(_INTL("{1}'s Taunt wore off!",battler.pbThis))
|
||||||
else
|
else
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} made its taunt wear off!",
|
battler.battle.pbDisplay(_INTL("{1}'s {2} made its taunt wear off!",
|
||||||
@@ -337,7 +337,7 @@ BattleHandlers::StatusCureAbility.add(:OWNTEMPO,
|
|||||||
next if battler.effects[PBEffects::Confusion]==0
|
next if battler.effects[PBEffects::Confusion]==0
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbCureConfusion
|
battler.pbCureConfusion
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1} snapped out of its confusion.",battler.pbThis))
|
battler.battle.pbDisplay(_INTL("{1} snapped out of its confusion.",battler.pbThis))
|
||||||
else
|
else
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} snapped it out of its confusion!",
|
battler.battle.pbDisplay(_INTL("{1}'s {2} snapped it out of its confusion!",
|
||||||
@@ -351,8 +351,8 @@ BattleHandlers::StatusCureAbility.add(:WATERVEIL,
|
|||||||
proc { |ability,battler|
|
proc { |ability,battler|
|
||||||
next if battler.status != :BURN
|
next if battler.status != :BURN
|
||||||
battler.battle.pbShowAbilitySplash(battler)
|
battler.battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
battler.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battler.battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",battler.pbThis,battler.abilityName))
|
battler.battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
battler.battle.pbHideAbilitySplash(battler)
|
battler.battle.pbHideAbilitySplash(battler)
|
||||||
@@ -370,7 +370,7 @@ BattleHandlers::StatLossImmunityAbility.add(:BIGPECKS,
|
|||||||
next false if stat!=:DEFENSE
|
next false if stat!=:DEFENSE
|
||||||
if showMessages
|
if showMessages
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!",battler.pbThis,GameData::Stat.get(stat).name))
|
battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!",battler.pbThis,GameData::Stat.get(stat).name))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!",battler.pbThis,
|
battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!",battler.pbThis,
|
||||||
@@ -386,7 +386,7 @@ BattleHandlers::StatLossImmunityAbility.add(:CLEARBODY,
|
|||||||
proc { |ability,battler,stat,battle,showMessages|
|
proc { |ability,battler,stat,battle,showMessages|
|
||||||
if showMessages
|
if showMessages
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} prevents stat loss!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} prevents stat loss!",battler.pbThis,battler.abilityName))
|
||||||
@@ -404,7 +404,7 @@ BattleHandlers::StatLossImmunityAbility.add(:FLOWERVEIL,
|
|||||||
next false if !battler.pbHasType?(:GRASS)
|
next false if !battler.pbHasType?(:GRASS)
|
||||||
if showMessages
|
if showMessages
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} prevents stat loss!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} prevents stat loss!",battler.pbThis,battler.abilityName))
|
||||||
@@ -420,7 +420,7 @@ BattleHandlers::StatLossImmunityAbility.add(:HYPERCUTTER,
|
|||||||
next false if stat!=:ATTACK
|
next false if stat!=:ATTACK
|
||||||
if showMessages
|
if showMessages
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!",battler.pbThis,GameData::Stat.get(stat).name))
|
battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!",battler.pbThis,GameData::Stat.get(stat).name))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!",battler.pbThis,
|
battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!",battler.pbThis,
|
||||||
@@ -437,7 +437,7 @@ BattleHandlers::StatLossImmunityAbility.add(:KEENEYE,
|
|||||||
next false if stat!=:ACCURACY
|
next false if stat!=:ACCURACY
|
||||||
if showMessages
|
if showMessages
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!",battler.pbThis,GameData::Stat.get(stat).name))
|
battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!",battler.pbThis,GameData::Stat.get(stat).name))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!",battler.pbThis,
|
battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!",battler.pbThis,
|
||||||
@@ -457,7 +457,7 @@ BattleHandlers::StatLossImmunityAbilityNonIgnorable.add(:FULLMETALBODY,
|
|||||||
proc { |ability,battler,stat,battle,showMessages|
|
proc { |ability,battler,stat,battle,showMessages|
|
||||||
if showMessages
|
if showMessages
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} prevents stat loss!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} prevents stat loss!",battler.pbThis,battler.abilityName))
|
||||||
@@ -477,7 +477,7 @@ BattleHandlers::StatLossImmunityAllyAbility.add(:FLOWERVEIL,
|
|||||||
next false if !battler.pbHasType?(:GRASS)
|
next false if !battler.pbHasType?(:GRASS)
|
||||||
if showMessages
|
if showMessages
|
||||||
battle.pbShowAbilitySplash(bearer)
|
battle.pbShowAbilitySplash(bearer)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s stats cannot be lowered!",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} prevents {3}'s stat loss!",
|
battle.pbDisplay(_INTL("{1}'s {2} prevents {3}'s stat loss!",
|
||||||
@@ -605,7 +605,7 @@ BattleHandlers::MoveImmunityTargetAbility.add(:BULLETPROOF,
|
|||||||
next false if !move.bombMove?
|
next false if !move.bombMove?
|
||||||
if show_message
|
if show_message
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
||||||
@@ -625,14 +625,14 @@ BattleHandlers::MoveImmunityTargetAbility.add(:FLASHFIRE,
|
|||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if !target.effects[PBEffects::FlashFire]
|
if !target.effects[PBEffects::FlashFire]
|
||||||
target.effects[PBEffects::FlashFire] = true
|
target.effects[PBEffects::FlashFire] = true
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose!", target.pbThis(true)))
|
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose!", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose because of its {2}!",
|
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose because of its {2}!",
|
||||||
target.pbThis(true), target.abilityName))
|
target.pbThis(true), target.abilityName))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
||||||
@@ -669,7 +669,7 @@ BattleHandlers::MoveImmunityTargetAbility.add(:SOUNDPROOF,
|
|||||||
next false if Settings::MECHANICS_GENERATION >= 8 && user.index == target.index
|
next false if Settings::MECHANICS_GENERATION >= 8 && user.index == target.index
|
||||||
if show_message
|
if show_message
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} blocks {3}!", target.pbThis, target.abilityName, move.name))
|
battle.pbDisplay(_INTL("{1}'s {2} blocks {3}!", target.pbThis, target.abilityName, move.name))
|
||||||
@@ -692,7 +692,7 @@ BattleHandlers::MoveImmunityTargetAbility.add(:TELEPATHY,
|
|||||||
next false if user.index==target.index || target.opposes?(user)
|
next false if user.index==target.index || target.opposes?(user)
|
||||||
if show_message
|
if show_message
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon!", target.pbThis(true)))
|
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon!", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon with {2}!",
|
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon with {2}!",
|
||||||
@@ -724,7 +724,7 @@ BattleHandlers::MoveImmunityTargetAbility.add(:WONDERGUARD,
|
|||||||
next false if !type || Effectiveness.super_effective?(target.damageState.typeMod)
|
next false if !type || Effectiveness.super_effective?(target.damageState.typeMod)
|
||||||
if show_message
|
if show_message
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} avoided damage with {2}!", target.pbThis, target.abilityName))
|
battle.pbDisplay(_INTL("{1} avoided damage with {2}!", target.pbThis, target.abilityName))
|
||||||
@@ -1373,7 +1373,7 @@ BattleHandlers::TargetAbilityOnHit.add(:AFTERMATH,
|
|||||||
dampBattler = battle.pbCheckGlobalAbility(:DAMP)
|
dampBattler = battle.pbCheckGlobalAbility(:DAMP)
|
||||||
if dampBattler
|
if dampBattler
|
||||||
battle.pbShowAbilitySplash(dampBattler)
|
battle.pbShowAbilitySplash(dampBattler)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} cannot use {2}!",target.pbThis,target.abilityName))
|
battle.pbDisplay(_INTL("{1} cannot use {2}!",target.pbThis,target.abilityName))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!",
|
battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!",
|
||||||
@@ -1384,8 +1384,8 @@ BattleHandlers::TargetAbilityOnHit.add(:AFTERMATH,
|
|||||||
next
|
next
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if user.takesIndirectDamage?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if user.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
battle.scene.pbDamageAnimation(user)
|
battle.scene.pbDamageAnimation(user)
|
||||||
user.pbReduceHP(user.totalhp/4,false)
|
user.pbReduceHP(user.totalhp/4,false)
|
||||||
battle.pbDisplay(_INTL("{1} was caught in the aftermath!",user.pbThis))
|
battle.pbDisplay(_INTL("{1} was caught in the aftermath!",user.pbThis))
|
||||||
@@ -1402,7 +1402,7 @@ BattleHandlers::TargetAbilityOnHit.add(:ANGERPOINT,
|
|||||||
target.stages[:ATTACK] = 6
|
target.stages[:ATTACK] = 6
|
||||||
target.statsRaisedThisRound = true
|
target.statsRaisedThisRound = true
|
||||||
battle.pbCommonAnimation("StatUp",target)
|
battle.pbCommonAnimation("StatUp",target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} maxed its {2}!",target.pbThis,GameData::Stat.get(:ATTACK).name))
|
battle.pbDisplay(_INTL("{1} maxed its {2}!",target.pbThis,GameData::Stat.get(:ATTACK).name))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} maxed its {3}!",
|
battle.pbDisplay(_INTL("{1}'s {2} maxed its {3}!",
|
||||||
@@ -1436,10 +1436,10 @@ BattleHandlers::TargetAbilityOnHit.add(:CURSEDBODY,
|
|||||||
next if !regularMove || (regularMove.pp==0 && regularMove.total_pp>0)
|
next if !regularMove || (regularMove.pp==0 && regularMove.total_pp>0)
|
||||||
next if battle.pbRandom(100)>=30
|
next if battle.pbRandom(100)>=30
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if !move.pbMoveFailedAromaVeil?(target,user,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if !move.pbMoveFailedAromaVeil?(target,user,Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
user.effects[PBEffects::Disable] = 3
|
user.effects[PBEffects::Disable] = 3
|
||||||
user.effects[PBEffects::DisableMove] = regularMove.id
|
user.effects[PBEffects::DisableMove] = regularMove.id
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} was disabled!",user.pbThis,regularMove.name))
|
battle.pbDisplay(_INTL("{1}'s {2} was disabled!",user.pbThis,regularMove.name))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} was disabled by {3}'s {4}!",
|
battle.pbDisplay(_INTL("{1}'s {2} was disabled by {3}'s {4}!",
|
||||||
@@ -1458,10 +1458,10 @@ BattleHandlers::TargetAbilityOnHit.add(:CUTECHARM,
|
|||||||
next if !move.pbContactMove?(user)
|
next if !move.pbContactMove?(user)
|
||||||
next if battle.pbRandom(100)>=30
|
next if battle.pbRandom(100)>=30
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.pbCanAttract?(target,PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if user.pbCanAttract?(target,Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} made {3} fall in love!",target.pbThis,
|
msg = _INTL("{1}'s {2} made {3} fall in love!",target.pbThis,
|
||||||
target.abilityName,user.pbThis(true))
|
target.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
@@ -1483,31 +1483,31 @@ BattleHandlers::TargetAbilityOnHit.add(:EFFECTSPORE,
|
|||||||
next if r==1 && user.poisoned?
|
next if r==1 && user.poisoned?
|
||||||
next if r==2 && user.paralyzed?
|
next if r==2 && user.paralyzed?
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.affectedByPowder?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if user.affectedByPowder?(Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
case r
|
case r
|
||||||
when 0
|
when 0
|
||||||
if user.pbCanSleep?(target,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.pbCanSleep?(target,Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} made {3} fall asleep!",target.pbThis,
|
msg = _INTL("{1}'s {2} made {3} fall asleep!",target.pbThis,
|
||||||
target.abilityName,user.pbThis(true))
|
target.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
user.pbSleep(msg)
|
user.pbSleep(msg)
|
||||||
end
|
end
|
||||||
when 1
|
when 1
|
||||||
if user.pbCanPoison?(target,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.pbCanPoison?(target,Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} poisoned {3}!",target.pbThis,
|
msg = _INTL("{1}'s {2} poisoned {3}!",target.pbThis,
|
||||||
target.abilityName,user.pbThis(true))
|
target.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
user.pbPoison(target,msg)
|
user.pbPoison(target,msg)
|
||||||
end
|
end
|
||||||
when 2
|
when 2
|
||||||
if user.pbCanParalyze?(target,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.pbCanParalyze?(target,Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} paralyzed {3}! It may be unable to move!",
|
msg = _INTL("{1}'s {2} paralyzed {3}! It may be unable to move!",
|
||||||
target.pbThis,target.abilityName,user.pbThis(true))
|
target.pbThis,target.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
@@ -1524,10 +1524,10 @@ BattleHandlers::TargetAbilityOnHit.add(:FLAMEBODY,
|
|||||||
next if !move.pbContactMove?(user)
|
next if !move.pbContactMove?(user)
|
||||||
next if user.burned? || battle.pbRandom(100)>=30
|
next if user.burned? || battle.pbRandom(100)>=30
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.pbCanBurn?(target,PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if user.pbCanBurn?(target,Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} burned {3}!",target.pbThis,target.abilityName,user.pbThis(true))
|
msg = _INTL("{1}'s {2} burned {3}!",target.pbThis,target.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
user.pbBurn(target,msg)
|
user.pbBurn(target,msg)
|
||||||
@@ -1560,10 +1560,10 @@ BattleHandlers::TargetAbilityOnHit.add(:INNARDSOUT,
|
|||||||
proc { |ability,user,target,move,battle|
|
proc { |ability,user,target,move,battle|
|
||||||
next if !target.fainted? || user.dummy
|
next if !target.fainted? || user.dummy
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.takesIndirectDamage?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
battle.scene.pbDamageAnimation(user)
|
battle.scene.pbDamageAnimation(user)
|
||||||
user.pbReduceHP(target.damageState.hpLost,false)
|
user.pbReduceHP(target.damageState.hpLost,false)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} is hurt!",user.pbThis))
|
battle.pbDisplay(_INTL("{1} is hurt!",user.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} is hurt by {2}'s {3}!",user.pbThis,
|
battle.pbDisplay(_INTL("{1} is hurt by {2}'s {3}!",user.pbThis,
|
||||||
@@ -1578,11 +1578,11 @@ BattleHandlers::TargetAbilityOnHit.add(:IRONBARBS,
|
|||||||
proc { |ability,user,target,move,battle|
|
proc { |ability,user,target,move,battle|
|
||||||
next if !move.pbContactMove?(user)
|
next if !move.pbContactMove?(user)
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.takesIndirectDamage?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if user.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
battle.scene.pbDamageAnimation(user)
|
battle.scene.pbDamageAnimation(user)
|
||||||
user.pbReduceHP(user.totalhp/8,false)
|
user.pbReduceHP(user.totalhp/8,false)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} is hurt!",user.pbThis))
|
battle.pbDisplay(_INTL("{1} is hurt!",user.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} is hurt by {2}'s {3}!",user.pbThis,
|
battle.pbDisplay(_INTL("{1} is hurt by {2}'s {3}!",user.pbThis,
|
||||||
@@ -1609,12 +1609,12 @@ BattleHandlers::TargetAbilityOnHit.add(:MUMMY,
|
|||||||
next if user.unstoppableAbility? || user.ability == ability
|
next if user.unstoppableAbility? || user.ability == ability
|
||||||
oldAbil = nil
|
oldAbil = nil
|
||||||
battle.pbShowAbilitySplash(target) if user.opposes?(target)
|
battle.pbShowAbilitySplash(target) if user.opposes?(target)
|
||||||
if user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
oldAbil = user.ability
|
oldAbil = user.ability
|
||||||
battle.pbShowAbilitySplash(user,true,false) if user.opposes?(target)
|
battle.pbShowAbilitySplash(user,true,false) if user.opposes?(target)
|
||||||
user.ability = ability
|
user.ability = ability
|
||||||
battle.pbReplaceAbilitySplash(user) if user.opposes?(target)
|
battle.pbReplaceAbilitySplash(user) if user.opposes?(target)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s Ability became {2}!",user.pbThis,user.abilityName))
|
battle.pbDisplay(_INTL("{1}'s Ability became {2}!",user.pbThis,user.abilityName))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s Ability became {2} because of {3}!",
|
battle.pbDisplay(_INTL("{1}'s Ability became {2} because of {3}!",
|
||||||
@@ -1634,12 +1634,12 @@ BattleHandlers::TargetAbilityOnHit.add(:PERISHBODY,
|
|||||||
next if user.fainted?
|
next if user.fainted?
|
||||||
next if user.effects[PBEffects::PerishSong] > 0 || target.effects[PBEffects::PerishSong] > 0
|
next if user.effects[PBEffects::PerishSong] > 0 || target.effects[PBEffects::PerishSong] > 0
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
user.effects[PBEffects::PerishSong] = 4
|
user.effects[PBEffects::PerishSong] = 4
|
||||||
user.effects[PBEffects::PerishSongUser] = target.index
|
user.effects[PBEffects::PerishSongUser] = target.index
|
||||||
target.effects[PBEffects::PerishSong] = 4
|
target.effects[PBEffects::PerishSong] = 4
|
||||||
target.effects[PBEffects::PerishSongUser] = target.index
|
target.effects[PBEffects::PerishSongUser] = target.index
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("Both Pokémon will faint in three turns!"))
|
battle.pbDisplay(_INTL("Both Pokémon will faint in three turns!"))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("Both Pokémon will faint in three turns because of {1}'s {2}!",
|
battle.pbDisplay(_INTL("Both Pokémon will faint in three turns because of {1}'s {2}!",
|
||||||
@@ -1655,10 +1655,10 @@ BattleHandlers::TargetAbilityOnHit.add(:POISONPOINT,
|
|||||||
next if !move.pbContactMove?(user)
|
next if !move.pbContactMove?(user)
|
||||||
next if user.poisoned? || battle.pbRandom(100)>=30
|
next if user.poisoned? || battle.pbRandom(100)>=30
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.pbCanPoison?(target,PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if user.pbCanPoison?(target,Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} poisoned {3}!",target.pbThis,target.abilityName,user.pbThis(true))
|
msg = _INTL("{1}'s {2} poisoned {3}!",target.pbThis,target.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
user.pbPoison(target,msg)
|
user.pbPoison(target,msg)
|
||||||
@@ -1691,10 +1691,10 @@ BattleHandlers::TargetAbilityOnHit.add(:STATIC,
|
|||||||
next if !move.pbContactMove?(user)
|
next if !move.pbContactMove?(user)
|
||||||
next if user.paralyzed? || battle.pbRandom(100)>=30
|
next if user.paralyzed? || battle.pbRandom(100)>=30
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.pbCanParalyze?(target,PokeBattle_SceneConstants::USE_ABILITY_SPLASH) &&
|
if user.pbCanParalyze?(target,Battle::Scene::USE_ABILITY_SPLASH) &&
|
||||||
user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} paralyzed {3}! It may be unable to move!",
|
msg = _INTL("{1}'s {2} paralyzed {3}! It may be unable to move!",
|
||||||
target.pbThis,target.abilityName,user.pbThis(true))
|
target.pbThis,target.abilityName,user.pbThis(true))
|
||||||
end
|
end
|
||||||
@@ -1711,7 +1711,7 @@ BattleHandlers::TargetAbilityOnHit.add(:WANDERINGSPIRIT,
|
|||||||
oldUserAbil = nil
|
oldUserAbil = nil
|
||||||
oldTargetAbil = nil
|
oldTargetAbil = nil
|
||||||
battle.pbShowAbilitySplash(target) if user.opposes?(target)
|
battle.pbShowAbilitySplash(target) if user.opposes?(target)
|
||||||
if user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
if user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
battle.pbShowAbilitySplash(user, true, false) if user.opposes?(target)
|
battle.pbShowAbilitySplash(user, true, false) if user.opposes?(target)
|
||||||
oldUserAbil = user.ability
|
oldUserAbil = user.ability
|
||||||
oldTargetAbil = target.ability
|
oldTargetAbil = target.ability
|
||||||
@@ -1721,7 +1721,7 @@ BattleHandlers::TargetAbilityOnHit.add(:WANDERINGSPIRIT,
|
|||||||
battle.pbReplaceAbilitySplash(user)
|
battle.pbReplaceAbilitySplash(user)
|
||||||
battle.pbReplaceAbilitySplash(target)
|
battle.pbReplaceAbilitySplash(target)
|
||||||
end
|
end
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} swapped Abilities with {2}!", target.pbThis, user.pbThis(true)))
|
battle.pbDisplay(_INTL("{1} swapped Abilities with {2}!", target.pbThis, user.pbThis(true)))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} swapped its {2} Ability with {3}'s {4} Ability!",
|
battle.pbDisplay(_INTL("{1} swapped its {2} Ability with {3}'s {4} Ability!",
|
||||||
@@ -1771,13 +1771,13 @@ BattleHandlers::UserAbilityOnHit.add(:POISONTOUCH,
|
|||||||
battle.pbShowAbilitySplash(user)
|
battle.pbShowAbilitySplash(user)
|
||||||
if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
|
if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
|
||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
|
battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
|
||||||
end
|
end
|
||||||
battle.pbHideAbilitySplash(target)
|
battle.pbHideAbilitySplash(target)
|
||||||
elsif target.pbCanPoison?(user,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
elsif target.pbCanPoison?(user,Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
msg = nil
|
msg = nil
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
msg = _INTL("{1}'s {2} poisoned {3}!",user.pbThis,user.abilityName,target.pbThis(true))
|
msg = _INTL("{1}'s {2} poisoned {3}!",user.pbThis,user.abilityName,target.pbThis(true))
|
||||||
end
|
end
|
||||||
target.pbPoison(user,msg)
|
target.pbPoison(user,msg)
|
||||||
@@ -1850,7 +1850,7 @@ BattleHandlers::UserAbilityEndOfMove.add(:MAGICIAN,
|
|||||||
battle.pbShowAbilitySplash(user)
|
battle.pbShowAbilitySplash(user)
|
||||||
if b.hasActiveAbility?(:STICKYHOLD)
|
if b.hasActiveAbility?(:STICKYHOLD)
|
||||||
battle.pbShowAbilitySplash(b) if user.opposes?(b)
|
battle.pbShowAbilitySplash(b) if user.opposes?(b)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s item cannot be stolen!",b.pbThis))
|
battle.pbDisplay(_INTL("{1}'s item cannot be stolen!",b.pbThis))
|
||||||
end
|
end
|
||||||
battle.pbHideAbilitySplash(b) if user.opposes?(b)
|
battle.pbHideAbilitySplash(b) if user.opposes?(b)
|
||||||
@@ -1863,7 +1863,7 @@ BattleHandlers::UserAbilityEndOfMove.add(:MAGICIAN,
|
|||||||
user.setInitialItem(user.item)
|
user.setInitialItem(user.item)
|
||||||
b.setInitialItem(nil)
|
b.setInitialItem(nil)
|
||||||
end
|
end
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} stole {2}'s {3}!",user.pbThis,
|
battle.pbDisplay(_INTL("{1} stole {2}'s {3}!",user.pbThis,
|
||||||
b.pbThis(true),user.itemName))
|
b.pbThis(true),user.itemName))
|
||||||
else
|
else
|
||||||
@@ -1928,7 +1928,7 @@ BattleHandlers::TargetAbilityAfterMoveUse.add(:PICKPOCKET,
|
|||||||
battle.pbShowAbilitySplash(target)
|
battle.pbShowAbilitySplash(target)
|
||||||
if user.hasActiveAbility?(:STICKYHOLD)
|
if user.hasActiveAbility?(:STICKYHOLD)
|
||||||
battle.pbShowAbilitySplash(user) if target.opposes?(user)
|
battle.pbShowAbilitySplash(user) if target.opposes?(user)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s item cannot be stolen!",user.pbThis))
|
battle.pbDisplay(_INTL("{1}'s item cannot be stolen!",user.pbThis))
|
||||||
end
|
end
|
||||||
battle.pbHideAbilitySplash(user) if target.opposes?(user)
|
battle.pbHideAbilitySplash(user) if target.opposes?(user)
|
||||||
@@ -1967,7 +1967,7 @@ BattleHandlers::EORWeatherAbility.add(:DRYSKIN,
|
|||||||
next if !battler.canHeal?
|
next if !battler.canHeal?
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbRecoverHP(battler.totalhp/8)
|
battler.pbRecoverHP(battler.totalhp/8)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s HP was restored.",battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s HP was restored.",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.",battler.pbThis,battler.abilityName))
|
||||||
@@ -1983,7 +1983,7 @@ BattleHandlers::EORWeatherAbility.add(:ICEBODY,
|
|||||||
next if !battler.canHeal?
|
next if !battler.canHeal?
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbRecoverHP(battler.totalhp/16)
|
battler.pbRecoverHP(battler.totalhp/16)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s HP was restored.",battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s HP was restored.",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.",battler.pbThis,battler.abilityName))
|
||||||
@@ -1997,7 +1997,7 @@ BattleHandlers::EORWeatherAbility.add(:ICEFACE,
|
|||||||
next if weather != :Hail
|
next if weather != :Hail
|
||||||
next if !battler.canRestoreIceFace || battler.form != 1
|
next if !battler.canRestoreIceFace || battler.form != 1
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))
|
||||||
end
|
end
|
||||||
battler.pbChangeForm(0, _INTL("{1} transformed!", battler.pbThis))
|
battler.pbChangeForm(0, _INTL("{1} transformed!", battler.pbThis))
|
||||||
@@ -2011,7 +2011,7 @@ BattleHandlers::EORWeatherAbility.add(:RAINDISH,
|
|||||||
next if !battler.canHeal?
|
next if !battler.canHeal?
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
battler.pbRecoverHP(battler.totalhp/16)
|
battler.pbRecoverHP(battler.totalhp/16)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s HP was restored.",battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s HP was restored.",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.",battler.pbThis,battler.abilityName))
|
||||||
@@ -2043,8 +2043,8 @@ BattleHandlers::EORHealingAbility.add(:HEALER,
|
|||||||
next if b.status == :NONE
|
next if b.status == :NONE
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
oldStatus = b.status
|
oldStatus = b.status
|
||||||
b.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
b.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
case oldStatus
|
case oldStatus
|
||||||
when :SLEEP
|
when :SLEEP
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} woke its partner up!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} woke its partner up!",battler.pbThis,battler.abilityName))
|
||||||
@@ -2069,8 +2069,8 @@ BattleHandlers::EORHealingAbility.add(:HYDRATION,
|
|||||||
next if ![:Rain, :HeavyRain].include?(battler.effectiveWeather)
|
next if ![:Rain, :HeavyRain].include?(battler.effectiveWeather)
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
oldStatus = battler.status
|
oldStatus = battler.status
|
||||||
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
battler.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
case oldStatus
|
case oldStatus
|
||||||
when :SLEEP
|
when :SLEEP
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} woke it up!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} woke it up!",battler.pbThis,battler.abilityName))
|
||||||
@@ -2094,8 +2094,8 @@ BattleHandlers::EORHealingAbility.add(:SHEDSKIN,
|
|||||||
next unless battle.pbRandom(100)<30
|
next unless battle.pbRandom(100)<30
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
oldStatus = battler.status
|
oldStatus = battler.status
|
||||||
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
battler.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
case oldStatus
|
case oldStatus
|
||||||
when :SLEEP
|
when :SLEEP
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} woke it up!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} woke it up!",battler.pbThis,battler.abilityName))
|
||||||
@@ -2122,9 +2122,9 @@ BattleHandlers::EOREffectAbility.add(:BADDREAMS,
|
|||||||
battle.allOtherSideBattlers(battler.index).each do |b|
|
battle.allOtherSideBattlers(battler.index).each do |b|
|
||||||
next if !b.near?(battler) || !b.asleep?
|
next if !b.near?(battler) || !b.asleep?
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
next if !b.takesIndirectDamage?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
next if !b.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
b.pbTakeEffectDamage(b.totalhp / 8) { |hp_lost|
|
b.pbTakeEffectDamage(b.totalhp / 8) { |hp_lost|
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} is tormented!", b.pbThis))
|
battle.pbDisplay(_INTL("{1} is tormented!", b.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} is tormented by {2}'s {3}!",
|
battle.pbDisplay(_INTL("{1} is tormented by {2}'s {3}!",
|
||||||
@@ -2278,7 +2278,7 @@ BattleHandlers::TrappingTargetAbility.add(:SHADOWTAG,
|
|||||||
BattleHandlers::AbilityOnSwitchIn.add(:AIRLOCK,
|
BattleHandlers::AbilityOnSwitchIn.add(:AIRLOCK,
|
||||||
proc { |ability,battler,battle|
|
proc { |ability,battler,battle|
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} has {2}!",battler.pbThis,battler.abilityName))
|
battle.pbDisplay(_INTL("{1} has {2}!",battler.pbThis,battler.abilityName))
|
||||||
end
|
end
|
||||||
battle.pbDisplay(_INTL("The effects of the weather disappeared."))
|
battle.pbDisplay(_INTL("The effects of the weather disappeared."))
|
||||||
@@ -2362,7 +2362,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:CURIOUSMEDICINE,
|
|||||||
battler.allAllies.each do |b|
|
battler.allAllies.each do |b|
|
||||||
next if !b.hasAlteredStatStages?
|
next if !b.hasAlteredStatStages?
|
||||||
b.pbResetStatStages
|
b.pbResetStatStages
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s stat changes were removed!", b.pbThis))
|
battle.pbDisplay(_INTL("{1}'s stat changes were removed!", b.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1}'s stat changes were removed by {2}'s {3}!",
|
battle.pbDisplay(_INTL("{1}'s stat changes were removed by {2}'s {3}!",
|
||||||
@@ -2480,7 +2480,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:FOREWARN,
|
|||||||
if forewarnMoves.length>0
|
if forewarnMoves.length>0
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
forewarnMoveName = forewarnMoves[battle.pbRandom(forewarnMoves.length)]
|
forewarnMoveName = forewarnMoves[battle.pbRandom(forewarnMoves.length)]
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} was alerted to {2}!",
|
battle.pbDisplay(_INTL("{1} was alerted to {2}!",
|
||||||
battler.pbThis, forewarnMoveName))
|
battler.pbThis, forewarnMoveName))
|
||||||
else
|
else
|
||||||
@@ -2527,7 +2527,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:ICEFACE,
|
|||||||
next if !battler.isSpecies?(:EISCUE) || battler.form != 1
|
next if !battler.isSpecies?(:EISCUE) || battler.form != 1
|
||||||
next if battler.effectiveWeather != :Hail
|
next if battler.effectiveWeather != :Hail
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))
|
battle.pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))
|
||||||
end
|
end
|
||||||
battler.pbChangeForm(0, _INTL("{1} transformed!", battler.pbThis))
|
battler.pbChangeForm(0, _INTL("{1} transformed!", battler.pbThis))
|
||||||
@@ -2635,8 +2635,8 @@ BattleHandlers::AbilityOnSwitchIn.add(:PASTELVEIL,
|
|||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
battler.allAllies.each do |b|
|
battler.allAllies.each do |b|
|
||||||
next if b.status != :POISON
|
next if b.status != :POISON
|
||||||
b.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
|
b.pbCureStatus(Battle::Scene::USE_ABILITY_SPLASH)
|
||||||
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1}'s {2} cured {3}'s poisoning!",
|
battle.pbDisplay(_INTL("{1}'s {2} cured {3}'s poisoning!",
|
||||||
battler.pbThis, battler.abilityName, b.pbThis(true)))
|
battler.pbThis, battler.abilityName, b.pbThis(true)))
|
||||||
end
|
end
|
||||||
@@ -2715,7 +2715,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:SLOWSTART,
|
|||||||
proc { |ability,battler,battle|
|
proc { |ability,battler,battle|
|
||||||
battle.pbShowAbilitySplash(battler)
|
battle.pbShowAbilitySplash(battler)
|
||||||
battler.effects[PBEffects::SlowStart] = 5
|
battler.effects[PBEffects::SlowStart] = 5
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} can't get it going!",battler.pbThis))
|
battle.pbDisplay(_INTL("{1} can't get it going!",battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} can't get it going because of its {2}!",
|
battle.pbDisplay(_INTL("{1} can't get it going because of its {2}!",
|
||||||
@@ -661,7 +661,7 @@ BattleHandlers::DamageCalcUserItem.add(:ICEGEM,
|
|||||||
|
|
||||||
BattleHandlers::DamageCalcUserItem.add(:LIFEORB,
|
BattleHandlers::DamageCalcUserItem.add(:LIFEORB,
|
||||||
proc { |item,user,target,move,mults,baseDmg,type|
|
proc { |item,user,target,move,mults,baseDmg,type|
|
||||||
if !move.is_a?(PokeBattle_Confusion)
|
if !move.is_a?(Battle::Move::Confusion)
|
||||||
mults[:final_damage_multiplier] *= 1.3
|
mults[:final_damage_multiplier] *= 1.3
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
@@ -1338,7 +1338,7 @@ BattleHandlers::TargetItemAfterMoveUse.add(:REDCARD,
|
|||||||
battler.pbConsumeItem
|
battler.pbConsumeItem
|
||||||
if user.hasActiveAbility?(:SUCTIONCUPS) && !battle.moldBreaker
|
if user.hasActiveAbility?(:SUCTIONCUPS) && !battle.moldBreaker
|
||||||
battle.pbShowAbilitySplash(user)
|
battle.pbShowAbilitySplash(user)
|
||||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
if Battle::Scene::USE_ABILITY_SPLASH
|
||||||
battle.pbDisplay(_INTL("{1} anchors itself!", user.pbThis))
|
battle.pbDisplay(_INTL("{1} anchors itself!", user.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} anchors itself with {2}!", user.pbThis, user.abilityName))
|
battle.pbDisplay(_INTL("{1} anchors itself with {2}!", user.pbThis, user.abilityName))
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
begin
|
|
||||||
class PokeBattle_ActiveField
|
|
||||||
attr_accessor :effects
|
|
||||||
attr_accessor :defaultWeather
|
|
||||||
attr_accessor :weather
|
|
||||||
attr_accessor :weatherDuration
|
|
||||||
attr_accessor :defaultTerrain
|
|
||||||
attr_accessor :terrain
|
|
||||||
attr_accessor :terrainDuration
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
@effects = []
|
|
||||||
@effects[PBEffects::AmuletCoin] = false
|
|
||||||
@effects[PBEffects::FairyLock] = 0
|
|
||||||
@effects[PBEffects::FusionBolt] = false
|
|
||||||
@effects[PBEffects::FusionFlare] = false
|
|
||||||
@effects[PBEffects::Gravity] = 0
|
|
||||||
@effects[PBEffects::HappyHour] = false
|
|
||||||
@effects[PBEffects::IonDeluge] = false
|
|
||||||
@effects[PBEffects::MagicRoom] = 0
|
|
||||||
@effects[PBEffects::MudSportField] = 0
|
|
||||||
@effects[PBEffects::PayDay] = 0
|
|
||||||
@effects[PBEffects::TrickRoom] = 0
|
|
||||||
@effects[PBEffects::WaterSportField] = 0
|
|
||||||
@effects[PBEffects::WonderRoom] = 0
|
|
||||||
@defaultWeather = :None
|
|
||||||
@weather = :None
|
|
||||||
@weatherDuration = 0
|
|
||||||
@defaultTerrain = :None
|
|
||||||
@terrain = :None
|
|
||||||
@terrainDuration = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_ActiveSide
|
|
||||||
attr_accessor :effects
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
@effects = []
|
|
||||||
@effects[PBEffects::AuroraVeil] = 0
|
|
||||||
@effects[PBEffects::CraftyShield] = false
|
|
||||||
@effects[PBEffects::EchoedVoiceCounter] = 0
|
|
||||||
@effects[PBEffects::EchoedVoiceUsed] = false
|
|
||||||
@effects[PBEffects::LastRoundFainted] = -1
|
|
||||||
@effects[PBEffects::LightScreen] = 0
|
|
||||||
@effects[PBEffects::LuckyChant] = 0
|
|
||||||
@effects[PBEffects::MatBlock] = false
|
|
||||||
@effects[PBEffects::Mist] = 0
|
|
||||||
@effects[PBEffects::QuickGuard] = false
|
|
||||||
@effects[PBEffects::Rainbow] = 0
|
|
||||||
@effects[PBEffects::Reflect] = 0
|
|
||||||
@effects[PBEffects::Round] = false
|
|
||||||
@effects[PBEffects::Safeguard] = 0
|
|
||||||
@effects[PBEffects::SeaOfFire] = 0
|
|
||||||
@effects[PBEffects::Spikes] = 0
|
|
||||||
@effects[PBEffects::StealthRock] = false
|
|
||||||
@effects[PBEffects::StickyWeb] = false
|
|
||||||
@effects[PBEffects::Swamp] = 0
|
|
||||||
@effects[PBEffects::Tailwind] = 0
|
|
||||||
@effects[PBEffects::ToxicSpikes] = 0
|
|
||||||
@effects[PBEffects::WideGuard] = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_ActivePosition
|
|
||||||
attr_accessor :effects
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
@effects = []
|
|
||||||
@effects[PBEffects::FutureSightCounter] = 0
|
|
||||||
@effects[PBEffects::FutureSightMove] = nil
|
|
||||||
@effects[PBEffects::FutureSightUserIndex] = -1
|
|
||||||
@effects[PBEffects::FutureSightUserPartyIndex] = -1
|
|
||||||
@effects[PBEffects::HealingWish] = false
|
|
||||||
@effects[PBEffects::LunarDance] = false
|
|
||||||
@effects[PBEffects::Wish] = 0
|
|
||||||
@effects[PBEffects::WishAmount] = 0
|
|
||||||
@effects[PBEffects::WishMaker] = -1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
rescue Exception
|
|
||||||
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
|
|
||||||
raise $!
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Simple battler class for the wild Pokémon in a Safari Zone battle
|
# Simple battler class for the wild Pokémon in a Safari Zone battle
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_FakeBattler
|
class Battle::FakeBattler
|
||||||
attr_reader :battle
|
attr_reader :battle
|
||||||
attr_reader :index
|
attr_reader :index
|
||||||
attr_reader :pokemon
|
attr_reader :pokemon
|
||||||
@@ -47,7 +47,7 @@ class PokeBattle_FakeBattler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def opposes?(i)
|
def opposes?(i)
|
||||||
i = i.index if i.is_a?(PokeBattle_FakeBattler)
|
i = i.index if i.is_a?(FakeBattler)
|
||||||
return (@index&1)!=(i&1)
|
return (@index&1)!=(i&1)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Data box for safari battles
|
# Data box for safari battles
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class SafariDataBox < SpriteWrapper
|
class Battle::Scene::SafariDataBox < SpriteWrapper
|
||||||
attr_accessor :selected
|
attr_accessor :selected
|
||||||
|
|
||||||
def initialize(battle,viewport=nil)
|
def initialize(battle,viewport=nil)
|
||||||
@@ -98,8 +98,8 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows the player throwing bait at a wild Pokémon in a Safari battle.
|
# Shows the player throwing bait at a wild Pokémon in a Safari battle.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class ThrowBaitAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::ThrowBait < Battle::Scene::Animation
|
||||||
include PokeBattle_BallAnimationMixin
|
include Battle::Scene::Animation::BallAnimationMixin
|
||||||
|
|
||||||
def initialize(sprites,viewport,battler)
|
def initialize(sprites,viewport,battler)
|
||||||
@battler = battler
|
@battler = battler
|
||||||
@@ -111,7 +111,7 @@ class ThrowBaitAnimation < PokeBattle_Animation
|
|||||||
# Calculate start and end coordinates for battler sprite movement
|
# Calculate start and end coordinates for battler sprite movement
|
||||||
batSprite = @sprites["pokemon_#{@battler.index}"]
|
batSprite = @sprites["pokemon_#{@battler.index}"]
|
||||||
traSprite = @sprites["player_1"]
|
traSprite = @sprites["player_1"]
|
||||||
ballPos = PokeBattle_SceneConstants.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
ballPos = Battle::Scene.pbBattlerPosition(@battler.index,batSprite.sideSize)
|
||||||
ballStartX = traSprite.x
|
ballStartX = traSprite.x
|
||||||
ballStartY = traSprite.y-traSprite.bitmap.height/2
|
ballStartY = traSprite.y-traSprite.bitmap.height/2
|
||||||
ballMidX = 0 # Unused in arc calculation
|
ballMidX = 0 # Unused in arc calculation
|
||||||
@@ -164,8 +164,8 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shows the player throwing a rock at a wild Pokémon in a Safari battle.
|
# Shows the player throwing a rock at a wild Pokémon in a Safari battle.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class ThrowRockAnimation < PokeBattle_Animation
|
class Battle::Scene::Animation::ThrowRock < Battle::Scene::Animation
|
||||||
include PokeBattle_BallAnimationMixin
|
include Battle::Scene::Animation::BallAnimationMixin
|
||||||
|
|
||||||
def initialize(sprites,viewport,battler)
|
def initialize(sprites,viewport,battler)
|
||||||
@battler = battler
|
@battler = battler
|
||||||
@@ -227,11 +227,11 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Safari Zone battle scene (the visuals of the battle)
|
# Safari Zone battle scene (the visuals of the battle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Scene
|
class Battle::Scene
|
||||||
def pbSafariStart
|
def pbSafariStart
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
@sprites["dataBox_0"] = SafariDataBox.new(@battle,@viewport)
|
@sprites["dataBox_0"] = SafariDataBox.new(@battle,@viewport)
|
||||||
dataBoxAnim = DataBoxAppearAnimation.new(@sprites,@viewport,0)
|
dataBoxAnim = Animation::DataBoxAppear.new(@sprites,@viewport,0)
|
||||||
loop do
|
loop do
|
||||||
dataBoxAnim.update
|
dataBoxAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -253,7 +253,7 @@ class PokeBattle_Scene
|
|||||||
|
|
||||||
def pbThrowBait
|
def pbThrowBait
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
baitAnim = ThrowBaitAnimation.new(@sprites,@viewport,@battle.battlers[1])
|
baitAnim = Animation::ThrowBait.new(@sprites,@viewport,@battle.battlers[1])
|
||||||
loop do
|
loop do
|
||||||
baitAnim.update
|
baitAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -264,7 +264,7 @@ class PokeBattle_Scene
|
|||||||
|
|
||||||
def pbThrowRock
|
def pbThrowRock
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
rockAnim = ThrowRockAnimation.new(@sprites,@viewport,@battle.battlers[1])
|
rockAnim = Animation::ThrowRock.new(@sprites,@viewport,@battle.battlers[1])
|
||||||
loop do
|
loop do
|
||||||
rockAnim.update
|
rockAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -276,7 +276,7 @@ class PokeBattle_Scene
|
|||||||
alias __safari__pbThrowSuccess pbThrowSuccess
|
alias __safari__pbThrowSuccess pbThrowSuccess
|
||||||
def pbThrowSuccess
|
def pbThrowSuccess
|
||||||
__safari__pbThrowSuccess
|
__safari__pbThrowSuccess
|
||||||
pbWildBattleSuccess if @battle.is_a?(PokeBattle_SafariZone)
|
pbWildBattleSuccess if @battle.is_a?(SafariBattle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Safari Zone battle class
|
# Safari Zone battle class
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_SafariZone
|
class SafariBattle
|
||||||
attr_reader :battlers # Array of fake battler objects
|
attr_reader :battlers # Array of fake battler objects
|
||||||
attr_accessor :sideSizes # Array of number of battlers per side
|
attr_accessor :sideSizes # Array of number of battlers per side
|
||||||
attr_accessor :backdrop # Filename fragment used for background graphics
|
attr_accessor :backdrop # Filename fragment used for background graphics
|
||||||
@@ -304,7 +304,7 @@ class PokeBattle_SafariZone
|
|||||||
attr_accessor :rules
|
attr_accessor :rules
|
||||||
attr_accessor :ballCount
|
attr_accessor :ballCount
|
||||||
|
|
||||||
include PokeBattle_BattleCommon
|
include Battle::Common
|
||||||
|
|
||||||
def pbRandom(x); return rand(x); end
|
def pbRandom(x); return rand(x); end
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ class PokeBattle_SafariZone
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
def initialize(scene,player,party2)
|
def initialize(scene,player,party2)
|
||||||
@scene = scene
|
@scene = scene
|
||||||
@peer = PokeBattle_BattlePeer.create()
|
@peer = Battle::Peer.new
|
||||||
@backdrop = ""
|
@backdrop = ""
|
||||||
@backdropBase = nil
|
@backdropBase = nil
|
||||||
@time = 0
|
@time = 0
|
||||||
@@ -325,8 +325,8 @@ class PokeBattle_SafariZone
|
|||||||
@party2 = party2
|
@party2 = party2
|
||||||
@sideSizes = [1,1]
|
@sideSizes = [1,1]
|
||||||
@battlers = [
|
@battlers = [
|
||||||
PokeBattle_FakeBattler.new(self,0),
|
Battle::FakeBattler.new(self,0),
|
||||||
PokeBattle_FakeBattler.new(self,1)
|
Battle::FakeBattler.new(self,1)
|
||||||
]
|
]
|
||||||
@rules = {}
|
@rules = {}
|
||||||
@ballCount = 0
|
@ballCount = 0
|
||||||
@@ -357,7 +357,7 @@ class PokeBattle_SafariZone
|
|||||||
|
|
||||||
def pbSetSeen(battler)
|
def pbSetSeen(battler)
|
||||||
return if !battler || !@internalBattle
|
return if !battler || !@internalBattle
|
||||||
if battler.is_a?(PokeBattle_Battler)
|
if battler.is_a?(Battle::Battler)
|
||||||
pbPlayer.pokedex.register(battler.displaySpecies, battler.displayGender,
|
pbPlayer.pokedex.register(battler.displaySpecies, battler.displayGender,
|
||||||
battler.displayForm, battler.shiny?)
|
battler.displayForm, battler.shiny?)
|
||||||
else
|
else
|
||||||
@@ -367,7 +367,7 @@ class PokeBattle_SafariZone
|
|||||||
|
|
||||||
def pbSetCaught(battler)
|
def pbSetCaught(battler)
|
||||||
return if !battler || !@internalBattle
|
return if !battler || !@internalBattle
|
||||||
if battler.is_a?(PokeBattle_Battler)
|
if battler.is_a?(Battle::Battler)
|
||||||
pbPlayer.pokedex.register_caught(battler.displaySpecies)
|
pbPlayer.pokedex.register_caught(battler.displaySpecies)
|
||||||
else
|
else
|
||||||
pbPlayer.pokedex.register_caught(battler.species)
|
pbPlayer.pokedex.register_caught(battler.species)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Bug Catching Contest battle scene (the visuals of the battle)
|
# Bug Catching Contest battle scene (the visuals of the battle)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Scene
|
class Battle::Scene
|
||||||
alias _bugContest_pbInitSprites pbInitSprites
|
alias _bugContest_pbInitSprites pbInitSprites
|
||||||
|
|
||||||
def pbInitSprites
|
def pbInitSprites
|
||||||
@@ -31,7 +31,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Bug Catching Contest battle class
|
# Bug Catching Contest battle class
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_BugContestBattle < PokeBattle_Battle
|
class BugContestBattle < Battle
|
||||||
attr_accessor :ballCount
|
attr_accessor :ballCount
|
||||||
|
|
||||||
def initialize(*arg)
|
def initialize(*arg)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_BattlePalace < PokeBattle_Battle
|
class BattlePalaceBattle < Battle
|
||||||
# Percentage chances of choosing attack, defense, support moves
|
# Percentage chances of choosing attack, defense, support moves
|
||||||
@@BattlePalaceUsualTable = {
|
@@BattlePalaceUsualTable = {
|
||||||
:HARDY => [61, 7, 32],
|
:HARDY => [61, 7, 32],
|
||||||
@@ -103,7 +103,7 @@ class PokeBattle_BattlePalace < PokeBattle_Battle
|
|||||||
else
|
else
|
||||||
@choices[idxBattler][0] = :UseMove # "Use move"
|
@choices[idxBattler][0] = :UseMove # "Use move"
|
||||||
@choices[idxBattler][1] = idxMove # Index of move to be used
|
@choices[idxBattler][1] = idxMove # Index of move to be used
|
||||||
@choices[idxBattler][2] = this_battler.moves[idxMove] # PokeBattle_Move object
|
@choices[idxBattler][2] = this_battler.moves[idxMove] # Battle::Move object
|
||||||
@choices[idxBattler][3] = -1 # No target chosen yet
|
@choices[idxBattler][3] = -1 # No target chosen yet
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -175,7 +175,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
attr_accessor :battlePalace
|
attr_accessor :battlePalace
|
||||||
|
|
||||||
alias _battlePalace_initialize initialize
|
alias _battlePalace_initialize initialize
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Success state
|
# Success state
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_SuccessState
|
class Battle::SuccessState
|
||||||
attr_accessor :typeMod
|
attr_accessor :typeMod
|
||||||
attr_accessor :useState # 0 - not used, 1 - failed, 2 - succeeded
|
attr_accessor :useState # 0 - not used, 1 - failed, 2 - succeeded
|
||||||
attr_accessor :protected
|
attr_accessor :protected
|
||||||
@@ -39,7 +39,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_BattleArena < PokeBattle_Battle
|
class BattleArenaBattle < Battle
|
||||||
def initialize(*arg)
|
def initialize(*arg)
|
||||||
super
|
super
|
||||||
@battlersChanged = true
|
@battlersChanged = true
|
||||||
@@ -209,7 +209,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_AI
|
class Battle::AI
|
||||||
attr_accessor :battleArena
|
attr_accessor :battleArena
|
||||||
|
|
||||||
alias _battleArena_pbEnemyShouldWithdraw? pbEnemyShouldWithdraw?
|
alias _battleArena_pbEnemyShouldWithdraw? pbEnemyShouldWithdraw?
|
||||||
@@ -225,7 +225,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Scene
|
class Battle::Scene
|
||||||
def pbBattleArenaUpdate
|
def pbBattleArenaUpdate
|
||||||
pbGraphicsUpdate
|
pbGraphicsUpdate
|
||||||
end
|
end
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
module PokeBattle_RecordedBattleModule
|
module RecordedBattleModule
|
||||||
attr_reader :randomnums
|
attr_reader :randomnums
|
||||||
attr_reader :rounds
|
attr_reader :rounds
|
||||||
|
|
||||||
@@ -135,45 +135,10 @@ module PokeBattle_RecordedBattleModule
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
module BattlePlayerHelper
|
module RecordedBattlePlaybackModule
|
||||||
def self.pbGetOpponent(battle)
|
|
||||||
return self.pbCreateTrainerInfo(battle[1]["opponent"])
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.pbGetBattleBGM(battle)
|
|
||||||
return self.pbGetTrainerBattleBGM(self.pbGetOpponent(battle))
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.pbCreateTrainerInfo(trainer)
|
|
||||||
return nil if !trainer
|
|
||||||
ret = []
|
|
||||||
trainer.each do |tr|
|
|
||||||
if tr.length == 4 # Player
|
|
||||||
t = Player.new(tr[1], tr[0])
|
|
||||||
t.id = tr[2]
|
|
||||||
t.badges = tr[3]
|
|
||||||
ret.push(t)
|
|
||||||
else # NPCTrainer
|
|
||||||
t = NPCTrainer.new(tr[1], tr[0])
|
|
||||||
t.id = tr[2]
|
|
||||||
ret.push(t)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return ret
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
|
||||||
#
|
|
||||||
#===============================================================================
|
|
||||||
module PokeBattle_BattlePlayerModule
|
|
||||||
module Commands
|
module Commands
|
||||||
Fight = 0
|
Fight = 0
|
||||||
Bag = 1
|
Bag = 1
|
||||||
@@ -193,8 +158,8 @@ module PokeBattle_BattlePlayerModule
|
|||||||
super(scene,
|
super(scene,
|
||||||
Marshal.restore(@properties["party1"]),
|
Marshal.restore(@properties["party1"]),
|
||||||
Marshal.restore(@properties["party2"]),
|
Marshal.restore(@properties["party2"]),
|
||||||
BattlePlayerHelper.pbCreateTrainerInfo(@properties["player"]),
|
RecordedBattle::PlaybackHelper.pbCreateTrainerInfo(@properties["player"]),
|
||||||
BattlePlayerHelper.pbCreateTrainerInfo(@properties["opponent"])
|
RecordedBattle::PlaybackHelper.pbCreateTrainerInfo(@properties["opponent"])
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -261,47 +226,66 @@ module PokeBattle_BattlePlayerModule
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_RecordedBattle < PokeBattle_Battle
|
class RecordedBattle < Battle
|
||||||
include PokeBattle_RecordedBattleModule
|
include RecordedBattleModule
|
||||||
|
|
||||||
def pbGetBattleType; return 0; end
|
def pbGetBattleType; return 0; end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class RecordedBattle::BattlePalaceBattle < BattlePalaceBattle
|
||||||
|
include RecordedBattleModule
|
||||||
class PokeBattle_RecordedBattlePalace < PokeBattle_BattlePalace
|
|
||||||
include PokeBattle_RecordedBattleModule
|
|
||||||
|
|
||||||
def pbGetBattleType; return 1; end
|
def pbGetBattleType; return 1; end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class RecordedBattle::BattleArenaBattle < BattleArenaBattle
|
||||||
|
include RecordedBattleModule
|
||||||
class PokeBattle_RecordedBattleArena < PokeBattle_BattleArena
|
|
||||||
include PokeBattle_RecordedBattleModule
|
|
||||||
|
|
||||||
def pbGetBattleType; return 2; end
|
def pbGetBattleType; return 2; end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class RecordedBattle::PlaybackBattle < Battle
|
||||||
|
include RecordedBattlePlaybackModule
|
||||||
class PokeBattle_BattlePlayer < PokeBattle_Battle
|
|
||||||
include PokeBattle_BattlePlayerModule
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class RecordedBattle::BattlePalacePlaybackBattle < BattlePalaceBattle
|
||||||
|
include RecordedBattlePlaybackModule
|
||||||
class PokeBattle_BattlePalacePlayer < PokeBattle_BattlePalace
|
|
||||||
include PokeBattle_BattlePlayerModule
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class RecordedBattle::BattleArenaPlaybackBattle < BattleArenaBattle
|
||||||
|
include RecordedBattlePlaybackModule
|
||||||
class PokeBattle_BattleArenaPlayer < PokeBattle_BattleArena
|
end
|
||||||
include PokeBattle_BattlePlayerModule
|
|
||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
#===============================================================================
|
||||||
|
module RecordedBattle::PlaybackHelper
|
||||||
|
def self.pbGetOpponent(battle)
|
||||||
|
return self.pbCreateTrainerInfo(battle[1]["opponent"])
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.pbGetBattleBGM(battle)
|
||||||
|
return self.pbGetTrainerBattleBGM(self.pbGetOpponent(battle))
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.pbCreateTrainerInfo(trainer)
|
||||||
|
return nil if !trainer
|
||||||
|
ret = []
|
||||||
|
trainer.each do |tr|
|
||||||
|
if tr.length == 4 # Player
|
||||||
|
t = Player.new(tr[1], tr[0])
|
||||||
|
t.id = tr[2]
|
||||||
|
t.badges = tr[3]
|
||||||
|
ret.push(t)
|
||||||
|
else # NPCTrainer
|
||||||
|
t = NPCTrainer.new(tr[1], tr[0])
|
||||||
|
t.id = tr[2]
|
||||||
|
ret.push(t)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -84,7 +84,7 @@ def setBattleRule(*args)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbNewBattleScene
|
def pbNewBattleScene
|
||||||
return PokeBattle_Scene.new
|
return Battle::Scene.new
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sets up various battle parameters and applies special rules.
|
# Sets up various battle parameters and applies special rules.
|
||||||
@@ -274,7 +274,7 @@ def pbWildBattleCore(*args)
|
|||||||
# Create the battle scene (the visual side of it)
|
# Create the battle scene (the visual side of it)
|
||||||
scene = pbNewBattleScene
|
scene = pbNewBattleScene
|
||||||
# Create the battle class (the mechanics side of it)
|
# Create the battle class (the mechanics side of it)
|
||||||
battle = PokeBattle_Battle.new(scene,playerParty,foeParty,playerTrainers,nil)
|
battle = Battle.new(scene,playerParty,foeParty,playerTrainers,nil)
|
||||||
battle.party1starts = playerPartyStarts
|
battle.party1starts = playerPartyStarts
|
||||||
# Set various other properties in the battle class
|
# Set various other properties in the battle class
|
||||||
pbPrepareBattle(battle)
|
pbPrepareBattle(battle)
|
||||||
@@ -426,7 +426,7 @@ def pbTrainerBattleCore(*args)
|
|||||||
# Create the battle scene (the visual side of it)
|
# Create the battle scene (the visual side of it)
|
||||||
scene = pbNewBattleScene
|
scene = pbNewBattleScene
|
||||||
# Create the battle class (the mechanics side of it)
|
# Create the battle class (the mechanics side of it)
|
||||||
battle = PokeBattle_Battle.new(scene,playerParty,foeParty,playerTrainers,foeTrainers)
|
battle = Battle.new(scene,playerParty,foeParty,playerTrainers,foeTrainers)
|
||||||
battle.party1starts = playerPartyStarts
|
battle.party1starts = playerPartyStarts
|
||||||
battle.party2starts = foePartyStarts
|
battle.party2starts = foePartyStarts
|
||||||
battle.items = foeItems
|
battle.items = foeItems
|
||||||
|
|||||||
@@ -640,7 +640,7 @@ MultipleForms.register(:ZACIAN, {
|
|||||||
move.id = :BEHEMOTHBLADE
|
move.id = :BEHEMOTHBLADE
|
||||||
battler.moves.each_with_index do |b_move, i|
|
battler.moves.each_with_index do |b_move, i|
|
||||||
next if b_move.id != :IRONHEAD
|
next if b_move.id != :IRONHEAD
|
||||||
battler.moves[i] = PokeBattle_Move.from_pokemon_move(battle, move)
|
battler.moves[i] = Battle::Move.from_pokemon_move(battle, move)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -665,7 +665,7 @@ MultipleForms.register(:ZAMAZENTA, {
|
|||||||
move.id = :BEHEMOTHBASH
|
move.id = :BEHEMOTHBASH
|
||||||
battler.moves.each_with_index do |b_move, i|
|
battler.moves.each_with_index do |b_move, i|
|
||||||
next if b_move.id != :IRONHEAD
|
next if b_move.id != :IRONHEAD
|
||||||
battler.moves[i] = PokeBattle_Move.from_pokemon_move(battle, move)
|
battler.moves[i] = Battle::Move.from_pokemon_move(battle, move)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Shadow Pokémon in battle.
|
# Shadow Pokémon in battle.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Battle
|
class Battle
|
||||||
alias __shadow__pbCanUseItemOnPokemon? pbCanUseItemOnPokemon?
|
alias __shadow__pbCanUseItemOnPokemon? pbCanUseItemOnPokemon?
|
||||||
|
|
||||||
def pbCanUseItemOnPokemon?(item,pkmn,battler,scene,showMessages=true)
|
def pbCanUseItemOnPokemon?(item,pkmn,battler,scene,showMessages=true)
|
||||||
@@ -182,7 +182,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PokeBattle_Battler
|
class Battle::Battler
|
||||||
alias __shadow__pbInitPokemon pbInitPokemon
|
alias __shadow__pbInitPokemon pbInitPokemon
|
||||||
|
|
||||||
def pbInitPokemon(*arg)
|
def pbInitPokemon(*arg)
|
||||||
@@ -316,7 +316,7 @@ ItemHandlers::BattleUseOnBattler.add(:VIVIDSCENT,proc { |item,battler,scene|
|
|||||||
# Two turn attack. On first turn, halves the HP of all active Pokémon.
|
# Two turn attack. On first turn, halves the HP of all active Pokémon.
|
||||||
# Skips second turn (if successful). (Shadow Half)
|
# Skips second turn (if successful). (Shadow Half)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_AllBattlersLoseHalfHPUserSkipsNextTurn < PokeBattle_Move
|
class Battle::Move::AllBattlersLoseHalfHPUserSkipsNextTurn < Battle::Move
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if @battle.allBattlers.none? { |b| b.hp > 1 }
|
if @battle.allBattlers.none? { |b| b.hp > 1 }
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -341,7 +341,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# User takes recoil damage equal to 1/2 of its current HP. (Shadow End)
|
# User takes recoil damage equal to 1/2 of its current HP. (Shadow End)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_UserLosesHalfHP < PokeBattle_RecoilMove
|
class Battle::Move::UserLosesHalfHP < Battle::Move::RecoilMove
|
||||||
def pbRecoilDamage(user,target)
|
def pbRecoilDamage(user,target)
|
||||||
return (target.damageState.totalHPLost/2.0).round
|
return (target.damageState.totalHPLost/2.0).round
|
||||||
end
|
end
|
||||||
@@ -362,7 +362,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Starts shadow weather. (Shadow Sky)
|
# Starts shadow weather. (Shadow Sky)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_StartShadowSkyWeather < PokeBattle_WeatherMove
|
class Battle::Move::StartShadowSkyWeather < Battle::Move::WeatherMove
|
||||||
def initialize(battle,move)
|
def initialize(battle,move)
|
||||||
super
|
super
|
||||||
@weatherType = :ShadowSky
|
@weatherType = :ShadowSky
|
||||||
@@ -375,7 +375,7 @@ end
|
|||||||
# Ends the effects of Light Screen, Reflect and Safeguard on both sides.
|
# Ends the effects of Light Screen, Reflect and Safeguard on both sides.
|
||||||
# (Shadow Shed)
|
# (Shadow Shed)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_RemoveAllScreens < PokeBattle_Move
|
class Battle::Move::RemoveAllScreens < Battle::Move
|
||||||
def pbEffectGeneral(user)
|
def pbEffectGeneral(user)
|
||||||
for i in @battle.sides
|
for i in @battle.sides
|
||||||
i.effects[PBEffects::AuroraVeil] = 0
|
i.effects[PBEffects::AuroraVeil] = 0
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattleType
|
class BattleType
|
||||||
def pbCreateBattle(scene, trainer1, trainer2)
|
def pbCreateBattle(scene, trainer1, trainer2)
|
||||||
return PokeBattle_Battle.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
return Battle.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattleTower < BattleType
|
class BattleTower < BattleType
|
||||||
def pbCreateBattle(scene, trainer1, trainer2)
|
def pbCreateBattle(scene, trainer1, trainer2)
|
||||||
return PokeBattle_RecordedBattle.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
return RecordedBattle.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattlePalace < BattleType
|
class BattlePalace < BattleType
|
||||||
def pbCreateBattle(scene, trainer1, trainer2)
|
def pbCreateBattle(scene, trainer1, trainer2)
|
||||||
return PokeBattle_RecordedBattlePalace.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
return RecordedBattle::BattlePalaceBattle.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class BattleArena < BattleType
|
class BattleArena < BattleType
|
||||||
def pbCreateBattle(scene, trainer1, trainer2)
|
def pbCreateBattle(scene, trainer1, trainer2)
|
||||||
return PokeBattle_RecordedBattleArena.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
return RecordedBattle::BattleArenaBattle.new(scene, trainer1.party, trainer2.party, trainer1, trainer2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -119,13 +119,13 @@ def pbPlayBattle(battledata)
|
|||||||
lastbattle = Marshal.restore(battledata)
|
lastbattle = Marshal.restore(battledata)
|
||||||
case lastbattle[0]
|
case lastbattle[0]
|
||||||
when BattleChallenge::BattleTowerID
|
when BattleChallenge::BattleTowerID
|
||||||
battleplayer = PokeBattle_BattlePlayer.new(scene, lastbattle)
|
battleplayer = RecordedBattle::PlaybackBattle.new(scene, lastbattle)
|
||||||
when BattleChallenge::BattlePalaceID
|
when BattleChallenge::BattlePalaceID
|
||||||
battleplayer = PokeBattle_BattlePalacePlayer.new(scene, lastbattle)
|
battleplayer = RecordedBattle::BattlePalacePlaybackBattle.new(scene, lastbattle)
|
||||||
when BattleChallenge::BattleArenaID
|
when BattleChallenge::BattleArenaID
|
||||||
battleplayer = PokeBattle_BattleArenaPlayer.new(scene, lastbattle)
|
battleplayer = RecordedBattle::BattleArenaPlaybackBattle.new(scene, lastbattle)
|
||||||
end
|
end
|
||||||
bgm = BattlePlayerHelper.pbGetBattleBGM(lastbattle)
|
bgm = RecordedBattle::PlaybackHelper.pbGetBattleBGM(lastbattle)
|
||||||
pbBattleAnimation(bgm) {
|
pbBattleAnimation(bgm) {
|
||||||
pbSceneStandby {
|
pbSceneStandby {
|
||||||
battleplayer.pbStartBattle
|
battleplayer.pbStartBattle
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ def pbSafariBattle(species,level)
|
|||||||
# Create the battle scene (the visual side of it)
|
# Create the battle scene (the visual side of it)
|
||||||
scene = pbNewBattleScene
|
scene = pbNewBattleScene
|
||||||
# Create the battle class (the mechanics side of it)
|
# Create the battle class (the mechanics side of it)
|
||||||
battle = PokeBattle_SafariZone.new(scene,playerTrainer,foeParty)
|
battle = SafariBattle.new(scene,playerTrainer,foeParty)
|
||||||
battle.ballCount = pbSafariState.ballcount
|
battle.ballCount = pbSafariState.ballcount
|
||||||
pbPrepareBattle(battle)
|
pbPrepareBattle(battle)
|
||||||
# Perform the battle itself
|
# Perform the battle itself
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ def pbBugContestBattle(species,level)
|
|||||||
# Create the battle scene (the visual side of it)
|
# Create the battle scene (the visual side of it)
|
||||||
scene = pbNewBattleScene
|
scene = pbNewBattleScene
|
||||||
# Create the battle class (the mechanics side of it)
|
# Create the battle class (the mechanics side of it)
|
||||||
battle = PokeBattle_BugContestBattle.new(scene,playerParty,foeParty,playerTrainer,nil)
|
battle = BugContestBattle.new(scene,playerParty,foeParty,playerTrainer,nil)
|
||||||
battle.party1starts = playerPartyStarts
|
battle.party1starts = playerPartyStarts
|
||||||
battle.ballCount = pbBugContestState.ballcount
|
battle.ballCount = pbBugContestState.ballcount
|
||||||
setBattleRule("single")
|
setBattleRule("single")
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ def pbRuledBattle(team1, team2, rule)
|
|||||||
items2[i] = p.item_id
|
items2[i] = p.item_id
|
||||||
trainer2.party.push(p)
|
trainer2.party.push(p)
|
||||||
end
|
end
|
||||||
scene = PokeBattle_DebugSceneNoLogging.new
|
scene = Battle::DebugSceneNoLogging.new
|
||||||
battle = rule.createBattle(scene, trainer1, trainer2)
|
battle = rule.createBattle(scene, trainer1, trainer2)
|
||||||
battle.debug = true
|
battle.debug = true
|
||||||
battle.controlPlayer = true
|
battle.controlPlayer = true
|
||||||
|
|||||||
@@ -54,13 +54,13 @@ class SpritePositioner
|
|||||||
@sprites["battle_bg"] = AnimatedPlane.new(@viewport)
|
@sprites["battle_bg"] = AnimatedPlane.new(@viewport)
|
||||||
@sprites["battle_bg"].setBitmap(battlebg)
|
@sprites["battle_bg"].setBitmap(battlebg)
|
||||||
@sprites["battle_bg"].z = 0
|
@sprites["battle_bg"].z = 0
|
||||||
baseX, baseY = PokeBattle_SceneConstants.pbBattlerPosition(0)
|
baseX, baseY = Battle::Scene.pbBattlerPosition(0)
|
||||||
@sprites["base_0"] = IconSprite.new(baseX, baseY, @viewport)
|
@sprites["base_0"] = IconSprite.new(baseX, baseY, @viewport)
|
||||||
@sprites["base_0"].setBitmap(playerbase)
|
@sprites["base_0"].setBitmap(playerbase)
|
||||||
@sprites["base_0"].x -= @sprites["base_0"].bitmap.width / 2 if @sprites["base_0"].bitmap
|
@sprites["base_0"].x -= @sprites["base_0"].bitmap.width / 2 if @sprites["base_0"].bitmap
|
||||||
@sprites["base_0"].y -= @sprites["base_0"].bitmap.height if @sprites["base_0"].bitmap
|
@sprites["base_0"].y -= @sprites["base_0"].bitmap.height if @sprites["base_0"].bitmap
|
||||||
@sprites["base_0"].z = 1
|
@sprites["base_0"].z = 1
|
||||||
baseX, baseY = PokeBattle_SceneConstants.pbBattlerPosition(1)
|
baseX, baseY = Battle::Scene.pbBattlerPosition(1)
|
||||||
@sprites["base_1"] = IconSprite.new(baseX, baseY, @viewport)
|
@sprites["base_1"] = IconSprite.new(baseX, baseY, @viewport)
|
||||||
@sprites["base_1"].setBitmap(enemybase)
|
@sprites["base_1"].setBitmap(enemybase)
|
||||||
@sprites["base_1"].x -= @sprites["base_1"].bitmap.width / 2 if @sprites["base_1"].bitmap
|
@sprites["base_1"].x -= @sprites["base_1"].bitmap.width / 2 if @sprites["base_1"].bitmap
|
||||||
@@ -118,7 +118,7 @@ class SpritePositioner
|
|||||||
end
|
end
|
||||||
metrics_data = GameData::SpeciesMetrics.get_species_form(@species, @form)
|
metrics_data = GameData::SpeciesMetrics.get_species_form(@species, @form)
|
||||||
for i in 0...2
|
for i in 0...2
|
||||||
pos = PokeBattle_SceneConstants.pbBattlerPosition(i, 1)
|
pos = Battle::Scene.pbBattlerPosition(i, 1)
|
||||||
@sprites["pokemon_#{i}"].x = pos[0]
|
@sprites["pokemon_#{i}"].x = pos[0]
|
||||||
@sprites["pokemon_#{i}"].y = pos[1]
|
@sprites["pokemon_#{i}"].y = pos[1]
|
||||||
metrics_data.apply_metrics_to_sprite(@sprites["pokemon_#{i}"], i)
|
metrics_data.apply_metrics_to_sprite(@sprites["pokemon_#{i}"], i)
|
||||||
|
|||||||
@@ -524,12 +524,12 @@ class AnimationCanvas < Sprite
|
|||||||
@sprites["pokemon_1"].bitmap=@target
|
@sprites["pokemon_1"].bitmap=@target
|
||||||
@sprites["pokemon_1"].z=16
|
@sprites["pokemon_1"].z=16
|
||||||
pbSpriteSetAnimFrame(@sprites["pokemon_0"],
|
pbSpriteSetAnimFrame(@sprites["pokemon_0"],
|
||||||
pbCreateCel(PokeBattle_SceneConstants::FOCUSUSER_X,
|
pbCreateCel(Battle::Scene::FOCUSUSER_X,
|
||||||
PokeBattle_SceneConstants::FOCUSUSER_Y,-1,2),
|
Battle::Scene::FOCUSUSER_Y,-1,2),
|
||||||
@sprites["pokemon_0"],@sprites["pokemon_1"])
|
@sprites["pokemon_0"],@sprites["pokemon_1"])
|
||||||
pbSpriteSetAnimFrame(@sprites["pokemon_1"],
|
pbSpriteSetAnimFrame(@sprites["pokemon_1"],
|
||||||
pbCreateCel(PokeBattle_SceneConstants::FOCUSTARGET_X,
|
pbCreateCel(Battle::Scene::FOCUSTARGET_X,
|
||||||
PokeBattle_SceneConstants::FOCUSTARGET_Y,-2,1),
|
Battle::Scene::FOCUSTARGET_Y,-2,1),
|
||||||
@sprites["pokemon_0"],@sprites["pokemon_1"])
|
@sprites["pokemon_0"],@sprites["pokemon_1"])
|
||||||
usersprite=@sprites["pokemon_#{oppmove ? 1 : 0}"]
|
usersprite=@sprites["pokemon_#{oppmove ? 1 : 0}"]
|
||||||
targetsprite=@sprites["pokemon_#{oppmove ? 0 : 1}"]
|
targetsprite=@sprites["pokemon_#{oppmove ? 0 : 1}"]
|
||||||
@@ -540,8 +540,8 @@ class AnimationCanvas < Sprite
|
|||||||
@player=PBAnimationPlayerX.new(@animation,
|
@player=PBAnimationPlayerX.new(@animation,
|
||||||
@battle.battlers[oppmove ? 1 : 0],@battle.battlers[oppmove ? 0 : 1],self,oppmove,true)
|
@battle.battlers[oppmove ? 1 : 0],@battle.battlers[oppmove ? 0 : 1],self,oppmove,true)
|
||||||
@player.setLineTransform(
|
@player.setLineTransform(
|
||||||
PokeBattle_SceneConstants::FOCUSUSER_X,PokeBattle_SceneConstants::FOCUSUSER_Y,
|
Battle::Scene::FOCUSUSER_X,Battle::Scene::FOCUSUSER_Y,
|
||||||
PokeBattle_SceneConstants::FOCUSTARGET_X,PokeBattle_SceneConstants::FOCUSTARGET_Y,
|
Battle::Scene::FOCUSTARGET_X,Battle::Scene::FOCUSTARGET_Y,
|
||||||
olduserx,oldusery,
|
olduserx,oldusery,
|
||||||
oldtargetx,oldtargety)
|
oldtargetx,oldtargety)
|
||||||
@player.start
|
@player.start
|
||||||
|
|||||||
@@ -104,17 +104,17 @@ def pbConvertAnimToNewFormat(textdata)
|
|||||||
textdata[i][j][AnimFrame::PRIORITY]=1 if textdata[i][j][AnimFrame::PRIORITY]==nil
|
textdata[i][j][AnimFrame::PRIORITY]=1 if textdata[i][j][AnimFrame::PRIORITY]==nil
|
||||||
if j==0 # User battler
|
if j==0 # User battler
|
||||||
textdata[i][j][AnimFrame::FOCUS]=2
|
textdata[i][j][AnimFrame::FOCUS]=2
|
||||||
textdata[i][j][AnimFrame::X]=PokeBattle_SceneConstants::FOCUSUSER_X
|
textdata[i][j][AnimFrame::X]=Battle::Scene::FOCUSUSER_X
|
||||||
textdata[i][j][AnimFrame::Y]=PokeBattle_SceneConstants::FOCUSUSER_Y
|
textdata[i][j][AnimFrame::Y]=Battle::Scene::FOCUSUSER_Y
|
||||||
elsif j==1 # Target battler
|
elsif j==1 # Target battler
|
||||||
textdata[i][j][AnimFrame::FOCUS]=1
|
textdata[i][j][AnimFrame::FOCUS]=1
|
||||||
textdata[i][j][AnimFrame::X]=PokeBattle_SceneConstants::FOCUSTARGET_X
|
textdata[i][j][AnimFrame::X]=Battle::Scene::FOCUSTARGET_X
|
||||||
textdata[i][j][AnimFrame::Y]=PokeBattle_SceneConstants::FOCUSTARGET_Y
|
textdata[i][j][AnimFrame::Y]=Battle::Scene::FOCUSTARGET_Y
|
||||||
else
|
else
|
||||||
textdata[i][j][AnimFrame::FOCUS]=(textdata.position || 4)
|
textdata[i][j][AnimFrame::FOCUS]=(textdata.position || 4)
|
||||||
if textdata.position==1
|
if textdata.position==1
|
||||||
textdata[i][j][AnimFrame::X]+=PokeBattle_SceneConstants::FOCUSTARGET_X
|
textdata[i][j][AnimFrame::X]+=Battle::Scene::FOCUSTARGET_X
|
||||||
textdata[i][j][AnimFrame::Y]+=PokeBattle_SceneConstants::FOCUSTARGET_Y-2
|
textdata[i][j][AnimFrame::Y]+=Battle::Scene::FOCUSTARGET_Y-2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user