From 2ba2893869a532d26530033d65b26d7b9a86c76a Mon Sep 17 00:00:00 2001 From: Keyacom <70766223+Keyacom@users.noreply.github.com> Date: Mon, 30 May 2022 00:01:34 +0200 Subject: [PATCH] Fixed Grav Apple having the incorrect damage boost (#179) * Fixed Grav Apple having the incorrect damage boost In the official games, Grav Apple has a damage boost of 1.5x under Gravity, not 2x. This has been fixed. * Updated move effect class name * Apply updated function code * Update moves.txt --- .../011_Battle/003_Move/006_MoveEffects_BattlerStats.rb | 8 ++++---- .../Scripts/011_Battle/005_AI/005_AI_Move_EffectScores.rb | 2 +- PBS/Gen 8/moves.txt | 2 +- PBS/moves.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb b/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb index 25696bcb9..7e40b0d85 100644 --- a/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb +++ b/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb @@ -946,12 +946,12 @@ class Battle::Move::LowerTargetDefense1 < Battle::Move::TargetStatDownMove end #=============================================================================== -# Decreases the target's Defense by 1 stage. Power is doubled if Gravity is in -# effect. (Grav Apple) +# Decreases the target's Defense by 1 stage. Power is mutliplied by 1.5 if +# Gravity is in effect. (Grav Apple) #=============================================================================== -class Battle::Move::LowerTargetDefense1DoublePowerInGravity < Battle::Move::LowerTargetDefense1 +class Battle::Move::LowerTargetDefense1PowersUpInGravity < Battle::Move::LowerTargetDefense1 def pbBaseDamage(baseDmg, user, target) - baseDmg *= 2 if @battle.field.effects[PBEffects::Gravity] > 0 + baseDmg = baseDmg * 3 / 2 if @battle.field.effects[PBEffects::Gravity] > 0 return baseDmg end end diff --git a/Data/Scripts/011_Battle/005_AI/005_AI_Move_EffectScores.rb b/Data/Scripts/011_Battle/005_AI/005_AI_Move_EffectScores.rb index 08a635dde..f8e6495ed 100644 --- a/Data/Scripts/011_Battle/005_AI/005_AI_Move_EffectScores.rb +++ b/Data/Scripts/011_Battle/005_AI/005_AI_Move_EffectScores.rb @@ -3063,7 +3063,7 @@ class Battle::AI score -= target.stages[:SPECIAL_ATTACK] * 20 end #--------------------------------------------------------------------------- - when "LowerTargetDefense1DoublePowerInGravity" + when "LowerTargetDefense1PowersUpInGravity" if target.pbCanLowerStatStage?(:DEFENSE, user) score += 20 score += target.stages[:DEFENSE] * 20 diff --git a/PBS/Gen 8/moves.txt b/PBS/Gen 8/moves.txt index 4fe913b73..7b5c18e89 100644 --- a/PBS/Gen 8/moves.txt +++ b/PBS/Gen 8/moves.txt @@ -3610,7 +3610,7 @@ Power = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = LowerTargetDefense1DoublePowerInGravity +FunctionCode = LowerTargetDefense1PowersUpInGravity Flags = CanProtect,CanMirrorMove,CannotMetronome EffectChance = 100 Description = The user inflicts damage by dropping an apple from high above. This also lowers the target's Defense. diff --git a/PBS/moves.txt b/PBS/moves.txt index 4fe913b73..7b5c18e89 100644 --- a/PBS/moves.txt +++ b/PBS/moves.txt @@ -3610,7 +3610,7 @@ Power = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = LowerTargetDefense1DoublePowerInGravity +FunctionCode = LowerTargetDefense1PowersUpInGravity Flags = CanProtect,CanMirrorMove,CannotMetronome EffectChance = 100 Description = The user inflicts damage by dropping an apple from high above. This also lowers the target's Defense.