mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Coded some Gen 9 ability/item/move effects
This commit is contained in:
@@ -10,7 +10,7 @@ class Battle::Move::UserTakesTargetItem < Battle::Move
|
||||
return if !target.item || user.item
|
||||
return if target.unlosableItem?(target.item)
|
||||
return if user.unlosableItem?(target.item)
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !target.beingMoldBroken?
|
||||
itemName = target.itemName
|
||||
user.item = target.item
|
||||
# Permanently steal the item from wild Pokémon
|
||||
@@ -91,7 +91,7 @@ class Battle::Move::UserTargetSwapItems < Battle::Move
|
||||
@battle.pbDisplay(_INTL("But it failed!")) if show_message
|
||||
return true
|
||||
end
|
||||
if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||
if target.hasActiveAbility?(:STICKYHOLD) && !target.beingMoldBroken?
|
||||
if show_message
|
||||
@battle.pbShowAbilitySplash(target)
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
@@ -181,7 +181,7 @@ class Battle::Move::RemoveTargetItem < Battle::Move
|
||||
return if user.fainted?
|
||||
return if target.damageState.unaffected || target.damageState.substitute
|
||||
return if !target.item || target.unlosableItem?(target.item)
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !target.beingMoldBroken?
|
||||
itemName = target.itemName
|
||||
target.pbRemoveItem(false)
|
||||
@battle.pbDisplay(_INTL("{1} dropped its {2}!", target.pbThis, itemName))
|
||||
@@ -197,7 +197,7 @@ class Battle::Move::DestroyTargetBerryOrGem < Battle::Move
|
||||
return if !target.item || (!target.item.is_berry? &&
|
||||
!(Settings::MECHANICS_GENERATION >= 6 && target.item.is_gem?))
|
||||
return if target.unlosableItem?(target.item)
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !target.beingMoldBroken?
|
||||
item_name = target.itemName
|
||||
target.pbRemoveItem
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} was incinerated!", target.pbThis, item_name))
|
||||
@@ -219,7 +219,7 @@ class Battle::Move::CorrodeTargetItem < Battle::Move
|
||||
@battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message
|
||||
return true
|
||||
end
|
||||
if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||
if target.hasActiveAbility?(:STICKYHOLD) && !target.beingMoldBroken?
|
||||
if show_message
|
||||
@battle.pbShowAbilitySplash(target)
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
@@ -386,7 +386,7 @@ class Battle::Move::UserConsumeTargetBerry < Battle::Move
|
||||
return if user.fainted? || target.fainted?
|
||||
return if target.damageState.unaffected || target.damageState.substitute
|
||||
return if !target.item || !target.item.is_berry? || target.unlosableItem?(target.item)
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !target.beingMoldBroken?
|
||||
item = target.item
|
||||
itemName = target.itemName
|
||||
user.setBelched
|
||||
@@ -438,7 +438,7 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
|
||||
def pbEffectAgainstTarget(user, target)
|
||||
return if target.damageState.substitute
|
||||
return if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker
|
||||
return if target.hasActiveAbility?(:SHIELDDUST) && !target.beingMoldBroken?
|
||||
case user.item_id
|
||||
when :POISONBARB
|
||||
target.pbPoison(user) if target.pbCanPoison?(user, false, self)
|
||||
|
||||
Reference in New Issue
Block a user