mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
Added "Consumable" property to items.txt, light effects now properly centre themselves on the event regardless of graphic size, Disguise/Double Iron Bash Gen 8 changes
This commit is contained in:
@@ -41,8 +41,7 @@ class PokeBattle_Battle
|
||||
#=============================================================================
|
||||
def pbConsumeItemInBag(item,idxBattler)
|
||||
return if !item
|
||||
useType = GameData::Item.get(item).battle_use
|
||||
return if useType==0 || (useType>=6 && useType<=10) # Not consumed upon use
|
||||
return if !GameData::Item.get(item).consumed_after_use?
|
||||
if pbOwnedByPlayer?(idxBattler)
|
||||
if !$PokemonBag.pbDeleteItem(item)
|
||||
raise _INTL("Tried to consume item that wasn't in the Bag somehow.")
|
||||
@@ -60,8 +59,7 @@ class PokeBattle_Battle
|
||||
|
||||
def pbReturnUnusedItemToBag(item,idxBattler)
|
||||
return if !item
|
||||
useType = GameData::Item.get(item).battle_use
|
||||
return if useType==0 || (useType>=6 && useType<=10) # Not consumed upon use
|
||||
return if !GameData::Item.get(item).consumed_after_use?
|
||||
if pbOwnedByPlayer?(idxBattler)
|
||||
if $PokemonBag && $PokemonBag.pbCanStore?(item)
|
||||
$PokemonBag.pbStoreItem(item)
|
||||
|
||||
@@ -107,21 +107,21 @@ class PokeBattle_Battle
|
||||
next false if !item
|
||||
battler = pkmn = nil
|
||||
case useType
|
||||
when 1, 2, 6, 7 # Use on Pokémon/Pokémon's move
|
||||
when 1, 2 # Use on Pokémon/Pokémon's move
|
||||
next false if !ItemHandlers.hasBattleUseOnPokemon(item)
|
||||
battler = pbFindBattler(idxPkmn,idxBattler)
|
||||
pkmn = pbParty(idxBattler)[idxPkmn]
|
||||
next false if !pbCanUseItemOnPokemon?(item,pkmn,battler,itemScene)
|
||||
when 3, 8 # Use on battler
|
||||
when 3 # Use on battler
|
||||
next false if !ItemHandlers.hasBattleUseOnBattler(item)
|
||||
battler = pbFindBattler(idxPkmn,idxBattler)
|
||||
pkmn = battler.pokemon if battler
|
||||
next false if !pbCanUseItemOnPokemon?(item,pkmn,battler,itemScene)
|
||||
when 4, 9 # Poké Balls
|
||||
when 4 # Poké Balls
|
||||
next false if idxPkmn<0
|
||||
battler = @battlers[idxPkmn]
|
||||
pkmn = battler.pokemon if battler
|
||||
when 5, 10 # No target (Poké Doll, Guard Spec., Launcher items)
|
||||
when 5 # No target (Poké Doll, Guard Spec., Launcher items)
|
||||
battler = @battlers[idxBattler]
|
||||
pkmn = battler.pokemon if battler
|
||||
else
|
||||
|
||||
@@ -71,13 +71,13 @@ class PokeBattle_Battle
|
||||
item = @choices[b.index][1]
|
||||
next if !item
|
||||
case GameData::Item.get(item).battle_use
|
||||
when 1, 2, 6, 7 # Use on Pokémon/Pokémon's move
|
||||
when 1, 2 # Use on Pokémon/Pokémon's move
|
||||
pbUseItemOnPokemon(item, @choices[b.index][2], b) if @choices[b.index][2] >= 0
|
||||
when 3, 8 # Use on battler
|
||||
when 3 # Use on battler
|
||||
pbUseItemOnBattler(item, @choices[b.index][2], b)
|
||||
when 4, 9 # Use Poké Ball
|
||||
when 4 # Use Poké Ball
|
||||
pbUsePokeBallInBattle(item, @choices[b.index][2], b)
|
||||
when 5, 10 # Use directly
|
||||
when 5 # Use directly
|
||||
pbUseItemInBattle(item, @choices[b.index][2], b)
|
||||
else
|
||||
next
|
||||
|
||||
Reference in New Issue
Block a user