diff --git a/Data/Actors.rxdata b/Data/Actors.rxdata index 41edc8e26..7967a5432 100644 Binary files a/Data/Actors.rxdata and b/Data/Actors.rxdata differ diff --git a/Data/Animations.rxdata b/Data/Animations.rxdata index 826e1e8a6..8e67182ba 100644 Binary files a/Data/Animations.rxdata and b/Data/Animations.rxdata differ diff --git a/Data/Armors.rxdata b/Data/Armors.rxdata index 901f2bb2b..2249bec14 100644 Binary files a/Data/Armors.rxdata and b/Data/Armors.rxdata differ diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata index 77966b330..cdae20883 100644 Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ diff --git a/Data/Enemies.rxdata b/Data/Enemies.rxdata index be622f513..004ee903d 100644 Binary files a/Data/Enemies.rxdata and b/Data/Enemies.rxdata differ diff --git a/Data/Items.rxdata b/Data/Items.rxdata index fe767fa0b..3e62ba6d2 100644 Binary files a/Data/Items.rxdata and b/Data/Items.rxdata differ diff --git a/Data/Map025.rxdata b/Data/Map025.rxdata index 33b8c3e2f..9f8aad366 100644 Binary files a/Data/Map025.rxdata and b/Data/Map025.rxdata differ diff --git a/Data/Map063.rxdata b/Data/Map063.rxdata index 4e6f974fa..34b7d9622 100644 Binary files a/Data/Map063.rxdata and b/Data/Map063.rxdata differ diff --git a/Data/Map064.rxdata b/Data/Map064.rxdata index 1e1bcc7db..eadf015da 100644 Binary files a/Data/Map064.rxdata and b/Data/Map064.rxdata differ diff --git a/Data/Map073.rxdata b/Data/Map073.rxdata index b1cd3d069..0d642ac02 100644 Binary files a/Data/Map073.rxdata and b/Data/Map073.rxdata differ diff --git a/Data/Map096.rxdata b/Data/Map096.rxdata index fd4f0f246..ff3503c6b 100644 Binary files a/Data/Map096.rxdata and b/Data/Map096.rxdata differ diff --git a/Data/Map129.rxdata b/Data/Map129.rxdata index 0f071b7ae..ddf0c0398 100644 Binary files a/Data/Map129.rxdata and b/Data/Map129.rxdata differ diff --git a/Data/Map329.rxdata b/Data/Map329.rxdata index a3ac40d85..97e201e3b 100644 Binary files a/Data/Map329.rxdata and b/Data/Map329.rxdata differ diff --git a/Data/Map349.rxdata b/Data/Map349.rxdata index 1a4555c3c..2526d2780 100644 Binary files a/Data/Map349.rxdata and b/Data/Map349.rxdata differ diff --git a/Data/Map692.rxdata b/Data/Map692.rxdata index bf96fc3e8..e12a84c6d 100644 Binary files a/Data/Map692.rxdata and b/Data/Map692.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index 018ef966c..379ff3afa 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index 1566587d9..0a21fd64d 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -6,7 +6,7 @@ module Settings # The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format. GAME_VERSION = '5.0.0' - GAME_VERSION_NUMBER = "5.0.18.1 - beta" + GAME_VERSION_NUMBER = "5.0.19 - beta" POKERADAR_LIGHT_ANIMATION_RED_ID = 17 POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18 diff --git a/Data/Scripts/007_Objects and windows/007_SpriteWrapper.rb b/Data/Scripts/007_Objects and windows/007_SpriteWrapper.rb index 2e00dce74..ffdfeb2e8 100644 --- a/Data/Scripts/007_Objects and windows/007_SpriteWrapper.rb +++ b/Data/Scripts/007_Objects and windows/007_SpriteWrapper.rb @@ -353,7 +353,6 @@ end #=============================================================================== class IconSprite < SpriteWrapper attr_reader :name - def initialize(*args) if args.length == 0 super(nil) @@ -395,6 +394,10 @@ class IconSprite < SpriteWrapper self.src_rect = oldrc end + def setColor(r = 0, g = 0, b = 0, a = 255) + @_iconbitmap.pbSetColor(r,g,b,a) + end + # Sets the icon's filename. def setBitmap(file, hue = 0) oldrc = self.src_rect @@ -427,6 +430,8 @@ class IconSprite < SpriteWrapper self.src_rect = oldrc end end + + end #=============================================================================== diff --git a/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb b/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb index 0334afef4..e3b0f8c1c 100644 --- a/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb +++ b/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb @@ -125,6 +125,10 @@ module GameData return self.icon_filename(pkmn.species, pkmn.form, pkmn.gender, pkmn.shiny?, pkmn.shadowPokemon?, pkmn.egg?) end + def self.icon_filename_from_species(species) + return self.icon_filename(species, 0, 0, false, false, false) + end + def self.egg_icon_bitmap(species, form) filename = self.egg_icon_filename(species, form) return (filename) ? AnimatedBitmap.new(filename).deanimate : nil diff --git a/Data/Scripts/013_Items/004_1_PokeradarUI.rb b/Data/Scripts/013_Items/004_1_PokeradarUI.rb new file mode 100644 index 000000000..1e5b04a2d --- /dev/null +++ b/Data/Scripts/013_Items/004_1_PokeradarUI.rb @@ -0,0 +1,98 @@ +class PokeRadar_UI + attr_reader :sprites + attr_reader :disposed + + ICON_START_X = 50 + ICON_START_Y = 5 + + ICON_MARGIN_X = 50 + ICON_MARGIN_Y = 50 + + ICON_LINE_END = 450 + + + def initialize(seenPokemon = [], unseenPokemon = [], rarePokemon = []) + @seen_pokemon = seenPokemon + @unseen_pokemon = unseenPokemon + @rare_pokemon = rarePokemon + + @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height) + @viewport.z = 99 + @sprites = {} + @sprites["background"] = IconSprite.new(0, 0, @viewport) + @sprites["background"].setBitmap("Graphics/Pictures/Pokeradar/banner") + @sprites["background"].zoom_x = 2 + @sprites["background"].zoom_y = 2 + + @sprites["background"].visible = true + + @current_x = 50 + @current_y = 0 + displaySeen() + displayUnseen() + displayRare() + end + + def dispose + pbDisposeSpriteHash(@sprites) + @viewport.dispose if @viewport != nil + end + + #display rare with a (circle?) under the sprite to highlight it + # blacken if not seen + def displayRare() + @rare_pokemon.each { |pokemon| + blackened = !$Trainer.seen?(pokemon) + addPokemonIcon(pokemon,blackened,true) + } + end + + def displaySeen() + @seen_pokemon.each { |pokemonId| + addPokemonIcon(pokemonId, false ) + } + end + + def displayUnseen() + @unseen_pokemon.each { |pokemonId| + addPokemonIcon(pokemonId, true) + } + end + + def addPokemonIcon(pokemonId, blackened = false, rare=false) + iconId = _INTL("icon{1}", pokemonId) + pokemonBitmap = pbCheckPokemonIconFiles(getDexNumberForSpecies(pokemonId)) + if rare + outlineSprite = IconSprite.new(@current_x, @current_y) + outlineSprite.setBitmap("Graphics/Pictures/Pokeradar/highlight") + outlineSprite.visible=true + @sprites[iconId + "_outline"] = outlineSprite + end + + iconSprite = IconSprite.new(@current_x, @current_y) + iconSprite.setBitmap(pokemonBitmap) + @sprites[iconId] = iconSprite + @sprites[iconId].src_rect.width /= 2 + + + if blackened + @sprites[iconId].setColor(0,0,0,200) + end + @sprites[iconId].visible = true + @sprites[iconId].x = @current_x + @sprites[iconId].y = @current_y + @sprites[iconId].z = 100 + + @current_x += ICON_MARGIN_X + if @current_x >= ICON_LINE_END + @current_x = ICON_START_X + @current_y +=ICON_MARGIN_Y + @sprites["background"].zoom_y += 1 + end + + end + +end + + + diff --git a/Data/Scripts/013_Items/005_Item_PokeRadar.rb b/Data/Scripts/013_Items/005_Item_PokeRadar.rb index ba8156e31..03ad2fd2d 100644 --- a/Data/Scripts/013_Items/005_Item_PokeRadar.rb +++ b/Data/Scripts/013_Items/005_Item_PokeRadar.rb @@ -4,6 +4,8 @@ end class PokemonTemp attr_accessor :pokeradar # [species, level, chain count, grasses (x,y,ring,rarity)] + attr_accessor :pokeradar_ui # [species, level, chain count, grasses (x,y,ring,rarity)] + end ################################################################################ @@ -22,10 +24,10 @@ def pbCanUsePokeRadar? return false end # Can't use Radar while cycling - if $PokemonGlobal.bicycle - pbMessage(_INTL("Can't use that while on a bicycle.")) - return false - end + # if $PokemonGlobal.bicycle + # pbMessage(_INTL("Can't use that while on a bicycle.")) + # return false + # end # Debug return true if $DEBUG && Input.press?(Input::CTRL) # Can't use Radar if it isn't fully charged @@ -41,29 +43,44 @@ def pbUsePokeRadar return false if !pbCanUsePokeRadar? $PokemonTemp.pokeradar = [0, 0, 0, []] if !$PokemonTemp.pokeradar $PokemonGlobal.pokeradarBattery = Settings::POKERADAR_BATTERY_STEPS - rareAllowed = canEncounterRarePokemon() + unseenPokemon = listPokemonInCurrentRoute($PokemonEncounters.encounter_type, false, true) + seenPokemon = listPokemonInCurrentRoute($PokemonEncounters.encounter_type, true, false) + rareAllowed = canEncounterRarePokemon(unseenPokemon) + displayPokeradarBanner(seenPokemon, unseenPokemon, rareAllowed) playPokeradarLightAnimation(rareAllowed) pbWait(20) pbPokeRadarHighlightGrass return true end -#can only encounter rare if have seen every encounterable land pokemon on the route -def canEncounterRarePokemon() - processed = [] - for encounter in $PokemonEncounters.listPossibleEncounters($PokemonEncounters.pbEncounterType) - species = encounter[0] - if !processed.include?(species) - if $Trainer.seen[species] - processed << species - else - return false - end +def listPokeradarRareEncounters() + map = $game_map.map_id + array = [] + Settings::POKE_RADAR_ENCOUNTERS.each do |enc| + if enc[0] == map + species = enc[2] + array.push(species) end end - return true + return array end +# #can only encounter rare if have seen every encounterable land pokemon on the route +# def canEncounterRarePokemon() +# processed = [] +# for encounter in $PokemonEncounters.listPossibleEncounters($PokemonEncounters.pbEncounterType) +# species = encounter[0] +# if !processed.include?(species) +# if $Trainer.seen[species] +# processed << species +# else +# return false +# end +# end +# end +# return true +# end + def playPokeradarLightAnimation(rareAllowed = false) if rareAllowed $scene.spriteset.addUserAnimation(Settings::POKERADAR_LIGHT_ANIMATION_GREEN_ID, $game_player.x, $game_player.y, true) @@ -72,17 +89,29 @@ def playPokeradarLightAnimation(rareAllowed = false) end end +def displayPokeradarBanner(seenPokemon = [], unseenPokemon = [], includeRare = false) + return if $PokemonTemp.pokeradar_ui !=nil + rarePokemon = includeRare ? listPokeradarRareEncounters() : [] + $PokemonTemp.pokeradar_ui = PokeRadar_UI.new(seenPokemon, unseenPokemon, rarePokemon) +end + def pbPokeRadarCancel + if $PokemonTemp.pokeradar_ui != nil + $PokemonTemp.pokeradar_ui.dispose + $PokemonTemp.pokeradar_ui=nil + end $PokemonTemp.pokeradar = nil end -def listUnseenPokemonInCurrentRoute(encounterType) +def listPokemonInCurrentRoute(encounterType, onlySeen = false, onlyUnseen = false) processed = [] + seen = [] unseen = [] for encounter in $PokemonEncounters.listPossibleEncounters(encounterType) species = encounter[1] if !processed.include?(species) if $Trainer.seen?(species) + seen << species processed << species else unseen << species @@ -90,15 +119,17 @@ def listUnseenPokemonInCurrentRoute(encounterType) end end end - return unseen + if onlySeen + return seen + elsif onlyUnseen + return unseen + else + return processed + end end #can only encounter rare if have seen every encounterable land pokemon on the route -def canEncounterRarePokemon() - return true - - #pokedex register seen doesn't work correctly so temporarily removed - unseenPokemon = listUnseenPokemonInCurrentRoute($PokemonEncounters.encounter_type) +def canEncounterRarePokemon(unseenPokemon) return unseenPokemon.length == 0 end @@ -201,7 +232,7 @@ end ################################################################################ EncounterModifier.register(proc { |encounter| if GameData::EncounterType.get($PokemonTemp.encounterType).type != :land || - $PokemonGlobal.bicycle || $PokemonGlobal.partner + $PokemonGlobal.partner # $PokemonGlobal.bicycle || $PokemonGlobal.partner pbPokeRadarCancel next encounter end diff --git a/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb b/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb index b5cf77c68..eaacf8737 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb @@ -130,6 +130,10 @@ class PokemonIconSprite < SpriteWrapper super(@logical_y + @adjusted_y) end + def animBitmap=(value) + @animBitmap = value + end + def pokemon=(value) @pokemon = value @animBitmap.dispose if @animBitmap diff --git a/Data/Scripts/016_UI/013_UI_Load.rb b/Data/Scripts/016_UI/013_UI_Load.rb index b376673e1..6daad3ca1 100644 --- a/Data/Scripts/016_UI/013_UI_Load.rb +++ b/Data/Scripts/016_UI/013_UI_Load.rb @@ -284,7 +284,7 @@ class PokemonLoadScreen cmd_debug = -1 cmd_quit = -1 show_continue = !@save_data.empty? - new_game_plus = @save_data[:player].new_game_plus_unlocked + new_game_plus = show_continue && @save_data[:player].new_game_plus_unlocked if show_continue commands[cmd_continue = commands.length] = _INTL('Continue') if @save_data[:player].mystery_gift_unlocked diff --git a/Data/Scripts/016_UI/016_UI_ReadyMenu.rb b/Data/Scripts/016_UI/016_UI_ReadyMenu.rb index 4edfdc436..2dc62a296 100644 --- a/Data/Scripts/016_UI/016_UI_ReadyMenu.rb +++ b/Data/Scripts/016_UI/016_UI_ReadyMenu.rb @@ -301,7 +301,7 @@ end def pbUseKeyItem moves = [:CUT, :DEFOG, :DIG, :DIVE, :FLASH, :FLY, :HEADBUTT, :ROCKCLIMB, :ROCKSMASH, :SECRETPOWER, :STRENGTH, :SURF, :SWEETSCENT, :TELEPORT, - :WATERFALL, :WHIRLPOOL] + :WATERFALL, :WHIRLPOOL, :BOUNCE] real_moves = [] moves.each do |move| $Trainer.pokemon_party.each_with_index do |pkmn, i| diff --git a/Data/Skills.rxdata b/Data/Skills.rxdata index a45219f5e..61cba7ea2 100644 Binary files a/Data/Skills.rxdata and b/Data/Skills.rxdata differ diff --git a/Data/States.rxdata b/Data/States.rxdata index 868d49e59..0f9b4ae5d 100644 Binary files a/Data/States.rxdata and b/Data/States.rxdata differ diff --git a/Data/System.rxdata b/Data/System.rxdata index b1cda7ac6..44e226ea4 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Data/Tilesets.rxdata b/Data/Tilesets.rxdata index 9873e9ae6..8d34a0eef 100644 Binary files a/Data/Tilesets.rxdata and b/Data/Tilesets.rxdata differ diff --git a/Data/Weapons.rxdata b/Data/Weapons.rxdata index c7ea19a7a..d9bd35260 100644 Binary files a/Data/Weapons.rxdata and b/Data/Weapons.rxdata differ