mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Added def GameData::Species.base_stat_total, other minor code tweaks
This commit is contained in:
@@ -270,7 +270,7 @@ def pbPlayBuzzerSE
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Plays a sound effect that plays when the player moves the cursor.
|
# Plays a sound effect that plays when the player closes a menu.
|
||||||
def pbPlayCloseMenuSE
|
def pbPlayCloseMenuSE
|
||||||
if FileTest.audio_exist?("Audio/SE/GUI menu close")
|
if FileTest.audio_exist?("Audio/SE/GUI menu close")
|
||||||
pbSEPlay("GUI menu close", 80)
|
pbSEPlay("GUI menu close", 80)
|
||||||
|
|||||||
@@ -208,10 +208,6 @@ module GameData
|
|||||||
return pbGetMessageFromHash(MessageTypes::Entries, @real_pokedex_entry)
|
return pbGetMessageFromHash(MessageTypes::Entries, @real_pokedex_entry)
|
||||||
end
|
end
|
||||||
|
|
||||||
def single_gendered?
|
|
||||||
return GameData::GenderRatio.get(@gender_ratio).single_gendered?
|
|
||||||
end
|
|
||||||
|
|
||||||
def default_form
|
def default_form
|
||||||
@flags.each do |flag|
|
@flags.each do |flag|
|
||||||
return $~[1].to_i if flag[/^DefaultForm_(\d+)$/i]
|
return $~[1].to_i if flag[/^DefaultForm_(\d+)$/i]
|
||||||
@@ -224,6 +220,14 @@ module GameData
|
|||||||
return (default >= 0) ? default : @form
|
return (default >= 0) ? default : @form
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def single_gendered?
|
||||||
|
return GameData::GenderRatio.get(@gender_ratio).single_gendered?
|
||||||
|
end
|
||||||
|
|
||||||
|
def base_stat_total
|
||||||
|
return @base_stats.values.sum
|
||||||
|
end
|
||||||
|
|
||||||
def has_flag?(flag)
|
def has_flag?(flag)
|
||||||
return @flags.any? { |f| f.downcase == flag.downcase }
|
return @flags.any? { |f| f.downcase == flag.downcase }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ def pbStartOver(gameover = false)
|
|||||||
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]You scurry back to a Pokémon Center, protecting your exhausted Pokémon from any further harm..."))
|
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]You scurry back to a Pokémon Center, protecting your exhausted Pokémon from any further harm..."))
|
||||||
end
|
end
|
||||||
pbCancelVehicles
|
pbCancelVehicles
|
||||||
pbRemoveDependencies
|
Followers.clear
|
||||||
$game_switches[Settings::STARTING_OVER_SWITCH] = true
|
$game_switches[Settings::STARTING_OVER_SWITCH] = true
|
||||||
$game_temp.player_new_map_id = $PokemonGlobal.pokecenterMapId
|
$game_temp.player_new_map_id = $PokemonGlobal.pokecenterMapId
|
||||||
$game_temp.player_new_x = $PokemonGlobal.pokecenterX
|
$game_temp.player_new_x = $PokemonGlobal.pokecenterX
|
||||||
@@ -120,7 +120,7 @@ def pbStartOver(gameover = false)
|
|||||||
end
|
end
|
||||||
if homedata
|
if homedata
|
||||||
pbCancelVehicles
|
pbCancelVehicles
|
||||||
pbRemoveDependencies
|
Followers.clear
|
||||||
$game_switches[Settings::STARTING_OVER_SWITCH] = true
|
$game_switches[Settings::STARTING_OVER_SWITCH] = true
|
||||||
$game_temp.player_new_map_id = homedata[0]
|
$game_temp.player_new_map_id = homedata[0]
|
||||||
$game_temp.player_new_x = homedata[1]
|
$game_temp.player_new_x = homedata[1]
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ module RandomDungeonGenerator
|
|||||||
TEXT_SYMBOLS = {
|
TEXT_SYMBOLS = {
|
||||||
VOID => "#",
|
VOID => "#",
|
||||||
ROOM => " ",
|
ROOM => " ",
|
||||||
WALL => "-",
|
WALL => "=",
|
||||||
CORRIDOR => "."
|
CORRIDOR => "."
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ module RandomDungeonGenerator
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_text(value)
|
def to_text(value)
|
||||||
return TEXT_SYMBOLS[value] || TEXT_SYMBOLS[VOID]
|
return TEXT_SYMBOLS[value] || "\e[30m\e[41m?\e[0m"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user