mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Some battle method refactoring, fixed typo
This commit is contained in:
@@ -496,162 +496,3 @@ module BattleHandlers
|
||||
return (ret!=nil) ? ret : false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbBattleConfusionBerry(battler,battle,item,forced,flavor,confuseMsg)
|
||||
return false if !forced && !battler.canHeal?
|
||||
return false if !forced && !battler.canConsumePinchBerry?(Settings::MECHANICS_GENERATION >= 7)
|
||||
itemName = GameData::Item.get(item).name
|
||||
fraction_to_heal = 8 # Gens 6 and lower
|
||||
if Settings::MECHANICS_GENERATION == 7
|
||||
fraction_to_heal = 2
|
||||
elsif Settings::MECHANICS_GENERATION >= 8
|
||||
fraction_to_heal = 3
|
||||
end
|
||||
amt = battler.totalhp / fraction_to_heal
|
||||
ripening = false
|
||||
if battler.hasActiveAbility?(:RIPEN)
|
||||
battle.pbShowAbilitySplash(battler, forced)
|
||||
amt *= 2
|
||||
ripening = true
|
||||
end
|
||||
battle.pbCommonAnimation("EatBerry", battler) if !forced
|
||||
battle.pbHideAbilitySplash(battler) if ripening
|
||||
amt = battler.pbRecoverHP(amt)
|
||||
if amt>0
|
||||
if forced
|
||||
PBDebug.log("[Item triggered] Forced consuming of #{itemName}")
|
||||
battle.pbDisplay(_INTL("{1}'s HP was restored.",battler.pbThis))
|
||||
else
|
||||
battle.pbDisplay(_INTL("{1} restored its health using its {2}!",battler.pbThis,itemName))
|
||||
end
|
||||
end
|
||||
flavor_stat = [:ATTACK, :DEFENSE, :SPEED, :SPECIAL_ATTACK, :SPECIAL_DEFENSE][flavor]
|
||||
battler.nature.stat_changes.each do |change|
|
||||
next if change[1] > 0 || change[0] != flavor_stat
|
||||
battle.pbDisplay(confuseMsg)
|
||||
battler.pbConfuse if battler.pbCanConfuseSelf?(false)
|
||||
break
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
def pbBattleStatIncreasingBerry(battler,battle,item,forced,stat,increment=1)
|
||||
return false if !forced && !battler.canConsumePinchBerry?
|
||||
return false if !battler.pbCanRaiseStatStage?(stat,battler)
|
||||
itemName = GameData::Item.get(item).name
|
||||
ripening = false
|
||||
if battler.hasActiveAbility?(:RIPEN)
|
||||
battle.pbShowAbilitySplash(battler, forced)
|
||||
increment *= 2
|
||||
ripening = true
|
||||
end
|
||||
battle.pbCommonAnimation("EatBerry", battler) if !forced
|
||||
battle.pbHideAbilitySplash(battler) if ripening
|
||||
return battler.pbRaiseStatStageByCause(stat, increment, battler, itemName) if !forced
|
||||
PBDebug.log("[Item triggered] Forced consuming of #{itemName}")
|
||||
return battler.pbRaiseStatStage(stat, increment, battler)
|
||||
end
|
||||
|
||||
# For abilities that grant immunity to moves of a particular type, and raises
|
||||
# one of the ability's bearer's stats instead.
|
||||
def pbBattleMoveImmunityStatAbility(user, target, move, moveType, immuneType,
|
||||
stat, increment, battle, show_message)
|
||||
return false if user.index==target.index
|
||||
return false if moveType != immuneType
|
||||
# NOTE: If show_message is false (Dragon Darts only), the stat will not be
|
||||
# raised. This is not how the official games work, but I'm considering
|
||||
# that a bug because Dragon Darts won't be fired at target in the first
|
||||
# place if it's immune, so why would this ability be triggered by them?
|
||||
if show_message
|
||||
battle.pbShowAbilitySplash(target)
|
||||
if target.pbCanRaiseStatStage?(stat, target)
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
target.pbRaiseStatStage(stat, increment, target)
|
||||
else
|
||||
target.pbRaiseStatStageByCause(stat, increment, target, target.abilityName)
|
||||
end
|
||||
else
|
||||
if Battle::Scene::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
|
||||
return true
|
||||
end
|
||||
|
||||
# For abilities that grant immunity to moves of a particular type, and heals the
|
||||
# ability's bearer by 1/4 of its total HP instead.
|
||||
def pbBattleMoveImmunityHealAbility(user, target, move, moveType, immuneType, battle, show_message)
|
||||
return false if user.index==target.index
|
||||
return false if moveType != immuneType
|
||||
# NOTE: If show_message is false (Dragon Darts only), HP will not be healed.
|
||||
# This is not how the official games work, but I'm considering that a
|
||||
# bug because Dragon Darts won't be fired at target in the first place
|
||||
# if it's immune, so why would this ability be triggered by them?
|
||||
if show_message
|
||||
battle.pbShowAbilitySplash(target)
|
||||
if target.canHeal? && target.pbRecoverHP(target.totalhp / 4) > 0
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
battle.pbDisplay(_INTL("{1}'s HP was restored.", target.pbThis))
|
||||
else
|
||||
battle.pbDisplay(_INTL("{1}'s {2} restored its HP.", target.pbThis, target.abilityName))
|
||||
end
|
||||
else
|
||||
if Battle::Scene::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
|
||||
return true
|
||||
end
|
||||
|
||||
def pbBattleGem(user,type,move,mults,moveType)
|
||||
# Pledge moves never consume Gems
|
||||
return if move.is_a?(Battle::Move::PledgeMove)
|
||||
return if moveType != type
|
||||
user.effects[PBEffects::GemConsumed] = user.item_id
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
mults[:base_damage_multiplier] *= 1.3
|
||||
else
|
||||
mults[:base_damage_multiplier] *= 1.5
|
||||
end
|
||||
end
|
||||
|
||||
def pbBattleTypeWeakingBerry(type,moveType,target,mults)
|
||||
return if moveType != type
|
||||
return if !Effectiveness.super_effective?(target.damageState.typeMod) && moveType != :NORMAL
|
||||
mults[:final_damage_multiplier] /= 2
|
||||
target.damageState.berryWeakened = true
|
||||
ripening = false
|
||||
if target.hasActiveAbility?(:RIPEN)
|
||||
target.battle.pbShowAbilitySplash(target)
|
||||
mults[:final_damage_multiplier] /= 2
|
||||
ripening = true
|
||||
end
|
||||
target.battle.pbCommonAnimation("EatBerry",target)
|
||||
target.battle.pbHideAbilitySplash(target) if ripening
|
||||
end
|
||||
|
||||
def pbBattleWeatherAbility(weather,battler,battle,ignorePrimal=false)
|
||||
return if !ignorePrimal && [:HarshSun, :HeavyRain, :StrongWinds].include?(battle.field.weather)
|
||||
return if battle.field.weather==weather
|
||||
battle.pbShowAbilitySplash(battler)
|
||||
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||
battle.pbDisplay(_INTL("{1}'s {2} activated!",battler.pbThis,battler.abilityName))
|
||||
end
|
||||
fixedDuration = false
|
||||
fixedDuration = true if Settings::FIXED_DURATION_WEATHER_FROM_ABILITY &&
|
||||
![:HarshSun, :HeavyRain, :StrongWinds].include?(weather)
|
||||
battle.pbStartWeather(battler,weather,fixedDuration)
|
||||
# NOTE: The ability splash is hidden again in def pbStartWeather.
|
||||
end
|
||||
|
||||
@@ -647,19 +647,22 @@ BattleHandlers::MoveImmunityTargetAbility.add(:FLASHFIRE,
|
||||
|
||||
BattleHandlers::MoveImmunityTargetAbility.add(:LIGHTNINGROD,
|
||||
proc { |ability, user, target, move, type, battle, show_message|
|
||||
next pbBattleMoveImmunityStatAbility(user, target, move, type, :ELECTRIC, :SPECIAL_ATTACK, 1, battle, show_message)
|
||||
next target.pbMoveImmunityStatRaisingAbility(user, move, type,
|
||||
:ELECTRIC, :SPECIAL_ATTACK, 1, show_message)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::MoveImmunityTargetAbility.add(:MOTORDRIVE,
|
||||
proc { |ability, user, target, move, type, battle, show_message|
|
||||
next pbBattleMoveImmunityStatAbility(user, target, move, type, :ELECTRIC, :SPEED, 1, battle, show_message)
|
||||
next target.pbMoveImmunityStatRaisingAbility(user, move, type,
|
||||
:ELECTRIC, :SPEED, 1, show_message)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::MoveImmunityTargetAbility.add(:SAPSIPPER,
|
||||
proc { |ability, user, target, move, type, battle, show_message|
|
||||
next pbBattleMoveImmunityStatAbility(user, target, move, type, :GRASS, :ATTACK, 1, battle, show_message)
|
||||
next target.pbMoveImmunityStatRaisingAbility(user, move, type,
|
||||
:GRASS, :ATTACK, 1, show_message)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -682,7 +685,8 @@ BattleHandlers::MoveImmunityTargetAbility.add(:SOUNDPROOF,
|
||||
|
||||
BattleHandlers::MoveImmunityTargetAbility.add(:STORMDRAIN,
|
||||
proc { |ability, user, target, move, type, battle, show_message|
|
||||
next pbBattleMoveImmunityStatAbility(user, target, move, type, :WATER, :SPECIAL_ATTACK, 1, battle, show_message)
|
||||
next target.pbMoveImmunityStatRaisingAbility(user, move, type,
|
||||
:WATER, :SPECIAL_ATTACK, 1, show_message)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -706,13 +710,13 @@ BattleHandlers::MoveImmunityTargetAbility.add(:TELEPATHY,
|
||||
|
||||
BattleHandlers::MoveImmunityTargetAbility.add(:VOLTABSORB,
|
||||
proc { |ability, user, target, move, type, battle, show_message|
|
||||
next pbBattleMoveImmunityHealAbility(user, target, move, type, :ELECTRIC, battle, show_message)
|
||||
next target.pbMoveImmunityHealingAbility(user, move, type, :ELECTRIC, show_message)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::MoveImmunityTargetAbility.add(:WATERABSORB,
|
||||
proc { |ability, user, target, move, type, battle, show_message|
|
||||
next pbBattleMoveImmunityHealAbility(user, target, move, type, :WATER, battle, show_message)
|
||||
next target.pbMoveImmunityHealingAbility(user, move, type, :WATER, show_message)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1676,7 +1680,7 @@ BattleHandlers::TargetAbilityOnHit.add(:RATTLED,
|
||||
|
||||
BattleHandlers::TargetAbilityOnHit.add(:SANDSPIT,
|
||||
proc { |ability, user, target, move, battle|
|
||||
pbBattleWeatherAbility(:Sandstorm, battler, battle)
|
||||
battle.pbStartWeatherAbility(:Sandstorm, battler)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2389,13 +2393,13 @@ BattleHandlers::AbilityOnSwitchIn.add(:DAUNTLESSSHIELD,
|
||||
|
||||
BattleHandlers::AbilityOnSwitchIn.add(:DELTASTREAM,
|
||||
proc { |ability,battler,battle|
|
||||
pbBattleWeatherAbility(:StrongWinds, battler, battle, true)
|
||||
battle.pbStartWeatherAbility(:StrongWinds, battler, true)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::AbilityOnSwitchIn.add(:DESOLATELAND,
|
||||
proc { |ability,battler,battle|
|
||||
pbBattleWeatherAbility(:HarshSun, battler, battle, true)
|
||||
battle.pbStartWeatherAbility(:HarshSun, battler, true)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2413,13 +2417,13 @@ BattleHandlers::AbilityOnSwitchIn.add(:DOWNLOAD,
|
||||
|
||||
BattleHandlers::AbilityOnSwitchIn.add(:DRIZZLE,
|
||||
proc { |ability,battler,battle|
|
||||
pbBattleWeatherAbility(:Rain, battler, battle)
|
||||
battle.pbStartWeatherAbility(:Rain, battler)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::AbilityOnSwitchIn.add(:DROUGHT,
|
||||
proc { |ability,battler,battle|
|
||||
pbBattleWeatherAbility(:Sun, battler, battle)
|
||||
battle.pbStartWeatherAbility(:Sun, battler)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2655,7 +2659,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:PRESSURE,
|
||||
|
||||
BattleHandlers::AbilityOnSwitchIn.add(:PRIMORDIALSEA,
|
||||
proc { |ability,battler,battle|
|
||||
pbBattleWeatherAbility(:HeavyRain, battler, battle, true)
|
||||
battle.pbStartWeatherAbility(:HeavyRain, battler, true)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2670,7 +2674,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:PSYCHICSURGE,
|
||||
|
||||
BattleHandlers::AbilityOnSwitchIn.add(:SANDSTREAM,
|
||||
proc { |ability,battler,battle|
|
||||
pbBattleWeatherAbility(:Sandstorm, battler, battle)
|
||||
battle.pbStartWeatherAbility(:Sandstorm, battler)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2727,7 +2731,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:SLOWSTART,
|
||||
|
||||
BattleHandlers::AbilityOnSwitchIn.add(:SNOWWARNING,
|
||||
proc { |ability,battler,battle|
|
||||
pbBattleWeatherAbility(:Hail, battler, battle)
|
||||
battle.pbStartWeatherAbility(:Hail, battler)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -47,14 +47,15 @@ BattleHandlers::WeightCalcItem.add(:FLOATSTONE,
|
||||
|
||||
BattleHandlers::HPHealItem.add(:AGUAVBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleConfusionBerry(battler,battle,item,forced,4,
|
||||
_INTL("For {1}, the {2} was too bitter!",battler.pbThis(true),GameData::Item.get(item).name))
|
||||
next battler.pbConfusionBerry(item, forced, 4,
|
||||
_INTL("For {1}, the {2} was too bitter!", battler.pbThis(true), GameData::Item.get(item).name))
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::HPHealItem.add(:APICOTBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleStatIncreasingBerry(battler,battle,item,forced,:SPECIAL_DEFENSE)
|
||||
next battler.pbStatIncreasingBerry(item, forced, :SPECIAL_DEFENSE)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -77,21 +78,23 @@ BattleHandlers::HPHealItem.add(:BERRYJUICE,
|
||||
|
||||
BattleHandlers::HPHealItem.add(:FIGYBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleConfusionBerry(battler,battle,item,forced,0,
|
||||
_INTL("For {1}, the {2} was too spicy!",battler.pbThis(true),GameData::Item.get(item).name))
|
||||
next battler.pbConfusionBerry(item, forced, 0,
|
||||
_INTL("For {1}, the {2} was too spicy!", battler.pbThis(true), GameData::Item.get(item).name)
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::HPHealItem.add(:GANLONBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleStatIncreasingBerry(battler,battle,item,forced,:DEFENSE)
|
||||
next battler.pbStatIncreasingBerry(item, forced, :DEFENSE)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::HPHealItem.add(:IAPAPABERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleConfusionBerry(battler,battle,item,forced,1,
|
||||
_INTL("For {1}, the {2} was too sour!",battler.pbThis(true),GameData::Item.get(item).name))
|
||||
next battler.pbConfusionBerry(item, forced, 1,
|
||||
_INTL("For {1}, the {2} was too sour!", battler.pbThis(true), GameData::Item.get(item).name)
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -113,14 +116,15 @@ BattleHandlers::HPHealItem.add(:LANSATBERRY,
|
||||
|
||||
BattleHandlers::HPHealItem.add(:LIECHIBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleStatIncreasingBerry(battler,battle,item,forced,:ATTACK)
|
||||
next battler.pbStatIncreasingBerry(item, forced, :ATTACK)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::HPHealItem.add(:MAGOBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleConfusionBerry(battler,battle,item,forced,2,
|
||||
_INTL("For {1}, the {2} was too sweet!",battler.pbThis(true),GameData::Item.get(item).name))
|
||||
next battler.pbConfusionBerry(item, forced, 2,
|
||||
_INTL("For {1}, the {2} was too sweet!", battler.pbThis(true), GameData::Item.get(item).name)
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -169,13 +173,13 @@ BattleHandlers::HPHealItem.add(:ORANBERRY,
|
||||
|
||||
BattleHandlers::HPHealItem.add(:PETAYABERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleStatIncreasingBerry(battler,battle,item,forced,:SPECIAL_ATTACK)
|
||||
next battler.pbStatIncreasingBerry(item, forced, :SPECIAL_ATTACK)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::HPHealItem.add(:SALACBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleStatIncreasingBerry(battler,battle,item,forced,:SPEED)
|
||||
next battler.pbStatIncreasingBerry(item, forced, :SPEED)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -210,14 +214,15 @@ BattleHandlers::HPHealItem.add(:STARFBERRY,
|
||||
GameData::Stat.each_main_battle { |s| stats.push(s.id) if battler.pbCanRaiseStatStage?(s.id, battler) }
|
||||
next false if stats.length==0
|
||||
stat = stats[battle.pbRandom(stats.length)]
|
||||
next pbBattleStatIncreasingBerry(battler,battle,item,forced,stat,2)
|
||||
next battler.pbStatIncreasingBerry(item, forced, stat, 2)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::HPHealItem.add(:WIKIBERRY,
|
||||
proc { |item,battler,battle,forced|
|
||||
next pbBattleConfusionBerry(battler,battle,item,forced,3,
|
||||
_INTL("For {1}, the {2} was too dry!",battler.pbThis(true),GameData::Item.get(item).name))
|
||||
next battler.pbConfusionBerry(item, forced, 3,
|
||||
_INTL("For {1}, the {2} was too dry!", battler.pbThis(true), GameData::Item.get(item).name)
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -529,7 +534,7 @@ BattleHandlers::DamageCalcUserItem.copy(:BLACKGLASSES,:DREADPLATE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:BUGGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:BUG,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:BUG, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -555,7 +560,7 @@ BattleHandlers::DamageCalcUserItem.add(:CHOICESPECS,
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:DARKGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:DARK,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:DARK, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -577,13 +582,13 @@ BattleHandlers::DamageCalcUserItem.copy(:DRAGONFANG,:DRACOPLATE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:DRAGONGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:DRAGON,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:DRAGON, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:ELECTRICGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:ELECTRIC,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:ELECTRIC, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -597,37 +602,37 @@ BattleHandlers::DamageCalcUserItem.add(:EXPERTBELT,
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:FAIRYGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:FAIRY,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:FAIRY, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:FIGHTINGGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:FIGHTING,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:FIGHTING, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:FIREGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:FIRE,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:FIRE, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:FLYINGGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:FLYING,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:FLYING, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:GHOSTGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:GHOST,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:GHOST, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:GRASSGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:GRASS,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:GRASS, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -641,7 +646,7 @@ BattleHandlers::DamageCalcUserItem.add(:GRISEOUSORB,
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:GROUNDGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:GROUND,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:GROUND, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -655,7 +660,7 @@ BattleHandlers::DamageCalcUserItem.copy(:HARDSTONE,:STONEPLATE,:ROCKINCENSE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:ICEGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:ICE,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:ICE, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -738,7 +743,7 @@ BattleHandlers::DamageCalcUserItem.copy(:NEVERMELTICE,:ICICLEPLATE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:NORMALGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:NORMAL,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:NORMAL, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -758,19 +763,19 @@ BattleHandlers::DamageCalcUserItem.copy(:POISONBARB,:TOXICPLATE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:POISONGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:POISON,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:POISON, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:PSYCHICGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:PSYCHIC,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:PSYCHIC, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:ROCKGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:ROCK,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:ROCK, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -827,7 +832,7 @@ BattleHandlers::DamageCalcUserItem.copy(:SPELLTAG,:SPOOKYPLATE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:STEELGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:STEEL,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:STEEL, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -849,7 +854,7 @@ BattleHandlers::DamageCalcUserItem.copy(:TWISTEDSPOON,:MINDPLATE,:ODDINCENSE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:WATERGEM,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleGem(user,:WATER,move,mults,type)
|
||||
user.pbMoveTypePoweringUpGem(:WATER, move, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -874,37 +879,37 @@ BattleHandlers::DamageCalcTargetItem.add(:ASSAULTVEST,
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:BABIRIBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:STEEL,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:STEEL, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:CHARTIBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:ROCK,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:ROCK, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:CHILANBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:NORMAL,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:NORMAL, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:CHOPLEBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:FIGHTING,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:FIGHTING, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:COBABERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:FLYING,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:FLYING, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:COLBURBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:DARK,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:DARK, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -930,19 +935,19 @@ BattleHandlers::DamageCalcTargetItem.add(:EVIOLITE,
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:HABANBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:DRAGON,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:DRAGON, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:KASIBBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:GHOST,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:GHOST, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:KEBIABERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:POISON,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:POISON, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -956,37 +961,37 @@ BattleHandlers::DamageCalcTargetItem.add(:METALPOWDER,
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:OCCABERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:FIRE,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:FIRE, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:PASSHOBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:WATER,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:WATER, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:PAYAPABERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:PSYCHIC,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:PSYCHIC, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:RINDOBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:GRASS,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:GRASS, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:ROSELIBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:FAIRY,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:FAIRY, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:SHUCABERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:GROUND,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:GROUND, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1002,19 +1007,19 @@ BattleHandlers::DamageCalcTargetItem.add(:SOULDEW,
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:TANGABERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:BUG,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:BUG, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:WACANBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:ELECTRIC,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:ELECTRIC, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:YACHEBERRY,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
pbBattleTypeWeakingBerry(:ICE,type,target,mults)
|
||||
target.pbMoveTypeWeakeningBerry(:ICE, type, mults)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user