More or less standardised separator comments in the code

This commit is contained in:
Maruno17
2024-06-27 21:21:26 +01:00
parent 225549bfce
commit 509a414f37
198 changed files with 1907 additions and 1263 deletions

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class GrowthRate
attr_reader :id
@@ -24,6 +27,8 @@ module GameData
return Settings::MAXIMUM_LEVEL
end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -72,6 +77,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::GrowthRate.register({

View File

@@ -1,7 +1,9 @@
#===============================================================================
# If a Pokémon's gender ratio is none of :AlwaysMale, :AlwaysFemale or
# :Genderless, then it will choose a random number between 0 and 255 inclusive,
# and compare it to the @female_chance. If the random number is lower than this
# chance, it will be female; otherwise, it will be male.
#===============================================================================
module GameData
class GenderRatio
attr_reader :id
@@ -16,6 +18,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -35,6 +39,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::GenderRatio.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class EggGroup
attr_reader :id
@@ -11,6 +14,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -23,6 +28,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::EggGroup.register({

View File

@@ -1,7 +1,9 @@
#===============================================================================
# NOTE: The order these shapes are registered are the order they are listed in
# the Pokédex search screen.
# "Graphics/UI/Pokedex/icon_shapes.png" contains icons for these
# shapes.
#===============================================================================
module GameData
class BodyShape
attr_reader :id
@@ -16,6 +18,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -29,6 +33,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::BodyShape.register({

View File

@@ -1,5 +1,7 @@
#===============================================================================
# NOTE: The order these colors are registered are the order they are listed in
# the Pokédex search screen.
#===============================================================================
module GameData
class BodyColor
attr_reader :id
@@ -13,6 +15,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -25,6 +29,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::BodyColor.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class Habitat
attr_reader :id
@@ -11,6 +14,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -23,6 +28,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::Habitat.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class Evolution
attr_reader :id
@@ -20,6 +23,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:id].to_s || "Unnamed"
@@ -71,12 +76,18 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::Evolution.register({
:id => :None
})
#===============================================================================
#
#===============================================================================
GameData::Evolution.register({
:id => :Level,
:parameter => Integer,
@@ -545,6 +556,7 @@ GameData::Evolution.register({
#===============================================================================
# Evolution methods that trigger when levelling up in battle.
#===============================================================================
GameData::Evolution.register({
:id => :LevelBattle,
:parameter => Integer,
@@ -556,6 +568,7 @@ GameData::Evolution.register({
#===============================================================================
# Evolution methods that trigger when using an item on the Pokémon.
#===============================================================================
GameData::Evolution.register({
:id => :Item,
:parameter => :Item,
@@ -607,6 +620,7 @@ GameData::Evolution.register({
#===============================================================================
# Evolution methods that trigger when the Pokémon is obtained in a trade.
#===============================================================================
GameData::Evolution.register({
:id => :Trade,
:on_trade_proc => proc { |pkmn, parameter, other_pkmn|
@@ -666,6 +680,7 @@ GameData::Evolution.register({
#===============================================================================
# Evolution methods that are triggered after any battle.
#===============================================================================
GameData::Evolution.register({
:id => :AfterBattleCounter,
:parameter => Integer,

View File

@@ -1,8 +1,10 @@
#===============================================================================
# The pbs_order value determines the order in which the stats are written in
# several PBS files, where base stats/IVs/EVs/EV yields are defined. Only stats
# which are yielded by the "each_main" method can have stat numbers defined in
# those places. The values of pbs_order defined below should start with 0 and
# increase without skipping any numbers.
#===============================================================================
module GameData
class Stat
attr_reader :id
@@ -34,6 +36,8 @@ module GameData
self.each { |s| yield s if [:main_battle, :battle].include?(s.type) }
end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -54,6 +58,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::Stat.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class Nature
attr_reader :id
@@ -12,6 +15,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -25,6 +30,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::Nature.register({

View File

@@ -1,9 +1,11 @@
#===============================================================================
# NOTE: "Graphics/UI/statuses.png" also contains icons for being fainted and for
# having Pokérus, in that order, at the bottom of the graphic.
# "Graphics/UI/Battle/icon_statuses.png" also contains an icon for bad
# poisoning (toxic), at the bottom of the graphic.
# Both graphics automatically handle varying numbers of defined statuses,
# as long as their extra icons remain at the bottom of them.
#===============================================================================
module GameData
class Status
attr_reader :id
@@ -21,6 +23,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -35,6 +39,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::Status.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class TerrainTag
attr_reader :id
@@ -40,6 +43,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@id_number = hash[:id_number]
@@ -72,6 +77,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::TerrainTag.register({

View File

@@ -1,3 +1,4 @@
#===============================================================================
# Category has the following effects:
# - Determines the in-battle weather.
# - Some abilities reduce the encounter rate in certain categories of weather.
@@ -8,6 +9,7 @@
# Delta values are per second.
# For the tone_proc, strength goes from 0 to RPG::Weather::MAX_SPRITES (60) and
# will typically be the maximum.
#===============================================================================
module GameData
class Weather
attr_reader :id
@@ -30,6 +32,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@id_number = hash[:id_number]
@@ -60,6 +64,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::Weather.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class EncounterType
attr_reader :id
@@ -13,6 +16,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:id].to_s || "Unnamed"
@@ -24,6 +29,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::EncounterType.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class Environment
attr_reader :id
@@ -12,6 +15,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -25,6 +30,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::Environment.register({

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module GameData
class BattleWeather
attr_reader :id
@@ -12,6 +15,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -25,6 +30,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::BattleWeather.register({

View File

@@ -1,4 +1,6 @@
#===============================================================================
# These are in-battle terrain effects caused by moves like Electric Terrain.
#===============================================================================
module GameData
class BattleTerrain
attr_reader :id
@@ -13,6 +15,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -26,6 +30,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
GameData::BattleTerrain.register({

View File

@@ -1,3 +1,4 @@
#===============================================================================
# NOTE: If adding a new target, you will need to add code in several places to
# make them work properly:
# - def pbFindTargets
@@ -5,6 +6,7 @@
# - def pbCreateTargetTexts
# - def pbFirstTarget
# - def pbTargetsMultiple?
#===============================================================================
module GameData
class Target
attr_reader :id
@@ -23,6 +25,8 @@ module GameData
def self.load; end
def self.save; end
#---------------------------------------------------------------------------
def initialize(hash)
@id = hash[:id]
@real_name = hash[:name] || "Unnamed"
@@ -48,6 +52,8 @@ module GameData
end
end
#===============================================================================
#
#===============================================================================
# Bide, Counter, Metal Burst, Mirror Coat (calculate a target)