Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2efd78631 | ||
|
|
116323d8e8 | ||
|
|
8c80c9db35 | ||
|
|
0d75109a20 | ||
|
|
d78caf6792 | ||
|
|
4a6a889b3e | ||
|
|
6180590860 | ||
|
|
dee677224d | ||
|
|
2a33e49855 | ||
|
|
a21f3b289b | ||
|
|
1379b219f2 | ||
|
|
f6b55a838b | ||
|
|
92194cab02 | ||
|
|
0904f27afa | ||
|
|
c5f578039e | ||
|
|
2b06205ee8 | ||
|
|
867a3bf0a5 | ||
|
|
9bdaf9e817 | ||
|
|
ef919ee44b | ||
|
|
e6d133f7a6 | ||
|
|
e186c4b668 | ||
|
|
ad1be384ce | ||
|
|
19864599e0 | ||
|
|
b053d1eb77 | ||
|
|
2c3fae1b27 | ||
|
|
5e30a12118 | ||
|
|
c6a52b7940 | ||
|
|
0ba5b1551e |
6485
Data/CUSTOM_SPRITES
10379
Data/SPRITE_CREDS
@@ -5,8 +5,8 @@
|
||||
#==============================================================================#
|
||||
module Settings
|
||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||
GAME_VERSION = '6.2.1'
|
||||
GAME_VERSION_NUMBER = "6.2.1"
|
||||
GAME_VERSION = '6.2.3'
|
||||
GAME_VERSION_NUMBER = "6.2.3"
|
||||
|
||||
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
||||
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# class Object
|
||||
#===============================================================================
|
||||
class Object
|
||||
alias full_inspect inspect
|
||||
alias full_inspect inspect unless method_defined?(:full_inspect)
|
||||
|
||||
def inspect
|
||||
return "#<#{self.class}>"
|
||||
|
||||
@@ -36,6 +36,7 @@ class Game_Map
|
||||
attr_reader :display_x # display x-coordinate * 128
|
||||
attr_reader :display_y # display y-coordinate * 128
|
||||
attr_accessor :need_refresh # refresh request flag
|
||||
attr_accessor :scroll_direction
|
||||
|
||||
TILE_WIDTH = 32
|
||||
TILE_HEIGHT = 32
|
||||
|
||||
@@ -178,6 +178,12 @@ class Game_Player < Game_Character
|
||||
self.map.display_y = y * Game_Map::REAL_RES_Y - SCREEN_CENTER_Y
|
||||
end
|
||||
|
||||
|
||||
def isCentered()
|
||||
x_centered = self.map.display_x == x * Game_Map::REAL_RES_X - SCREEN_CENTER_X
|
||||
y_centered = self.map.display_y == y * Game_Map::REAL_RES_Y - SCREEN_CENTER_Y
|
||||
return x_centered && y_centered
|
||||
end
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Move to Designated Position
|
||||
# x : x-coordinate
|
||||
|
||||
@@ -41,9 +41,9 @@ end
|
||||
|
||||
|
||||
class Spriteset_Map
|
||||
alias _animationSprite_initialize initialize
|
||||
alias _animationSprite_update update
|
||||
alias _animationSprite_dispose dispose
|
||||
alias _animationSprite_initialize initialize unless method_defined?(:_animationSprite_initialize)
|
||||
alias _animationSprite_update update unless method_defined?(:_animationSprite_update)
|
||||
alias _animationSprite_dispose dispose unless method_defined?(:_animationSprite_dispose)
|
||||
|
||||
def initialize(map=nil)
|
||||
@usersprites=[]
|
||||
|
||||
@@ -19,7 +19,7 @@ class Sprite_Shadow < RPG::Sprite
|
||||
end
|
||||
|
||||
def dispose
|
||||
@chbitmap.dispose if @chbitmap
|
||||
@chbitmap&.dispose
|
||||
super
|
||||
end
|
||||
|
||||
@@ -35,8 +35,8 @@ class Sprite_Shadow < RPG::Sprite
|
||||
@tile_id = @character.tile_id
|
||||
@character_name = @character.character_name
|
||||
@character_hue = @character.character_hue
|
||||
@chbitmap&.dispose
|
||||
if @tile_id >= 384
|
||||
@chbitmap.dispose if @chbitmap
|
||||
@chbitmap = pbGetTileBitmap(@character.map.tileset_name,
|
||||
@tile_id, @character.character_hue)
|
||||
self.src_rect.set(0, 0, 32, 32)
|
||||
@@ -45,9 +45,8 @@ class Sprite_Shadow < RPG::Sprite
|
||||
self.ox = 16
|
||||
self.oy = 32
|
||||
else
|
||||
@chbitmap.dispose if @chbitmap
|
||||
@chbitmap = AnimatedBitmap.new(
|
||||
'Graphics/Characters/'+@character.character_name,@character.character_hue)
|
||||
@chbitmap = AnimatedBitmap.new('Graphics/Characters/' + @character.character_name,
|
||||
@character.character_hue)
|
||||
@cw = @chbitmap.width / 4
|
||||
@ch = @chbitmap.height / 4
|
||||
self.ox = @cw / 2
|
||||
@@ -90,7 +89,7 @@ class Sprite_Shadow < RPG::Sprite
|
||||
@deltay = ScreenPosHelper.pbScreenY(@source) - self.y
|
||||
self.color = Color.new(0, 0, 0)
|
||||
@distance = ((@deltax**2) + (@deltay**2))
|
||||
self.opacity = @self_opacity * 13000 / ((@distance * 370 / @distancemax) + 6000)
|
||||
self.opacity = @self_opacity * 13_000 / ((@distance * 370 / @distancemax) + 6000)
|
||||
self.angle = 57.3 * Math.atan2(@deltax, @deltay)
|
||||
@angle_trigo = self.angle + 90
|
||||
@angle_trigo += 360 if @angle_trigo < 0
|
||||
@@ -124,7 +123,7 @@ end
|
||||
# ? CLASS Sprite_Character edit
|
||||
#===================================================
|
||||
class Sprite_Character < RPG::Sprite
|
||||
alias :shadow_initialize :initialize
|
||||
alias shadow_initialize initialize unless method_defined?(:shadow_initialize)
|
||||
|
||||
def initialize(viewport, character = nil)
|
||||
@ombrelist = []
|
||||
@@ -136,33 +135,29 @@ class Sprite_Character < RPG::Sprite
|
||||
if character.is_a?(Game_Event) && shadows.length > 0
|
||||
params = XPML_read(map, "Shadow", @character, 4)
|
||||
if params != nil
|
||||
for i in 0...shadows.size
|
||||
@ombrelist.push(Sprite_Shadow.new(viewport, @character, shadows[i]))
|
||||
shadows.each do |shadow|
|
||||
@ombrelist.push(Sprite_Shadow.new(viewport, @character, shadows))
|
||||
end
|
||||
end
|
||||
end
|
||||
if character.is_a?(Game_Player) && shadows.length > 0
|
||||
for i in 0...shadows.size
|
||||
@ombrelist.push(Sprite_Shadow.new(viewport, $game_player, shadows[i]))
|
||||
shadows.each do |shadow|
|
||||
@ombrelist.push(Sprite_Shadow.new(viewport, $game_player, shadow))
|
||||
end
|
||||
end
|
||||
update
|
||||
end
|
||||
|
||||
def clearShadows
|
||||
@ombrelist.each { |s| s.dispose if s }
|
||||
@ombrelist.each { |s| s&.dispose }
|
||||
@ombrelist.clear
|
||||
end
|
||||
|
||||
alias shadow_update update
|
||||
alias shadow_update update unless method_defined?(:shadow_update)
|
||||
|
||||
def update
|
||||
shadow_update
|
||||
if @ombrelist.length>0
|
||||
for i in 0...@ombrelist.size
|
||||
@ombrelist[i].update
|
||||
end
|
||||
end
|
||||
@ombrelist.each { |ombre| ombre.update }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -183,16 +178,16 @@ end
|
||||
class Spriteset_Map
|
||||
attr_accessor :shadows
|
||||
|
||||
alias shadow_initialize initialize
|
||||
alias shadow_initialize initialize unless method_defined?(:shadow_initialize)
|
||||
|
||||
def initialize(map = nil)
|
||||
@shadows = []
|
||||
warn = false
|
||||
map = $game_map if !map
|
||||
for k in map.events.keys.sort
|
||||
map.events.keys.sort.each do |k|
|
||||
ev = map.events[k]
|
||||
warn = true if (ev.list != nil && ev.list.length > 0 &&
|
||||
ev.list[0].code == 108 &&
|
||||
(ev.list[0].parameters == ["s"] || ev.list[0].parameters == ["o"]))
|
||||
warn = true if ev.list != nil && ev.list.length > 0 && ev.list[0].code == 108 &&
|
||||
(ev.list[0].parameters == ["s"] || ev.list[0].parameters == ["o"])
|
||||
params = XPML_read(map, "Shadow Source", ev, 4)
|
||||
@shadows.push([ev] + params) if params != nil
|
||||
end
|
||||
@@ -200,7 +195,7 @@ class Spriteset_Map
|
||||
p "Warning : At least one event on this map uses the obsolete way to add shadows"
|
||||
end
|
||||
shadow_initialize(map)
|
||||
for sprite in @character_sprites
|
||||
@character_sprites.each do |sprite|
|
||||
sprite.setShadows(map, @shadows)
|
||||
end
|
||||
$scene.spritesetGlobal.playersprite.setShadows(map, @shadows)
|
||||
@@ -230,12 +225,12 @@ end
|
||||
#===================================================
|
||||
def XPML_read(map, markup, event, max_param_number = 0)
|
||||
parameter_list = nil
|
||||
return nil if !event || event.list == nil
|
||||
for i in 0...event.list.size
|
||||
return nil if !event || event.list.nil?
|
||||
event.list.size.times do |i|
|
||||
if event.list[i].code == 108 &&
|
||||
event.list[i].parameters[0].downcase == "begin " + markup.downcase
|
||||
parameter_list = [] if parameter_list == nil
|
||||
for j in i+1...event.list.size
|
||||
parameter_list = [] if parameter_list.nil?
|
||||
((i + 1)...event.list.size).each do |j|
|
||||
if event.list[j].code == 108
|
||||
parts = event.list[j].parameters[0].split
|
||||
if parts.size != 1 && parts[0].downcase != "begin"
|
||||
|
||||
@@ -31,7 +31,7 @@ class Particle_Engine
|
||||
|
||||
def dispose
|
||||
return if disposed?
|
||||
for particle in @effect
|
||||
@effect.each do |particle|
|
||||
next if particle.nil?
|
||||
particle.dispose
|
||||
end
|
||||
@@ -57,17 +57,17 @@ class Particle_Engine
|
||||
def realloc_effect(event, particle)
|
||||
type = pbEventCommentInput(event, 1, "Particle Engine Type")
|
||||
if type.nil?
|
||||
particle.dispose if particle
|
||||
particle&.dispose
|
||||
return nil
|
||||
end
|
||||
type = type[0].downcase
|
||||
cls = @effects[type]
|
||||
if cls.nil?
|
||||
particle.dispose if particle
|
||||
particle&.dispose
|
||||
return nil
|
||||
end
|
||||
if !particle || !particle.is_a?(cls)
|
||||
particle.dispose if particle
|
||||
particle&.dispose
|
||||
particle = cls.new(event, @viewport)
|
||||
end
|
||||
return particle
|
||||
@@ -80,13 +80,12 @@ class Particle_Engine
|
||||
def update
|
||||
if @firsttime
|
||||
@firsttime = false
|
||||
for event in @map.events.values
|
||||
@map.events.values.each do |event|
|
||||
remove_effect(event)
|
||||
add_effect(event)
|
||||
end
|
||||
end
|
||||
for i in 0...@effect.length
|
||||
particle = @effect[i]
|
||||
@effect.each_with_index do |particle, i|
|
||||
next if particle.nil?
|
||||
if particle.event.pe_refresh
|
||||
event = particle.event
|
||||
@@ -94,7 +93,7 @@ class Particle_Engine
|
||||
particle = realloc_effect(event, particle)
|
||||
@effect[i] = particle
|
||||
end
|
||||
particle.update if particle
|
||||
particle&.update
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -136,7 +135,7 @@ class ParticleSprite
|
||||
end
|
||||
|
||||
def dispose
|
||||
@sprite.dispose if @sprite
|
||||
@sprite&.dispose
|
||||
end
|
||||
|
||||
def bitmap=(value)
|
||||
@@ -217,7 +216,7 @@ class ParticleEffect_Event < ParticleEffect
|
||||
@zoffset = zOffset
|
||||
@bmwidth = 32
|
||||
@bmheight = 32
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
@particlex[i] = -@xoffset
|
||||
@particley[i] = -@yoffset
|
||||
@particles[i] = ParticleSprite.new(@viewport)
|
||||
@@ -261,9 +260,9 @@ class ParticleEffect_Event < ParticleEffect
|
||||
@real_y = newRealY
|
||||
if @opacityvar > 0 && @viewport
|
||||
opac = 255.0 / @opacityvar
|
||||
minX = opac*(-@xgravity*1.0 / @slowdown).floor + @startingx
|
||||
maxX = opac*(@xgravity*1.0 / @slowdown).floor + @startingx
|
||||
minY = opac*(-@ygravity*1.0 / @slowdown).floor + @startingy
|
||||
minX = (opac * (-@xgravity.to_f / @slowdown).floor) + @startingx
|
||||
maxX = (opac * (@xgravity.to_f / @slowdown).floor) + @startingx
|
||||
minY = (opac * (-@ygravity.to_f / @slowdown).floor) + @startingy
|
||||
maxY = @startingy
|
||||
minX -= @bmwidth
|
||||
minY -= @bmheight
|
||||
@@ -275,7 +274,7 @@ class ParticleEffect_Event < ParticleEffect
|
||||
end
|
||||
end
|
||||
particleZ = selfZ + @zoffset
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
@particles[i].z = particleZ
|
||||
if @particles[i].y <= @ytop
|
||||
@particles[i].y = @startingy + @yoffset
|
||||
@@ -309,15 +308,13 @@ class ParticleEffect_Event < ParticleEffect
|
||||
@particlex[i] = 0.0
|
||||
@particley[i] = 0.0
|
||||
end
|
||||
else
|
||||
if @opacity[i] <= 0
|
||||
elsif @opacity[i] <= 0
|
||||
@opacity[i] = 250
|
||||
@particles[i].y = @startingy + @yoffset
|
||||
@particles[i].x = @startingx + @xoffset
|
||||
@particlex[i] = 0.0
|
||||
@particley[i] = 0.0
|
||||
end
|
||||
end
|
||||
calcParticlePos(i)
|
||||
if @randomhue == 1
|
||||
@hue += 0.5
|
||||
@@ -333,11 +330,11 @@ class ParticleEffect_Event < ParticleEffect
|
||||
def calcParticlePos(i)
|
||||
@leftright = rand(2)
|
||||
if @leftright == 1
|
||||
xo = -@xgravity*1.0 / @slowdown
|
||||
xo = -@xgravity.to_f / @slowdown
|
||||
else
|
||||
xo = @xgravity*1.0 / @slowdown
|
||||
xo = @xgravity.to_f / @slowdown
|
||||
end
|
||||
yo = -@ygravity*1.0 / @slowdown
|
||||
yo = -@ygravity.to_f / @slowdown
|
||||
@particlex[i] += xo
|
||||
@particley[i] += yo
|
||||
@particlex[i] -= @__offsetx
|
||||
@@ -349,10 +346,10 @@ class ParticleEffect_Event < ParticleEffect
|
||||
end
|
||||
|
||||
def dispose
|
||||
for particle in @particles
|
||||
@particles.each do |particle|
|
||||
particle.dispose
|
||||
end
|
||||
for bitmap in @bitmaps.values
|
||||
@bitmaps.values.each do |bitmap|
|
||||
bitmap.dispose
|
||||
end
|
||||
@particles.clear
|
||||
@@ -390,7 +387,7 @@ class Particle_Engine::Teleport < ParticleEffect_Event
|
||||
setParameters([1, 1, 1, 10, rand(360), 1, -64,
|
||||
Graphics.height, -64, Graphics.width, 0, 3, -8, -15, 20, 0])
|
||||
initParticles("wideportal", 250)
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
@particles[i].ox = 16
|
||||
@particles[i].oy = 16
|
||||
end
|
||||
@@ -449,7 +446,7 @@ class Particle_Engine::SootSmoke < ParticleEffect_Event
|
||||
setParameters([0, 0, 0, 30, 0, 0.5, -64,
|
||||
Graphics.height, -64, Graphics.width, 0.5, 0.10, -5, -15, 5, 80])
|
||||
initParticles("smoke", 100, 0)
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
@particles[i].blend_type = rand(6) < 3 ? 1 : 2
|
||||
end
|
||||
end
|
||||
@@ -474,7 +471,7 @@ class Particle_Engine::FixedTeleport < ParticleEffect_Event
|
||||
setParameters([1, 0, 1, 10, rand(360), 1,
|
||||
-Graphics.height, Graphics.height, 0, Graphics.width, 0, 3, -8, -15, 20, 0])
|
||||
initParticles("wideportal", 250)
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
@particles[i].ox = 16
|
||||
@particles[i].oy = 16
|
||||
end
|
||||
@@ -490,7 +487,7 @@ class Particle_Engine::StarTeleport < ParticleEffect_Event
|
||||
setParameters([0, 0, 1, 10, 0, 1,
|
||||
-Graphics.height, Graphics.height, 0, Graphics.width, 0, 3, -8, -15, 10, 0])
|
||||
initParticles("star", 250)
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
@particles[i].ox = 48
|
||||
@particles[i].oy = 48
|
||||
end
|
||||
@@ -505,7 +502,7 @@ class Particle_Engine::Smokescreen < ParticleEffect_Event
|
||||
setParameters([0, 0, 0, 250, 0, 0.2, -64,
|
||||
Graphics.height, -64, Graphics.width, 0.8, 0.8, -5, -15, 5, 80])
|
||||
initParticles(nil, 100)
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
rnd = rand(3)
|
||||
@opacity[i] = (rnd == 0) ? 1 : 100
|
||||
filename = (rnd == 0) ? "explosionsmoke" : "smoke"
|
||||
@@ -520,9 +517,9 @@ class Particle_Engine::Smokescreen < ParticleEffect_Event
|
||||
end
|
||||
multiple = 1.7
|
||||
xgrav = @xgravity * multiple / @slowdown
|
||||
xgrav = -xgrav if (rand(2)==1)
|
||||
xgrav = -xgrav if rand(2) == 1
|
||||
ygrav = @ygravity * multiple / @slowdown
|
||||
ygrav = -ygrav if (rand(2)==1)
|
||||
ygrav = -ygrav if rand(2) == 1
|
||||
@particlex[i] += xgrav
|
||||
@particley[i] += ygrav
|
||||
@particlex[i] -= @__offsetx
|
||||
@@ -557,7 +554,7 @@ class Particle_Engine::Splash < ParticleEffect_Event
|
||||
|
||||
def update
|
||||
super
|
||||
for i in 0...@maxparticless
|
||||
@maxparticless.times do |i|
|
||||
@particles[i].opacity = 50
|
||||
@particles[i].update
|
||||
end
|
||||
@@ -569,7 +566,8 @@ end
|
||||
class Game_Event < Game_Character
|
||||
attr_accessor :pe_refresh
|
||||
|
||||
alias nf_particles_game_map_initialize initialize
|
||||
alias nf_particles_game_map_initialize initialize unless method_defined?(:nf_particles_game_map_initialize)
|
||||
|
||||
def initialize(map_id, event, map = nil)
|
||||
@pe_refresh = false
|
||||
begin
|
||||
@@ -579,7 +577,8 @@ class Game_Event < Game_Character
|
||||
end
|
||||
end
|
||||
|
||||
alias nf_particles_game_map_refresh refresh
|
||||
alias nf_particles_game_map_refresh refresh unless method_defined?(:nf_particles_game_map_refresh)
|
||||
|
||||
def refresh
|
||||
nf_particles_game_map_refresh
|
||||
@pe_refresh = true
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
#[FRAME1 [x,y]],[FRAME2 [x,y], etc.]
|
||||
#
|
||||
# exact number of pixels that the sprite needs to be moved for each frame
|
||||
# add 2 pixels on even frames
|
||||
module Outfit_Offsets
|
||||
BASE_OFFSET = [[0, 0], [0, 0], [0, 0], [0, 0]]
|
||||
|
||||
@@ -24,4 +27,8 @@ module Outfit_Offsets
|
||||
BIKE_OFFSETS_RIGHT = [[4, -4], [2, -2], [4, -4], [6, -2]]
|
||||
BIKE_OFFSETS_UP = [[0, -2], [-2, 0], [0, -2], [2, 0]]
|
||||
|
||||
FISH_OFFSETS_DOWN = [[0, -6], [0, -2], [0, -8], [2, -6]]
|
||||
FISH_OFFSETS_LEFT = [[0, -8], [-6, -6], [0, -8], [2, -8]]
|
||||
FISH_OFFSETS_RIGHT = [[0, -8], [6, -6], [0, -8], [-2, -8]]
|
||||
FISH_OFFSETS_UP = [[0, -6], [0, -6], [0, -6], [2, -4]]
|
||||
end
|
||||
|
||||
@@ -28,6 +28,31 @@ class Sprite_Wearable < RPG::Sprite
|
||||
@sprite.y += offsets_array[current_frame][1]
|
||||
end
|
||||
|
||||
def adjustPositionForScreenScrolling
|
||||
return if !$game_map.scrolling? && !@was_just_scrolling
|
||||
if $game_map.scrolling?
|
||||
@was_just_scrolling=true
|
||||
else
|
||||
@was_just_scrolling=false
|
||||
end
|
||||
offset_x = 0
|
||||
offset_y = 0
|
||||
case $game_map.scroll_direction
|
||||
when DIRECTION_RIGHT
|
||||
offset_x=-8
|
||||
when DIRECTION_LEFT
|
||||
offset_x=8
|
||||
when DIRECTION_UP
|
||||
offset_y=8
|
||||
@sprite.z+=50 #weird layering glitch for some reason otherwise. It's reset to the correct value in the next animation frame
|
||||
when DIRECTION_DOWN
|
||||
offset_y=-8
|
||||
end
|
||||
@sprite.x+=offset_x
|
||||
@sprite.y+=offset_y
|
||||
end
|
||||
|
||||
|
||||
def set_sprite_position(action, direction, current_frame)
|
||||
@sprite.x = @player_sprite.x - @player_sprite.ox
|
||||
@sprite.y = @player_sprite.y - @player_sprite.oy
|
||||
@@ -72,20 +97,33 @@ class Sprite_Wearable < RPG::Sprite
|
||||
elsif direction == DIRECTION_UP
|
||||
apply_sprite_offset( Outfit_Offsets::BIKE_OFFSETS_UP,current_frame)
|
||||
end
|
||||
when "fish"
|
||||
if direction == DIRECTION_DOWN
|
||||
apply_sprite_offset(Outfit_Offsets::FISH_OFFSETS_DOWN,current_frame)
|
||||
elsif direction == DIRECTION_LEFT
|
||||
apply_sprite_offset( Outfit_Offsets::FISH_OFFSETS_LEFT,current_frame)
|
||||
elsif direction == DIRECTION_RIGHT
|
||||
apply_sprite_offset( Outfit_Offsets::FISH_OFFSETS_RIGHT,current_frame)
|
||||
elsif direction == DIRECTION_UP
|
||||
apply_sprite_offset( Outfit_Offsets::FISH_OFFSETS_UP,current_frame)
|
||||
end
|
||||
else
|
||||
@sprite.x = @player_sprite.x - @player_sprite.ox
|
||||
@sprite.y = @player_sprite.y - @player_sprite.oy
|
||||
end
|
||||
adjustPositionForScreenScrolling()
|
||||
|
||||
@sprite.y -= 2 if current_frame % 2 == 1
|
||||
end
|
||||
|
||||
def animate(action)
|
||||
|
||||
def animate(action, frame=nil)
|
||||
@action = action
|
||||
current_frame = @player_sprite.character.pattern
|
||||
current_frame = @player_sprite.character.pattern if !frame
|
||||
direction = @player_sprite.character.direction
|
||||
crop_spritesheet(direction)
|
||||
set_sprite_position(@action, direction, current_frame)
|
||||
adjust_layer()
|
||||
set_sprite_position(@action, direction, current_frame)
|
||||
end
|
||||
|
||||
def update(action, filename,color)
|
||||
|
||||
@@ -6,56 +6,56 @@ class Sprite_Hat < Sprite_Wearable
|
||||
|
||||
end
|
||||
|
||||
def set_sprite_position(action, direction, current_frame)
|
||||
@sprite.x = @player_sprite.x - @player_sprite.ox
|
||||
@sprite.y = @player_sprite.y - @player_sprite.oy
|
||||
case action
|
||||
when "run"
|
||||
if direction == DIRECTION_DOWN
|
||||
apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_DOWN, current_frame)
|
||||
elsif direction == DIRECTION_LEFT
|
||||
apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_LEFT, current_frame)
|
||||
elsif direction == DIRECTION_RIGHT
|
||||
apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_RIGHT, current_frame)
|
||||
elsif direction == DIRECTION_UP
|
||||
apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_UP, current_frame)
|
||||
end
|
||||
when "surf"
|
||||
if direction == DIRECTION_DOWN
|
||||
apply_sprite_offset(Outfit_Offsets::SURF_OFFSETS_DOWN,current_frame)
|
||||
elsif direction == DIRECTION_LEFT
|
||||
apply_sprite_offset( Outfit_Offsets::SURF_OFFSETS_LEFT,current_frame)
|
||||
elsif direction == DIRECTION_RIGHT
|
||||
apply_sprite_offset( Outfit_Offsets::SURF_OFFSETS_RIGHT,current_frame)
|
||||
elsif direction == DIRECTION_UP
|
||||
apply_sprite_offset( Outfit_Offsets::SURF_OFFSETS_UP,current_frame)
|
||||
end
|
||||
when "dive"
|
||||
if direction == DIRECTION_DOWN
|
||||
apply_sprite_offset(Outfit_Offsets::DIVE_OFFSETS_DOWN,current_frame)
|
||||
elsif direction == DIRECTION_LEFT
|
||||
apply_sprite_offset( Outfit_Offsets::DIVE_OFFSETS_LEFT,current_frame)
|
||||
elsif direction == DIRECTION_RIGHT
|
||||
apply_sprite_offset( Outfit_Offsets::DIVE_OFFSETS_RIGHT,current_frame)
|
||||
elsif direction == DIRECTION_UP
|
||||
apply_sprite_offset( Outfit_Offsets::DIVE_OFFSETS_UP,current_frame)
|
||||
end
|
||||
when "bike"
|
||||
if direction == DIRECTION_DOWN
|
||||
apply_sprite_offset(Outfit_Offsets::BIKE_OFFSETS_DOWN,current_frame)
|
||||
elsif direction == DIRECTION_LEFT
|
||||
apply_sprite_offset( Outfit_Offsets::BIKE_OFFSETS_LEFT,current_frame)
|
||||
elsif direction == DIRECTION_RIGHT
|
||||
apply_sprite_offset( Outfit_Offsets::BIKE_OFFSETS_RIGHT,current_frame)
|
||||
elsif direction == DIRECTION_UP
|
||||
apply_sprite_offset( Outfit_Offsets::BIKE_OFFSETS_UP,current_frame)
|
||||
end
|
||||
else
|
||||
@sprite.x = @player_sprite.x - @player_sprite.ox
|
||||
@sprite.y = @player_sprite.y - @player_sprite.oy
|
||||
end
|
||||
@sprite.y -= 2 if current_frame % 2 == 1
|
||||
end
|
||||
# def set_sprite_position(action, direction, current_frame)
|
||||
# @sprite.x = @player_sprite.x - @player_sprite.ox
|
||||
# @sprite.y = @player_sprite.y - @player_sprite.oy
|
||||
# case action
|
||||
# when "run"
|
||||
# if direction == DIRECTION_DOWN
|
||||
# apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_DOWN, current_frame)
|
||||
# elsif direction == DIRECTION_LEFT
|
||||
# apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_LEFT, current_frame)
|
||||
# elsif direction == DIRECTION_RIGHT
|
||||
# apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_RIGHT, current_frame)
|
||||
# elsif direction == DIRECTION_UP
|
||||
# apply_sprite_offset(Outfit_Offsets::RUN_OFFSETS_UP, current_frame)
|
||||
# end
|
||||
# when "surf"
|
||||
# if direction == DIRECTION_DOWN
|
||||
# apply_sprite_offset(Outfit_Offsets::SURF_OFFSETS_DOWN,current_frame)
|
||||
# elsif direction == DIRECTION_LEFT
|
||||
# apply_sprite_offset( Outfit_Offsets::SURF_OFFSETS_LEFT,current_frame)
|
||||
# elsif direction == DIRECTION_RIGHT
|
||||
# apply_sprite_offset( Outfit_Offsets::SURF_OFFSETS_RIGHT,current_frame)
|
||||
# elsif direction == DIRECTION_UP
|
||||
# apply_sprite_offset( Outfit_Offsets::SURF_OFFSETS_UP,current_frame)
|
||||
# end
|
||||
# when "dive"
|
||||
# if direction == DIRECTION_DOWN
|
||||
# apply_sprite_offset(Outfit_Offsets::DIVE_OFFSETS_DOWN,current_frame)
|
||||
# elsif direction == DIRECTION_LEFT
|
||||
# apply_sprite_offset( Outfit_Offsets::DIVE_OFFSETS_LEFT,current_frame)
|
||||
# elsif direction == DIRECTION_RIGHT
|
||||
# apply_sprite_offset( Outfit_Offsets::DIVE_OFFSETS_RIGHT,current_frame)
|
||||
# elsif direction == DIRECTION_UP
|
||||
# apply_sprite_offset( Outfit_Offsets::DIVE_OFFSETS_UP,current_frame)
|
||||
# end
|
||||
# when "bike"
|
||||
# if direction == DIRECTION_DOWN
|
||||
# apply_sprite_offset(Outfit_Offsets::BIKE_OFFSETS_DOWN,current_frame)
|
||||
# elsif direction == DIRECTION_LEFT
|
||||
# apply_sprite_offset( Outfit_Offsets::BIKE_OFFSETS_LEFT,current_frame)
|
||||
# elsif direction == DIRECTION_RIGHT
|
||||
# apply_sprite_offset( Outfit_Offsets::BIKE_OFFSETS_RIGHT,current_frame)
|
||||
# elsif direction == DIRECTION_UP
|
||||
# apply_sprite_offset( Outfit_Offsets::BIKE_OFFSETS_UP,current_frame)
|
||||
# end
|
||||
# else
|
||||
# @sprite.x = @player_sprite.x - @player_sprite.ox
|
||||
# @sprite.y = @player_sprite.y - @player_sprite.oy
|
||||
# end
|
||||
# @sprite.y -= 2 if current_frame % 2 == 1
|
||||
# end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ class Sprite_Player < Sprite_Character
|
||||
getClothedPlayerSprite(true)
|
||||
end
|
||||
|
||||
|
||||
def updateCharacterBitmap
|
||||
skinTone = $Trainer.skin_tone ? $Trainer.skin_tone : 0
|
||||
baseBitmapFilename = getBaseOverworldSpriteFilename(@character_name, skinTone)
|
||||
@@ -78,9 +79,7 @@ class Sprite_Player < Sprite_Character
|
||||
return baseBitmap
|
||||
end
|
||||
|
||||
def positionHair(baseBitmap, hairBirmap, offset)
|
||||
baseBitmap.blt(offset[0], offset[1], hairBirmap, hairBirmap.rect)
|
||||
end
|
||||
|
||||
|
||||
|
||||
def update
|
||||
|
||||
@@ -177,7 +177,7 @@ class PokeBattle_Scene
|
||||
sprite.setBitmapDirectly(generate_front_trainer_sprite_bitmap())
|
||||
sprite.zoom_x=2
|
||||
sprite.zoom_y=2
|
||||
sprite.z=30 + idxTrainer
|
||||
sprite.z=100 + idxTrainer
|
||||
|
||||
sprite.mirror =true
|
||||
@sprites["player_#{idxTrainer + 1}"] = sprite
|
||||
|
||||
@@ -72,7 +72,7 @@ end
|
||||
|
||||
def applyRoamWeather()
|
||||
return if $game_screen.weather_type != :None
|
||||
currently_roaming = $PokemonGlobal.roamPosition.keys
|
||||
currently_roaming = getAllCurrentlyRoamingPokemon()
|
||||
currently_roaming.each do |roamer_id|
|
||||
roamer_switch = Settings::ROAMING_SPECIES[roamer_id][2]
|
||||
roamer_active = $game_switches[roamer_switch]
|
||||
|
||||
@@ -244,7 +244,7 @@ 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)
|
||||
if !$game_player.pbFacingTerrainTag.can_fish || (!$PokemonGlobal.surfing && !notCliff)
|
||||
if !$game_player.pbFacingTerrainTag.can_fish || (!$PokemonGlobal.surfing && !notCliff) || $PokemonGlobal.surfing
|
||||
pbMessage(_INTL("Can't use that here."))
|
||||
next 0
|
||||
end
|
||||
@@ -257,7 +257,7 @@ ItemHandlers::UseInField.add(:OLDROD, proc { |item|
|
||||
|
||||
ItemHandlers::UseInField.add(:GOODROD, proc { |item|
|
||||
notCliff = $game_map.passable?($game_player.x, $game_player.y, $game_player.direction, $game_player)
|
||||
if !$game_player.pbFacingTerrainTag.can_fish || (!$PokemonGlobal.surfing && !notCliff)
|
||||
if !$game_player.pbFacingTerrainTag.can_fish || (!$PokemonGlobal.surfing && !notCliff) || $PokemonGlobal.surfing
|
||||
pbMessage(_INTL("Can't use that here."))
|
||||
next 0
|
||||
end
|
||||
@@ -270,7 +270,7 @@ ItemHandlers::UseInField.add(:GOODROD, proc { |item|
|
||||
|
||||
ItemHandlers::UseInField.add(:SUPERROD, proc { |item|
|
||||
notCliff = $game_map.passable?($game_player.x, $game_player.y, $game_player.direction, $game_player)
|
||||
if !$game_player.pbFacingTerrainTag.can_fish || (!$PokemonGlobal.surfing && !notCliff)
|
||||
if !$game_player.pbFacingTerrainTag.can_fish || (!$PokemonGlobal.surfing && !notCliff) || $PokemonGlobal.surfing
|
||||
pbMessage(_INTL("Can't use that here."))
|
||||
next 0
|
||||
end
|
||||
@@ -1075,6 +1075,8 @@ ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE, proc { |item, pkmn, scene|
|
||||
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
|
||||
pkmn.name, newabilname))
|
||||
pkmn.ability_index = newabil
|
||||
pkmn.ability = GameData::Ability.get((newabil == 0) ? abil1 : abil2).id
|
||||
|
||||
#pkmn.ability = GameData::Ability.get((newabil == 0) ? abil1 : abil2).id
|
||||
scene.pbHardRefresh
|
||||
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!", pkmn.name, newabilname))
|
||||
|
||||
@@ -18,6 +18,9 @@ def pbLoadTrainer(tr_type, tr_name, tr_version = 0)
|
||||
raise _INTL("Trainer type {1} does not exist.", tr_type) if !tr_type_data
|
||||
tr_type = tr_type_data.id
|
||||
trainer_data = getTrainersDataMode.try_get(tr_type, tr_name, tr_version)
|
||||
if !trainer_data
|
||||
trainer_data = GameData::Trainer.try_get(tr_type, tr_name, tr_version)
|
||||
end
|
||||
return (trainer_data) ? trainer_data.to_trainer : nil
|
||||
end
|
||||
|
||||
|
||||
@@ -587,6 +587,7 @@ class PokemonMartScreen
|
||||
@scene.pbStartBuyScene(@stock,@adapter)
|
||||
item=nil
|
||||
loop do
|
||||
pbWait(4)
|
||||
item=@scene.pbChooseBuyItem
|
||||
break if !item
|
||||
quantity=0
|
||||
|
||||
@@ -5,7 +5,7 @@ class Player < Trainer
|
||||
attr_accessor :has_snag_machine
|
||||
attr_accessor :seen_purify_chamber
|
||||
|
||||
alias __shadowPkmn__initialize initialize
|
||||
alias __shadowPkmn__initialize initialize unless method_defined?(:__shadowPkmn__initialize)
|
||||
def initialize(name, trainer_type)
|
||||
__shadowPkmn__initialize(name, trainer_type)
|
||||
@has_snag_machine = false
|
||||
|
||||
@@ -176,11 +176,11 @@ end
|
||||
|
||||
|
||||
def playPokeFluteAnimation
|
||||
return if $Trainer.outfit != 0
|
||||
$game_player.setDefaultCharName("players/pokeflute", 0, false)
|
||||
Graphics.update
|
||||
Input.update
|
||||
pbUpdateSceneMap
|
||||
# return if $Trainer.outfit != 0
|
||||
# $game_player.setDefaultCharName("players/pokeflute", 0, false)
|
||||
# Graphics.update
|
||||
# Input.update
|
||||
# pbUpdateSceneMap
|
||||
end
|
||||
|
||||
def restoreDefaultCharacterSprite(charset_number = 0)
|
||||
|
||||
@@ -30,7 +30,9 @@ next catchRate
|
||||
})
|
||||
BallHandlers::OnCatch.add(:ABILITYBALL,proc{|ball,battle,pokemon|
|
||||
species = getSpecies(dexNum(pokemon))
|
||||
pokemon.ability_index= getAbilityIndexFromID(species.hidden_abilities[-1],pokemon)
|
||||
ability = species.hidden_abilities[-1]
|
||||
pokemon.ability = ability
|
||||
pokemon.ability_index= getAbilityIndexFromID(ability,pokemon)
|
||||
})
|
||||
|
||||
#VIRUS BALL 27 - give pokerus
|
||||
|
||||
@@ -1868,13 +1868,27 @@ ItemHandlers::UseInField.add(:DEVONSCOPE, proc { |item|
|
||||
#TRACKER (for roaming legendaries)
|
||||
ItemHandlers::UseInField.add(:REVEALGLASS, proc { |item|
|
||||
track_pokemon()
|
||||
next true
|
||||
})
|
||||
ItemHandlers::UseFromBag.add(:REVEALGLASS, proc { |item|
|
||||
track_pokemon()
|
||||
next true
|
||||
})
|
||||
|
||||
def getAllCurrentlyRoamingPokemon
|
||||
currently_roaming = []
|
||||
Settings::ROAMING_SPECIES.each_with_index do |data, i|
|
||||
next if !GameData::Species.exists?(data[0])
|
||||
next if data[2] > 0 && !$game_switches[data[2]] # Isn't roaming
|
||||
next if $PokemonGlobal.roamPokemon[i] == true # Roaming Pokémon has been caught
|
||||
currently_roaming << i
|
||||
end
|
||||
return currently_roaming
|
||||
end
|
||||
|
||||
def track_pokemon()
|
||||
currently_roaming = $PokemonGlobal.roamPosition.keys
|
||||
currently_roaming = getAllCurrentlyRoamingPokemon()
|
||||
echoln currently_roaming
|
||||
weather_data = []
|
||||
mapinfos = $RPGVX ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata")
|
||||
currently_roaming.each do |roamer_id|
|
||||
@@ -1891,12 +1905,11 @@ def track_pokemon()
|
||||
end
|
||||
weather_data << forecast_msg if forecast_msg && !weather_data.include?(forecast_msg)
|
||||
end
|
||||
|
||||
weather_data << _INTL("No unusual weather patterns have been detected.") if weather_data.empty?
|
||||
weather_data.each do |message|
|
||||
Kernel.pbMessage(message)
|
||||
end
|
||||
|
||||
|
||||
# nbRoaming = 0
|
||||
# if Settings::ROAMING_SPECIES.length == 0
|
||||
# Kernel.pbMessage(_INTL("No roaming Pokémon defined."))
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 936 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 777 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 767 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 874 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 878 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 855 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 966 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 672 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 886 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 906 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 872 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 855 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 916 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 951 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 913 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 799 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 761 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 37 KiB |
BIN
Graphics/Characters/cooltrainer_surf_1.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
Graphics/Characters/cooltrainer_surf_nobase.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |