class RPG::System::Words
def gold
return @gold if !$game_map
case $game_map.map_id
when 10, 11, 12, 13 # add map IDs separated by commas
return "Gold2"
when 14, 15, 16, 17 # add map IDs separated by commas
return "Gold3"
else # For everything else
return @gold
end
end
end
# Gets the exchange rate of the currency depending on
# the current map
def getExchangeRate
return 1.0 if !$game_map
case $game_map.map_id
when 10, 11, 12, 13 # add map IDs separated by commas
return 1.2 # Worth 1.2 times the nominal currency
when 14, 15, 16, 17 # add map IDs separated by commas
return 0.8 # Worth 1.2 times the nominal currency
else # For everything else
return 1.0
end
end
class Game_Party
def gain_gold(n)
@gold = [[@gold+(n*1.0*getExchangeRate()), 0].max, 9999999].min
end
def gold
goldValue=(@gold*1.0/getExchangeRate())
goldValue=[[goldValue,0.0].max,9999999.0].min
return goldValue.to_i
end
end
@>Comment: Resetting gold to 0
@>Control Variables: [0010: Gold] = Gold
@>Change Gold: - Variable [0010: Gold]
@>Comment: Resetting gold to 0
@>Control Variables: [0001: Temp] = Gold
@>Change Gold: - Variable [0001: Temp]
@>Comment: Restoring gold
@>Change Gold: + Variable [0010: Gold]