mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Bug fixes from previous commits
This commit is contained in:
@@ -199,20 +199,20 @@ class Game_Character
|
|||||||
def calculate_bush_depth
|
def calculate_bush_depth
|
||||||
if @tile_id > 0 || @always_on_top || jumping?
|
if @tile_id > 0 || @always_on_top || jumping?
|
||||||
@bush_depth = 0
|
@bush_depth = 0
|
||||||
|
return
|
||||||
|
end
|
||||||
|
deep_bush = regular_bush = false
|
||||||
|
xbehind = @x + (@direction == 4 ? 1 : @direction == 6 ? -1 : 0)
|
||||||
|
ybehind = @y + (@direction == 8 ? 1 : @direction == 2 ? -1 : 0)
|
||||||
|
this_map = (self.map.valid?(@x, @y)) ? [self.map, @x, @y] : $map_factory&.getNewMap(@x, @y)
|
||||||
|
behind_map = (self.map.valid?(xbehind, ybehind)) ? [self.map, xbehind, ybehind] : $map_factory&.getNewMap(xbehind, ybehind)
|
||||||
|
if this_map && this_map[0].deepBush?(this_map[1], this_map[2]) &&
|
||||||
|
(!behind_map || behind_map[0].deepBush?(behind_map[1], behind_map[2]))
|
||||||
|
@bush_depth = Game_Map::TILE_HEIGHT
|
||||||
|
elsif this_map && this_map[0].bush?(this_map[1], this_map[2]) && !moving?
|
||||||
|
@bush_depth = 12
|
||||||
else
|
else
|
||||||
deep_bush = regular_bush = false
|
@bush_depth = 0
|
||||||
xbehind = @x + (@direction == 4 ? 1 : @direction == 6 ? -1 : 0)
|
|
||||||
ybehind = @y + (@direction == 8 ? 1 : @direction == 2 ? -1 : 0)
|
|
||||||
this_map = (self.map.valid?(@x, @y)) ? [self.map, @x, @y] : $map_factory.getNewMap(@x, @y)
|
|
||||||
behind_map = (self.map.valid?(xbehind, ybehind)) ? [self.map, xbehind, ybehind] : $map_factory&.getNewMap(xbehind, ybehind)
|
|
||||||
if this_map[0].deepBush?(this_map[1], this_map[2]) &&
|
|
||||||
(!behind_map || behind_map[0].deepBush?(behind_map[1], behind_map[2]))
|
|
||||||
@bush_depth = Game_Map::TILE_HEIGHT
|
|
||||||
elsif !moving? && this_map[0].bush?(this_map[1], this_map[2])
|
|
||||||
@bush_depth = 12
|
|
||||||
else
|
|
||||||
@bush_depth = 0
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -156,11 +156,11 @@ class Game_Player < Game_Character
|
|||||||
@jump_distance_left = 1 # Just needs to be non-zero
|
@jump_distance_left = 1 # Just needs to be non-zero
|
||||||
if real_distance > 0 # Jumping to somewhere else
|
if real_distance > 0 # Jumping to somewhere else
|
||||||
if $PokemonGlobal&.diving || $PokemonGlobal&.surfing
|
if $PokemonGlobal&.diving || $PokemonGlobal&.surfing
|
||||||
$stats.distance_surfed += x_plus.abs + y_pos.abs
|
$stats.distance_surfed += x_plus.abs + y_plus.abs
|
||||||
elsif $PokemonGlobal&.bicycle
|
elsif $PokemonGlobal&.bicycle
|
||||||
$stats.distance_cycled += x_plus.abs + y_pos.abs
|
$stats.distance_cycled += x_plus.abs + y_plus.abs
|
||||||
else
|
else
|
||||||
$stats.distance_walked += x_plus.abs + y_pos.abs
|
$stats.distance_walked += x_plus.abs + y_plus.abs
|
||||||
end
|
end
|
||||||
@jump_count = 0
|
@jump_count = 0
|
||||||
else # Jumping on the spot
|
else # Jumping on the spot
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
def pbAddDependency2(event_id, name, common_event_id)
|
def pbAddDependency2(event_id, name, common_event_id)
|
||||||
Deprecation.warn_method('pbAddDependency2', 'v21', 'Followers.add(event_id, name, common_event_id)')
|
Deprecation.warn_method('pbAddDependency2', 'v21', 'Followers.add(event_id, name, common_event_id)')
|
||||||
Followers.add_event(event)
|
Followers.add(event_id, name, common_event_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbAddDependency(event)
|
def pbAddDependency(event)
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class Pokemon
|
|||||||
# Used by Galarian Yamask to remember that it took sufficient damage from a
|
# Used by Galarian Yamask to remember that it took sufficient damage from a
|
||||||
# battle and can evolve.
|
# battle and can evolve.
|
||||||
attr_accessor :ready_to_evolve
|
attr_accessor :ready_to_evolve
|
||||||
# Whether this Pokémon can be deposited in storage
|
# Whether this Pokémon can be deposited in storage/Day Care
|
||||||
attr_accessor :cannot_store
|
attr_accessor :cannot_store
|
||||||
# Whether this Pokémon can be released
|
# Whether this Pokémon can be released
|
||||||
attr_accessor :cannot_release
|
attr_accessor :cannot_release
|
||||||
|
|||||||
Reference in New Issue
Block a user