Added effects of Gulp Missile and Unseen Fist, fixed typo with Ice Face

This commit is contained in:
Maruno17
2021-07-24 21:19:01 +01:00
parent a1cff9cc36
commit d71a3d47e8
6 changed files with 115 additions and 89 deletions

View File

@@ -362,6 +362,7 @@ class PokeBattle_Battler
:DISGUISE, :DISGUISE,
# :FLOWERGIFT, # This can be stopped # :FLOWERGIFT, # This can be stopped
# :FORECAST, # This can be stopped # :FORECAST, # This can be stopped
:GULPMISSILE,
:ICEFACE, :ICEFACE,
:MULTITYPE, :MULTITYPE,
:POWERCONSTRUCT, :POWERCONSTRUCT,
@@ -387,6 +388,7 @@ class PokeBattle_Battler
:DISGUISE, :DISGUISE,
:FLOWERGIFT, :FLOWERGIFT,
:FORECAST, :FORECAST,
:GULPMISSILE,
:ICEFACE, :ICEFACE,
:MULTITYPE, :MULTITYPE,
:POWERCONSTRUCT, :POWERCONSTRUCT,

View File

@@ -198,7 +198,7 @@ class PokeBattle_Battler
end end
end end
# Eiscue - Ice Face # Eiscue - Ice Face
if !ability_changed && isSpecies?(:EISCUE) && self.ability = :ICEFACE && if !ability_changed && isSpecies?(:EISCUE) && self.ability == :ICEFACE &&
@form == 1 && effectiveWeather == :Hail @form == 1 && effectiveWeather == :Hail
@canRestoreIceFace = true # Changed form at end of round @canRestoreIceFace = true # Changed form at end of round
end end

View File

@@ -309,6 +309,7 @@ class PokeBattle_Battler
@battle.successStates[user.index].protected = true @battle.successStates[user.index].protected = true
return false return false
end end
if !(user.hasActiveAbility?(:UNSEENFIST) && move.contactMove?)
# Wide Guard # Wide Guard
if target.pbOwnSide.effects[PBEffects::WideGuard] && user.index!=target.index && if target.pbOwnSide.effects[PBEffects::WideGuard] && user.index!=target.index &&
move.pbTarget(user).num_targets > 1 && move.pbTarget(user).num_targets > 1 &&
@@ -397,6 +398,7 @@ class PokeBattle_Battler
return false return false
end end
end end
end
# Magic Coat/Magic Bounce # Magic Coat/Magic Bounce
if move.statusMove? && move.canMagicCoat? && !target.semiInvulnerable? && target.opposes?(user) if move.statusMove? && move.canMagicCoat? && !target.semiInvulnerable? && target.opposes?(user)
if target.effects[PBEffects::MagicCoat] if target.effects[PBEffects::MagicCoat]

View File

@@ -10,6 +10,26 @@ class PokeBattle_Battler
BattleHandlers.triggerTargetAbilityOnHit(target.ability,user,target,move,@battle) BattleHandlers.triggerTargetAbilityOnHit(target.ability,user,target,move,@battle)
user.pbItemHPHealCheck if user.hp<oldHP user.pbItemHPHealCheck if user.hp<oldHP
end end
# Cramorant - Gulp Missile
if target.isSpecies?(:CRAMORANT) && target.ability == :GULPMISSILE &&
target.form > 0 && !target.effects[PBEffects::Transform]
oldHP = user.hp
# NOTE: Strictly speaking, an attack animation should be shown (the
# target Cramorant attacking the user) and the ability splash
# shouldn't be shown.
@battle.pbShowAbilitySplash(target)
if user.takesIndirectDamage?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
@battle.scene.pbDamageAnimation(user)
user.pbReduceHP(user.totalhp / 4, false)
end
if target.form == 1 # Gulping Form
user.pbLowerStatStageByAbility(:DEFENSE, 1, target, false)
elsif target.form == 2 # Gorging Form
target.pbParalyze(user) if target.pbCanParalyze?(user, false)
end
@battle.pbHideAbilitySplash(target)
user.pbItemHPHealCheck if user.hp < oldHP
end
# User's ability # User's ability
if user.abilityActive?(true) if user.abilityActive?(true)
BattleHandlers.triggerUserAbilityOnHit(user.ability,user,target,move,@battle) BattleHandlers.triggerUserAbilityOnHit(user.ability,user,target,move,@battle)
@@ -109,6 +129,15 @@ class PokeBattle_Battler
end end
end end
end end
# Cramorant = Gulp Missile
if !user.fainted? && !user.effects[PBEffects::Transform] &&
user.isSpecies?(:CRAMORANT) && user.ability == :GULPMISSILE && user.form == 0
if !@battle.pbAllFainted?(user.idxOpposingSide) &&
((move.id == :SURF && numHits > 0) || (move.id == :DIVE && move.chargingTurn))
# NOTE: Intentionally no ability splash or message here.
user.pbChangeForm((user.hp > user.totalhp / 2) ? 1 : 2, nil)
end
end
# Consume user's Gem # Consume user's Gem
if user.effects[PBEffects::GemConsumed] if user.effects[PBEffects::GemConsumed]
# NOTE: The consume animation and message for Gems are shown immediately # NOTE: The consume animation and message for Gems are shown immediately

View File

@@ -427,6 +427,8 @@ end
# Two turn move. # Two turn move.
#=============================================================================== #===============================================================================
class PokeBattle_TwoTurnMove < PokeBattle_Move class PokeBattle_TwoTurnMove < PokeBattle_Move
attr_reader :chargingTurn
def chargingTurnMove?; return true; end def chargingTurnMove?; return true; end
# user.effects[PBEffects::TwoTurnAttack] is set to the move's ID if this # user.effects[PBEffects::TwoTurnAttack] is set to the move's ID if this
@@ -436,7 +438,7 @@ class PokeBattle_TwoTurnMove < PokeBattle_Move
@powerHerb = false @powerHerb = false
@chargingTurn = false # Assume damaging turn by default @chargingTurn = false # Assume damaging turn by default
@damagingTurn = true @damagingTurn = true
# 0 at start of charging turn, move's ID at start of damaging turn # nil at start of charging turn, move's ID at start of damaging turn
if !user.effects[PBEffects::TwoTurnAttack] if !user.effects[PBEffects::TwoTurnAttack]
@powerHerb = user.hasActiveItem?(:POWERHERB) @powerHerb = user.hasActiveItem?(:POWERHERB)
@chargingTurn = true @chargingTurn = true

View File

@@ -329,11 +329,6 @@ BattleHandlers::EORWeatherAbility.add(:ICEFACE,
#=============================================================================== #===============================================================================
Gulp Missile
After using Surf/Dive, changes the bearer's form depending on its HP. If hit by
an attack while in one of these forms, damages the attacker and causes an effect
depending on the form.
Steam Engine Steam Engine
When bearer is hit by a Fire- or Water-type move, bearer gets +6 Speed (after When bearer is hit by a Fire- or Water-type move, bearer gets +6 Speed (after
the effect of that move is applied). Outside of battle, makes eggs hatch twice the effect of that move is applied). Outside of battle, makes eggs hatch twice
@@ -343,10 +338,6 @@ Gorilla Tactics
Boosts bearer's Attack by 50%, but restricts bearer to one move (cf. Choice Boosts bearer's Attack by 50%, but restricts bearer to one move (cf. Choice
Band). Power boost stacks with Choice Band. Band). Power boost stacks with Choice Band.
Unseen Fist
The bearer's moves will do damage with contact moves even if the target is
protected from it. (Does this mean it just bypasses the protection?)
Mirror Armor Mirror Armor
If a move/ability tries to lower the bearer's stat(s), the effect is reflected If a move/ability tries to lower the bearer's stat(s), the effect is reflected
back at the causer. back at the causer.