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