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

@@ -308,7 +308,7 @@ BattleHandlers::StatusCureAbility.add(:MAGMAARMOR,
BattleHandlers::StatusCureAbility.add(:OBLIVIOUS,
proc { |ability,battler|
next if battler.effects[PBEffects::Attract]<0 &&
(battler.effects[PBEffects::Taunt]==0 || MECHANICS_GENERATION <= 5)
(battler.effects[PBEffects::Taunt]==0 || Settings::MECHANICS_GENERATION <= 5)
battler.battle.pbShowAbilitySplash(battler)
if battler.effects[PBEffects::Attract]>=0
battler.pbCureAttract
@@ -319,7 +319,7 @@ BattleHandlers::StatusCureAbility.add(:OBLIVIOUS,
battler.pbThis,battler.abilityName))
end
end
if battler.effects[PBEffects::Taunt]>0 && MECHANICS_GENERATION >= 6
if battler.effects[PBEffects::Taunt]>0 && Settings::MECHANICS_GENERATION >= 6
battler.effects[PBEffects::Taunt] = 0
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battler.battle.pbDisplay(_INTL("{1}'s Taunt wore off!",battler.pbThis))
@@ -741,7 +741,7 @@ BattleHandlers::MoveBaseTypeModifierAbility.add(:LIQUIDVOICE,
BattleHandlers::MoveBaseTypeModifierAbility.add(:NORMALIZE,
proc { |ability,user,move,type|
next if !GameData::Type.exists?(:NORMAL)
move.powerBoost = true if MECHANICS_GENERATION >= 7
move.powerBoost = true if Settings::MECHANICS_GENERATION >= 7
next :NORMAL
}
)
@@ -780,7 +780,7 @@ BattleHandlers::AccuracyCalcUserAbility.add(:HUSTLE,
BattleHandlers::AccuracyCalcUserAbility.add(:KEENEYE,
proc { |ability,mods,user,target,move,type|
mods[:evasion_stage] = 0 if mods[:evasion_stage] > 0 && MECHANICS_GENERATION >= 6
mods[:evasion_stage] = 0 if mods[:evasion_stage] > 0 && Settings::MECHANICS_GENERATION >= 6
}
)
@@ -1606,7 +1606,7 @@ BattleHandlers::TargetAbilityOnHit.add(:WEAKARMOR,
battle.pbShowAbilitySplash(target)
target.pbLowerStatStageByAbility(PBStats::DEFENSE, 1, target, false)
target.pbRaiseStatStageByAbility(PBStats::SPEED,
(MECHANICS_GENERATION >= 7) ? 2 : 1, target, false)
(Settings::MECHANICS_GENERATION >= 7) ? 2 : 1, target, false)
battle.pbHideAbilitySplash(target)
}
)
@@ -2089,7 +2089,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:ANTICIPATION,
next if m.statusMove?
if type1
moveType = m.type
if MECHANICS_GENERATION >= 6 && m.function == "090" # Hidden Power
if Settings::MECHANICS_GENERATION >= 6 && m.function == "090" # Hidden Power
moveType = pbHiddenPower(b.pokemon)[0]
end
eff = PBTypes.getCombinedEffectiveness(moveType,type1,type2,type3)
@@ -2236,7 +2236,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:FRISK,
end
if foes.length>0
battle.pbShowAbilitySplash(battler)
if MECHANICS_GENERATION >= 6
if Settings::MECHANICS_GENERATION >= 6
foes.each do |b|
battle.pbDisplay(_INTL("{1} frisked {2} and found its {3}!",
battler.pbThis,b.pbThis(true),b.itemName))