diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata
index d83bead15..b8d159f71 100644
Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ
diff --git a/Data/Map037.rxdata b/Data/Map037.rxdata
index 39feafeea..f42a414a4 100644
Binary files a/Data/Map037.rxdata and b/Data/Map037.rxdata differ
diff --git a/Data/Map532.rxdata b/Data/Map532.rxdata
index 0eb49d3fc..22b04ebac 100644
Binary files a/Data/Map532.rxdata and b/Data/Map532.rxdata differ
diff --git a/Data/Map534.rxdata b/Data/Map534.rxdata
index 2c7334f74..f7dc2a370 100644
Binary files a/Data/Map534.rxdata and b/Data/Map534.rxdata differ
diff --git a/Data/Map562.rxdata b/Data/Map562.rxdata
index 325aae94f..d166bd197 100644
Binary files a/Data/Map562.rxdata and b/Data/Map562.rxdata differ
diff --git a/Data/Map619.rxdata b/Data/Map619.rxdata
index 2ce336eb8..e9ee38b59 100644
Binary files a/Data/Map619.rxdata and b/Data/Map619.rxdata differ
diff --git a/Data/Map697.rxdata b/Data/Map697.rxdata
index 2422557c5..acef44b0c 100644
Binary files a/Data/Map697.rxdata and b/Data/Map697.rxdata differ
diff --git a/Data/Map734.rxdata b/Data/Map734.rxdata
index 147ea3354..3e337dae8 100644
Binary files a/Data/Map734.rxdata and b/Data/Map734.rxdata differ
diff --git a/Data/Map738.rxdata b/Data/Map738.rxdata
index a6f7f6044..3cc8dd39d 100644
Binary files a/Data/Map738.rxdata and b/Data/Map738.rxdata differ
diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata
index 77a4c8196..ba0fa57f5 100644
Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ
diff --git a/Data/Scripts/007_Objects and windows/011_Messages.rb b/Data/Scripts/007_Objects and windows/011_Messages.rb
index 635160d3d..3420fe1b8 100644
--- a/Data/Scripts/007_Objects and windows/011_Messages.rb
+++ b/Data/Scripts/007_Objects and windows/011_Messages.rb
@@ -434,6 +434,38 @@ def pbDisplayGoldWindow(msgwindow)
return goldwindow
end
+def pbDisplayBattleFactoryPointsWindow(msgwindow)
+ pointsString = $game_variables[BATTLE_FACTORY_TOKENS].to_s
+ pointswindow=Window_AdvancedTextPokemon.new(_INTL("Tokens:\n{1}", pointsString))
+ pointswindow.setSkin("Graphics/Windowskins/goldskin")
+ pointswindow.resizeToFit(pointswindow.text,Graphics.width)
+ pointswindow.width=160 if pointswindow.width<=160
+ if msgwindow.y==0
+ pointswindow.y=Graphics.height-pointswindow.height
+ else
+ pointswindow.y=0
+ end
+ pointswindow.viewport=msgwindow.viewport
+ pointswindow.z=msgwindow.z
+ return pointswindow
+end
+
+def pbDisplayHeartScalesWindow(msgwindow)
+ pointsString = $PokemonBag.pbQuantity(:HEARTSCALE).to_s
+ pointswindow=Window_AdvancedTextPokemon.new(_INTL("Heart Scales:\n{1}", pointsString))
+ pointswindow.setSkin("Graphics/Windowskins/goldskin")
+ pointswindow.resizeToFit(pointswindow.text,Graphics.width)
+ pointswindow.width=160 if pointswindow.width<=160
+ if msgwindow.y==0
+ pointswindow.y=Graphics.height-pointswindow.height
+ else
+ pointswindow.y=0
+ end
+ pointswindow.viewport=msgwindow.viewport
+ pointswindow.z=msgwindow.z
+ return pointswindow
+end
+
def pbDisplayCoinsWindow(msgwindow,goldwindow)
coinString=($Trainer) ? $Trainer.coins.to_s_formatted : "0"
coinwindow=Window_AdvancedTextPokemon.new(_INTL("Coins:\n{1}",coinString))
@@ -592,7 +624,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
### Controls
textchunks=[]
controls=[]
- while text[/(?:\\(f|ff|ts|cl|me|se|wt|wtnp|ch)\[([^\]]*)\]|\\(g|cn|pt|wd|wm|op|cl|wu|\.|\||\!|\^))/i]
+ while text[/(?:\\(f|ff|ts|cl|me|se|wt|wtnp|ch)\[([^\]]*)\]|\\(g|cn|pt|ft|hs|wd|wm|op|cl|wu|\.|\||\!|\^))/i]
textchunks.push($~.pre_match)
if $~[1]
controls.push([$~[1].downcase,$~[2],-1])
@@ -701,6 +733,12 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
when "g" # Display gold window
goldwindow.dispose if goldwindow
goldwindow = pbDisplayGoldWindow(msgwindow)
+ when "ft" # Display battle factory tokens
+ goldwindow.dispose if goldwindow
+ goldwindow = pbDisplayBattleFactoryPointsWindow(msgwindow)
+ when "hs" # Display battle factory tokens
+ goldwindow.dispose if goldwindow
+ goldwindow = pbDisplayHeartScalesWindow(msgwindow)
when "cn" # Display coins window
coinwindow.dispose if coinwindow
coinwindow = pbDisplayCoinsWindow(msgwindow,goldwindow)
diff --git a/Data/Scripts/014_Pokemon/001_Pokemon.rb b/Data/Scripts/014_Pokemon/001_Pokemon.rb
index 7213efd76..e7c1ca560 100644
--- a/Data/Scripts/014_Pokemon/001_Pokemon.rb
+++ b/Data/Scripts/014_Pokemon/001_Pokemon.rb
@@ -706,6 +706,13 @@ class Pokemon
return false
end
+ def has_egg_move?
+ return false if egg? || shadowPokemon?
+ baby = pbGetBabySpecies(self.species)
+ moves = pbGetSpeciesEggMoves(baby)
+ return true if moves.size >= 1
+ end
+
#=============================================================================
# Ribbons
#=============================================================================
diff --git a/Data/Scripts/016_UI/020_UI_PokeMart.rb b/Data/Scripts/016_UI/020_UI_PokeMart.rb
index 87d9058b5..883a0e7e1 100644
--- a/Data/Scripts/016_UI/020_UI_PokeMart.rb
+++ b/Data/Scripts/016_UI/020_UI_PokeMart.rb
@@ -172,6 +172,10 @@ end
#
#===============================================================================
class PokemonMart_Scene
+ def initialize(currency_name="Money")
+ @currency_name = currency_name
+ end
+
def update
pbUpdateSpriteHash(@sprites)
@subscene.pbUpdate if @subscene
@@ -187,7 +191,7 @@ class PokemonMart_Scene
(itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.")
itemwindow.refresh
end
- @sprites["moneywindow"].text = _INTL("Money:\r\n{1}", @adapter.getMoneyString)
+ @sprites["moneywindow"].text = _INTL("{2}:\r\n{1}", @adapter.getMoneyString,@currency_name)
end
def pbStartBuyOrSellScene(buying, stock, adapter)
@@ -520,10 +524,10 @@ end
#
#===============================================================================
class PokemonMartScreen
- def initialize(scene,stock)
+ def initialize(scene,stock,adapter=PokemonMartAdapter.new)
@scene=scene
@stock=stock
- @adapter=PokemonMartAdapter.new
+ @adapter=adapter
end
def pbConfirm(msg)
diff --git a/Data/Scripts/049_Compatibility/Constants.rb b/Data/Scripts/049_Compatibility/Constants.rb
index a5fb30f75..9d3662e1e 100644
--- a/Data/Scripts/049_Compatibility/Constants.rb
+++ b/Data/Scripts/049_Compatibility/Constants.rb
@@ -7,6 +7,7 @@ BEAT_THE_LEAGUE = 12
#Variables
DEFAULT_BATTLE_TYPE = 242
+BATTLE_FACTORY_TOKENS = 243
#Settings
diff --git a/Data/Scripts/049_Compatibility/UtilityMethods.rb b/Data/Scripts/049_Compatibility/UtilityMethods.rb
new file mode 100644
index 000000000..b65a7e32b
--- /dev/null
+++ b/Data/Scripts/049_Compatibility/UtilityMethods.rb
@@ -0,0 +1,4 @@
+
+def pbGetTerrainTag()
+ return $game_player.pbTerrainTag().id
+end
\ No newline at end of file
diff --git a/Data/Scripts/050_AddOns/EggMoveTutor.rb b/Data/Scripts/050_AddOns/EggMoveTutor.rb
new file mode 100644
index 000000000..20244997a
--- /dev/null
+++ b/Data/Scripts/050_AddOns/EggMoveTutor.rb
@@ -0,0 +1,32 @@
+def pbRelearnEggMoveScreen(pkmn)
+ retval = true
+ pbFadeOutIn {
+ scene = MoveRelearner_Scene.new
+ screen = MoveRelearnerScreen.new(scene)
+ retval = screen.pbStartScreenEgg(pkmn)
+ }
+ return retval
+end
+
+class MoveRelearnerScreen
+ def pbStartScreenEgg(pkmn)
+ baby = pbGetBabySpecies(pkmn.species)
+ moves = pbGetSpeciesEggMoves(baby)
+
+ @scene.pbStartScene(pkmn, moves)
+ loop do
+ move = @scene.pbChooseMove
+ if move
+ if @scene.pbConfirm(_INTL("Teach {1}?", GameData::Move.get(move).name))
+ if pbLearnMove(pkmn, move)
+ @scene.pbEndScene
+ return true
+ end
+ end
+ elsif @scene.pbConfirm(_INTL("Give up trying to teach a new move to {1}?", pkmn.name))
+ @scene.pbEndScene
+ return false
+ end
+ end
+ end
+end
diff --git a/Data/Scripts/050_AddOns/NonMoneyShop.rb b/Data/Scripts/050_AddOns/NonMoneyShop.rb
new file mode 100644
index 000000000..8ec923734
--- /dev/null
+++ b/Data/Scripts/050_AddOns/NonMoneyShop.rb
@@ -0,0 +1,53 @@
+class VariableCurrencyMartAdapter < PokemonMartAdapter
+ def initialize(currency)
+ @currency_variable = currency
+ end
+ def getMoney
+ return pbGet(@currency_variable).to_i
+ end
+
+ def getMoneyString
+ return pbGet(@currency_variable).to_s
+ end
+
+ def setMoney(value)
+ pbSet(@currency_variable,value)
+ end
+end
+
+
+def pbVariablePokemonMart(stock,currencyVariable,currency_name="Points",speech=nil,cantsell=true)
+ for i in 0...stock.length
+ stock[i] = GameData::Item.get(stock[i]).id
+ stock[i] = nil if GameData::Item.get(stock[i]).is_important? && $PokemonBag.pbHasItem?(stock[i])
+ end
+ stock.compact!
+ commands = []
+ cmdBuy = -1
+ cmdSell = -1
+ cmdQuit = -1
+ commands[cmdBuy = commands.length] = _INTL("Buy")
+ commands[cmdSell = commands.length] = _INTL("Sell") if !cantsell
+ commands[cmdQuit = commands.length] = _INTL("Quit")
+ cmd = pbMessage(
+ speech ? speech : _INTL("Welcome! How may I serve you?"),
+ commands,cmdQuit+1)
+ loop do
+ if cmdBuy>=0 && cmd==cmdBuy
+ adapter = VariableCurrencyMartAdapter.new(currencyVariable)
+ scene = PokemonMart_Scene.new(currency_name)
+ screen = PokemonMartScreen.new(scene,stock,adapter)
+ screen.pbBuyScreen
+ elsif cmdSell>=0 && cmd==cmdSell #NOT IMPLEMENTED
+ scene = PokemonMart_Scene.new(currency_name)
+ screen = PokemonMartScreen.new(scene,stock,adapter)
+ screen.pbSellScreen
+ else
+ pbMessage(_INTL("Please come again!"))
+ break
+ end
+ cmd = pbMessage(_INTL("Is there anything else I can help you with?"),
+ commands,cmdQuit+1)
+ end
+ $game_temp.clear_mart_prices
+end
\ No newline at end of file
diff --git a/Data/Scripts/050_AddOns/SpeechBubbles.rb b/Data/Scripts/050_AddOns/SpeechBubbles.rb
index 5c64b0d03..c2bb6a2e5 100644
--- a/Data/Scripts/050_AddOns/SpeechBubbles.rb
+++ b/Data/Scripts/050_AddOns/SpeechBubbles.rb
@@ -26,6 +26,7 @@ class PokemonTemp
attr_accessor :speechbubble_arrow
attr_accessor :speechbubble_outofrange
attr_accessor :speechbubble_talking
+ attr_accessor :speechbubble_alwaysDown
end
module MessageConfig
@@ -85,7 +86,7 @@ def pbRepositionMessageWindow(msgwindow, linecount=2)
msgwindow.setSkin("Graphics/windowskins/frlgtextskin")
msgwindow.height = 102
msgwindow.width = Graphics.width
- if $game_player.direction==8
+ if $game_player.direction==8 && !$PokemonTemp.speechbubble_alwaysDown
$PokemonTemp.speechbubble_vp = Viewport.new(0, 0, Graphics.width, 280)
msgwindow.y = 6
else
@@ -119,7 +120,7 @@ end
def pbCreateMessageWindow(viewport=nil,skin=nil)
arrow = nil
if $PokemonTemp.speechbubble_bubble==2 && $game_map.events[$PokemonTemp.speechbubble_talking] != nil # Message window set to floating bubble.
- if $game_player.direction==8 # Player facing up, message window top.
+ if $game_player.direction==8 && !$PokemonTemp.speechbubble_alwaysDown# Player facing up, message window top.
$PokemonTemp.speechbubble_vp = Viewport.new(0, 104, Graphics.width, 280)
$PokemonTemp.speechbubble_vp.z = 999999
arrow = Sprite.new($PokemonTemp.speechbubble_vp)
@@ -192,4 +193,6 @@ end
def pbCallBub(status=0,value=0,always_down=false)
$PokemonTemp.speechbubble_talking=get_character(value).id
$PokemonTemp.speechbubble_bubble=status
+ $PokemonTemp.speechbubble_alwaysDown=always_down
+
end
\ No newline at end of file
diff --git a/Data/Scripts/050_AddOns/Spped Up.rb b/Data/Scripts/050_AddOns/Spped Up.rb
new file mode 100644
index 000000000..02decdbd2
--- /dev/null
+++ b/Data/Scripts/050_AddOns/Spped Up.rb
@@ -0,0 +1,62 @@
+
+#==============================================================================#
+# Better Fast-forward Mode #
+# v1.0 #
+# #
+# by Marin #
+#==============================================================================#
+# Usage #
+# #
+# SPEEDUP_STAGES are the speed stages the game will pick from. If you click F, #
+# it'll choose the next number in that array. It goes back to the first number #
+# afterward. #
+# #
+# $GameSpeed is the current index in the speed up array. #
+# Should you want to change that manually, you can do, say, $GameSpeed = 0 #
+# #
+# If you don't want the user to be able to speed up at certain points, you can #
+# use "pbDisallowSpeedup" and "pbAllowSpeedup". #
+#==============================================================================#
+# Please give credit when using this. #
+#==============================================================================#
+
+PluginManager.register({
+ :name => "Better Fast-forward Mode",
+ :version => "1.1",
+ :credits => "Marin",
+ :link => "https://reliccastle.com/resources/151/"
+ })
+
+# When the user clicks F, it'll pick the next number in this array.
+SPEEDUP_STAGES = [1,2,3]
+
+
+def pbAllowSpeedup
+ $CanToggle = true
+end
+
+def pbDisallowSpeedup
+ $CanToggle = false
+end
+
+# Default game speed.
+$GameSpeed = 0
+$frame = 0
+$CanToggle = true
+
+module Graphics
+ class << Graphics
+ alias fast_forward_update update
+ end
+
+ def self.update
+ if $CanToggle && Input.trigger?(Input::AUX1)
+ $GameSpeed += 1
+ $GameSpeed = 0 if $GameSpeed >= SPEEDUP_STAGES.size
+ end
+ $frame += 1
+ return unless $frame % SPEEDUP_STAGES[$GameSpeed] == 0
+ fast_forward_update
+ $frame = 0
+ end
+end
\ No newline at end of file
diff --git a/Data/System.rxdata b/Data/System.rxdata
index e20bb28c0..98dc9a82d 100644
Binary files a/Data/System.rxdata and b/Data/System.rxdata differ