mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Moved some global metadata values to class Player, added battle points property
This commit is contained in:
@@ -269,7 +269,7 @@ class SlotMachineScene
|
||||
@sprites["window1"].setBitmap(sprintf("Graphics/Pictures/Slot Machine/insert"))
|
||||
@sprites["window1"].src_rect.set(0,0,152,208)
|
||||
@sprites["window2"]=IconSprite.new(358,96,@viewport)
|
||||
@sprites["credit"]=SlotMachineScore.new(360,66,$PokemonGlobal.coins)
|
||||
@sprites["credit"]=SlotMachineScore.new(360,66,$Trainer.coins)
|
||||
@sprites["payout"]=SlotMachineScore.new(438,66,0)
|
||||
@wager=0
|
||||
update
|
||||
@@ -289,7 +289,7 @@ class SlotMachineScene
|
||||
if @sprites["credit"].score == Settings::MAX_COINS
|
||||
pbMessage(_INTL("You've got {1} Coins.", Settings::MAX_COINS.to_s_formatted))
|
||||
break
|
||||
elsif $PokemonGlobal.coins==0
|
||||
elsif $Trainer.coins==0
|
||||
pbMessage(_INTL("You've run out of Coins.\nGame over!"))
|
||||
break
|
||||
elsif @gameRunning # Reels are spinning
|
||||
@@ -361,7 +361,7 @@ class SlotMachineScene
|
||||
end
|
||||
frame = (frame+1)%(Graphics.frame_rate*4)
|
||||
end
|
||||
$PokemonGlobal.coins = @sprites["credit"].score
|
||||
$Trainer.coins = @sprites["credit"].score
|
||||
end
|
||||
|
||||
def pbEndScene
|
||||
@@ -390,9 +390,9 @@ end
|
||||
def pbSlotMachine(difficulty=1)
|
||||
if GameData::Item.exists?(:COINCASE) && !$PokemonBag.pbHasItem?(:COINCASE)
|
||||
pbMessage(_INTL("It's a Slot Machine."))
|
||||
elsif $PokemonGlobal.coins==0
|
||||
elsif $Trainer.coins == 0
|
||||
pbMessage(_INTL("You don't have any Coins to play!"))
|
||||
elsif $PokemonGlobal.coins == Settings::MAX_COINS
|
||||
elsif $Trainer.coins == Settings::MAX_COINS
|
||||
pbMessage(_INTL("Your Coin Case is full!"))
|
||||
else
|
||||
pbFadeOutIn {
|
||||
|
||||
Reference in New Issue
Block a user