Added effect of Dragon Darts, fixed incorrect status icon being used in battle

This commit is contained in:
Maruno17
2021-09-04 20:53:43 +01:00
parent 423961e524
commit c7fd147040
14 changed files with 528 additions and 441 deletions

View File

@@ -583,127 +583,136 @@ BattleHandlers::MoveBlockingAbility.copy(:DAZZLING,:QUEENLYMAJESTY)
#===============================================================================
BattleHandlers::MoveImmunityTargetAbility.add(:BULLETPROOF,
proc { |ability,user,target,move,type,battle|
proc { |ability, user, target, move, type, battle, show_message|
next false if !move.bombMove?
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
target.pbThis,target.abilityName,move.name))
if show_message
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
target.pbThis, target.abilityName, move.name))
end
battle.pbHideAbilitySplash(target)
end
battle.pbHideAbilitySplash(target)
next true
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:FLASHFIRE,
proc { |ability,user,target,move,type,battle|
proc { |ability, user, target, move, type, battle, show_message|
next false if user.index==target.index
next false if type != :FIRE
battle.pbShowAbilitySplash(target)
if !target.effects[PBEffects::FlashFire]
target.effects[PBEffects::FlashFire] = true
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose!",target.pbThis(true)))
if show_message
battle.pbShowAbilitySplash(target)
if !target.effects[PBEffects::FlashFire]
target.effects[PBEffects::FlashFire] = true
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose!", target.pbThis(true)))
else
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose because of its {2}!",
target.pbThis(true), target.abilityName))
end
else
battle.pbDisplay(_INTL("The power of {1}'s Fire-type moves rose because of its {2}!",
target.pbThis(true),target.abilityName))
end
else
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
target.pbThis,target.abilityName,move.name))
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
target.pbThis, target.abilityName, move.name))
end
end
battle.pbHideAbilitySplash(target)
end
battle.pbHideAbilitySplash(target)
next true
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:LIGHTNINGROD,
proc { |ability,user,target,move,type,battle|
next pbBattleMoveImmunityStatAbility(user,target,move,type,:ELECTRIC,:SPECIAL_ATTACK,1,battle)
proc { |ability, user, target, move, type, battle, show_message|
next pbBattleMoveImmunityStatAbility(user, target, move, type, :ELECTRIC, :SPECIAL_ATTACK, 1, battle, show_message)
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:MOTORDRIVE,
proc { |ability,user,target,move,type,battle|
next pbBattleMoveImmunityStatAbility(user,target,move,type,:ELECTRIC,:SPEED,1,battle)
proc { |ability, user, target, move, type, battle, show_message|
next pbBattleMoveImmunityStatAbility(user, target, move, type, :ELECTRIC, :SPEED, 1, battle, show_message)
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:SAPSIPPER,
proc { |ability,user,target,move,type,battle|
next pbBattleMoveImmunityStatAbility(user,target,move,type,:GRASS,:ATTACK,1,battle)
proc { |ability, user, target, move, type, battle, show_message|
next pbBattleMoveImmunityStatAbility(user, target, move, type, :GRASS, :ATTACK, 1, battle, show_message)
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:SOUNDPROOF,
proc { |ability,user,target,move,type,battle|
proc { |ability, user, target, move, type, battle, show_message|
next false if !move.soundMove?
next false if Settings::MECHANICS_GENERATION >= 8 && user.index == target.index
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1}'s {2} blocks {3}!",target.pbThis,target.abilityName,move.name))
if show_message
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1}'s {2} blocks {3}!", target.pbThis, target.abilityName, move.name))
end
battle.pbHideAbilitySplash(target)
end
battle.pbHideAbilitySplash(target)
next true
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:STORMDRAIN,
proc { |ability,user,target,move,type,battle|
next pbBattleMoveImmunityStatAbility(user,target,move,type,:WATER,:SPECIAL_ATTACK,1,battle)
proc { |ability, user, target, move, type, battle, show_message|
next pbBattleMoveImmunityStatAbility(user, target, move, type, :WATER, :SPECIAL_ATTACK, 1, battle, show_message)
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:TELEPATHY,
proc { |ability,user,target,move,type,battle|
proc { |ability, user, target, move, type, battle, show_message|
next false if move.statusMove?
next false if user.index==target.index || target.opposes?(user)
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon!",target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon with {2}!",
target.pbThis,target.abilityName))
if show_message
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon!", target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1} avoids attacks by its ally Pokémon with {2}!",
target.pbThis, target.abilityName))
end
battle.pbHideAbilitySplash(target)
end
battle.pbHideAbilitySplash(target)
next true
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:VOLTABSORB,
proc { |ability,user,target,move,type,battle|
next pbBattleMoveImmunityHealAbility(user,target,move,type,:ELECTRIC,battle)
proc { |ability, user, target, move, type, battle, show_message|
next pbBattleMoveImmunityHealAbility(user, target, move, type, :ELECTRIC, battle, show_message)
}
)
BattleHandlers::MoveImmunityTargetAbility.add(:WATERABSORB,
proc { |ability,user,target,move,type,battle|
next pbBattleMoveImmunityHealAbility(user,target,move,type,:WATER,battle)
proc { |ability, user, target, move, type, battle, show_message|
next pbBattleMoveImmunityHealAbility(user, target, move, type, :WATER, battle, show_message)
}
)
BattleHandlers::MoveImmunityTargetAbility.copy(:WATERABSORB,:DRYSKIN)
BattleHandlers::MoveImmunityTargetAbility.add(:WONDERGUARD,
proc { |ability,user,target,move,type,battle|
proc { |ability, user, target, move, type, battle, show_message|
next false if move.statusMove?
next false if !type || Effectiveness.super_effective?(target.damageState.typeMod)
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1} avoided damage with {2}!",target.pbThis,target.abilityName))
if show_message
battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
else
battle.pbDisplay(_INTL("{1} avoided damage with {2}!", target.pbThis, target.abilityName))
end
battle.pbHideAbilitySplash(target)
end
battle.pbHideAbilitySplash(target)
next true
}
)