mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Converted Shadow Pokémon PBS file to a section-based format, improved Shadow Pokémon mechanics
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
class Game_Temp
|
||||
attr_accessor :town_map_data
|
||||
attr_accessor :phone_messages_data
|
||||
attr_accessor :shadow_movesets_data
|
||||
attr_accessor :regional_dexes_data
|
||||
attr_accessor :battle_animations_data
|
||||
attr_accessor :move_to_battle_animation_data
|
||||
@@ -15,7 +14,6 @@ def pbClearData
|
||||
if $game_temp
|
||||
$game_temp.town_map_data = nil
|
||||
$game_temp.phone_messages_data = nil
|
||||
$game_temp.shadow_movesets_data = nil
|
||||
$game_temp.regional_dexes_data = nil
|
||||
$game_temp.battle_animations_data = nil
|
||||
$game_temp.move_to_battle_animation_data = nil
|
||||
@@ -52,17 +50,6 @@ def pbLoadPhoneData
|
||||
return $game_temp.phone_messages_data
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Method to get Shadow Pokémon moveset data.
|
||||
#===============================================================================
|
||||
def pbLoadShadowMovesets
|
||||
$game_temp = Game_Temp.new if !$game_temp
|
||||
if !$game_temp.shadow_movesets_data
|
||||
$game_temp.shadow_movesets_data = load_data("Data/shadow_movesets.dat") || []
|
||||
end
|
||||
return $game_temp.shadow_movesets_data
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Method to get Regional Dexes data.
|
||||
#===============================================================================
|
||||
|
||||
32
Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb
Normal file
32
Data/Scripts/010_Data/002_PBS data/011_ShadowPokemon.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
module GameData
|
||||
class ShadowPokemon
|
||||
attr_reader :id
|
||||
attr_reader :moves
|
||||
attr_reader :gauge_size
|
||||
attr_reader :flags
|
||||
|
||||
DATA = {}
|
||||
DATA_FILENAME = "shadow_pokemon.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"GaugeSize" => [:gauge_size, "v"],
|
||||
"Moves" => [:moves, "*s"], # Not enumerated when compiled
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
HEART_GAUGE_SIZE = 4000 # Default gauge size
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
include InstanceMethods
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@moves = hash[:moves] || []
|
||||
@gauge_size = hash[:gauge_size] || HEART_GAUGE_SIZE
|
||||
@flags = hash[:flags] || []
|
||||
end
|
||||
|
||||
def has_flag?(flag)
|
||||
return @flags.any? { |f| f.downcase == flag.downcase }
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user