release 6.2

This commit is contained in:
infinitefusion
2024-06-28 12:01:39 -04:00
parent 0b9e83f554
commit 3a488c9ba6
7249 changed files with 713866 additions and 136365 deletions

View File

@@ -9,6 +9,9 @@ class Trainer
attr_accessor :party
attr_accessor :quests
attr_accessor :sprite_override
attr_accessor :lowest_difficulty
attr_accessor :selected_difficulty
attr_accessor :game_mode
def inspect
str = super.chop
@@ -216,6 +219,9 @@ class Trainer
@language = pbGetLanguage
@party = []
@sprite_override = sprite_override
@lowest_difficulty=2 #On hard by default, lowered whenever the player selects another difficulty
@selected_difficulty=2 #On hard by default, lowered whenever the player selects another difficulty
@game_mode =0 #classic
end
end

View File

@@ -2,22 +2,40 @@
# Walking charset, for use in text entry screens and load game screen
#===============================================================================
class TrainerWalkingCharSprite < SpriteWrapper
def initialize(charset,viewport=nil)
def initialize(charset,viewport=nil,trainer=nil)
super(viewport)
@animbitmap = nil
@trainer=trainer
self.charset = charset
@animframe = 0 # Current pattern
@frame = 0 # Frame counter
self.animspeed = 5 # Animation speed (frames per pattern)
end
def charset=(value)
@animbitmap.dispose if @animbitmap
@animbitmap = nil
outfit_bitmap = _INTL("Graphics/Characters/players/outfits/{1}_{2}",value,$Trainer.outfit) if $Trainer && $Trainer.outfit
@trainer = $Trainer if !@trainer
if $Trainer
meta=GameData::Metadata.get_player($Trainer.character_ID)
isPlayerCharacter = value == pbGetPlayerCharset(meta,1,nil,true)
end
isPlayerCharacter = true if $scene.is_a?(Scene_Intro) #
bitmapFileName = sprintf("Graphics/Characters/%s",value)
@charset = pbResolveBitmap(bitmapFileName)
if @charset
@animbitmap = AnimatedBitmap.new(@charset)
if isPlayerCharacter #Display clothed player on continue screen
@animbitmap.bitmap = generateClothedBitmapStatic(@trainer)
@animbitmap.bitmap.blt(0, 0, outfit_bitmap, outfit_bitmap.rect) if pbResolveBitmap(outfit_bitmap)
else
@animbitmap.bitmap.blt(0, 0, outfit_bitmap, outfit_bitmap.rect) if pbResolveBitmap(outfit_bitmap)
end
self.bitmap = @animbitmap.bitmap
self.src_rect.set(0,0,self.bitmap.width/4,self.bitmap.height/4)
else
@@ -54,6 +72,7 @@ class TrainerWalkingCharSprite < SpriteWrapper
@animbitmap.update
self.bitmap = @animbitmap.bitmap
end
@frame += 1
if @frame>=@frameskip
@animframe = (@animframe+1)%4

View File

@@ -5,7 +5,22 @@ class Player < Trainer
# @return [Integer] the character ID of the player
attr_accessor :character_ID
# @return [Integer] the player's outfit
attr_accessor :outfit
attr_accessor :outfit #old - unused
attr_accessor :skin_tone
attr_accessor :clothes
attr_accessor :hat
attr_accessor :hair
attr_accessor :hair_color
attr_accessor :hat_color
attr_accessor :clothes_color
attr_accessor :unlocked_clothes
attr_accessor :unlocked_hats
attr_accessor :unlocked_hairstyles
attr_accessor :surfing_pokemon
# @return [Array<Boolean>] the player's Gym Badges (true if owned)
attr_accessor :badges
# @return [Integer] the player's money
@@ -54,6 +69,102 @@ class Player < Trainer
@coins = value.clamp(0, Settings::MAX_COINS)
end
def outfit=(value)
@outfit=value
$game_player.outfit_changed=true
end
def hat=(value)
if value.is_a?(Symbol)
value = HATS[value].id
end
@hat=value
refreshPlayerOutfit()
$game_player.outfit_changed=true
end
def hair=(value)
if value.is_a?(Symbol)
value = HAIRSTYLES[value].id
end
@hair=value
refreshPlayerOutfit()
$game_player.outfit_changed=true
end
def clothes=(value)
if value.is_a?(Symbol)
value = OUTFITS[value].id
end
@clothes=value
refreshPlayerOutfit()
$game_player.outfit_changed=true
end
def unlock_clothes(outfitID,silent=false)
update_global_clothes_list()
outfit = $PokemonGlobal.clothes_data[outfitID]
@unlocked_clothes = [] if !@unlocked_clothes
@unlocked_clothes << outfitID if !@unlocked_clothes.include?(outfitID)
if !silent
filename = getTrainerSpriteOutfitFilename(outfitID)
name= outfit ? outfit.name : outfitID
unlock_outfit_animation(filename,name)
end
end
def unlock_hat(hatID,silent=false)
update_global_hats_list()
hat = $PokemonGlobal.hats_data[hatID]
@unlocked_hats = [] if !@unlocked_hats
@unlocked_hats << hatID if !@unlocked_hats.include?(hatID)
if !silent
filename = getTrainerSpriteHatFilename(hatID)
name= hat ? hat.name : hatID
unlock_outfit_animation(filename,name)
end
end
def unlock_hair(hairID,silent=false)
update_global_hairstyles_list()
hairstyle = $PokemonGlobal.hairstyles_data[hairID]
if hairID.is_a?(Symbol)
hairID = HAIRSTYLES[hairID].id
end
@unlocked_hairstyles = [] if !@unlocked_hairstyles
@unlocked_hairstyles << hairID if !@unlocked_hairstyles.include?(hairID)
if !silent
filename = getTrainerSpriteHairFilename("2_" + hairID)
name= hairstyle ? hairstyle.name : hairID
unlock_outfit_animation(filename,name)
end
end
def unlock_outfit_animation(filepath,name,color=2)
outfit_preview = PictureWindow.new(filepath)
outfit_preview.x = Graphics.width/4
musicEffect= "Key item get"
pbMessage(_INTL("{1} obtained \\C[{2}]{3}\\C[0]!\\me[{4}]",$Trainer.name,color,name,musicEffect))
outfit_preview.dispose
end
def surfing_pokemon=(species)
@surfing_pokemon = species
end
def skin_tone=(value)
@skin_tone=value
$scene.reset_player_sprite
#$scene.spritesetGlobal.playersprite.updateCharacterBitmap
end
def beat_league=(value)
@beat_league = value
@@ -105,6 +216,11 @@ class Player < Trainer
super
@character_ID = -1
@outfit = 0
@hat = 0
@hair = 0
@clothes = 0
@hair_color = 0
@skin_tone = 0
@badges = [false] * 8
@money = Settings::INITIAL_MONEY
@coins = 0
@@ -120,5 +236,6 @@ class Player < Trainer
@beat_league = false
@new_game_plus_unlocked = false
@new_game_plus = false
@surfing_pokemon = nil
end
end