diff --git a/Data/Map148.rxdata b/Data/Map148.rxdata index b71634c6b..314e99811 100644 Binary files a/Data/Map148.rxdata and b/Data/Map148.rxdata differ diff --git a/Data/Map196.rxdata b/Data/Map196.rxdata index 481d5223c..f22180564 100644 Binary files a/Data/Map196.rxdata and b/Data/Map196.rxdata differ diff --git a/Data/Map228.rxdata b/Data/Map228.rxdata index 0d58f3df8..9509238ca 100644 Binary files a/Data/Map228.rxdata and b/Data/Map228.rxdata differ diff --git a/Data/Map354.rxdata b/Data/Map354.rxdata index 1e2d4a60a..1c22abdde 100644 Binary files a/Data/Map354.rxdata and b/Data/Map354.rxdata differ diff --git a/Data/Map563.rxdata b/Data/Map563.rxdata index 184a3c345..eecfd33bf 100644 Binary files a/Data/Map563.rxdata and b/Data/Map563.rxdata differ diff --git a/Data/Map565.rxdata b/Data/Map565.rxdata index 70f08c29a..0878e58c3 100644 Binary files a/Data/Map565.rxdata and b/Data/Map565.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index 63bd26b2f..4375fea63 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts.rxdata b/Data/Scripts.rxdata index 6b564aa8f..ae261f3c1 100644 Binary files a/Data/Scripts.rxdata and b/Data/Scripts.rxdata differ diff --git a/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb b/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb index d36e1766a..e28e2a711 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb @@ -131,7 +131,6 @@ class PokeBattle_Scene # enemyBase = "Graphics/Battlebacks/"+baseFilename+"_base1" # messageBG = "Graphics/Battlebacks/"+messageFilename+"_message" - battleBG = "Graphics/Battlebacks/battlebg/"+backdropFilename playerBase = "Graphics/Battlebacks/playerbase/"+baseFilename enemyBase = "Graphics/Battlebacks/enemybase/"+baseFilename diff --git a/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb b/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb index a5257e067..27f818810 100644 --- a/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb +++ b/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb @@ -85,9 +85,12 @@ def pbRoamPokemonOne(idxRoamer) if rand(32)==0 newMapChoices.push(mapIDs[rand(mapIDs.length)]) end - # Choose a random new map to roam to - if newMapChoices.length>0 - $PokemonGlobal.roamPosition[idxRoamer] = newMapChoices[rand(newMapChoices.length)] + #50% chance of moving to a new map + if rand(2)==0 + # Choose a random new map to roam to + if newMapChoices.length>0 + $PokemonGlobal.roamPosition[idxRoamer] = newMapChoices[rand(newMapChoices.length)] + end end end diff --git a/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb b/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb index 77e8269de..29e7297ae 100644 --- a/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb +++ b/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb @@ -390,7 +390,8 @@ Events.onAction += proc { |_sender, _e| break end if surface_map_id && - $MapFactory.getTerrainTag(surface_map_id, $game_player.x, $game_player.y).can_dive + #$MapFactory.getTerrainTag(surface_map_id, $game_player.x, $game_player.y).can_dive + $MapFactory.getTerrainTag(surface_map_id, $game_player.x, $game_player.y).can_surf pbSurfacing end else diff --git a/Data/Scripts/013_Items/002_Item_Effects.rb b/Data/Scripts/013_Items/002_Item_Effects.rb index 54aa79b85..004c79c12 100644 --- a/Data/Scripts/013_Items/002_Item_Effects.rb +++ b/Data/Scripts/013_Items/002_Item_Effects.rb @@ -38,7 +38,7 @@ ItemHandlers::UseFromBag.add(:BICYCLE,proc { |item| next (pbBikeCheck) ? 2 : 0 }) -ItemHandlers::UseFromBag.copy(:BICYCLE,:MACHBIKE,:ACROBIKE) +ItemHandlers::UseFromBag.copy(:BICYCLE,:RACEBIKE) ItemHandlers::UseFromBag.add(:OLDROD,proc { |item| notCliff = $game_map.passable?($game_player.x,$game_player.y,$game_player.direction,$game_player) @@ -227,7 +227,7 @@ ItemHandlers::UseInField.add(:BICYCLE,proc { |item| next 0 }) -ItemHandlers::UseInField.copy(:BICYCLE,:MACHBIKE,:ACROBIKE) +ItemHandlers::UseInField.copy(:BICYCLE,:RACEBIKE) ItemHandlers::UseInField.add(:OLDROD,proc { |item| notCliff = $game_map.passable?($game_player.x,$game_player.y,$game_player.direction,$game_player) diff --git a/Data/Scripts/016_UI/012_UI_TrainerCard.rb b/Data/Scripts/016_UI/012_UI_TrainerCard.rb index 60a3f488c..80644841e 100644 --- a/Data/Scripts/016_UI/012_UI_TrainerCard.rb +++ b/Data/Scripts/016_UI/012_UI_TrainerCard.rb @@ -18,10 +18,19 @@ class PokemonTrainerCard_Scene end cardexists = pbResolveBitmap(sprintf("Graphics/Pictures/Trainer Card/card_f")) @sprites["card"] = IconSprite.new(0,0,@viewport) + is_postgame = $game_switches[BEAT_THE_LEAGUE] if $Trainer.female? && cardexists - @sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card_f") + path = "Graphics/Pictures/Trainer Card/card_f" + if is_postgame + path+="_postgame" + end + @sprites["card"].setBitmap(path) else - @sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card") + path = "Graphics/Pictures/Trainer Card/card" + if is_postgame + path+="_postgame" + end + @sprites["card"].setBitmap(path) end @sprites["overlay"] = BitmapSprite.new(Graphics.width,Graphics.height,@viewport) pbSetSystemFont(@sprites["overlay"].bitmap) @@ -64,17 +73,38 @@ class PokemonTrainerCard_Scene ] pbDrawTextPositions(overlay,textPositions) x = 72 - region = pbGetCurrentRegion(0) # Get the current region imagePositions = [] - for i in 0...8 - if $Trainer.badges[i+region*8] - imagePositions.push(["Graphics/Pictures/Trainer Card/icon_badges",x,310,i*32,region*32,32,32]) + postgame = $game_switches[BEAT_THE_LEAGUE] + numberOfBadgesDisplayed = postgame ? 16 : 8 + for i in 0...numberOfBadgesDisplayed + badgeRow= i<8 ? 0 : 1 + if $Trainer.badges[i] + if i == 8 + x =72 + end + badge_graphic_x = badgeRow == 0 ? i*32 : (i-8)*32 + badge_graphic_y =badgeRow*32 + y = getBadgeDisplayHeight(postgame,i) + imagePositions.push(["Graphics/Pictures/Trainer Card/icon_badges",x,y,badge_graphic_x,badge_graphic_y,32,32]) end x += 48 end pbDrawImagePositions(overlay,imagePositions) end + def getBadgeDisplayHeight(postgame,i) + if postgame + if i < 8 + y=310 + else + y=344 + end + else + y = 312 + end + return y + end + def pbTrainerCard pbSEPlay("GUI trainer card open") loop do diff --git a/Data/Scripts/050_AddOns/Footprints.rb b/Data/Scripts/050_AddOns/Footprints.rb new file mode 100644 index 000000000..986d975d3 --- /dev/null +++ b/Data/Scripts/050_AddOns/Footprints.rb @@ -0,0 +1,225 @@ +#=============================================================================== +# Klein Footprints / WolfPP for Pokémon Essentials +# Give credits if you're using this! +# http://kleinstudio.deviantart.com +# +# bo4p5687 update (v.19) +#=============================================================================== + +# Fix event comment +def pbEventCommentInput(*args) + parameters = [] + list = *args[0].list # Event or event page + elements = *args[1] # Number of elements + trigger = *args[2] # Trigger + return nil if list == nil + return nil unless list.is_a?(Array) + for item in list + next unless item.code == 108 || item.code == 408 + if item.parameters[0] == trigger[0] + start = list.index(item) + 1 + finish = start + elements[0] + for id in start...finish + next if !list[id] + parameters.push(list[id].parameters[0]) + end + return parameters + end + end + return nil +end + +module FootprintVariables + # If you set pokemon here, they doesn't have footprints + FOLLOWING_DONT_WALK = [ + # Example: + # 12,15,17 + ] + + # Set here the terrain tag for footprints, 3 is sand + TERRAIN_FOOT = 3 + + # Initial opacity for footprints + FOOT_OPACITY = 62 + + # Delay velocity + FOOT_DELAY = 1.1 + + def self.get_new_id + newId = 1 + while !$game_map.events[newId].nil? do + break if $game_map.events[newId].erased + newId += 1 + end + return newId + end + + def self.show(event, position) + if event != $game_player + return if event.character_name == "" || event.character_name == "nil" || event.name.include?("/nofoot/") + return if pbEventCommentInput(event, 0, "NoFoot") + if $Trainer.party.length > 0 + return if (!($game_map.events[event] && $game_map.events[event].name == "Dependent") && + (FOLLOWING_DONT_WALK.include?($Trainer.party[0].species) || $PokemonGlobal.bicycle)) + end + end + character_sprites = $scene.spriteset.character_sprites + viewport = $scene.spriteset.viewport1 + footsprites = $scene.spriteset.footsprites + nid = self.get_new_id + rpgEvent = RPG::Event.new(position[0], position[1]) + rpgEvent.id = nid + fev = Game_Event.new($game_map.map_id, rpgEvent, $game_map) + eventsprite = Sprite_Character.new(viewport, fev) + character_sprites.push(eventsprite) + footsprites.push(Footsprite.new(eventsprite, fev, viewport, $game_map, position[2], nid, character_sprites, (event==$game_player))) + end + +end + +class Game_Event < Game_Character + attr_reader :erased +end + +class Sprite_Character + alias old_initialize_foot initialize + def initialize(viewport, character=nil) + old_initialize_foot(viewport, character) + @disposed = false + end + + alias old_update_foot update + def update + return if @disposed + old_update_foot + end + + alias old_dispose_foot dispose + def dispose + old_dispose_foot + @disposed = true + end +end + +class Spriteset_Map + attr_accessor :character_sprites + attr_accessor :footsprites + + alias old_initialize initialize + def initialize(map=nil) + old_initialize(map) + @footsprites = [] + end + + def viewport1 + return @@viewport1 + end + + def putFootprint(event, pos) + return FootprintVariables.show(event, pos) + end + + alias old_dispose dispose + def dispose + old_dispose + @footsprites.each { |sprite| sprite.dispose } if !@footsprites.nil? + @footsprites.clear + end + + alias old_update update + def update + old_update + return if @footsprites.nil? + @footsprites.each { |sprite| sprite.update } + end +end + +class Scene_Map + def spriteset? + return !@spritesets.nil? + end +end + +class Game_Character + + def get_last_pos + case direction + when 2 then return [@x, @y-1, direction] # Move down + when 4 then return [@x+1, @y, direction] # Move left + when 6 then return [@x-1, @y, direction] # Move right + when 8 then return [@x, @y+1, direction] # Move up + end + return false + end + + def foot_prints? + return $game_map.terrain_tag(get_last_pos[0], get_last_pos[1]) == FootprintVariables::TERRAIN_FOOT && $scene.is_a?(Scene_Map) && $scene.spriteset? + end + + alias leave_tile_footprints triggerLeaveTile + def triggerLeaveTile + leave_tile_footprints + $scene.spriteset.putFootprint(self, get_last_pos) if foot_prints? + end + +end + +class Footsprite + def initialize(sprite,event,viewport,map,direction,nid,chardata,player) + @rsprite = sprite + # Sprite + @sprite = Sprite.new(viewport) + file = player && $PokemonGlobal.bicycle ? "footsetbike.png" : "footset.png" + @sprite.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/", file) + # Set position + @realwidth = @sprite.bitmap.width/4 + @sprite.src_rect.width = @realwidth + @opacity = FootprintVariables::FOOT_OPACITY + setFootset(direction) + # Values + @map = map + @event = event + @disposed = false + @eventid = nid + @viewport = viewport + @chardata = chardata + update + end + + def setFootset(direction) + @sprite.src_rect.x = + case direction + when 2 then 0 # Move down + when 4 then @realwidth * 3 # Move left + when 6 then @realwidth * 2 # Move right + when 8 then @realwidth # Move up + end + @sprite.opacity = @opacity + end + + def dispose + return if @disposed + @disposed = true + @event.erase + (0...@chardata.length).each { |i| @chardata.delete_at(i) if @chardata[i] == @rsprite } + @rsprite.dispose + @sprite.dispose + @sprite = nil + end + + def update + return if @disposed + x = @rsprite.x - @rsprite.ox + y = @rsprite.y - @rsprite.oy + width = @rsprite.src_rect.width + height = @rsprite.src_rect.height + @sprite.x = x + width / 2 + @sprite.y = y + height + @sprite.ox = @realwidth / 2 + @sprite.oy = @sprite.bitmap.height + @sprite.z = @rsprite.z - 2 + @opacity -= FootprintVariables::FOOT_DELAY + @sprite.opacity = @opacity + dispose if @sprite.opacity <= 0 + end +end \ No newline at end of file diff --git a/Data/Scripts/050_AddOns/New Balls.rb b/Data/Scripts/050_AddOns/New Balls.rb index 78811475d..da775d3d0 100644 --- a/Data/Scripts/050_AddOns/New Balls.rb +++ b/Data/Scripts/050_AddOns/New Balls.rb @@ -70,31 +70,26 @@ BallHandlers::OnCatch.add(:PERFECTBALL,proc{|ball,battle,pokemon| #DREAMBALL - endormi BallHandlers::ModifyCatchRate.add(:DREAMBALL,proc{|ball,catchRate,battle,battler| battler.status = :SLEEP - catchRate = 1 next catchRate }) #TOXICBALL - empoisonné BallHandlers::ModifyCatchRate.add(:TOXICBALL,proc{|ball,catchRate,battle,battler| battler.status = :POISON - catchRate = 1 next catchRate }) #SCORCHBALL - brulé BallHandlers::ModifyCatchRate.add(:SCORCHBALL,proc{|ball,catchRate,battle,battler| battler.status = :BURN - catchRate = 1 next catchRate }) #FROSTBALL - frozen BallHandlers::ModifyCatchRate.add(:FROSTBALL,proc{|ball,catchRate,battle,battler| battler.status = :FROZEN - catchRate = 1 next catchRate }) #SPARKBALL - paralizé BallHandlers::ModifyCatchRate.add(:SPARKBALL,proc{|ball,catchRate,battle,battler| battler.status = :PARALYSIS - catchRate = 1 next catchRate }) #PUREBALL - marche mieux quand pas de status diff --git a/Data/System.rxdata b/Data/System.rxdata index 809e0fc34..925287174 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Data/items.dat b/Data/items.dat index 31c76737f..ecd8a5dad 100644 Binary files a/Data/items.dat and b/Data/items.dat differ diff --git a/Data/messages.dat b/Data/messages.dat index 3736e91bb..9c6df5721 100644 Binary files a/Data/messages.dat and b/Data/messages.dat differ