Rearranged settings

This commit is contained in:
Maruno17
2021-01-02 21:08:47 +00:00
parent 63e257323b
commit d4a7de4bdd
38 changed files with 626 additions and 593 deletions

View File

@@ -255,7 +255,7 @@ class PokeBattle_Battler
speedMult /= 2 if pbOwnSide.effects[PBEffects::Swamp]>0
# Paralysis
if status==PBStatuses::PARALYSIS && !hasActiveAbility?(:QUICKFEET)
speedMult /= (NEWEST_BATTLE_MECHANICS) ? 2 : 4
speedMult /= (MECHANICS_GENERATION >= 7) ? 2 : 4
end
# Badge multiplier
if @battle.internalBattle && pbOwnedByPlayer? &&
@@ -524,28 +524,29 @@ class PokeBattle_Battler
def affectedByPowder?(showMsg=false)
return false if fainted?
return true if !NEWEST_BATTLE_MECHANICS
if pbHasType?(:GRASS)
if pbHasType?(:GRASS) && MORE_TYPE_EFFECTS
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis)) if showMsg
return false
end
if hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
if showMsg
@battle.pbShowAbilitySplash(self)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
else
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,abilityName))
if MECHANICS_GENERATION >= 6
if hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
if showMsg
@battle.pbShowAbilitySplash(self)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis))
else
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,abilityName))
end
@battle.pbHideAbilitySplash(self)
end
@battle.pbHideAbilitySplash(self)
return false
end
return false
end
if hasActiveItem?(:SAFETYGOGGLES)
if showMsg
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,itemName))
if hasActiveItem?(:SAFETYGOGGLES)
if showMsg
@battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!",pbThis,itemName))
end
return false
end
return false
end
return true
end

View File

@@ -137,7 +137,7 @@ class PokeBattle_Battler
self.form = newForm
pbUpdate(true)
@hp = @totalhp-oldDmg
@effects[PBEffects::WeightChange] = 0 if NEWEST_BATTLE_MECHANICS
@effects[PBEffects::WeightChange] = 0 if MECHANICS_GENERATION >= 6
@battle.scene.pbChangePokemon(self,@pokemon)
@battle.scene.pbRefreshOne(@index)
@battle.pbDisplay(msg) if msg && msg!=""
@@ -275,7 +275,7 @@ class PokeBattle_Battler
@spdef = target.spdef
@speed = target.speed
PBStats.eachBattleStat { |s| @stages[s] = target.stages[s] }
if NEWEST_BATTLE_MECHANICS
if NEW_CRITICAL_HIT_RATE_MECHANICS
@effects[PBEffects::FocusEnergy] = target.effects[PBEffects::FocusEnergy]
@effects[PBEffects::LaserFocus] = target.effects[PBEffects::LaserFocus]
end

View File

@@ -93,7 +93,7 @@ class PokeBattle_Battler
when PBStatuses::BURN
hasImmuneType |= pbHasType?(:FIRE)
when PBStatuses::PARALYSIS
hasImmuneType |= pbHasType?(:ELECTRIC) && NEWEST_BATTLE_MECHANICS
hasImmuneType |= pbHasType?(:ELECTRIC) && MORE_TYPE_EFFECTS
when PBStatuses::FROZEN
hasImmuneType |= pbHasType?(:ICE)
end
@@ -189,7 +189,7 @@ class PokeBattle_Battler
when PBStatuses::BURN
hasImmuneType |= pbHasType?(:FIRE)
when PBStatuses::PARALYSIS
hasImmuneType |= pbHasType?(:ELECTRIC) && NEWEST_BATTLE_MECHANICS
hasImmuneType |= pbHasType?(:ELECTRIC) && MORE_TYPE_EFFECTS
end
return false if hasImmuneType
# Ability immunity

View File

@@ -124,12 +124,10 @@ class PokeBattle_Battler
#=============================================================================
# Held item consuming/removing
#=============================================================================
def pbCanConsumeBerry?(_item,alwaysCheckGluttony=true)
return false if @battle.pbCheckOpposingAbility(:UNNERVE,@index)
return true if @hp<=@totalhp/4
if alwaysCheckGluttony || NEWEST_BATTLE_MECHANICS
return true if @hp<=@totalhp/2 && hasActiveAbility?(:GLUTTONY)
end
def pbCanConsumeBerry?(_item, check_gluttony = true)
return false if @battle.pbCheckOpposingAbility(:UNNERVE, @index)
return true if @hp <= @totalhp / 4
return true if @hp <= @totalhp / 2 && (!check_gluttony || hasActiveAbility?(:GLUTTONY))
return false
end

View File

@@ -61,7 +61,7 @@ class PokeBattle_Battler
}
@battle.pbJudge
# Update priority order
# @battle.pbCalculatePriority if NEWEST_BATTLE_MECHANICS
@battle.pbCalculatePriority if RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
return true
end

View File

@@ -253,7 +253,7 @@ class PokeBattle_Battler
else
@battle.pbCommonAnimation("Confusion",self)
@battle.pbDisplay(_INTL("{1} is confused!",pbThis))
threshold = (NEWEST_BATTLE_MECHANICS) ? 33 : 50 # % chance
threshold = (MECHANICS_GENERATION >= 7) ? 33 : 50 # % chance
if @battle.pbRandom(100)<threshold
pbConfusionDamage(_INTL("It hurt itself in its confusion!"))
@lastMoveFailed = true
@@ -313,7 +313,7 @@ class PokeBattle_Battler
# Wide Guard
if target.pbOwnSide.effects[PBEffects::WideGuard] && user.index!=target.index &&
PBTargets.multipleTargets?(move.pbTarget(user)) &&
(NEWEST_BATTLE_MECHANICS || move.damagingMove?)
(MECHANICS_GENERATION >= 7 || move.damagingMove?)
@battle.pbCommonAnimation("WideGuard",target)
@battle.pbDisplay(_INTL("Wide Guard protected {1}!",target.pbThis(true)))
target.damageState.protected = true
@@ -408,7 +408,7 @@ class PokeBattle_Battler
return false
end
# Dark-type immunity to moves made faster by Prankster
if NEWEST_BATTLE_MECHANICS && user.effects[PBEffects::Prankster] &&
if MECHANICS_GENERATION >= 7 && user.effects[PBEffects::Prankster] &&
target.pbHasType?(:DARK) && target.opposes?(user)
PBDebug.log("[Target immune] #{target.pbThis} is Dark-type and immune to Prankster-boosted moves")
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
@@ -441,26 +441,28 @@ class PokeBattle_Battler
end
end
# Immunity to powder-based moves
if NEWEST_BATTLE_MECHANICS && move.powderMove?
if target.pbHasType?(:GRASS)
if move.powderMove?
if target.pbHasType?(:GRASS) && MORE_TYPE_EFFECTS
PBDebug.log("[Target immune] #{target.pbThis} is Grass-type and immune to powder-based moves")
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
return false
end
if target.hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
@battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
else
@battle.pbDisplay(_INTL("It doesn't affect {1} because of its {2}.",target.pbThis(true),target.abilityName))
if MECHANICS_GENERATION >= 6
if target.hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
@battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
else
@battle.pbDisplay(_INTL("It doesn't affect {1} because of its {2}.",target.pbThis(true),target.abilityName))
end
@battle.pbHideAbilitySplash(target)
return false
end
if target.hasActiveItem?(:SAFETYGOGGLES)
PBDebug.log("[Item triggered] #{target.pbThis} has Safety Goggles and is immune to powder-based moves")
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
return false
end
@battle.pbHideAbilitySplash(target)
return false
end
if target.hasActiveItem?(:SAFETYGOGGLES)
PBDebug.log("[Item triggered] #{target.pbThis} has Safety Goggles and is immune to powder-based moves")
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
return false
end
end
# Substitute

View File

@@ -72,7 +72,7 @@ class PokeBattle_Battler
next if b.status!=PBStatuses::FROZEN
# NOTE: Non-Fire-type moves that thaw the user will also thaw the
# target (in Gen 6+).
if move.calcType == :FIRE || (NEWEST_BATTLE_MECHANICS && move.thawsUser?)
if move.calcType == :FIRE || (MECHANICS_GENERATION >= 6 && move.thawsUser?)
b.pbCureStatus
end
end