Tidied up semicolon use, refactored random dungeon generation code, fixed visual bug in Day Care debug screen

This commit is contained in:
Maruno17
2021-08-22 23:18:34 +01:00
parent ecc5a040cd
commit 8bb70a226e
64 changed files with 1286 additions and 926 deletions

View File

@@ -100,7 +100,8 @@ class PokeBattle_Battler
return false
end
# Ability immunity
immuneByAbility = false; immAlly = nil
immuneByAbility = false
immAlly = nil
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(self.ability,self,newStatus)
immuneByAbility = true
elsif selfInflicted || !@battle.moldBreaker

View File

@@ -10,7 +10,8 @@ class PokeBattle_Battler
# Snatch
move.snatched = false
if move.statusMove? && move.canSnatch?
newUser = nil; strength = 100
newUser = nil
strength = 100
@battle.eachBattler do |b|
next if b.effects[PBEffects::Snatch]==0 ||
b.effects[PBEffects::Snatch]>=strength
@@ -101,7 +102,8 @@ class PokeBattle_Battler
priority = @battle.pbPriority(true)
nearOnly = !target_data.can_choose_distant_target?
# Spotlight (takes priority over Follow Me/Rage Powder/Lightning Rod/Storm Drain)
newTarget = nil; strength = 100 # Lower strength takes priority
newTarget = nil
strength = 100 # Lower strength takes priority
priority.each do |b|
next if b.fainted? || b.effects[PBEffects::SkyDrop]>=0
next if b.effects[PBEffects::Spotlight]==0 ||
@@ -118,7 +120,8 @@ class PokeBattle_Battler
return targets
end
# Follow Me/Rage Powder (takes priority over Lightning Rod/Storm Drain)
newTarget = nil; strength = 100 # Lower strength takes priority
newTarget = nil
strength = 100 # Lower strength takes priority
priority.each do |b|
next if b.fainted? || b.effects[PBEffects::SkyDrop]>=0
next if b.effects[PBEffects::RagePowder] && !user.affectedByPowder?

View File

@@ -506,7 +506,8 @@ class PokeBattle_Battler
user.effects[PBEffects::LockOnPos]==target.index
# Toxic
return true if move.pbOverrideSuccessCheckPerHit(user,target)
miss = false; hitsInvul = false
miss = false
hitsInvul = false
# No Guard
hitsInvul = true if user.hasActiveAbility?(:NOGUARD) ||
target.hasActiveAbility?(:NOGUARD)