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,
# :FLOWERGIFT, # This can be stopped
# :FORECAST, # This can be stopped
:GULPMISSILE,
:ICEFACE,
:MULTITYPE,
:POWERCONSTRUCT,
@@ -387,6 +388,7 @@ class PokeBattle_Battler
:DISGUISE,
:FLOWERGIFT,
:FORECAST,
:GULPMISSILE,
:ICEFACE,
:MULTITYPE,
:POWERCONSTRUCT,

View File

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

View File

@@ -309,92 +309,94 @@ class PokeBattle_Battler
@battle.successStates[user.index].protected = true
return false
end
# Wide Guard
if target.pbOwnSide.effects[PBEffects::WideGuard] && user.index!=target.index &&
move.pbTarget(user).num_targets > 1 &&
(Settings::MECHANICS_GENERATION >= 7 || move.damagingMove?)
@battle.pbCommonAnimation("WideGuard",target)
@battle.pbDisplay(_INTL("Wide Guard protected {1}!",target.pbThis(true)))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
return false
end
if move.canProtectAgainst?
# Quick Guard
if target.pbOwnSide.effects[PBEffects::QuickGuard] &&
@battle.choices[user.index][4]>0 # Move priority saved from pbCalculatePriority
@battle.pbCommonAnimation("QuickGuard",target)
@battle.pbDisplay(_INTL("Quick Guard protected {1}!",target.pbThis(true)))
if !(user.hasActiveAbility?(:UNSEENFIST) && move.contactMove?)
# Wide Guard
if target.pbOwnSide.effects[PBEffects::WideGuard] && user.index!=target.index &&
move.pbTarget(user).num_targets > 1 &&
(Settings::MECHANICS_GENERATION >= 7 || move.damagingMove?)
@battle.pbCommonAnimation("WideGuard",target)
@battle.pbDisplay(_INTL("Wide Guard protected {1}!",target.pbThis(true)))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
return false
end
# Protect
if target.effects[PBEffects::Protect]
@battle.pbCommonAnimation("Protect",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
return false
end
# King's Shield
if target.effects[PBEffects::KingsShield] && move.damagingMove?
@battle.pbCommonAnimation("KingsShield",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
if user.pbCanLowerStatStage?(:ATTACK)
user.pbLowerStatStage(:ATTACK, (Settings::MECHANICS_GENERATION >= 8) ? 1 : 2, nil)
if move.canProtectAgainst?
# Quick Guard
if target.pbOwnSide.effects[PBEffects::QuickGuard] &&
@battle.choices[user.index][4]>0 # Move priority saved from pbCalculatePriority
@battle.pbCommonAnimation("QuickGuard",target)
@battle.pbDisplay(_INTL("Quick Guard protected {1}!",target.pbThis(true)))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
return false
end
# Protect
if target.effects[PBEffects::Protect]
@battle.pbCommonAnimation("Protect",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
return false
end
# King's Shield
if target.effects[PBEffects::KingsShield] && move.damagingMove?
@battle.pbCommonAnimation("KingsShield",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
if user.pbCanLowerStatStage?(:ATTACK)
user.pbLowerStatStage(:ATTACK, (Settings::MECHANICS_GENERATION >= 8) ? 1 : 2, nil)
end
end
return false
end
return false
end
# Spiky Shield
if target.effects[PBEffects::SpikyShield]
@battle.pbCommonAnimation("SpikyShield",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
@battle.scene.pbDamageAnimation(user)
user.pbReduceHP(user.totalhp/8,false)
@battle.pbDisplay(_INTL("{1} was hurt!",user.pbThis))
user.pbItemHPHealCheck
end
return false
end
# Baneful Bunker
if target.effects[PBEffects::BanefulBunker]
@battle.pbCommonAnimation("BanefulBunker",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
user.pbPoison(target) if user.pbCanPoison?(target,false)
end
return false
end
# Obstruct
if target.effects[PBEffects::Obstruct] && move.damagingMove?
@battle.pbCommonAnimation("Obstruct",target)
@battle.pbDisplay(_INTL("{1} protected itself!", target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
if user.pbCanLowerStatStage?(:DEFENSE)
user.pbLowerStatStage(:DEFENSE, 2, nil)
# Spiky Shield
if target.effects[PBEffects::SpikyShield]
@battle.pbCommonAnimation("SpikyShield",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
@battle.scene.pbDamageAnimation(user)
user.pbReduceHP(user.totalhp/8,false)
@battle.pbDisplay(_INTL("{1} was hurt!",user.pbThis))
user.pbItemHPHealCheck
end
return false
end
# Baneful Bunker
if target.effects[PBEffects::BanefulBunker]
@battle.pbCommonAnimation("BanefulBunker",target)
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
user.pbPoison(target) if user.pbCanPoison?(target,false)
end
return false
end
# Obstruct
if target.effects[PBEffects::Obstruct] && move.damagingMove?
@battle.pbCommonAnimation("Obstruct",target)
@battle.pbDisplay(_INTL("{1} protected itself!", target.pbThis))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect?
if user.pbCanLowerStatStage?(:DEFENSE)
user.pbLowerStatStage(:DEFENSE, 2, nil)
end
end
return false
end
# Mat Block
if target.pbOwnSide.effects[PBEffects::MatBlock] && move.damagingMove?
# NOTE: Confirmed no common animation for this effect.
@battle.pbDisplay(_INTL("{1} was blocked by the kicked-up mat!",move.name))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
return false
end
return false
end
# Mat Block
if target.pbOwnSide.effects[PBEffects::MatBlock] && move.damagingMove?
# NOTE: Confirmed no common animation for this effect.
@battle.pbDisplay(_INTL("{1} was blocked by the kicked-up mat!",move.name))
target.damageState.protected = true
@battle.successStates[user.index].protected = true
return false
end
end
# Magic Coat/Magic Bounce

View File

@@ -10,6 +10,26 @@ class PokeBattle_Battler
BattleHandlers.triggerTargetAbilityOnHit(target.ability,user,target,move,@battle)
user.pbItemHPHealCheck if user.hp<oldHP
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
if user.abilityActive?(true)
BattleHandlers.triggerUserAbilityOnHit(user.ability,user,target,move,@battle)
@@ -109,6 +129,15 @@ class PokeBattle_Battler
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
if user.effects[PBEffects::GemConsumed]
# NOTE: The consume animation and message for Gems are shown immediately

View File

@@ -427,6 +427,8 @@ end
# Two turn move.
#===============================================================================
class PokeBattle_TwoTurnMove < PokeBattle_Move
attr_reader :chargingTurn
def chargingTurnMove?; return true; end
# user.effects[PBEffects::TwoTurnAttack] is set to the move's ID if this
@@ -436,7 +438,7 @@ class PokeBattle_TwoTurnMove < PokeBattle_Move
@powerHerb = false
@chargingTurn = false # Assume damaging turn by default
@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]
@powerHerb = user.hasActiveItem?(:POWERHERB)
@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
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
@@ -343,10 +338,6 @@ Gorilla Tactics
Boosts bearer's Attack by 50%, but restricts bearer to one move (cf. Choice
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
If a move/ability tries to lower the bearer's stat(s), the effect is reflected
back at the causer.