Added some Gen 8 item effects, added super shininess

This commit is contained in:
Maruno17
2021-06-23 23:15:15 +01:00
parent 0ad86e6b03
commit feb9e3b2de
20 changed files with 586 additions and 171 deletions

View File

@@ -184,6 +184,10 @@ class PokeBattle_Battler
return @pokemon && @pokemon.shiny?
end
def super_shiny?
return @pokemon && @pokemon.super_shiny?
end
def owned?
return false if !@battle.wildBattle?
return $Trainer.owned?(displaySpecies)

View File

@@ -3432,10 +3432,10 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
:PIXIEPLATE,:SKYPLATE,:SPLASHPLATE,:SPOOKYPLATE,:STONEPLATE,
:TOXICPLATE,:ZAPPLATE
],
80 => [:ASSAULTVEST,:DAWNSTONE,:DUSKSTONE,:ELECTIRIZER,:MAGMARIZER,
:ODDKEYSTONE,:OVALSTONE,:PROTECTOR,:QUICKCLAW,:RAZORCLAW,:SACHET,
:SAFETYGOGGLES,:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,
:WHIPPEDDREAM
80 => [:ASSAULTVEST,:CHIPPEDPOT,:CRACKEDPOT,:DAWNSTONE,:DUSKSTONE,
:ELECTIRIZER,:HEAVYDUTYBOOTS,:MAGMARIZER,:ODDKEYSTONE,:OVALSTONE,
:PROTECTOR,:QUICKCLAW,:RAZORCLAW,:SACHET,:SAFETYGOGGLES,
:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM
],
70 => [:DRAGONFANG,:POISONBARB,
# EV-training items (Macho Brace is 60)
@@ -3444,7 +3444,7 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
# Drives
:BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE
],
60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LUSTROUSORB,
60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LEEK,:LUSTROUSORB,
:MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER
],
50 => [:DUBIOUSDISC,:SHARPBEAK,
@@ -3471,7 +3471,7 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
:BURNHEAL,:CASTELIACONE,:ELIXIR,:ENERGYPOWDER,:ENERGYROOT,:ETHER,
:FRESHWATER,:FULLHEAL,:FULLRESTORE,:HEALPOWDER,:HYPERPOTION,
:ICEHEAL,:LAVACOOKIE,:LEMONADE,:LUMIOSEGALETTE,:MAXELIXIR,
:MAXETHER,:MAXPOTION,:MAXREVIVE,:MOOMOOMILK,:OLDGATEAU,
:MAXETHER,:MAXHONEY,:MAXPOTION,:MAXREVIVE,:MOOMOOMILK,:OLDGATEAU,
:PARALYZEHEAL,:PARLYZHEAL,:PEWTERCRUNCHIES,:POTION,:RAGECANDYBAR,
:REDFLUTE,:REVIVALHERB,:REVIVE,:SHALOURSABLE,:SODAPOP,
:SUPERPOTION,:SWEETHEART,:YELLOWFLUTE,
@@ -3486,12 +3486,14 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
:XSPEED,:XSPEED2,:XSPEED3,:XSPEED6,
:DIREHIT,:DIREHIT2,:DIREHIT3,
:ABILITYURGE,:GUARDSPEC,:ITEMDROP,:ITEMURGE,:RESETURGE,
:MAXMUSHROOMS,
# Vitamins
:CALCIUM,:CARBOS,:HPUP,:IRON,:PPUP,:PPMAX,:PROTEIN,:ZINC,
:RARECANDY,
# Most evolution stones (see also 80)
:EVERSTONE,:FIRESTONE,:ICESTONE,:LEAFSTONE,:MOONSTONE,:SUNSTONE,
:THUNDERSTONE,:WATERSTONE,
:THUNDERSTONE,:WATERSTONE,:SWEETAPPLE,:TARTAPPLE, :GALARICACUFF,
:GALARICAWREATH,
# Repels
:MAXREPEL,:REPEL,:SUPERREPEL,
# Mulches
@@ -3503,9 +3505,13 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
:BALMMUSHROOM,:BIGMUSHROOM,:BIGNUGGET,:BIGPEARL,:COMETSHARD,
:NUGGET,:PEARL,:PEARLSTRING,:RELICBAND,:RELICCOPPER,:RELICCROWN,
:RELICGOLD,:RELICSILVER,:RELICSTATUE,:RELICVASE,:STARDUST,
:STARPIECE,:STRANGESOUVENIR,:TINYMUSHROOM
:STARPIECE,:STRANGESOUVENIR,:TINYMUSHROOM,
# Exp Candies
:EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL
],
20 => [# Wings
20 => [# Feathers
:CLEVERFEATHER,:GENIUSFEATHER,:HEALTHFEATHER,:MUSCLEFEATHER,
:PRETTYFEATHER,:RESISTFEATHER,:SWIFTFEATHER,
:CLEVERWING,:GENIUSWING,:HEALTHWING,:MUSCLEWING,:PRETTYWING,
:RESISTWING,:SWIFTWING
],
@@ -3523,7 +3529,16 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
:FULLINCENSE,:LAXINCENSE,:LUCKINCENSE,:ODDINCENSE,:PUREINCENSE,
:ROCKINCENSE,:ROSEINCENSE,:SEAINCENSE,:WAVEINCENSE,
# Scarves
:BLUESCARF,:GREENSCARF,:PINKSCARF,:REDSCARF,:YELLOWSCARF
:BLUESCARF,:GREENSCARF,:PINKSCARF,:REDSCARF,:YELLOWSCARF,
# Mints
:LONELYMINT, :ADAMANTMINT, :NAUGHTYMINT, :BRAVEMINT, :BOLDMINT,
:IMPISHMINT, :LAXMINT, :RELAXEDMINT, :MODESTMINT, :MILDMINT,
:RASHMINT, :QUIETMINT, :CALMMINT, :GENTLEMINT, :CAREFULMINT,
:SASSYMINT, :TIMIDMINT, :HASTYMINT, :JOLLYMINT, :NAIVEMINT,
:SERIOUSMINT,
# Sweets
:STRAWBERRYSWEET, :LOVESWEET, :BERRYSWEET, :CLOVERSWEET,
:FLOWERSWEET, :STARSWEET, :RIBBONSWEET
]
}
end
@@ -3534,7 +3549,7 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
return if @willFail
@willFail = true if user.item.is_berry? && !user.canConsumeBerry?
return if @willFail
return if user.item.is_mega_stone?
return if user.item.is_mega_stone? || user.item.is_TR?
flingableItem = false
@flingPowers.each do |_power, items|
next if !items.include?(user.item_id)
@@ -3565,6 +3580,11 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
def pbBaseDamage(baseDmg,user,target)
return 10 if user.item && user.item.is_berry?
return 80 if user.item && user.item.is_mega_stone?
if user.item.is_TR?
ret = GameData::Move.get(user.item.move).base_damage
ret = 10 if ret < 10
return ret
end
@flingPowers.each do |power,items|
return power if items.include?(user.item_id)
end

View File

@@ -144,6 +144,8 @@ class PokeBattle_Battle
exp = (exp*1.5).floor
end
end
# Exp. Charm increases Exp gained
exp = exp * 3 / 2 if GameData::Item.exists?(:EXPCHARM) && $PokemonBag.pbHasItem?(:EXPCHARM)
# Modify Exp gain based on pkmn's held item
i = BattleHandlers.triggerExpGainModifierItem(pkmn.item,pkmn,exp)
if i<0

View File

@@ -350,7 +350,7 @@ class PokeBattle_Battle
# Entry hazards
# Stealth Rock
if battler.pbOwnSide.effects[PBEffects::StealthRock] && battler.takesIndirectDamage? &&
GameData::Type.exists?(:ROCK)
GameData::Type.exists?(:ROCK) && !battler.hasActiveItem?(:HEAVYDUTYBOOTS)
bTypes = battler.pbTypes(true)
eff = Effectiveness.calculate(:ROCK, bTypes[0], bTypes[1], bTypes[2])
if !Effectiveness.ineffective?(eff)
@@ -366,7 +366,7 @@ class PokeBattle_Battle
end
# Spikes
if battler.pbOwnSide.effects[PBEffects::Spikes]>0 && battler.takesIndirectDamage? &&
!battler.airborne?
!battler.airborne? && !battler.hasActiveItem?(:HEAVYDUTYBOOTS)
spikesDiv = [8,6,4][battler.pbOwnSide.effects[PBEffects::Spikes]-1]
oldHP = battler.hp
battler.pbReduceHP(battler.totalhp/spikesDiv,false)
@@ -382,7 +382,7 @@ class PokeBattle_Battle
if battler.pbHasType?(:POISON)
battler.pbOwnSide.effects[PBEffects::ToxicSpikes] = 0
pbDisplay(_INTL("{1} absorbed the poison spikes!",battler.pbThis))
elsif battler.pbCanPoison?(nil,false)
elsif battler.pbCanPoison?(nil,false) && !battler.hasActiveItem?(:HEAVYDUTYBOOTS)
if battler.pbOwnSide.effects[PBEffects::ToxicSpikes]==2
battler.pbPoison(nil,_INTL("{1} was badly poisoned by the poison spikes!",battler.pbThis),true)
else
@@ -392,7 +392,7 @@ class PokeBattle_Battle
end
# Sticky Web
if battler.pbOwnSide.effects[PBEffects::StickyWeb] && !battler.fainted? &&
!battler.airborne?
!battler.airborne? && !battler.hasActiveItem?(:HEAVYDUTYBOOTS)
pbDisplay(_INTL("{1} was caught in a sticky web!",battler.pbThis))
if battler.pbCanLowerStatStage?(:SPEED)
battler.pbLowerStatStage(:SPEED,1,nil)

View File

@@ -57,7 +57,7 @@ class PokeBattle_AI
]
allStatusItems = [
:FULLHEAL, :LAVACOOKIE, :OLDGATEAU, :CASTELIACONE, :LUMIOSEGALETTE,
:SHALOURSABLE, :BIGMALASADA, :LUMBERRY, :HEALPOWDER
:SHALOURSABLE, :BIGMALASADA, :PEWTERCRUNCHIES, :LUMBERRY, :HEALPOWDER
]
allStatusItems.push(:RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
xItems = {

View File

@@ -975,12 +975,14 @@ BattleHandlers::CriticalCalcUserItem.add(:RAZORCLAW,
BattleHandlers::CriticalCalcUserItem.copy(:RAZORCLAW,:SCOPELENS)
BattleHandlers::CriticalCalcUserItem.add(:STICK,
BattleHandlers::CriticalCalcUserItem.add(:LEEK,
proc { |item,user,target,c|
next c+2 if user.isSpecies?(:FARFETCHD)
next c+2 if user.isSpecies?(:FARFETCHD) || user.isSpecies?(:SIRFETCHD)
}
)
BattleHandlers::CriticalCalcUserItem.copy(:LEEK, :STICK)
#===============================================================================
# CriticalCalcTargetItem handlers
#===============================================================================

View File

@@ -43,7 +43,11 @@ class PokeBattle_Scene
for i in 0...@battle.sideSizes[1]
idxBattler = 2*i+1
next if !@battle.battlers[idxBattler] || !@battle.battlers[idxBattler].shiny?
pbCommonAnimation("Shiny",@battle.battlers[idxBattler])
if Settings::SUPER_SHINY && @battle.battlers[idxBattler].super_shiny?
pbCommonAnimation("SuperShiny", @battle.battlers[idxBattler])
else
pbCommonAnimation("Shiny", @battle.battlers[idxBattler])
end
end
end
end
@@ -130,7 +134,11 @@ class PokeBattle_Scene
# Play shininess animations for shiny Pokémon
sendOuts.each do |b|
next if !@battle.showAnims || !@battle.battlers[b[0]].shiny?
pbCommonAnimation("Shiny",@battle.battlers[b[0]])
if Settings::SUPER_SHINY && @battle.battlers[b[0]].super_shiny?
pbCommonAnimation("SuperShiny", @battle.battlers[b[0]])
else
pbCommonAnimation("Shiny", @battle.battlers[b[0]])
end
end
end

View File

@@ -13,16 +13,17 @@ class PokeBattle_FakeBattler
@index = index
end
def pokemonIndex; return 0; end
def species; return @pokemon.species; end
def gender; return @pokemon.gender; end
def status; return @pokemon.status; end
def hp; return @pokemon.hp; end
def level; return @pokemon.level; end
def name; return @pokemon.name; end
def totalhp; return @pokemon.totalhp; end
def displayGender; return @pokemon.gender; end
def shiny?; return @pokemon.shiny?; end
def pokemonIndex; return 0; end
def species; return @pokemon.species; end
def gender; return @pokemon.gender; end
def status; return @pokemon.status; end
def hp; return @pokemon.hp; end
def level; return @pokemon.level; end
def name; return @pokemon.name; end
def totalhp; return @pokemon.totalhp; end
def displayGender; return @pokemon.gender; end
def shiny?; return @pokemon.shiny?; end
def super_shiny?; return @pokemon.super_shiny?; end
def isSpecies?(check_species)
return @pokemon && @pokemon.isSpecies?(check_species)

View File

@@ -27,7 +27,7 @@ class PokeBattle_RealBattlePeer
player.party[player.party.length] = pkmn
return -1
end
pkmn.heal
pkmn.heal if Settings::HEAL_STORED_POKEMON
oldCurBox = pbCurrentBox
storedBox = $PokemonStorage.pbStoreCaught(pkmn)
if storedBox<0

View File

@@ -270,6 +270,16 @@ BattleHandlers::PriorityBracketUseAbility.add(:QUICKDRAW,
Hunger Switch
At the end of each round, switches the bearer's form (if it is Morpeko).
Ice Face
When bearer is hit by a physical move while in its initial form, it takes no
damage and its form changes. At he end of a round in which hail weather started,
the bearer regains its initial form.
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.
Ball Fetch
At the end of a round in which a thrown Poké Ball fails to catch a Pokémon,
bearer picks up that Poké Ball. Applies only to the first thrown Poké Ball, and
@@ -280,11 +290,6 @@ 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
as fast (doesn't stack with other such abilities).
Ice Face
When bearer is hit by a physical move while in its initial form, it takes no
damage and its form changes. At he end of a round in which hail weather started,
the bearer regains its initial form.
As One (Chilling)
Combination of Unnerve and Chilling Neigh. Message upon entering battle says it
has two abilities; other triggers use the name of the appropriate ability rather
@@ -323,9 +328,4 @@ The bearer's type changes depending on the terrain. Triggers upon entering
battle and when terrain changes (and not when bearer's type is changed, e.g.
with Soak).
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.
=end

View File

@@ -1,12 +1,290 @@
ItemHandlers::UseOnPokemon.add(:EXPCANDYXS, proc { |item, pkmn, scene|
if pkmn.level >= GameData::GrowthRate.max_level || pkmn.shadowPokemon?
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
gain_amount = 100
maximum = ((pkmn.growth_rate.maximum_exp - pkmn.exp) / gain_amount.to_f).ceil
qty = scene.scene.pbChooseNumber(
_INTL("How many {1} do you want to use?", GameData::Item.get(item).name), maximum)
next false if qty = 0
pbChangeExp(pkmn, pkmn.exp + gain_amount * qty, scene)
$PokemonBag.pbDeleteItem(item, qty - 1)
scene.pbHardRefresh
next true
})
ItemHandlers::UseOnPokemon.add(:EXPCANDYS, proc { |item, pkmn, scene|
if pkmn.level >= GameData::GrowthRate.max_level || pkmn.shadowPokemon?
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
gain_amount = 800
maximum = ((pkmn.growth_rate.maximum_exp - pkmn.exp) / gain_amount.to_f).ceil
qty = scene.scene.pbChooseNumber(
_INTL("How many {1} do you want to use?", GameData::Item.get(item).name), maximum)
next false if qty = 0
pbChangeExp(pkmn, pkmn.exp + gain_amount * qty, scene)
$PokemonBag.pbDeleteItem(item, qty - 1)
scene.pbHardRefresh
next true
})
ItemHandlers::UseOnPokemon.add(:EXPCANDYM, proc { |item, pkmn, scene|
if pkmn.level >= GameData::GrowthRate.max_level || pkmn.shadowPokemon?
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
gain_amount = 3_000
maximum = ((pkmn.growth_rate.maximum_exp - pkmn.exp) / gain_amount.to_f).ceil
qty = scene.scene.pbChooseNumber(
_INTL("How many {1} do you want to use?", GameData::Item.get(item).name), maximum)
next false if qty = 0
pbChangeExp(pkmn, pkmn.exp + gain_amount * qty, scene)
$PokemonBag.pbDeleteItem(item, qty - 1)
scene.pbHardRefresh
next true
})
ItemHandlers::UseOnPokemon.add(:EXPCANDYL, proc { |item, pkmn, scene|
if pkmn.level >= GameData::GrowthRate.max_level || pkmn.shadowPokemon?
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
gain_amount = 10_000
maximum = ((pkmn.growth_rate.maximum_exp - pkmn.exp) / gain_amount.to_f).ceil
qty = scene.scene.pbChooseNumber(
_INTL("How many {1} do you want to use?", GameData::Item.get(item).name), maximum)
next false if qty = 0
pbChangeExp(pkmn, pkmn.exp + gain_amount * qty, scene)
$PokemonBag.pbDeleteItem(item, qty - 1)
scene.pbHardRefresh
next true
})
ItemHandlers::UseOnPokemon.add(:EXPCANDYXL, proc { |item, pkmn, scene|
if pkmn.level >= GameData::GrowthRate.max_level || pkmn.shadowPokemon?
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
gain_amount = 30_000
maximum = ((pkmn.growth_rate.maximum_exp - pkmn.exp) / gain_amount.to_f).ceil
qty = scene.scene.pbChooseNumber(
_INTL("How many {1} do you want to use?", GameData::Item.get(item).name), maximum)
next false if qty = 0
pbChangeExp(pkmn, pkmn.exp + gain_amount * qty, scene)
$PokemonBag.pbDeleteItem(item, qty - 1)
scene.pbHardRefresh
next true
})
def pbNatureChangingMint(new_nature, item, pkmn, scene)
if pkmn.nature_for_stats == new_nature
scene.pbDisplay(_INTL("It won't have any effect."))
return false
end
if !scene.pbConfirm(_INTL("It might affect {1}'s stats. Are you sure you want to use it?", pkmn.name))
return false
end
pkmn.nature_for_stats = new_nature
pkmn.calc_stats
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s stats may have changed due to the effects of the {2}!",
pkmn.name, GameData::Item.get(item).name))
return true
end
ItemHandlers::UseOnPokemon.add(:LONELYMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:LONELY, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:ADAMANTMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:ADAMANT, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:NAUGHTYMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:NAUGHTY, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:BRAVEMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:BRAVE, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:BOLDMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:BOLD, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:IMPISHMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:IMPISH, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:LAXMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:LAX, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:RELAXEDMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:RELAXED, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:MODESTMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:MODEST, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:MILDMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:MILD, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:RASHMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:RASH, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:QUIETMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:QUIET, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:CALMMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:CALM, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:GENTLEMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:GENTLE, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:CAREFULMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:CAREFUL, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:SASSYMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:SASSY, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:TIMIDMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:TIMID, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:HASTYMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:HASTY, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:JOLLYMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:JOLLY, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:NAIVEMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:NAIVE, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.add(:SERIOUSMINT, proc { |item, pkmn, scene|
pbNatureChangingMint(:SERIOUS, item, pkmn, scene)
})
ItemHandlers::UseOnPokemon.copy(:MAXREVIVE, :MAXHONEY)
ItemHandlers::CanUseInBattle.copy(:REVIVE, :MAXHONEY)
ItemHandlers::BattleUseOnPokemon.copy(:MAXREVIVE, :MAXHONEY)
ItemHandlers::CanUseInBattle.add(:MAXMUSHROOMS, proc { |item, pokemon, battler, move, firstAction, battle, scene, showMessages|
if !pbBattleItemCanRaiseStat?(:ATTACK, battler, scene, false) &&
!pbBattleItemCanRaiseStat?(:DEFENSE, battler, scene, false) &&
!pbBattleItemCanRaiseStat?(:SPECIAL_ATTACK, battler, scene, false) &&
!pbBattleItemCanRaiseStat?(:SPECIAL_DEFENSE, battler, scene, false) &&
!pbBattleItemCanRaiseStat?(:SPEED, battler, scene, false)
scene.pbDisplay(_INTL("It won't have any effect.")) if showMessages
next false
end
next true
})
ItemHandlers::BattleUseOnBattler.add(:MAXMUSHROOMS,proc { |item, battler, scene|
battler.pbRaiseStatStage(:ATTACK, 1, battler) if battler.pbCanRaiseStatStage?(:ATTACK, battler)
battler.pbRaiseStatStage(:DEFENSE, 1, battler) if battler.pbCanRaiseStatStage?(:DEFENSE, battler)
battler.pbRaiseStatStage(:SPECIAL_ATTACK, 1, battler) if battler.pbCanRaiseStatStage?(:SPECIAL_ATTACK, battler)
battler.pbRaiseStatStage(:SPECIAL_DEFENSE, 1, battler) if battler.pbCanRaiseStatStage?(:SPECIAL_DEFENSE, battler)
battler.pbRaiseStatStage(:SPEED, 1, battler) if battler.pbCanRaiseStatStage?(:SPEED, battler)
battler.pokemon.changeHappiness("battleitem")
})
ItemHandlers::UseOnPokemon.add(:REINSOFUNITY, proc { |item, pkmn, scene|
if !pkmn.isSpecies?(:CALYREX)
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
# Fusing
if pkmn.fused.nil?
chosen = scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
next false if chosen < 0
other_pkmn = $Trainer.party[chosen]
if pkmn == other_pkmn
scene.pbDisplay(_INTL("It cannot be fused with itself."))
next false
elsif other_pkmn.egg?
scene.pbDisplay(_INTL("It cannot be fused with an Egg."))
next false
elsif other_pkmn.fainted?
scene.pbDisplay(_INTL("It cannot be fused with that fainted Pokémon."))
next false
elsif !other_pkmn.isSpecies?(:GLASTRIER) &&
!other_pkmn.isSpecies?(:SPECTRIER)
scene.pbDisplay(_INTL("It cannot be fused with that Pokémon."))
next false
end
newForm = 0
newForm = 1 if other_pkmn.isSpecies?(:GLASTRIER)
newForm = 2 if other_pkmn.isSpecies?(:SPECTRIER)
pkmn.setForm(newForm) {
pkmn.fused = other_pkmn
$Trainer.remove_pokemon_at_index(chosen)
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1} changed Forme!", pkmn.name))
}
next true
end
# Unfusing
if $Trainer.party_full?
scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
next false
end
pkmn.setForm(0) {
$Trainer.party[$Trainer.party.length] = pkmn.fused
pkmn.fused = nil
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1} changed Forme!", pkmn.name))
}
next true
})
ItemHandlers::UseOnPokemon.add(:ABILITYPATCH, proc { |item, pkmn, scene|
if scene.pbConfirm(_INTL("Do you want to change {1}'s Ability?", pkmn.name))
abils = pkmn.getAbilityList
new_ability_id = nil
abils.each { |a| new_ability_id = a[0] if a[1] == 2 }
if !new_ability_id || pkmn.hasHiddenAbility?
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
new_ability_name = GameData::Ability.get(new_ability_id).name
pkmn.ability_index = 2
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed! Its Ability is now {2}!",
pkmn.name, new_ability_name))
next true
end
next false
})
=begin
Leek (rename of Stick, works for Sirfetch'd too)
Feathers (rename of Wings)
Pewter Crunchies (Full Heal clone)
#===============================================================================
Pokémon Box Link
Key item, gives access to Pokémon storage (except at certain times, perhaps when
a Game Switch is on).
Key item, unusable. Enables pressing a button while in the party screen to open
the "Organise Boxes" mode of Pokémon storage. This is disabled at certain times,
perhaps when a Game Switch is on.
Rusted Sword
Changes form of Zacian holding it. In battle, changes Zacian's Iron Head to
@@ -16,20 +294,8 @@ Rusted Shield
Changes form of Zamazenta holding it. In battle, changes Zamazenta's Iron Head
to Behemoth Bash.
Fossils
No effect themselves, but can be combined and revived.
Sweets
Milcery evolution item (spin while holding).
Sweet Apple, Tart Apple
Evolution stone for Applin.
Cracked Pot, Chipped Pot
Evolution stone for Sinistea.
Throat Spray
After holder uses a sound-based move, consume item and holders gets +1 Special
After holder uses a sound-based move, consume item and holder gets +1 Special
Attack (unless battle ends).
Eject Pack
@@ -37,14 +303,10 @@ When holder's stat(s) is lowered, consume item and holder switches out. Not
triggered by Parting Shot, or if a faster mon's Eject Button/Eject Pack
triggers.
Heavy-Duty Boots
Holder is immune to entry hazards. Poison-type holder will still remove Toxic
Spikes.
Blunder Policy
If holder's move fails its accuracy check, consume item and holder gets +2
Speed. Doesn't trigger if move was a OHKO move, or Triple Kick that hit at least
once.
Speed. Doesn't trigger if move was an OHKO move, or Triple Kick that hit at
least once.
Room Service
If Trick Room is used, or if holder switches in while Trick Room applies,
@@ -53,40 +315,13 @@ consume item and holder gets -1 Speed.
Utility Umbrella
Holder is unaffected by sun and rain weathers.
Exp. Candies
Gives a fixed number of Exp points.
TRs
Mints
Overrides a Pokémon's nature effect.
Catching Charm
Increases the chance of a critical catch.
Increases the chance of a critical catch. By how much?
Rotom Catalog
Changes Rotom's form (choosable).
Max Honey
Max Revive clone.
Max Mushrooms
Use from Bag: Raise a Pokémon's Attack, Defense, Speed, Special Attack and
Special Defence by 1 stage each.
Galarica Cuff, Galarica Wreath
Evolution stone for Galarian Slowpoke.
Exp. Charm
Boosts experience gained from battles by 50%.
Mark Charm
Increases the chance of a wild Pokémon having a mark
Reins of Unity
Fuses Calyrex with either Glastrier or Spectrier, or unfuses them.
Ability Patch
Changes a Pokémon's ability to its hidden ability.
Increases the chance of a wild Pokémon having a mark.
=end