mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Added Gen 9 forms code, evolution code, some item effects
This commit is contained in:
@@ -297,10 +297,8 @@ class Battle::Move
|
||||
@battle.pbDisplay(_INTL("The substitute took damage for {1}!", target.pbThis(true)))
|
||||
end
|
||||
if target.damageState.critical
|
||||
if $game_temp.party_critical_hits_dealt &&
|
||||
$game_temp.party_critical_hits_dealt[user.pokemonIndex] &&
|
||||
user.pbOwnedByPlayer?
|
||||
$game_temp.party_critical_hits_dealt[user.pokemonIndex] += 1
|
||||
if user.pokemon.isSpecies?(:FARFETCHD) && user.pokemon.form == 1
|
||||
user.pokemon.evolution_counter += 1
|
||||
end
|
||||
if target.damageState.affection_critical
|
||||
if numTargets > 1
|
||||
@@ -396,10 +394,8 @@ class Battle::Move
|
||||
target.tookMoveDamageThisRound = true if damage > 0 && !target.damageState.substitute # For Focus Punch
|
||||
target.tookDamageThisRound = true if damage > 0 # For Assurance
|
||||
target.lastAttacker.push(user.index) # For Revenge
|
||||
if $game_temp.party_direct_damage_taken &&
|
||||
$game_temp.party_direct_damage_taken[target.pokemonIndex] &&
|
||||
target.pbOwnedByPlayer?
|
||||
$game_temp.party_direct_damage_taken[target.pokemonIndex] += damage
|
||||
if target.pokemon.isSpecies?(:YAMASK) && target.pokemon.form == 1
|
||||
target.pokemon.evolution_counter += damage
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -424,6 +424,9 @@ class Battle::Move::RecoilMove < Battle::Move
|
||||
return if user.hasActiveAbility?(:ROCKHEAD)
|
||||
amt = pbRecoilDamage(user, target)
|
||||
amt = 1 if amt < 1
|
||||
if user.pokemon.isSpecies?(:BASCULIN) && [2, 3].include?(user.pokemon.form)
|
||||
user.pokemon.evolution_counter += amt
|
||||
end
|
||||
user.pbReduceHP(amt, false)
|
||||
@battle.pbDisplay(_INTL("{1} is damaged by recoil!", user.pbThis))
|
||||
user.pbItemHPHealCheck
|
||||
|
||||
@@ -847,7 +847,8 @@ class Battle::Move::RemoveScreens < Battle::Move
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# User is protected against moves with the "B" flag this round. (Detect, Protect)
|
||||
# User is protected against moves with the "CanProtect" flag this round.
|
||||
# (Detect, Protect)
|
||||
#===============================================================================
|
||||
class Battle::Move::ProtectUser < Battle::Move::ProtectMove
|
||||
def initialize(battle, move)
|
||||
@@ -857,8 +858,8 @@ class Battle::Move::ProtectUser < Battle::Move::ProtectMove
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# User is protected against moves with the "B" flag this round. If a Pokémon
|
||||
# makes contact with the user while this effect applies, that Pokémon is
|
||||
# User is protected against moves with the "CanProtect" flag this round. If a
|
||||
# Pokémon makes contact with the user while this effect applies, that Pokémon is
|
||||
# poisoned. (Baneful Bunker)
|
||||
#===============================================================================
|
||||
class Battle::Move::ProtectUserBanefulBunker < Battle::Move::ProtectMove
|
||||
|
||||
Reference in New Issue
Block a user