updates to version 6.1

This commit is contained in:
infinitefusion
2024-03-28 17:14:35 -04:00
parent e952a6f574
commit 1635409e6d
1151 changed files with 509422 additions and 5972 deletions

View File

@@ -21,8 +21,8 @@ class Game_Map
attr_accessor :fog_zoom # fog zoom rate
attr_accessor :fog_sx # fog sx
attr_accessor :fog_sy # fog sy
attr_reader :fog_ox # fog x-coordinate starting point
attr_reader :fog_oy # fog y-coordinate starting point
attr_accessor :fog_ox # fog x-coordinate starting point
attr_accessor :fog_oy # fog y-coordinate starting point
attr_reader :fog_tone # fog color tone
attr_accessor :battleback_name # battleback file name
attr_reader :display_x # display x-coordinate * 128

View File

@@ -25,6 +25,7 @@ class Game_Character
attr_reader :move_speed
attr_accessor :walk_anime
attr_writer :bob_height
attr_accessor :under_everything
def initialize(map = nil)
@map = map
@@ -75,6 +76,7 @@ class Game_Character
@moved_this_frame = false
@locked = false
@prelock_direction = 0
@under_everything=false
end
def at_coordinate?(check_x, check_y)
@@ -231,10 +233,11 @@ class Game_Character
def passable?(x, y, d, strict = false)
return false if self == $game_player && $game_switches[SWITCH_LOCK_PLAYER_MOVEMENT]
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
return false unless self.map.valid?(new_x, new_y)
if self.character_name == "SHARPEDO"
if self.character_name == "SHARPEDO" || self.character_name == "nightmare"
return false if pbFacingTerrainTag().id==:SharpedoObstacle
end
return true if @through
@@ -330,6 +333,7 @@ class Game_Character
end
def screen_z(height = 0)
return -1 if @under_everything
return 999 if @always_on_top
z = screen_y_ground
if @tile_id > 0
@@ -363,6 +367,7 @@ class Game_Character
end
def force_move_route(move_route)
echoln screen_z() if self == $game_player
if @original_move_route == nil
@original_move_route = @move_route
@original_move_route_index = @move_route_index

View File

@@ -9,6 +9,8 @@ class Game_Player < Game_Character
attr_accessor :bump_se
attr_accessor :charsetData
attr_accessor :encounter_count
attr_accessor :x
attr_accessor :y
SCREEN_CENTER_X = (Settings::SCREEN_WIDTH / 2 - Game_Map::TILE_WIDTH / 2) * Game_Map::X_SUBPIXELS
SCREEN_CENTER_Y = (Settings::SCREEN_HEIGHT / 2 - Game_Map::TILE_HEIGHT / 2) * Game_Map::Y_SUBPIXELS

View File

@@ -14,8 +14,9 @@ def pbRemoveDependencies()
pbDeregisterPartner() rescue nil
end
def pbAddDependency(event)
def pbAddDependency(event,follows=true)
$PokemonTemp.dependentEvents.addEvent(event)
$PokemonTemp.dependentEvents.follows_player = follows
end
def pbRemoveDependency(event)
@@ -140,6 +141,7 @@ end
class DependentEvents
attr_reader :lastUpdate
attr_writer :follows_player
def createEvent(eventData)
rpgEvent = RPG::Event.new(eventData[3],eventData[4])
@@ -169,6 +171,7 @@ class DependentEvents
for event in events
@realEvents.push(createEvent(event))
end
@follows_player=true
end
def pbEnsureEvent(event, newMapID)
@@ -213,6 +216,7 @@ class DependentEvents
facings.push(d) # Get forward facing
end
mapTile=nil
if areConnected
bestRelativePos=-1
oldthrough=follower.through
@@ -251,6 +255,7 @@ class DependentEvents
mapTile=passable ? mapTile : nil
end
if mapTile && follower.map.map_id==mapTile[0]
return if !@follows_player
# Follower is on same map
newX=mapTile[1]
newY=mapTile[2]
@@ -258,6 +263,13 @@ class DependentEvents
deltaY=(d == 2 ? -1 : d == 8 ? 1 : 0)
posX = newX + deltaX
posY = newY + deltaY
# if !@follows_player
# posX=follower.original_x
# posY=follower.original_y
#
# end
follower.move_speed=leader.move_speed # sync movespeed
if (follower.x-newX==-1 && follower.y==newY) ||
(follower.x-newX==1 && follower.y==newY) ||
@@ -337,13 +349,20 @@ class DependentEvents
leader=$game_player
for i in 0...events.length
event=@realEvents[i]
pbFollowEventAcrossMaps(leader,event,false,i==0)
# Update X and Y for this event
events[i][3]=event.x
events[i][4]=event.y
events[i][5]=event.direction
# Set leader to this event
leader=event
if !@follows_player
pbRemoveDependencies if leader.map.map_id != event.map.map_id
pbFollowEventAcrossMaps(leader,event,false,i==0)
events[i][3]=event.original_x
events[i][4]=event.original_y
else
pbFollowEventAcrossMaps(leader,event,false,i==0)
# Update X and Y for this event
events[i][3]=event.x
events[i][4]=event.y
events[i][5]=event.direction
# Set leader to this event
leader=event
end
end
end
@@ -372,6 +391,8 @@ class DependentEvents
events=$PokemonGlobal.dependentEvents
return if events.length==0
for i in 0...events.length
break if !@follows_player
event=@realEvents[i]
next if !@realEvents[i]
event.transparent=$game_player.transparent
@@ -388,6 +409,7 @@ class DependentEvents
events[i][5]=event.direction
end
# Check event triggers
#
if Input.trigger?(Input::USE) && !$game_temp.in_menu && !$game_temp.in_battle &&
!$game_player.move_route_forcing && !$game_temp.message_window_showing &&
!pbMapInterpreterRunning?
@@ -471,6 +493,8 @@ class DependentEvents
def addEvent(event,eventName=nil,commonEvent=nil)
return if !event
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events[i] && events[i][0]==$game_map.map_id && events[i][1]==event.id
# Already exists