mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Implement TramplesMinimize as a move flag (#175)
* Implement "TramplesMinimize" as a move flag Implemented `TramplesMinimize` as a move flag. Due to it, removed effect codes `FlinchTargetTrampleMinimize` and `ParalyzeTargetTrampleMinimize` (the second one was exclusive to Body Slam). Moves that had them now have the effect codes `FlinchTarget` and `ParalyzeTarget`, respectively. The code now does not check if the parameter of `tramplesMinimize?` is 1 or 2, it now checks if it is `true` or `false`. For the effect that causes the moves with this flag to skip accuracy checks, it also checks if `Settings::MECHANICS_GENERATION` is equal to or greater than 6. Data on which moves are to be treated as able to double damage if Minimized and skip accuracy checks are [here](https://bulbapedia.bulbagarden.net/wiki/Minimize_(move)#Vulnerability_to_moves). **Remarks:** - Dragon Rush, Heat Crash and Heavy Slam could not trample Minimize in Gen 5. Dragon Rush and Heat Crash could do so in Gen 6+, but Heavy Slam could not until Gen 7. - Double Iron Bash could only trample Minimize in Gen 7. **TL;DR:** - Implemented `TramplesMinimize` as a move flag. - Modified the check for this move flag. - Removed effect codes `FlinchTargetTrampleMinimize` and `ParalyzeTargetTrampleMinimize`. Moves that had them now have the effect codes `FlinchTarget` and `ParalyzeTarget`, respectively.
This commit is contained in:
@@ -169,18 +169,6 @@ class Battle::Move::ParalyzeTargetIfNotTypeImmune < Battle::Move::ParalyzeTarget
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Paralyzes the target. Does double damage and has perfect accuracy if target is
|
||||
# Minimized. (Body Slam (Gen 6+))
|
||||
#===============================================================================
|
||||
class Battle::Move::ParalyzeTargetTrampleMinimize < Battle::Move::ParalyzeTarget
|
||||
def tramplesMinimize?(param = 1)
|
||||
return true if param == 1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return true if param == 2 # Double damage
|
||||
return super
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Paralyzes the target. Accuracy perfect in rain, 50% in sunshine. Hits some
|
||||
# semi-invulnerable targets. (Thunder)
|
||||
@@ -548,18 +536,6 @@ class Battle::Move::FlinchTarget < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Causes the target to flinch. Does double damage and has perfect accuracy if
|
||||
# the target is Minimized. (Dragon Rush (Gen 6+), Steamroller, Stomp)
|
||||
#===============================================================================
|
||||
class Battle::Move::FlinchTargetTrampleMinimize < Battle::Move::FlinchTarget
|
||||
def tramplesMinimize?(param = 1)
|
||||
return true if param == 1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return true if param == 2 # Double damage
|
||||
return super
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Causes the target to flinch. Fails if the user is not asleep. (Snore)
|
||||
#===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user