Moved all settings into module Settings

This commit is contained in:
Maruno17
2021-02-01 21:03:58 +00:00
parent 923844fdc7
commit 1209b804e9
88 changed files with 848 additions and 839 deletions

View File

@@ -71,7 +71,7 @@ class PokeBattle_Move
# NOTE: This method is only ever called while using a move (and also by the
# AI), so using @calcType here is acceptable.
def physicalMove?(thisType=nil)
return (@category==0) if MOVE_CATEGORY_PER_MOVE
return (@category==0) if Settings::MOVE_CATEGORY_PER_MOVE
thisType ||= @calcType
thisType ||= @type
return true if !thisType
@@ -81,7 +81,7 @@ class PokeBattle_Move
# NOTE: This method is only ever called while using a move (and also by the
# AI), so using @calcType here is acceptable.
def specialMove?(thisType=nil)
return (@category==1) if MOVE_CATEGORY_PER_MOVE
return (@category==1) if Settings::MOVE_CATEGORY_PER_MOVE
thisType ||= @calcType
thisType ||= @type
return false if !thisType
@@ -132,7 +132,7 @@ class PokeBattle_Move
def nonLethal?(_user,_target); return false; end # For False Swipe
def ignoresSubstitute?(user) # user is the Pokémon using this move
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
return true if soundMove?
return true if user && user.hasActiveAbility?(:INFILTRATOR)
end

View File

@@ -161,7 +161,7 @@ class PokeBattle_Move
def pbIsCritical?(user,target)
return false if target.pbOwnSide.effects[PBEffects::LuckyChant]>0
# Set up the critical hit ratios
ratios = (NEW_CRITICAL_HIT_RATE_MECHANICS) ? [24,8,2,1] : [16,8,4,3,2]
ratios = (Settings::NEW_CRITICAL_HIT_RATE_MECHANICS) ? [24,8,2,1] : [16,8,4,3,2]
c = 0
# Ability effects that alter critical hit rate
if c>=0 && user.abilityActive?
@@ -357,16 +357,16 @@ class PokeBattle_Move
# Badge multipliers
if @battle.internalBattle
if user.pbOwnedByPlayer?
if physicalMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_ATTACK
if physicalMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_ATTACK
multipliers[:attack_multiplier] *= 1.1
elsif specialMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_SPATK
elsif specialMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_SPATK
multipliers[:attack_multiplier] *= 1.1
end
end
if target.pbOwnedByPlayer?
if physicalMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_DEFENSE
if physicalMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_DEFENSE
multipliers[:defense_multiplier] *= 1.1
elsif specialMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_SPDEF
elsif specialMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_SPDEF
multipliers[:defense_multiplier] *= 1.1
end
end
@@ -396,7 +396,7 @@ class PokeBattle_Move
end
# Critical hits
if target.damageState.critical
if NEW_CRITICAL_HIT_RATE_MECHANICS
if Settings::NEW_CRITICAL_HIT_RATE_MECHANICS
multipliers[:final_damage_multiplier] *= 1.5
else
multipliers[:final_damage_multiplier] *= 2
@@ -461,7 +461,7 @@ class PokeBattle_Move
def pbAdditionalEffectChance(user,target,effectChance=0)
return 0 if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker
ret = (effectChance>0) ? effectChance : @addlEffect
if MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power
if Settings::MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power
ret *= 2 if user.hasActiveAbility?(:SERENEGRACE) ||
user.pbOwnSide.effects[PBEffects::Rainbow]>0
end

View File

@@ -555,7 +555,7 @@ class PokeBattle_ProtectMove < PokeBattle_Move
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
if (!@sidedEffect || MECHANICS_GENERATION <= 5) &&
if (!@sidedEffect || Settings::MECHANICS_GENERATION <= 5) &&
user.effects[PBEffects::ProtectRate]>1 &&
@battle.pbRandom(user.effects[PBEffects::ProtectRate])!=0
user.effects[PBEffects::ProtectRate] = 1
@@ -575,7 +575,7 @@ class PokeBattle_ProtectMove < PokeBattle_Move
else
user.effects[@effect] = true
end
user.effects[PBEffects::ProtectRate] *= (MECHANICS_GENERATION >= 6) ? 3 : 2
user.effects[PBEffects::ProtectRate] *= (Settings::MECHANICS_GENERATION >= 6) ? 3 : 2
pbProtectMessage(user)
end

View File

@@ -32,7 +32,7 @@ end
#===============================================================================
class PokeBattle_Move_003 < PokeBattle_SleepMove
def pbMoveFailed?(user,targets)
if MECHANICS_GENERATION >= 7 && @id == :DARKVOID
if Settings::MECHANICS_GENERATION >= 7 && @id == :DARKVOID
if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI
@battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis))
return true
@@ -93,7 +93,7 @@ class PokeBattle_Move_006 < PokeBattle_PoisonMove
end
def pbOverrideSuccessCheckPerHit(user,target)
return (MORE_TYPE_EFFECTS && statusMove? && user.pbHasType?(:POISON))
return (Settings::MORE_TYPE_EFFECTS && statusMove? && user.pbHasType?(:POISON))
end
end
@@ -107,7 +107,7 @@ end
class PokeBattle_Move_007 < PokeBattle_ParalysisMove
def tramplesMinimize?(param=1)
# Perfect accuracy and double damage (for Body Slam only)
return MECHANICS_GENERATION >= 6 if @id == :BODYSLAM
return Settings::MECHANICS_GENERATION >= 6 if @id == :BODYSLAM
return super
end
@@ -241,8 +241,8 @@ end
#===============================================================================
class PokeBattle_Move_010 < PokeBattle_FlinchMove
def tramplesMinimize?(param=1)
return super if @id == :DRAGONRUSH && MECHANICS_GENERATION <= 5
return true if param==1 && MECHANICS_GENERATION >= 6 # Perfect accuracy
return super if @id == :DRAGONRUSH && Settings::MECHANICS_GENERATION <= 5
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
return true if param==2 # Double damage
return super
end
@@ -1254,7 +1254,7 @@ end
class PokeBattle_Move_048 < PokeBattle_TargetStatDownMove
def initialize(battle,move)
super
@statDown = [PBStats::EVASION,(MECHANICS_GENERATION >= 6) ? 2 : 1]
@statDown = [PBStats::EVASION, (Settings::MECHANICS_GENERATION >= 6) ? 2 : 1]
end
end
@@ -1284,12 +1284,12 @@ class PokeBattle_Move_049 < PokeBattle_TargetStatDownMove
targetSide.effects[PBEffects::Spikes]>0 ||
targetSide.effects[PBEffects::ToxicSpikes]>0 ||
targetSide.effects[PBEffects::StickyWeb]
return false if MECHANICS_GENERATION >= 6 &&
return false if Settings::MECHANICS_GENERATION >= 6 &&
(targetOpposingSide.effects[PBEffects::StealthRock] ||
targetOpposingSide.effects[PBEffects::Spikes]>0 ||
targetOpposingSide.effects[PBEffects::ToxicSpikes]>0 ||
targetOpposingSide.effects[PBEffects::StickyWeb])
return false if MECHANICS_GENERATION >= 8 &&
return false if Settings::MECHANICS_GENERATION >= 8 &&
@battle.field.terrain != PBBattleTerrains::None
return super
end
@@ -1319,34 +1319,34 @@ class PokeBattle_Move_049 < PokeBattle_TargetStatDownMove
@battle.pbDisplay(_INTL("{1} is no longer protected by Safeguard!!",target.pbTeam))
end
if target.pbOwnSide.effects[PBEffects::StealthRock] ||
(MECHANICS_GENERATION >= 6 &&
(Settings::MECHANICS_GENERATION >= 6 &&
target.pbOpposingSide.effects[PBEffects::StealthRock])
target.pbOwnSide.effects[PBEffects::StealthRock] = false
target.pbOpposingSide.effects[PBEffects::StealthRock] = false if MECHANICS_GENERATION >= 6
target.pbOpposingSide.effects[PBEffects::StealthRock] = false if Settings::MECHANICS_GENERATION >= 6
@battle.pbDisplay(_INTL("{1} blew away stealth rocks!",user.pbThis))
end
if target.pbOwnSide.effects[PBEffects::Spikes]>0 ||
(MECHANICS_GENERATION >= 6 &&
(Settings::MECHANICS_GENERATION >= 6 &&
target.pbOpposingSide.effects[PBEffects::Spikes]>0)
target.pbOwnSide.effects[PBEffects::Spikes] = 0
target.pbOpposingSide.effects[PBEffects::Spikes] = 0 if MECHANICS_GENERATION >= 6
target.pbOpposingSide.effects[PBEffects::Spikes] = 0 if Settings::MECHANICS_GENERATION >= 6
@battle.pbDisplay(_INTL("{1} blew away spikes!",user.pbThis))
end
if target.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 ||
(MECHANICS_GENERATION >= 6 &&
(Settings::MECHANICS_GENERATION >= 6 &&
target.pbOpposingSide.effects[PBEffects::ToxicSpikes]>0)
target.pbOwnSide.effects[PBEffects::ToxicSpikes] = 0
target.pbOpposingSide.effects[PBEffects::ToxicSpikes] = 0 if MECHANICS_GENERATION >= 6
target.pbOpposingSide.effects[PBEffects::ToxicSpikes] = 0 if Settings::MECHANICS_GENERATION >= 6
@battle.pbDisplay(_INTL("{1} blew away poison spikes!",user.pbThis))
end
if target.pbOwnSide.effects[PBEffects::StickyWeb] ||
(MECHANICS_GENERATION >= 6 &&
(Settings::MECHANICS_GENERATION >= 6 &&
target.pbOpposingSide.effects[PBEffects::StickyWeb])
target.pbOwnSide.effects[PBEffects::StickyWeb] = false
target.pbOpposingSide.effects[PBEffects::StickyWeb] = false if MECHANICS_GENERATION >= 6
target.pbOpposingSide.effects[PBEffects::StickyWeb] = false if Settings::MECHANICS_GENERATION >= 6
@battle.pbDisplay(_INTL("{1} blew away sticky webs!",user.pbThis))
end
if MECHANICS_GENERATION >= 8 && @battle.field.terrain != PBBattleTerrains::None
if Settings::MECHANICS_GENERATION >= 8 && @battle.field.terrain != PBBattleTerrains::None
case @battle.field.terrain
when PBBattleTerrains::Electric
@battle.pbDisplay(_INTL("The electricity disappeared from the battlefield."))
@@ -1407,7 +1407,7 @@ class PokeBattle_Move_04D < PokeBattle_TargetStatDownMove
def initialize(battle,move)
super
inc = 2
inc = 1 if @id == :STRINGSHOT && MECHANICS_GENERATION <= 5
inc = 1 if @id == :STRINGSHOT && Settings::MECHANICS_GENERATION <= 5
@statDown = [PBStats::SPEED,inc]
end
end
@@ -1561,7 +1561,7 @@ class PokeBattle_Move_055 < PokeBattle_Move
def pbEffectAgainstTarget(user,target)
PBStats.eachBattleStat { |s| user.stages[s] = target.stages[s] }
if NEW_CRITICAL_HIT_RATE_MECHANICS
if Settings::NEW_CRITICAL_HIT_RATE_MECHANICS
user.effects[PBEffects::FocusEnergy] = target.effects[PBEffects::FocusEnergy]
user.effects[PBEffects::LaserFocus] = target.effects[PBEffects::LaserFocus]
end
@@ -1796,7 +1796,7 @@ class PokeBattle_Move_05E < PokeBattle_Move
userTypes = user.pbTypes(true)
@newTypes = []
user.eachMoveWithIndex do |m,i|
break if MECHANICS_GENERATION >= 6 && i>0
break if Settings::MECHANICS_GENERATION >= 6 && i>0
next if PBTypes.isPseudoType?(m.type)
next if userTypes.include?(m.type)
@newTypes.push(m.type) if !@newTypes.include?(m.type)
@@ -2169,7 +2169,7 @@ class PokeBattle_Move_067 < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if !target.ability ||
(user.ability == target.ability && MECHANICS_GENERATION <= 5)
(user.ability == target.ability && Settings::MECHANICS_GENERATION <= 5)
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
@@ -2371,7 +2371,7 @@ class PokeBattle_Move_070 < PokeBattle_FixedDamageMove
@battle.pbHideAbilitySplash(target)
return true
end
if MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && target.pbHasType?(:ICE)
if Settings::MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && target.pbHasType?(:ICE)
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
@@ -2380,7 +2380,7 @@ class PokeBattle_Move_070 < PokeBattle_FixedDamageMove
def pbAccuracyCheck(user,target)
acc = @accuracy+user.level-target.level
acc -= 10 if MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && !user.pbHasType?(:ICE)
acc -= 10 if Settings::MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && !user.pbHasType?(:ICE)
return @battle.pbRandom(100)<acc
end
@@ -2699,7 +2699,7 @@ end
# Burn's halving of Attack is negated (new mechanics).
#===============================================================================
class PokeBattle_Move_07E < PokeBattle_Move
def damageReducedByBurn?; return MECHANICS_GENERATION <= 5; end
def damageReducedByBurn?; return Settings::MECHANICS_GENERATION <= 5; end
def pbBaseDamage(baseDmg,user,target)
baseDmg *= 2 if user.poisoned? || user.burned? || user.paralyzed?

View File

@@ -248,7 +248,7 @@ class PokeBattle_Move_090 < PokeBattle_Move
end
def pbBaseDamage(baseDmg,user,target)
return super if MECHANICS_GENERATION >= 6
return super if Settings::MECHANICS_GENERATION >= 6
hp = pbHiddenPower(user)
return hp[1]
end
@@ -272,7 +272,7 @@ def pbHiddenPower(pkmn)
idxType |= (iv[PBStats::SPDEF]&1)<<5
idxType = (types.length-1)*idxType/63
type = types[idxType]
if MECHANICS_GENERATION <= 5
if Settings::MECHANICS_GENERATION <= 5
powerMin = 30
powerMax = 70
power |= (iv[PBStats::HP]&2)>>1
@@ -503,7 +503,7 @@ class PokeBattle_Move_096 < PokeBattle_Move
@damageArray.each do |dmg, items|
next if !items.include?(heldItem)
ret = dmg
ret += 20 if MECHANICS_GENERATION >= 6
ret += 20 if Settings::MECHANICS_GENERATION >= 6
break
end
return ret
@@ -600,7 +600,7 @@ end
#===============================================================================
class PokeBattle_Move_09B < PokeBattle_Move
def tramplesMinimize?(param=1)
return true if MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage
return true if Settings::MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage
return super
end
@@ -646,7 +646,7 @@ end
#===============================================================================
class PokeBattle_Move_09D < PokeBattle_Move
def pbMoveFailed?(user,targets)
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
if @battle.field.effects[PBEffects::MudSportField]>0
@battle.pbDisplay(_INTL("But it failed!"))
return true
@@ -662,7 +662,7 @@ class PokeBattle_Move_09D < PokeBattle_Move
end
def pbEffectGeneral(user)
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@battle.field.effects[PBEffects::MudSportField] = 5
else
user.effects[PBEffects::MudSport] = true
@@ -678,7 +678,7 @@ end
#===============================================================================
class PokeBattle_Move_09E < PokeBattle_Move
def pbMoveFailed?(user,targets)
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
if @battle.field.effects[PBEffects::WaterSportField]>0
@battle.pbDisplay(_INTL("But it failed!"))
return true
@@ -694,7 +694,7 @@ class PokeBattle_Move_09E < PokeBattle_Move
end
def pbEffectGeneral(user)
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@battle.field.effects[PBEffects::WaterSportField] = 5
else
user.effects[PBEffects::WaterSport] = true
@@ -1193,7 +1193,7 @@ class PokeBattle_Move_0AF < PokeBattle_Move
"133", # Hold Hands
"134" # Celebrate
]
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@moveBlacklist += [
# Target-switching moves
"0EB", # Roar, Whirlwind
@@ -1325,7 +1325,7 @@ class PokeBattle_Move_0B3 < PokeBattle_Move
case @battle.environment
when PBEnvironment::Grass, PBEnvironment::TallGrass,
PBEnvironment::Forest, PBEnvironment::ForestGrass
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@npMove = :ENERGYBALL if GameData::Move.exists?(:ENERGYBALL)
else
@npMove = :SEEDBOMB if GameData::Move.exists?(:SEEDBOMB)
@@ -1335,25 +1335,25 @@ class PokeBattle_Move_0B3 < PokeBattle_Move
when PBEnvironment::Puddle
@npMove = :MUDBOMB if GameData::Move.exists?(:MUDBOMB)
when PBEnvironment::Cave
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@npMove = :POWERGEM if GameData::Move.exists?(:POWERGEM)
else
@npMove = :ROCKSLIDE if GameData::Move.exists?(:ROCKSLIDE)
end
when PBEnvironment::Rock
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@npMove = :EARTHPOWER if GameData::Move.exists?(:EARTHPOWER)
else
@npMove = :ROCKSLIDE if GameData::Move.exists?(:ROCKSLIDE)
end
when PBEnvironment::Sand
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@npMove = :EARTHPOWER if GameData::Move.exists?(:EARTHPOWER)
else
@npMove = :EARTHQUAKE if GameData::Move.exists?(:EARTHQUAKE)
end
when PBEnvironment::Snow
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@npMove = :FROSTBREATH if GameData::Move.exists?(:FROSTBREATH)
else
@npMove = :BLIZZARD if GameData::Move.exists?(:BLIZZARD)
@@ -1519,7 +1519,7 @@ class PokeBattle_Move_0B5 < PokeBattle_Move
"133", # Hold Hands
"134" # Celebrate
]
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
@moveBlacklist += [
# Moves that call other moves
"0B3", # Nature Power
@@ -1550,7 +1550,7 @@ class PokeBattle_Move_0B5 < PokeBattle_Move
# NOTE: This includes the Pokémon of ally trainers in multi battles.
@battle.pbParty(user.index).each_with_index do |pkmn,i|
next if !pkmn || i==user.pokemonIndex
next if MECHANICS_GENERATION >= 6 && pkmn.egg?
next if Settings::MECHANICS_GENERATION >= 6 && pkmn.egg?
pkmn.moves.each do |move|
next if @moveBlacklist.include?(move.function_code)
next if move.type == :SHADOW
@@ -1783,7 +1783,7 @@ class PokeBattle_Move_0BA < PokeBattle_Move
return true
end
return true if pbMoveFailedAromaVeil?(user,target)
if MECHANICS_GENERATION >= 6 && target.hasActiveAbility?(:OBLIVIOUS) &&
if Settings::MECHANICS_GENERATION >= 6 && target.hasActiveAbility?(:OBLIVIOUS) &&
!@battle.moldBreaker
@battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@@ -1848,7 +1848,7 @@ class PokeBattle_Move_0BC < PokeBattle_Move
# Moves that call other moves (see also below)
"0AE" # Mirror Move
]
if MECHANICS_GENERATION >= 7
if Settings::MECHANICS_GENERATION >= 7
@moveBlacklist += [
# Moves that call other moves
# "0AE", # Mirror Move # See above
@@ -2241,7 +2241,7 @@ class PokeBattle_Move_0CE < PokeBattle_TwoTurnMove
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
if MECHANICS_GENERATION >= 6 && target.pbWeight>=2000 # 200.0kg
if Settings::MECHANICS_GENERATION >= 6 && target.pbWeight>=2000 # 200.0kg
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
@@ -2291,7 +2291,7 @@ class PokeBattle_Move_0CF < PokeBattle_Move
return if target.effects[PBEffects::Trapping]>0
# Set trapping effect duration and info
if user.hasActiveItem?(:GRIPCLAW)
target.effects[PBEffects::Trapping] = (MECHANICS_GENERATION >= 5) ? 8 : 6
target.effects[PBEffects::Trapping] = (Settings::MECHANICS_GENERATION >= 5) ? 8 : 6
else
target.effects[PBEffects::Trapping] = 5+@battle.pbRandom(2)
end
@@ -2654,7 +2654,7 @@ end
# User gains half the HP it inflicts as damage.
#===============================================================================
class PokeBattle_Move_0DD < PokeBattle_Move
def healingMove?; return MECHANICS_GENERATION >= 6; end
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
def pbEffectAgainstTarget(user,target)
return if target.damageState.hpLost<=0
@@ -2670,7 +2670,7 @@ end
# (Dream Eater)
#===============================================================================
class PokeBattle_Move_0DE < PokeBattle_Move
def healingMove?; return MECHANICS_GENERATION >= 6; end
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
def pbFailsAgainstTarget?(user,target)
if !target.asleep?
@@ -2905,7 +2905,7 @@ end
#===============================================================================
class PokeBattle_Move_0E7 < PokeBattle_Move
def pbMoveFailed?(user,targets)
if MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious]
if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious]
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
@@ -3150,7 +3150,7 @@ class PokeBattle_Move_0EF < PokeBattle_Move
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
if MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
return true
end
@@ -3166,7 +3166,7 @@ class PokeBattle_Move_0EF < PokeBattle_Move
def pbAdditionalEffect(user,target)
return if target.fainted? || target.damageState.substitute
return if target.effects[PBEffects::MeanLook]>=0
return if MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
target.effects[PBEffects::MeanLook] = user.index
@battle.pbDisplay(_INTL("{1} can no longer escape!",target.pbThis))
end
@@ -3180,7 +3180,7 @@ end
#===============================================================================
class PokeBattle_Move_0F0 < PokeBattle_Move
def pbBaseDamage(baseDmg,user,target)
if MECHANICS_GENERATION >= 6 &&
if Settings::MECHANICS_GENERATION >= 6 &&
target.item && !target.unlosableItem?(target.item)
# NOTE: Damage is still boosted even if target has Sticky Hold or a
# substitute.
@@ -3306,7 +3306,7 @@ end
#===============================================================================
class PokeBattle_Move_0F3 < PokeBattle_Move
def ignoresSubstitute?(user)
return true if MECHANICS_GENERATION >= 6
return true if Settings::MECHANICS_GENERATION >= 6
return super
end
@@ -3370,7 +3370,7 @@ class PokeBattle_Move_0F5 < PokeBattle_Move
def pbEffectWhenDealingDamage(user,target)
return if target.damageState.substitute || target.damageState.berryWeakened
return if !target.item || (!target.item.is_berry? &&
!(MECHANICS_GENERATION >= 6 && target.item.is_gem?))
!(Settings::MECHANICS_GENERATION >= 6 && target.item.is_gem?))
target.pbRemoveItem
@battle.pbDisplay(_INTL("{1}'s {2} was incinerated!",target.pbThis,target.itemName))
end

View File

@@ -1445,7 +1445,7 @@ end
#===============================================================================
class PokeBattle_Move_144 < PokeBattle_Move
def tramplesMinimize?(param=1)
return true if param==1 && MECHANICS_GENERATION >= 6 # Perfect accuracy
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
return true if param==2 # Double damage
return super
end
@@ -1666,7 +1666,7 @@ end
# User gains 3/4 the HP it inflicts as damage. (Draining Kiss, Oblivion Wing)
#===============================================================================
class PokeBattle_Move_14F < PokeBattle_Move
def healingMove?; return MECHANICS_GENERATION >= 6; end
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
def pbEffectAgainstTarget(user,target)
return if target.damageState.hpLost<=0