AI now keeps their last defined Pokémon for last, tweaks to some battle effects based on mechanics generation

This commit is contained in:
Maruno17
2021-10-24 23:06:47 +01:00
parent 18049c22b9
commit 680c1de392
8 changed files with 49 additions and 13 deletions

View File

@@ -313,7 +313,7 @@ class PokeBattle_Move
end
# Parental Bond's second attack
if user.effects[PBEffects::ParentalBond]==1
multipliers[:base_damage_multiplier] /= 4
multipliers[:base_damage_multiplier] /= (Settings::MECHANICS_GENERATION >= 7) ? 4 : 2
end
# Other
if user.effects[PBEffects::MeFirst]

View File

@@ -18,6 +18,18 @@ class PokeBattle_Move_RaiseUserAttack2 < PokeBattle_StatUpMove
end
end
#===============================================================================
# If this move KO's the target, increases the user's Attack by 2 stages.
# (Fell Stinger (Gen 6-))
#===============================================================================
class PokeBattle_Move_RaiseUserAttack2IfTargetFaints < PokeBattle_Move
def pbEffectAfterAllHits(user, target)
return if !target.damageState.fainted
return if !user.pbCanRaiseStatStage?(:ATTACK, user, self)
user.pbRaiseStatStage(:ATTACK, 2, user)
end
end
#===============================================================================
# Increases the user's Attack by 3 stages.
#===============================================================================
@@ -30,7 +42,7 @@ end
#===============================================================================
# If this move KO's the target, increases the user's Attack by 3 stages.
# (Fell Stinger)
# (Fell Stinger (Gen 7+))
#===============================================================================
class PokeBattle_Move_RaiseUserAttack3IfTargetFaints < PokeBattle_Move
def pbEffectAfterAllHits(user,target)