mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-21 00:35:07 +00:00
Compare commits
82 Commits
871045ca46
...
develop-en
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac83e9ddcb | ||
|
|
3470c75b02 | ||
|
|
7358d67e7e | ||
|
|
701ea9ab11 | ||
|
|
36851c7bb7 | ||
|
|
3d6e76a41e | ||
|
|
bc2d48488e | ||
|
|
f3ebd7e7f5 | ||
|
|
6a072917b8 | ||
|
|
0c06b7a6c9 | ||
|
|
14f99f7efb | ||
|
|
b14d9d491c | ||
|
|
071621b8dd | ||
|
|
dc4ec939cd | ||
|
|
a974994d15 | ||
|
|
6b978c0ebc | ||
|
|
8b8b348ed1 | ||
|
|
e9bdea5bad | ||
|
|
6248ccd061 | ||
|
|
60de077d01 | ||
|
|
20a5811ab8 | ||
|
|
32874d8a38 | ||
|
|
d9ef1cd12e | ||
|
|
ccb05dc509 | ||
|
|
4ed504d817 | ||
|
|
96f60d8cb9 | ||
|
|
45bf331031 | ||
|
|
4ef0e87577 | ||
|
|
4f1accc017 | ||
|
|
c41773d06f | ||
|
|
5398a5aa78 | ||
|
|
0d7ea25203 | ||
|
|
98f753eb97 | ||
|
|
f1f00202c2 | ||
|
|
c4242bb0b6 | ||
|
|
c3b501dc28 | ||
|
|
a6649ce82d | ||
|
|
4fcc3e1516 | ||
|
|
553d862168 | ||
|
|
1dba2e41ae | ||
|
|
f15fd29c39 | ||
|
|
c38d513a67 | ||
|
|
92feb7c714 | ||
|
|
892c2b62f6 | ||
|
|
f1d21b10c6 | ||
|
|
687aa86e1c | ||
|
|
707bac5d65 | ||
|
|
c8f2a37d5a | ||
|
|
5eac2dd43a | ||
|
|
9b5f376ed9 | ||
|
|
5ed090229b | ||
|
|
f9095f2d06 | ||
|
|
c6f69edf9c | ||
|
|
a52af5a021 | ||
|
|
80eef3b1c4 | ||
|
|
0f416eecaf | ||
|
|
d099d788f4 | ||
|
|
f835ff8209 | ||
|
|
810154c516 | ||
|
|
76ecb4e2e0 | ||
|
|
1c665bf636 | ||
|
|
0f38d7933b | ||
|
|
4089c956d7 | ||
|
|
133f01218b | ||
|
|
c5cff0dfb9 | ||
|
|
1d2139df32 | ||
|
|
8352043c4c | ||
|
|
67d32e7c18 | ||
|
|
1ddb9ba24a | ||
|
|
4fa7292bdd | ||
|
|
cb39bac568 | ||
|
|
541c98ba6b | ||
|
|
28a982ce15 | ||
|
|
fdcfbb5bb4 | ||
|
|
05b1af28e0 | ||
|
|
0f58800fd1 | ||
|
|
f251cf37ab | ||
|
|
d23e2ff98a | ||
|
|
256a045607 | ||
|
|
7bb75aaf1d | ||
|
|
2bf0b6d104 | ||
|
|
bd11977c80 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
Graphics/CustomBattlers/local_sprites/*
|
Graphics/CustomBattlers/local_sprites/*
|
||||||
Graphics/Pokemon/FusionIcons/*
|
Graphics/Pokemon/FusionIcons/*
|
||||||
Graphics/CustomBattlers/spritesheets
|
Graphics/CustomBattlers/spritesheets
|
||||||
|
Graphics/CustomBattlers/*
|
||||||
Data/sprites/*
|
Data/sprites/*
|
||||||
Data/VERSION
|
Data/VERSION
|
||||||
infinitefusion.sh
|
infinitefusion.sh
|
||||||
@@ -9,6 +10,5 @@ Data/sprites
|
|||||||
Data/sprites/updated_spritesheets_cache
|
Data/sprites/updated_spritesheets_cache
|
||||||
Data/sprites/sprites_rate_limit.log
|
Data/sprites/sprites_rate_limit.log
|
||||||
.gitignore
|
.gitignore
|
||||||
PBS
|
|
||||||
Game.rxproj
|
Game.rxproj
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@@ -45,7 +45,7 @@ Special thanks to Aegide and Reizod for helping to rip the sprites from the webs
|
|||||||
and to the owners of the respective fusion websites for accepting to share
|
and to the owners of the respective fusion websites for accepting to share
|
||||||
their sprites.
|
their sprites.
|
||||||
|
|
||||||
Intro cinamatic
|
Intro cinematic
|
||||||
#####################
|
#####################
|
||||||
Kiwikelly
|
Kiwikelly
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ with their respective authors' consent
|
|||||||
SailorVicious (Prof. Elm OW sprite) https://www.deviantart.com/sailorvicious
|
SailorVicious (Prof. Elm OW sprite) https://www.deviantart.com/sailorvicious
|
||||||
OceansLugiaSpirit (Koga OW sprite) http://oceanslugiaspirit.deviantart.com/
|
OceansLugiaSpirit (Koga OW sprite) http://oceanslugiaspirit.deviantart.com/
|
||||||
Wolfang62: https://www.deviantart.com/wolfang62/art/Wimpod-Sprite-Overworld-836704744
|
Wolfang62: https://www.deviantart.com/wolfang62/art/Wimpod-Sprite-Overworld-836704744
|
||||||
|
zender1752 (Sabrina OW sprite)
|
||||||
Battle sprites:
|
Battle sprites:
|
||||||
Custom graphics:
|
Custom graphics:
|
||||||
Kiwikelly, UnworthyPie
|
Kiwikelly, UnworthyPie
|
||||||
@@ -124,7 +124,7 @@ with their respective authors' consent
|
|||||||
Free use graphics:
|
Free use graphics:
|
||||||
luckygirl88 (Misty VS sprite) http://luckygirl88.deviantart.com/art/Pokemon-BW-Misty-Sprite-Sheet-268364830
|
luckygirl88 (Misty VS sprite) http://luckygirl88.deviantart.com/art/Pokemon-BW-Misty-Sprite-Sheet-268364830
|
||||||
Lorelei VS sprite by Nalty http://nalty.deviantart.com/art/Lorelei-VS-Sprite-177184960
|
Lorelei VS sprite by Nalty http://nalty.deviantart.com/art/Lorelei-VS-Sprite-177184960
|
||||||
|
x-5-4-5-2 (Sabrina sprite) https://www.deviantart.com/x-5-4-5-2/art/Game-Sabrina-204548703
|
||||||
### Custom tileset graphics ###
|
### Custom tileset graphics ###
|
||||||
Kiwikelly
|
Kiwikelly
|
||||||
|
|
||||||
|
|||||||
BIN
Data/.DS_Store
vendored
BIN
Data/.DS_Store
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,9 +5,9 @@
|
|||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
module Settings
|
module Settings
|
||||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||||
GAME_VERSION = '6.4.6'
|
GAME_VERSION = '6.5'
|
||||||
GAME_VERSION_NUMBER = "6.4.7"
|
GAME_VERSION_NUMBER = "6.5.0"
|
||||||
LATEST_GAME_RELEASE = "6.4"
|
LATEST_GAME_RELEASE = "6.5"
|
||||||
|
|
||||||
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
||||||
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
||||||
@@ -107,8 +107,8 @@ module Settings
|
|||||||
BASE_POKEMON_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_base/"
|
BASE_POKEMON_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_base/"
|
||||||
CUSTOM_FUSIONS_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_custom/"
|
CUSTOM_FUSIONS_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_custom/"
|
||||||
|
|
||||||
BASE_POKEMON_SPRITESHEET_TRUE_SIZE_URL = "https://infinitefusion.net/spritesheets_truesize/spritesheets_base/"
|
BASE_POKEMON_SPRITESHEET_TRUE_SIZE_URL = ""
|
||||||
CUSTOM_FUSIONS_SPRITESHEET_TRUE_SIZE_URL = "https://infinitefusion.net/spritesheets_truesize/spritesheets_custom/"
|
CUSTOM_FUSIONS_SPRITESHEET_TRUE_SIZE_URL = ""
|
||||||
|
|
||||||
RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW)
|
RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW)
|
||||||
VAR_1_PLACEHOLDER_SPECIES = :DIALGA
|
VAR_1_PLACEHOLDER_SPECIES = :DIALGA
|
||||||
@@ -575,7 +575,8 @@ module Settings
|
|||||||
|
|
||||||
# Available menu frames. These are graphic files in "Graphics/Windowskins/".
|
# Available menu frames. These are graphic files in "Graphics/Windowskins/".
|
||||||
MENU_WINDOWSKINS = [
|
MENU_WINDOWSKINS = [
|
||||||
"choice 1",
|
"default_transparent",
|
||||||
|
"default_opaque",
|
||||||
"choice 2",
|
"choice 2",
|
||||||
"choice 3",
|
"choice 3",
|
||||||
"choice 4",
|
"choice 4",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ class Sprite_Wearable < RPG::Sprite
|
|||||||
attr_accessor :action
|
attr_accessor :action
|
||||||
attr_accessor :sprite
|
attr_accessor :sprite
|
||||||
|
|
||||||
def initialize(player_sprite, filename, action, viewport)
|
def initialize(player_sprite, filename, action, viewport, relative_z=0)
|
||||||
@player_sprite = player_sprite
|
@player_sprite = player_sprite
|
||||||
@viewport = viewport
|
@viewport = viewport
|
||||||
@sprite = Sprite.new(@viewport)
|
@sprite = Sprite.new(@viewport)
|
||||||
@@ -15,7 +15,7 @@ class Sprite_Wearable < RPG::Sprite
|
|||||||
@frameWidth = 80 #@sprite.width
|
@frameWidth = 80 #@sprite.width
|
||||||
@frameHeight = 80 #@sprite.height / 4
|
@frameHeight = 80 #@sprite.height / 4
|
||||||
@sprite.z = 0
|
@sprite.z = 0
|
||||||
@relative_z=0 #relative to player
|
@relative_z=relative_z #relative to player
|
||||||
echoln(_INTL("init had at z = {1}, player sprite at {2}",@sprite.z,@player_sprite.z))
|
echoln(_INTL("init had at z = {1}, player sprite at {2}",@sprite.z,@player_sprite.z))
|
||||||
|
|
||||||
#Unused position offset
|
#Unused position offset
|
||||||
@@ -166,54 +166,5 @@ class Sprite_Wearable < RPG::Sprite
|
|||||||
@disposed
|
@disposed
|
||||||
end
|
end
|
||||||
|
|
||||||
# def getCurrentSpriteOffset()
|
|
||||||
# direction = @character.direction
|
|
||||||
# current_frame = @character.pattern
|
|
||||||
# case @character_name
|
|
||||||
# when "run"
|
|
||||||
# if direction == DIRECTION_DOWN
|
|
||||||
# return Outfit_Offsets::RUN_OFFSETS_DOWN[current_frame]
|
|
||||||
# elsif direction == DIRECTION_LEFT
|
|
||||||
# return Outfit_Offsets::RUN_OFFSETS_LEFT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_RIGHT
|
|
||||||
# return Outfit_Offsets::RUN_OFFSETS_RIGHT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_UP
|
|
||||||
# return Outfit_Offsets::RUN_OFFSETS_UP[current_frame]
|
|
||||||
# end
|
|
||||||
# when "surf"
|
|
||||||
# #when "dive"
|
|
||||||
# if direction == DIRECTION_DOWN
|
|
||||||
# return Outfit_Offsets::SURF_OFFSETS_DOWN[current_frame]
|
|
||||||
# elsif direction == DIRECTION_LEFT
|
|
||||||
# return Outfit_Offsets::SURF_OFFSETS_LEFT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_RIGHT
|
|
||||||
# return Outfit_Offsets::SURF_OFFSETS_RIGHT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_UP
|
|
||||||
# return Outfit_Offsets::SURF_OFFSETS_UP[current_frame]
|
|
||||||
# end
|
|
||||||
# when "dive"
|
|
||||||
# if direction == DIRECTION_DOWN
|
|
||||||
# return Outfit_Offsets::DIVE_OFFSETS_DOWN[current_frame]
|
|
||||||
# elsif direction == DIRECTION_LEFT
|
|
||||||
# return Outfit_Offsets::DIVE_OFFSETS_LEFT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_RIGHT
|
|
||||||
# return Outfit_Offsets::DIVE_OFFSETS_RIGHT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_UP
|
|
||||||
# return Outfit_Offsets::DIVE_OFFSETS_UP[current_frame]
|
|
||||||
# end
|
|
||||||
# when "bike"
|
|
||||||
# if direction == DIRECTION_DOWN
|
|
||||||
# return Outfit_Offsets::BIKE_OFFSETS_DOWN[current_frame]
|
|
||||||
# elsif direction == DIRECTION_LEFT
|
|
||||||
# return Outfit_Offsets::BIKE_OFFSETS_LEFT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_RIGHT
|
|
||||||
# return Outfit_Offsets::BIKE_OFFSETS_RIGHT[current_frame]
|
|
||||||
# elsif direction == DIRECTION_UP
|
|
||||||
# return Outfit_Offsets::BIKE_OFFSETS_UP[current_frame]
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
# return Outfit_Offsets::BASE_OFFSET[current_frame]
|
|
||||||
# end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,4 +5,81 @@ class Sprite_Hair < Sprite_Wearable
|
|||||||
|
|
||||||
#@sprite.z = @player_sprite.z + 1
|
#@sprite.z = @player_sprite.z + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def animate(action, frame = nil)
|
||||||
|
@action = action
|
||||||
|
current_frame = @player_sprite.character.pattern if !frame
|
||||||
|
direction = @player_sprite.character.direction
|
||||||
|
crop_spritesheet(direction, current_frame, action)
|
||||||
|
adjust_layer()
|
||||||
|
set_sprite_position(@action, direction, current_frame)
|
||||||
|
end
|
||||||
|
|
||||||
|
def crop_spritesheet(direction, current_frame, action)
|
||||||
|
sprite_x = ((current_frame)) * @frameWidth
|
||||||
|
# Don't animate surf
|
||||||
|
sprite_x = 0 if action == "surf"
|
||||||
|
|
||||||
|
sprite_y = ((direction - 2) / 2) * @frameHeight
|
||||||
|
@sprite.src_rect.set(sprite_x, sprite_y, @frameWidth, @frameHeight)
|
||||||
|
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 # Always animate as if on the first frame
|
||||||
|
apply_sprite_offset(Outfit_Offsets::SURF_OFFSETS_DOWN, 0)
|
||||||
|
elsif direction == DIRECTION_LEFT
|
||||||
|
apply_sprite_offset(Outfit_Offsets::SURF_OFFSETS_LEFT, 0)
|
||||||
|
elsif direction == DIRECTION_RIGHT
|
||||||
|
apply_sprite_offset(Outfit_Offsets::SURF_OFFSETS_RIGHT, 0)
|
||||||
|
elsif direction == DIRECTION_UP
|
||||||
|
apply_sprite_offset(Outfit_Offsets::SURF_OFFSETS_UP, 0)
|
||||||
|
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
|
||||||
|
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
|
||||||
|
end
|
||||||
|
adjustPositionForScreenScrolling()
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -1,192 +1,8 @@
|
|||||||
class Sprite_Hat < Sprite_Wearable
|
class Sprite_Hat < Sprite_Wearable
|
||||||
def initialize(player_sprite, filename, action, viewport)
|
def initialize(player_sprite, filename, action, viewport, relative_z=2)
|
||||||
super
|
super
|
||||||
@relative_z = 2
|
@relative_z = relative_z
|
||||||
#@sprite.z = @player_sprite.z + 2
|
#@sprite.z = @player_sprite.z + 2
|
||||||
|
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
# class Sprite_Hat < RPG::Sprite
|
|
||||||
# attr_accessor :filename
|
|
||||||
# attr_accessor :action
|
|
||||||
# attr_accessor :hat_sprite
|
|
||||||
#
|
|
||||||
# def initialize(player_sprite, filename, action, viewport)
|
|
||||||
# @player_sprite = player_sprite
|
|
||||||
# @viewport = viewport
|
|
||||||
# @hat_sprite = Sprite.new(@viewport)
|
|
||||||
# @hatBitmap = AnimatedBitmap.new(filename) if pbResolveBitmap(filename)
|
|
||||||
# @filename = filename
|
|
||||||
# @hat_sprite.bitmap = @hatBitmap.bitmap if @hatBitmap
|
|
||||||
# @action = action
|
|
||||||
# @color = 0
|
|
||||||
# @frameWidth = 80 #@hat_sprite.width
|
|
||||||
# @frameHeight = 80 #@hat_sprite.height / 4
|
|
||||||
# @hat_sprite.z = @player_sprite.z + 2
|
|
||||||
# echoln(_INTL("init had at z = {1}, player sprite at {2}",@hat_sprite.z,@player_sprite.z))
|
|
||||||
#
|
|
||||||
# #Unused position offset
|
|
||||||
# # @x_pos_base_offset = 0
|
|
||||||
# # @y_pos_base_offset = 0
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def apply_sprite_offset(offsets_array, current_frame)
|
|
||||||
# @hat_sprite.x += offsets_array[current_frame][0]
|
|
||||||
# @hat_sprite.y += offsets_array[current_frame][1]
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def set_sprite_position(action, direction, current_frame)
|
|
||||||
# @hat_sprite.x = @player_sprite.x - @player_sprite.ox
|
|
||||||
# @hat_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
|
|
||||||
# @hat_sprite.x = @player_sprite.x - @player_sprite.ox
|
|
||||||
# @hat_sprite.y = @player_sprite.y - @player_sprite.oy
|
|
||||||
# end
|
|
||||||
# @hat_sprite.y -= 2 if current_frame % 2 == 1
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def animate(action)
|
|
||||||
# @action = action
|
|
||||||
# current_frame = @player_sprite.character.pattern
|
|
||||||
# direction = @player_sprite.character.direction
|
|
||||||
# crop_spritesheet(direction)
|
|
||||||
# set_sprite_position(@action, direction, current_frame)
|
|
||||||
# adjust_hat_layer()
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def update(action, hatFilename,color)
|
|
||||||
# @hat_sprite.opacity = @player_sprite.opacity if @hatBitmap
|
|
||||||
# if hatFilename != @filename || color != @color
|
|
||||||
# if pbResolveBitmap(hatFilename)
|
|
||||||
# #echoln pbResolveBitmap(hatFilename)
|
|
||||||
# @hatBitmap = AnimatedBitmap.new(hatFilename,color)
|
|
||||||
# @hat_sprite.bitmap = @hatBitmap.bitmap
|
|
||||||
# else
|
|
||||||
# @hatBitmap = nil
|
|
||||||
# @hat_sprite.bitmap = nil
|
|
||||||
# end
|
|
||||||
# @color =color
|
|
||||||
# @filename = hatFilename
|
|
||||||
# end
|
|
||||||
# animate(action)
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def adjust_hat_layer()
|
|
||||||
# if @hat_sprite.z != @player_sprite.z
|
|
||||||
# @hat_sprite.z = @player_sprite.z
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def crop_spritesheet(direction)
|
|
||||||
# sprite_x = 0
|
|
||||||
# sprite_y = ((direction - 2) / 2) * @frameHeight
|
|
||||||
# @hat_sprite.src_rect.set(sprite_x, sprite_y, @frameWidth, @frameHeight)
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def dispose
|
|
||||||
# return if @disposed
|
|
||||||
# @hat_sprite.dispose if @hat_sprite
|
|
||||||
# @hat_sprite = nil
|
|
||||||
# @disposed = true
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def disposed?
|
|
||||||
# @disposed
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# end
|
|
||||||
|
|||||||
@@ -3,17 +3,20 @@ class Sprite_Player < Sprite_Character
|
|||||||
super
|
super
|
||||||
@viewport = viewport
|
@viewport = viewport
|
||||||
@outfit_bitmap = nil
|
@outfit_bitmap = nil
|
||||||
@hat_bitmap = nil
|
# @hat_bitmap = nil
|
||||||
|
# @hat2_bitmap = nil
|
||||||
|
|
||||||
hatFilename = ""
|
hatFilename = ""
|
||||||
hairFilename = ""
|
hairFilename = ""
|
||||||
|
@hat = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,3)
|
||||||
|
@hat2 = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,2)
|
||||||
@hair = Sprite_Hair.new(self, hairFilename, @character_name, @viewport)
|
@hair = Sprite_Hair.new(self, hairFilename, @character_name, @viewport)
|
||||||
@hat = Sprite_Hat.new(self, hatFilename, @character_name, @viewport)
|
|
||||||
|
|
||||||
@previous_skinTone = 0
|
@previous_skinTone = 0
|
||||||
|
|
||||||
@current_bitmap = nil
|
@current_bitmap = nil
|
||||||
@previous_action =nil
|
@previous_action =nil
|
||||||
|
echoln "init playa"
|
||||||
getClothedPlayerSprite(true)
|
getClothedPlayerSprite(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -30,12 +33,14 @@ class Sprite_Player < Sprite_Character
|
|||||||
def applyDayNightTone
|
def applyDayNightTone
|
||||||
super
|
super
|
||||||
pbDayNightTint(@hat.sprite) if @hat && @hat.sprite.bitmap
|
pbDayNightTint(@hat.sprite) if @hat && @hat.sprite.bitmap
|
||||||
|
pbDayNightTint(@hat2.sprite) if @hat2 && @hat2.sprite.bitmap
|
||||||
pbDayNightTint(@hair.sprite) if @hair && @hair.sprite.bitmap
|
pbDayNightTint(@hair.sprite) if @hair && @hair.sprite.bitmap
|
||||||
end
|
end
|
||||||
|
|
||||||
def opacity=(value)
|
def opacity=(value)
|
||||||
super
|
super
|
||||||
@hat.sprite.opacity= value if @hat && @hat.sprite.bitmap
|
@hat.sprite.opacity= value if @hat && @hat.sprite.bitmap
|
||||||
|
@hat2.sprite.opacity= value if @hat2 && @hat2.sprite.bitmap
|
||||||
@hair.sprite.opacity= value if @hair && @hair.sprite.bitmap
|
@hair.sprite.opacity= value if @hair && @hair.sprite.bitmap
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -46,6 +51,7 @@ class Sprite_Player < Sprite_Character
|
|||||||
@previous_action = @character_name
|
@previous_action = @character_name
|
||||||
@hair.animate(@character_name) if @hair
|
@hair.animate(@character_name) if @hair
|
||||||
@hat.animate(@character_name) if @hat
|
@hat.animate(@character_name) if @hat
|
||||||
|
@hat2.animate(@character_name) if @hat2
|
||||||
return @current_bitmap
|
return @current_bitmap
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -58,22 +64,28 @@ class Sprite_Player < Sprite_Character
|
|||||||
outfitFilename = getOverworldOutfitFilename(Settings::PLAYER_TEMP_OUTFIT_FALLBACK) if !pbResolveBitmap(outfitFilename)
|
outfitFilename = getOverworldOutfitFilename(Settings::PLAYER_TEMP_OUTFIT_FALLBACK) if !pbResolveBitmap(outfitFilename)
|
||||||
hairFilename = getOverworldHairFilename($Trainer.hair)
|
hairFilename = getOverworldHairFilename($Trainer.hair)
|
||||||
hatFilename = getOverworldHatFilename($Trainer.hat)
|
hatFilename = getOverworldHatFilename($Trainer.hat)
|
||||||
|
hat2Filename = getOverworldHatFilename($Trainer.hat2)
|
||||||
|
|
||||||
hair_color_shift = $Trainer.hair_color
|
hair_color_shift = $Trainer.hair_color
|
||||||
hat_color_shift = $Trainer.hat_color
|
hat_color_shift = $Trainer.hat_color
|
||||||
|
hat2_color_shift = $Trainer.hat2_color
|
||||||
|
|
||||||
clothes_color_shift = $Trainer.clothes_color
|
clothes_color_shift = $Trainer.clothes_color
|
||||||
|
|
||||||
hair_color_shift = 0 if !hair_color_shift
|
hair_color_shift = 0 if !hair_color_shift
|
||||||
hat_color_shift = 0 if !hat_color_shift
|
hat_color_shift = 0 if !hat_color_shift
|
||||||
|
hat2_color_shift = 0 if !hat2_color_shift
|
||||||
|
|
||||||
clothes_color_shift = 0 if !clothes_color_shift
|
clothes_color_shift = 0 if !clothes_color_shift
|
||||||
@hair.update(@character_name, hairFilename, hair_color_shift) if @hair
|
@hair.update(@character_name, hairFilename, hair_color_shift) if @hair
|
||||||
@hat.update(@character_name, hatFilename, hat_color_shift) if @hat
|
@hat.update(@character_name, hatFilename, hat_color_shift) if @hat
|
||||||
|
@hat2.update(@character_name, hat2Filename, hat2_color_shift) if @hat2
|
||||||
|
|
||||||
if !pbResolveBitmap(outfitFilename)
|
if !pbResolveBitmap(outfitFilename)
|
||||||
raise "No temp clothes graphics available"
|
raise "No temp clothes graphics available"
|
||||||
end
|
end
|
||||||
|
|
||||||
outfitBitmap = AnimatedBitmap.new(outfitFilename, clothes_color_shift) if pbResolveBitmap(outfitFilename) #pbLoadOutfitBitmap(outfitFilename) if pbResolveBitmap(outfitFilename)
|
outfitBitmap = AnimatedBitmap.new(outfitFilename, clothes_color_shift) if pbResolveBitmap(outfitFilename)
|
||||||
baseBitmap.blt(0, 0, outfitBitmap.bitmap, outfitBitmap.bitmap.rect) if outfitBitmap
|
baseBitmap.blt(0, 0, outfitBitmap.bitmap, outfitBitmap.bitmap.rect) if outfitBitmap
|
||||||
@previous_action = @character_name
|
@previous_action = @character_name
|
||||||
return baseBitmap
|
return baseBitmap
|
||||||
@@ -89,6 +101,7 @@ class Sprite_Player < Sprite_Character
|
|||||||
def dispose
|
def dispose
|
||||||
super
|
super
|
||||||
@hat.dispose if @hat
|
@hat.dispose if @hat
|
||||||
|
@hat2.dispose if @hat2
|
||||||
@hair.dispose if @hair
|
@hair.dispose if @hair
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ def pbPositionFaceWindow(facewindow,msgwindow)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbPositionNearMsgWindow(cmdwindow,msgwindow,side)
|
def pbPositionNearMsgWindow(cmdwindow,msgwindow,side, x_offset=nil,y_offset=nil)
|
||||||
return if !cmdwindow
|
return if !cmdwindow
|
||||||
if msgwindow
|
if msgwindow
|
||||||
height=[cmdwindow.height,Graphics.height-msgwindow.height].min
|
height=[cmdwindow.height,Graphics.height-msgwindow.height].min
|
||||||
@@ -234,6 +234,10 @@ def pbPositionNearMsgWindow(cmdwindow,msgwindow,side)
|
|||||||
cmdwindow.x=0
|
cmdwindow.x=0
|
||||||
cmdwindow.y=0
|
cmdwindow.y=0
|
||||||
end
|
end
|
||||||
|
cmdwindow.x+= x_offset if x_offset
|
||||||
|
cmdwindow.y+= y_offset if y_offset
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# internal function
|
# internal function
|
||||||
|
|||||||
@@ -909,7 +909,7 @@ def pbMessageChooseNumber(message, params, &block)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def pbShowCommands(msgwindow, commands = nil, cmdIfCancel = 0, defaultCmd = 0)
|
def pbShowCommands(msgwindow, commands = nil, cmdIfCancel = 0, defaultCmd = 0, x_offset=nil, y_offset=nil)
|
||||||
return 0 if !commands
|
return 0 if !commands
|
||||||
$PokemonTemp.speechbubble_arrow.visible =false if $PokemonTemp.speechbubble_arrow && !$PokemonTemp.speechbubble_arrow.disposed?
|
$PokemonTemp.speechbubble_arrow.visible =false if $PokemonTemp.speechbubble_arrow && !$PokemonTemp.speechbubble_arrow.disposed?
|
||||||
if defaultCmd == 0 && ($game_variables && $game_variables[VAR_COMMAND_WINDOW_INDEX] != 0)
|
if defaultCmd == 0 && ($game_variables && $game_variables[VAR_COMMAND_WINDOW_INDEX] != 0)
|
||||||
@@ -919,7 +919,7 @@ def pbShowCommands(msgwindow, commands = nil, cmdIfCancel = 0, defaultCmd = 0)
|
|||||||
cmdwindow.z = 99999
|
cmdwindow.z = 99999
|
||||||
cmdwindow.visible = true
|
cmdwindow.visible = true
|
||||||
cmdwindow.resizeToFit(cmdwindow.commands)
|
cmdwindow.resizeToFit(cmdwindow.commands)
|
||||||
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right)
|
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right, x_offset, y_offset)
|
||||||
cmdwindow.index = defaultCmd
|
cmdwindow.index = defaultCmd
|
||||||
command = 0
|
command = 0
|
||||||
loop do
|
loop do
|
||||||
|
|||||||
@@ -218,6 +218,9 @@ module GameData
|
|||||||
return @id_number > Settings::NB_POKEMON
|
return @id_number > Settings::NB_POKEMON
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def is_triple_fusion
|
||||||
|
return @id_number >= Settings::ZAPMOLCUNO_NB
|
||||||
|
end
|
||||||
def get_body_species
|
def get_body_species
|
||||||
return @species
|
return @species
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ module GameData
|
|||||||
# return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000")
|
# return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000")
|
||||||
# end
|
# end
|
||||||
def self.egg_sprite_filename(species, form)
|
def self.egg_sprite_filename(species, form)
|
||||||
|
return "Graphics/Battlers/Eggs/000" if $PokemonSystem.use_custom_eggs
|
||||||
dexNum = getDexNumberForSpecies(species)
|
dexNum = getDexNumberForSpecies(species)
|
||||||
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03d", dexNum) rescue nil
|
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03d", dexNum) rescue nil
|
||||||
if !pbResolveBitmap(bitmapFileName)
|
if !pbResolveBitmap(bitmapFileName)
|
||||||
@@ -208,15 +209,9 @@ module GameData
|
|||||||
def self.check_cry_file(species, form)
|
def self.check_cry_file(species, form)
|
||||||
species_data = self.get_species_form(species, form)
|
species_data = self.get_species_form(species, form)
|
||||||
return nil if species_data.nil?
|
return nil if species_data.nil?
|
||||||
return "Cries/BIRDBOSS_2" if $game_switches[SWITCH_TRIPLE_BOSS_BATTLE] && !$game_switches[SWITCH_SILVERBOSS_BATTLE]
|
|
||||||
if species_data.is_fusion
|
if species_data.is_fusion
|
||||||
species_data = GameData::Species.get(getHeadID(species_data))
|
species_data = GameData::Species.get(getHeadID(species_data))
|
||||||
end
|
end
|
||||||
|
|
||||||
# if form > 0
|
|
||||||
# ret = sprintf("Cries/%s_%d", species_data.species, form)
|
|
||||||
# return ret if pbResolveAudioSE(ret)
|
|
||||||
# end
|
|
||||||
ret = sprintf("Cries/%s", species_data.species)
|
ret = sprintf("Cries/%s", species_data.species)
|
||||||
return (pbResolveAudioSE(ret)) ? ret : nil
|
return (pbResolveAudioSE(ret)) ? ret : nil
|
||||||
end
|
end
|
||||||
@@ -230,6 +225,14 @@ module GameData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.play_cry_from_species(species, form = 0, volume = 90, pitch = 100)
|
def self.play_cry_from_species(species, form = 0, volume = 90, pitch = 100)
|
||||||
|
dex_num = getDexNumberForSpecies(species)
|
||||||
|
return if !dex_num
|
||||||
|
return play_triple_fusion_cry(species, volume, pitch) if dex_num > Settings::ZAPMOLCUNO_NB
|
||||||
|
if dex_num > NB_POKEMON
|
||||||
|
body_number = getBodyID(dex_num)
|
||||||
|
head_number = getHeadID(dex_num,body_number)
|
||||||
|
return play_fusion_cry(GameData::Species.get(head_number).species,GameData::Species.get(body_number).species, volume, pitch)
|
||||||
|
end
|
||||||
filename = self.cry_filename(species, form)
|
filename = self.cry_filename(species, form)
|
||||||
return if !filename
|
return if !filename
|
||||||
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
||||||
@@ -237,12 +240,35 @@ module GameData
|
|||||||
|
|
||||||
def self.play_cry_from_pokemon(pkmn, volume = 90, pitch = nil)
|
def self.play_cry_from_pokemon(pkmn, volume = 90, pitch = nil)
|
||||||
return if !pkmn || pkmn.egg?
|
return if !pkmn || pkmn.egg?
|
||||||
|
|
||||||
|
species_data = pkmn.species_data
|
||||||
|
return play_triple_fusion_cry(pkmn.species, volume, pitch) if species_data.is_triple_fusion
|
||||||
|
if pkmn.species_data.is_fusion
|
||||||
|
return play_fusion_cry(species_data.get_head_species,species_data.get_body_species, volume, pitch)
|
||||||
|
end
|
||||||
filename = self.cry_filename_from_pokemon(pkmn)
|
filename = self.cry_filename_from_pokemon(pkmn)
|
||||||
return if !filename
|
return if !filename
|
||||||
pitch ||= 75 + (pkmn.hp * 25 / pkmn.totalhp)
|
pitch ||= 75 + (pkmn.hp * 25 / pkmn.totalhp)
|
||||||
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.play_triple_fusion_cry(species_id, volume, pitch)
|
||||||
|
fusion_components = get_triple_fusion_components(species_id)
|
||||||
|
|
||||||
|
echoln fusion_components
|
||||||
|
echoln species_id
|
||||||
|
for id in fusion_components
|
||||||
|
cry_filename = self.check_cry_file(id,nil)
|
||||||
|
pbSEPlay(cry_filename,volume-10) rescue nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
def self.play_fusion_cry(head_id,body_id, volume = 90, pitch = 100)
|
||||||
|
head_cry_filename = self.check_cry_file(head_id,nil)
|
||||||
|
body_cry_filename = self.check_cry_file(body_id,nil)
|
||||||
|
|
||||||
|
pbSEPlay(body_cry_filename,volume-10) rescue nil
|
||||||
|
pbSEPlay(head_cry_filename,volume) rescue nil
|
||||||
|
end
|
||||||
def self.play_cry(pkmn, volume = 90, pitch = nil)
|
def self.play_cry(pkmn, volume = 90, pitch = nil)
|
||||||
if pkmn.is_a?(Pokemon)
|
if pkmn.is_a?(Pokemon)
|
||||||
self.play_cry_from_pokemon(pkmn, volume, pitch)
|
self.play_cry_from_pokemon(pkmn, volume, pitch)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class PokeBattle_Battler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbRecoverHPFromDrain(amt,target,msg=nil)
|
def pbRecoverHPFromDrain(amt,target,msg=nil)
|
||||||
if target.hasActiveAbility?(:LIQUIDOOZE)
|
if target.hasActiveAbility?(:LIQUIDOOZE, true)
|
||||||
@battle.pbShowAbilitySplash(target)
|
@battle.pbShowAbilitySplash(target)
|
||||||
pbReduceHP(amt)
|
pbReduceHP(amt)
|
||||||
@battle.pbDisplay(_INTL("{1} sucked up the liquid ooze!",pbThis))
|
@battle.pbDisplay(_INTL("{1} sucked up the liquid ooze!",pbThis))
|
||||||
|
|||||||
@@ -624,27 +624,8 @@ class PokeBattle_Battler
|
|||||||
#For meloetta form change
|
#For meloetta form change
|
||||||
|
|
||||||
def changeFormSpecies(oldForm, newForm,animation = "UltraBurst2")
|
def changeFormSpecies(oldForm, newForm,animation = "UltraBurst2")
|
||||||
|
|
||||||
@pokemon.changeFormSpecies(oldForm,newForm)
|
@pokemon.changeFormSpecies(oldForm,newForm)
|
||||||
playChangeFormAnimation(animation)
|
playChangeFormAnimation(animation)
|
||||||
|
|
||||||
# is_already_old_form = @pokemon.isFusionOf(oldForm) #A 466
|
|
||||||
# is_already_new_form = @pokemon.isFusionOf(newForm) #P
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# #reverse the fusion if it's a meloA and meloP fusion
|
|
||||||
# # There's probably a smarter way to do this but laziness lol
|
|
||||||
# if is_already_old_form && is_already_new_form
|
|
||||||
# if @pokemon.species_data.get_body_species() == oldForm
|
|
||||||
# changeSpeciesSpecific(@pokemon,getFusedPokemonIdFromSymbols(newForm,oldForm))
|
|
||||||
# else
|
|
||||||
# changeSpeciesSpecific(@pokemon,getFusedPokemonIdFromSymbols(oldForm,newForm))
|
|
||||||
# end
|
|
||||||
# playChangeFormAnimation(animation)
|
|
||||||
# else
|
|
||||||
# changeSpecies(@pokemon, oldForm, newForm, animation) if is_already_old_form
|
|
||||||
# changeSpecies(@pokemon, newForm, oldForm, animation) if is_already_new_form
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ class PokeBattle_Move_003 < PokeBattle_SleepMove
|
|||||||
#reverse the fusion if it's a meloA and meloP fusion
|
#reverse the fusion if it's a meloA and meloP fusion
|
||||||
# There's probably a smarter way to do this but laziness lol
|
# There's probably a smarter way to do this but laziness lol
|
||||||
if is_meloetta_A && is_meloetta_P
|
if is_meloetta_A && is_meloetta_P
|
||||||
if user.pokemon.species_data.get_body_species() == :MELOETTA_A
|
body_id = user.pokemon.species_data.get_body_species()
|
||||||
|
body_species = GameData::Species.get(body_id)
|
||||||
|
if body_species == :MELOETTA_A
|
||||||
changeSpeciesSpecific(user.pokemon,:B467H466)
|
changeSpeciesSpecific(user.pokemon,:B467H466)
|
||||||
else
|
else
|
||||||
changeSpeciesSpecific(user.pokemon,:B466H467)
|
changeSpeciesSpecific(user.pokemon,:B466H467)
|
||||||
@@ -394,12 +396,10 @@ class PokeBattle_Move_019 < PokeBattle_Move
|
|||||||
failed = false
|
failed = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if !failed
|
@battle.pbParty(user.index).each do |pkmn|
|
||||||
@battle.pbParty(user.index).each do |pkmn|
|
next if !pkmn || !pkmn.able? || pkmn.status == :NONE
|
||||||
next if !pkmn || !pkmn.able? || pkmn.status == :NONE
|
failed = false
|
||||||
failed = false
|
break
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if failed
|
if failed
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
|
|||||||
@@ -3226,10 +3226,8 @@ class PokeBattle_Move_0F1 < PokeBattle_Move
|
|||||||
# removed target.item == target.initialItem, this may cause bugs.
|
# removed target.item == target.initialItem, this may cause bugs.
|
||||||
if @battle.wildBattle? && target.opposes? && !user.initialItem
|
if @battle.wildBattle? && target.opposes? && !user.initialItem
|
||||||
user.setInitialItem(target.item)
|
user.setInitialItem(target.item)
|
||||||
target.pbRemoveItem
|
|
||||||
else
|
|
||||||
target.pbRemoveItem(false)
|
|
||||||
end
|
end
|
||||||
|
target.pbRemoveItem(false)
|
||||||
@battle.pbDisplay(_INTL("{1} stole {2}'s {3}!",user.pbThis,target.pbThis(true),itemName))
|
@battle.pbDisplay(_INTL("{1} stole {2}'s {3}!",user.pbThis,target.pbThis(true),itemName))
|
||||||
user.pbHeldItemTriggerCheck
|
user.pbHeldItemTriggerCheck
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -247,27 +247,10 @@ module PokeBattle_BattleCommon
|
|||||||
echoln isOnLastBall
|
echoln isOnLastBall
|
||||||
# Critical capture check
|
# Critical capture check
|
||||||
if isOnLastBall
|
if isOnLastBall
|
||||||
c = 0
|
c = x * 6 / 12
|
||||||
numOwned = $Trainer.pokedex.owned_count
|
|
||||||
if numOwned > 600;
|
|
||||||
c = x * 5 / 12
|
|
||||||
elsif numOwned > 450;
|
|
||||||
c = x * 4 / 12
|
|
||||||
elsif numOwned > 300;
|
|
||||||
c = x * 3 / 12
|
|
||||||
else
|
|
||||||
c = x * 2 / 12
|
|
||||||
end
|
|
||||||
# elsif numOwned > 150;
|
|
||||||
# c = x * 2 / 12
|
|
||||||
# elsif numOwned > 30;
|
|
||||||
# c = x / 12
|
|
||||||
# end
|
|
||||||
# Calculate the number of shakes
|
|
||||||
if c > 0 && pbRandom(256) < c
|
if c > 0 && pbRandom(256) < c
|
||||||
@criticalCapture = true
|
@criticalCapture = true
|
||||||
return 4 if pbRandom(65536) < y
|
return 4
|
||||||
return 0
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Calculate the number of shakes
|
# Calculate the number of shakes
|
||||||
|
|||||||
@@ -261,7 +261,9 @@ class PokeBattle_Battle
|
|||||||
return if pkmn.moves.any? { |m| m && m.id == newMove }
|
return if pkmn.moves.any? { |m| m && m.id == newMove }
|
||||||
# Pokémon has space for the new move; just learn it
|
# Pokémon has space for the new move; just learn it
|
||||||
if pkmn.moves.length < Pokemon::MAX_MOVES
|
if pkmn.moves.length < Pokemon::MAX_MOVES
|
||||||
pkmn.moves.push(Pokemon::Move.new(newMove))
|
move = Pokemon::Move.new(newMove)
|
||||||
|
pkmn.moves.push(move)
|
||||||
|
pkmn.add_learned_move(move)
|
||||||
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
||||||
if battler
|
if battler
|
||||||
battler.moves.push(PokeBattle_Move.from_pokemon_move(self, pkmn.moves.last))
|
battler.moves.push(PokeBattle_Move.from_pokemon_move(self, pkmn.moves.last))
|
||||||
@@ -279,7 +281,9 @@ class PokeBattle_Battle
|
|||||||
if forgetMove >= 0
|
if forgetMove >= 0
|
||||||
oldMoveName = pkmn.moves[forgetMove].name
|
oldMoveName = pkmn.moves[forgetMove].name
|
||||||
pkmn.moves[forgetMove] = Pokemon::Move.new(newMove) # Replaces current/total PP
|
pkmn.moves[forgetMove] = Pokemon::Move.new(newMove) # Replaces current/total PP
|
||||||
|
pkmn.add_learned_move(newMove)
|
||||||
battler.moves[forgetMove] = PokeBattle_Move.from_pokemon_move(self, pkmn.moves[forgetMove]) if battler
|
battler.moves[forgetMove] = PokeBattle_Move.from_pokemon_move(self, pkmn.moves[forgetMove]) if battler
|
||||||
|
|
||||||
pbDisplayPaused(_INTL("1, 2, and... ... ... Ta-da!"))
|
pbDisplayPaused(_INTL("1, 2, and... ... ... Ta-da!"))
|
||||||
pbDisplayPaused(_INTL("{1} forgot how to use {2}. And...", pkmnName, oldMoveName))
|
pbDisplayPaused(_INTL("{1} forgot how to use {2}. And...", pkmnName, oldMoveName))
|
||||||
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class PokeBattle_Scene
|
|||||||
# Opposing trainer(s) sprites
|
# Opposing trainer(s) sprites
|
||||||
if @battle.trainerBattle?
|
if @battle.trainerBattle?
|
||||||
@battle.opponent.each_with_index do |p, i|
|
@battle.opponent.each_with_index do |p, i|
|
||||||
pbCreateTrainerFrontSprite(i, p.trainer_type, @battle.opponent.length, p.sprite_override)
|
pbCreateTrainerFrontSprite(i, p.trainer_type, @battle.opponent.length, p.sprite_override, p.custom_appearance)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Data boxes and Pokémon sprites
|
# Data boxes and Pokémon sprites
|
||||||
@@ -207,7 +207,7 @@ class PokeBattle_Scene
|
|||||||
# trainer.oy = trainer.bitmap.height
|
# trainer.oy = trainer.bitmap.height
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbCreateTrainerFrontSprite(idxTrainer, trainerType, numTrainers = 1, sprite_override = nil)
|
def pbCreateTrainerFrontSprite(idxTrainer, trainerType, numTrainers = 1, sprite_override = nil, custom_appearance=nil)
|
||||||
trainerFile = GameData::TrainerType.front_sprite_filename(trainerType)
|
trainerFile = GameData::TrainerType.front_sprite_filename(trainerType)
|
||||||
trainerFile = sprite_override if sprite_override
|
trainerFile = sprite_override if sprite_override
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ class PokeBattle_Scene
|
|||||||
trainer = pbAddSprite("trainer_#{idxTrainer + 1}", spriteX, spriteY, trainerFile, @viewport)
|
trainer = pbAddSprite("trainer_#{idxTrainer + 1}", spriteX, spriteY, trainerFile, @viewport)
|
||||||
spriteOverrideBitmap = setTrainerSpriteOverrides(trainerType)
|
spriteOverrideBitmap = setTrainerSpriteOverrides(trainerType)
|
||||||
trainer.bitmap = spriteOverrideBitmap if spriteOverrideBitmap
|
trainer.bitmap = spriteOverrideBitmap if spriteOverrideBitmap
|
||||||
|
trainer.bitmap = generate_front_trainer_sprite_bitmap_from_appearance(custom_appearance).bitmap if custom_appearance
|
||||||
return if !trainer.bitmap
|
return if !trainer.bitmap
|
||||||
# Alter position of sprite
|
# Alter position of sprite
|
||||||
trainer.z = 7 + idxTrainer
|
trainer.z = 7 + idxTrainer
|
||||||
|
|||||||
@@ -100,8 +100,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_022 # Double Team
|
class PokeBattle_Move_022 # Double Team
|
||||||
alias __clauses__pbMoveFailed? pbMoveFailed?
|
alias __clauses__pbMoveFailed? pbMoveFailed? unless method_defined?(:__clauses__pbMoveFailed?)
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !damagingMove? && @battle.rules["evasionclause"]
|
if !damagingMove? && @battle.rules["evasionclause"]
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -114,8 +113,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_034 # Minimize
|
class PokeBattle_Move_034 # Minimize
|
||||||
alias __clauses__pbMoveFailed? pbMoveFailed?
|
alias __clauses__pbMoveFailed? pbMoveFailed? unless method_defined?(:__clauses__pbMoveFailed?)
|
||||||
|
|
||||||
def pbMoveFailed?(user,targets)
|
def pbMoveFailed?(user,targets)
|
||||||
if !damagingMove? && @battle.rules["evasionclause"]
|
if !damagingMove? && @battle.rules["evasionclause"]
|
||||||
@battle.pbDisplay(_INTL("But it failed!"))
|
@battle.pbDisplay(_INTL("But it failed!"))
|
||||||
@@ -142,7 +140,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_06A # Sonic Boom
|
class PokeBattle_Move_06A # Sonic Boom
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? unless method_defined?(:__clauses__pbFailsAgainstTarget?)
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user,target)
|
def pbFailsAgainstTarget?(user,target)
|
||||||
if @battle.rules["sonicboomclause"]
|
if @battle.rules["sonicboomclause"]
|
||||||
@@ -156,7 +154,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
class PokeBattle_Move_06B # Dragon Rage
|
class PokeBattle_Move_06B # Dragon Rage
|
||||||
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget?
|
alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? unless method_defined?(:__clauses__pbFailsAgainstTarget?)
|
||||||
|
|
||||||
def pbFailsAgainstTarget?(user,target)
|
def pbFailsAgainstTarget?(user,target)
|
||||||
if @battle.rules["sonicboomclause"]
|
if @battle.rules["sonicboomclause"]
|
||||||
|
|||||||
@@ -411,10 +411,23 @@ def pbFacingTileRegular(direction = nil, event = nil)
|
|||||||
return [$game_map.map_id, x + x_offset, y + y_offset]
|
return [$game_map.map_id, x + x_offset, y + y_offset]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns whether event is in line with the player, is facing the player and is
|
def pbEventNextToPlayer?(event,player)
|
||||||
|
return false if !event || !player
|
||||||
|
return false if $PokemonGlobal.sliding
|
||||||
|
if event.x == player.x
|
||||||
|
return event.y == player.y+1 || event.y == player.y-1
|
||||||
|
elsif event.y == player.y
|
||||||
|
return event.x == player.x-1 || event.x == player.x+1
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Returns whether event is in line with the player, is
|
||||||
# within distance tiles of the player.
|
# within distance tiles of the player.
|
||||||
def pbEventFacesPlayer?(event, player, distance)
|
def pbEventFacesPlayer?(event, player, distance)
|
||||||
return false if !event || !player || distance <= 0
|
return pbEventNextToPlayer?(event,player) if distance == 0
|
||||||
|
return false if !event || !player || distance < 0
|
||||||
x_min = x_max = y_min = y_max = -1
|
x_min = x_max = y_min = y_max = -1
|
||||||
case event.direction
|
case event.direction
|
||||||
when 2 # Down
|
when 2 # Down
|
||||||
@@ -473,6 +486,7 @@ def pbFacingEachOther(event1, event2)
|
|||||||
return pbEventFacesPlayer?(event1, event2, 1) && pbEventFacesPlayer?(event2, event1, 1)
|
return pbEventFacesPlayer?(event1, event2, 1) && pbEventFacesPlayer?(event2, event1, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Audio playing
|
# Audio playing
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ end
|
|||||||
#party: array of pokemon team
|
#party: array of pokemon team
|
||||||
# [[:SPECIES,level], ... ]
|
# [[:SPECIES,level], ... ]
|
||||||
#
|
#
|
||||||
def customTrainerBattle(trainerName, trainerType, party_array, default_level=50, endSpeech="", sprite_override=nil)
|
def customTrainerBattle(trainerName, trainerType, party_array, default_level=50, endSpeech="", sprite_override=nil,custom_appearance=nil)
|
||||||
|
|
||||||
|
|
||||||
# trainerID= "customTrainer"
|
# trainerID= "customTrainer"
|
||||||
@@ -582,7 +582,7 @@ def customTrainerBattle(trainerName, trainerType, party_array, default_level=50,
|
|||||||
# trainer_info_hash[:pokemon] = party
|
# trainer_info_hash[:pokemon] = party
|
||||||
|
|
||||||
#trainer = GameData::Trainer.new(trainer_info_hash)
|
#trainer = GameData::Trainer.new(trainer_info_hash)
|
||||||
trainer = NPCTrainer.new(trainerName,trainerType,sprite_override)
|
trainer = NPCTrainer.new(trainerName,trainerType,sprite_override,custom_appearance)
|
||||||
trainer.lose_text=endSpeech
|
trainer.lose_text=endSpeech
|
||||||
party = []
|
party = []
|
||||||
party_array.each { |pokemon|
|
party_array.each { |pokemon|
|
||||||
|
|||||||
@@ -677,7 +677,9 @@ def changeMeloettaForm(pokemon)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
if is_meloetta_A && is_meloetta_P
|
if is_meloetta_A && is_meloetta_P
|
||||||
if pokemon.species_data.get_body_species() == :MELOETTA_A
|
body_id = pokemon.species_data.get_body_species()
|
||||||
|
body_species = GameData::Species.get(body_id)
|
||||||
|
if body_species == :MELOETTA_A
|
||||||
changeSpeciesSpecific(pokemon, :B467H466)
|
changeSpeciesSpecific(pokemon, :B467H466)
|
||||||
else
|
else
|
||||||
changeSpeciesSpecific(pokemon, :B466H467)
|
changeSpeciesSpecific(pokemon, :B466H467)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user