mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Implemented usage of GameData::Item
This commit is contained in:
@@ -627,7 +627,7 @@ class TriadScreen
|
||||
end
|
||||
|
||||
def pbQuantity(items,item)
|
||||
return ItemStorageHelper.pbQuantity(items,$PokemonGlobal.triads.maxSize,item)
|
||||
return ItemStorageHelper.pbQuantity(items, item)
|
||||
end
|
||||
|
||||
def pbAdd(items,item)
|
||||
@@ -635,8 +635,8 @@ class TriadScreen
|
||||
$PokemonGlobal.triads.maxPerSlot,item,1)
|
||||
end
|
||||
|
||||
def pbSubtract(items,item)
|
||||
return ItemStorageHelper.pbDeleteItem(items,$PokemonGlobal.triads.maxSize,item,1)
|
||||
def pbSubtract(items, item)
|
||||
return ItemStorageHelper.pbDeleteItem(items, item, 1)
|
||||
end
|
||||
|
||||
def flipBoard(x,y,attackerParam=nil,recurse=false)
|
||||
@@ -1041,7 +1041,7 @@ class TriadStorage
|
||||
end
|
||||
|
||||
def pbQuantity(item)
|
||||
return ItemStorageHelper.pbQuantity(@items,self.maxSize,item)
|
||||
return ItemStorageHelper.pbQuantity(@items, item)
|
||||
end
|
||||
|
||||
def pbCanStore?(item,qty=1)
|
||||
@@ -1052,8 +1052,8 @@ class TriadStorage
|
||||
return ItemStorageHelper.pbStoreItem(@items,self.maxSize,self.maxPerSlot,item,qty)
|
||||
end
|
||||
|
||||
def pbDeleteItem(item,qty=1)
|
||||
return ItemStorageHelper.pbDeleteItem(@items,self.maxSize,item,qty)
|
||||
def pbDeleteItem(item, qty = 1)
|
||||
return ItemStorageHelper.pbDeleteItem(@items, item, qty)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ end
|
||||
|
||||
|
||||
def pbSlotMachine(difficulty=1)
|
||||
if hasConst?(PBItems,:COINCASE) && !$PokemonBag.pbHasItem?(:COINCASE)
|
||||
if GameData::Item.exists?(:COINCASE) && !$PokemonBag.pbHasItem?(:COINCASE)
|
||||
pbMessage(_INTL("It's a Slot Machine."))
|
||||
elsif $PokemonGlobal.coins==0
|
||||
pbMessage(_INTL("You don't have any Coins to play!"))
|
||||
|
||||
@@ -614,7 +614,7 @@ end
|
||||
|
||||
|
||||
def pbVoltorbFlip
|
||||
if hasConst?(PBItems,:COINCASE) && !$PokemonBag.pbHasItem?(:COINCASE)
|
||||
if GameData::Item.exists?(:COINCASE) && !$PokemonBag.pbHasItem?(:COINCASE)
|
||||
pbMessage(_INTL("You can't play unless you have a Coin Case."))
|
||||
elsif $PokemonGlobal.coins==MAX_COINS
|
||||
pbMessage(_INTL("Your Coin Case is full!"))
|
||||
|
||||
@@ -498,7 +498,7 @@ class MiningGameScene
|
||||
revealeditems.dispose
|
||||
for index in revealed
|
||||
@items[index][3]=true
|
||||
item=getConst(PBItems,ITEMS[@items[index][0]][0])
|
||||
item=ITEMS[@items[index][0]][0]
|
||||
@itemswon.push(item)
|
||||
end
|
||||
end
|
||||
@@ -581,10 +581,10 @@ class MiningGameScene
|
||||
for i in @itemswon
|
||||
if $PokemonBag.pbStoreItem(i)
|
||||
pbMessage(_INTL("One {1} was obtained.\\se[Mining item get]\\wtnp[30]",
|
||||
PBItems.getName(i)))
|
||||
GameData::Item.get(i).name))
|
||||
else
|
||||
pbMessage(_INTL("One {1} was found, but you have no room for it.",
|
||||
PBItems.getName(i)))
|
||||
GameData::Item.get(i).name))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user