Tidying up for v21's release

This commit is contained in:
Maruno17
2023-06-25 22:31:05 +01:00
parent 22fa0f9c0b
commit aecd9e5bb6
15 changed files with 35 additions and 712 deletions

View File

@@ -188,7 +188,7 @@ class NPCTrainer < Trainer
attr_accessor :win_text
def initialize(name, trainer_type, version = 0)
super
super(name, trainer_type)
@version = version
@items = []
@lose_text = nil

View File

@@ -35,6 +35,28 @@ class Player < Trainer
# @return [Array<Array>] downloaded Mystery Gift data
attr_accessor :mystery_gifts
def initialize(name, trainer_type)
super
@character_ID = 0
@outfit = 0
@badges = [false] * 8
@money = GameData::Metadata.get.start_money
@coins = 0
@battle_points = 0
@soot = 0
@pokedex = Pokedex.new
@has_pokedex = false
@has_pokegear = false
@has_running_shoes = false
@has_box_link = false
@seen_storage_creator = false
@has_exp_all = false
@mystery_gift_unlocked = false
@mystery_gifts = []
end
#=============================================================================
def character_ID=(value)
return if @character_ID == value
@character_ID = value
@@ -98,26 +120,4 @@ class Player < Trainer
def owned?(species)
return @pokedex.owned?(species)
end
#=============================================================================
def initialize(name, trainer_type)
super
@character_ID = 0
@outfit = 0
@badges = [false] * 8
@money = GameData::Metadata.get.start_money
@coins = 0
@battle_points = 0
@soot = 0
@pokedex = Pokedex.new
@has_pokedex = false
@has_pokegear = false
@has_running_shoes = false
@has_box_link = false
@seen_storage_creator = false
@has_exp_all = false
@mystery_gift_unlocked = false
@mystery_gifts = []
end
end