Added some more Gen 8 item effects, added Intimidate being blocked by some abilities, fixed Nectars being usable on fainted Oricorio

This commit is contained in:
Maruno17
2021-07-17 20:48:06 +01:00
parent 78f5530cbe
commit 14748f4999
22 changed files with 206 additions and 152 deletions

View File

@@ -858,8 +858,7 @@ ItemHandlers::UseOnPokemon.add(:GRACIDEA,proc { |item,pkmn,scene|
pkmn.status == :FROZEN || PBDayNight.isNight?
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
@@ -874,9 +873,9 @@ ItemHandlers::UseOnPokemon.add(:REDNECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==0
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
pkmn.setForm(0) {
scene.pbRefresh
@@ -889,9 +888,9 @@ ItemHandlers::UseOnPokemon.add(:YELLOWNECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==1
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
pkmn.setForm(1) {
scene.pbRefresh
@@ -904,9 +903,9 @@ ItemHandlers::UseOnPokemon.add(:PINKNECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==2
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
pkmn.setForm(2) {
scene.pbRefresh
@@ -919,9 +918,9 @@ ItemHandlers::UseOnPokemon.add(:PURPLENECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==3
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
pkmn.setForm(3) {
scene.pbRefresh
@@ -936,8 +935,7 @@ ItemHandlers::UseOnPokemon.add(:REVEALGLASS,proc { |item,pkmn,scene|
!pkmn.isSpecies?(:LANDORUS)
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
@@ -953,9 +951,9 @@ ItemHandlers::UseOnPokemon.add(:PRISONBOTTLE,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:HOOPA)
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
newForm = (pkmn.form==0) ? 1 : 0
pkmn.setForm(newForm) {
@@ -969,8 +967,7 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:KYUREM)
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
@@ -1022,8 +1019,7 @@ ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 2
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
@@ -1071,8 +1067,7 @@ ItemHandlers::UseOnPokemon.add(:NLUNARIZER,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 1
scene.pbDisplay(_INTL("It had no effect."))
next false
end
if pkmn.fainted?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end

View File

@@ -219,8 +219,7 @@ 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?
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
@@ -287,27 +286,54 @@ ItemHandlers::UseOnPokemon.add(:ABILITYPATCH, proc { |item, pkmn, scene|
next false
})
ItemHandlers::UseOnPokemon.add(:ROTOMCATALOG, proc { |item, pkmn, scene|
if !pkmn.isSpecies?(:ROTOM)
scene.pbDisplay(_INTL("It had no effect."))
next false
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
choices = [
_INTL("Light bulb"),
_INTL("Microwave oven"),
_INTL("Washing machine"),
_INTL("Refrigerator"),
_INTL("Electric fan"),
_INTL("Lawn mower"),
_INTL("Cancel")
]
new_form = scene.pbShowCommands(_INTL("Which appliance would you like to order?"),
commands, pkmn.form)
if new_form == pkmn.form
scene.pbDisplay(_INTL("It won't have any effect."))
next false
elsif new_form > 0 && new_form < choices.length - 1
pkmn.setForm(new_form) {
scene.pbRefresh
scene.pbDisplay(_INTL("{1} transformed!", pkmn.name))
}
next true
end
next false
})
BattleHandlers::UserItemAfterMoveUse.add(:THROATSPRAY,
proc { |item, user, targets, move, numHits, battle|
next if battle.pbAllFainted?(user.idxOwnSide) ||
battle.pbAllFainted?(user.idxOpposingSide)
next if !move.soundMove? || numHits == 0
next if !user.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user)
user.pbRaiseStatStage(:SPECIAL_ATTACK, 1, user)
user.pbConsumeItem
}
)
=begin
#===============================================================================
Pokémon Box Link
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
Behemoth Blade.
Rusted Shield
Changes form of Zamazenta holding it. In battle, changes Zamazenta's Iron Head
to Behemoth Bash.
Throat Spray
After holder uses a sound-based move, consume item and holder gets +1 Special
Attack (unless battle ends).
Eject Pack
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
@@ -322,16 +348,12 @@ Room Service
If Trick Room is used, or if holder switches in while Trick Room applies,
consume item and holder gets -1 Speed.
Utility Umbrella
Holder is unaffected by sun and rain weathers.
Pokémon Box Link
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.
Catching Charm
Increases the chance of a critical catch. By how much?
Rotom Catalog
Changes Rotom's form (choosable).
Mark Charm
Increases the chance of a wild Pokémon having a mark.
=end