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
This commit is contained in:
Keyacom
2022-05-30 00:01:34 +02:00
committed by GitHub
parent 22018012c7
commit 2ba2893869
4 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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.