Outfits migration again

This commit is contained in:
chardub
2025-04-27 00:37:26 -04:00
parent c0cf7da7bb
commit 4a19fbc754
6 changed files with 23 additions and 1 deletions

View File

@@ -1,59 +0,0 @@
#TODO
# attr_accessor :quicksurf
# attr_accessor :level_caps
# attr_accessor :battle_type
# attr_accessor :download_sprites
# attr_accessor :speedup
# attr_accessor :speedup_speed
# attr_accessor :max_nb_sprites_download
# attr_accessor :on_mobile
# attr_accessor :type_icons
# attr_accessor :use_generated_dex_entries
# attr_accessor :use_custom_eggs
#
#
#
# #===============================================================================#
# # Options menu handlers
# #===============================================================================#
# MenuHandlers.add(:options_menu, :only_speedup_battles, {
# "name" => _INTL("Speed Up Settings"),
# "order" => 25,
# "type" => EnumOption,
# "parameters" => [_INTL("Always"), _INTL("Only Battles")],
# "description" => _INTL("Choose which aspect is sped up."),
# "get_proc" => proc { next $PokemonSystem.only_speedup_battles },
# "set_proc" => proc { |value, scene|
# $GameSpeed = 0 if value != $PokemonSystem.only_speedup_battles
# $PokemonSystem.only_speedup_battles = value
# $CanToggle = value == 0
# }
# })
#
# MenuHandlers.add(:options_menu, :speedup_type, {
# "name" => _INTL("Speed-up type"),
# "order" => 25,
# "type" => EnumOption,
# "parameters" => [_INTL("Hold"), _INTL("Toggle")],
# "description" => _INTL("Pick how you want speed-up to be enabled."),
# "get_proc" => proc { next $PokemonSystem.speedup_type },
# "set_proc" => proc { |value, scene|
# $PokemonSystem.speedup_type = value
# }
# })
#
# MenuHandlers.add(:options_menu, :speedup_speed, {
# "name" => _INTL("Speed-up speed"),
# "order" => 27,
# "type" => SliderOption,
# "parameters" => [0, 10, 0.5], # [minimum_value, maximum_value, interval]
# "description" => _INTL("Sets by how much to speed up the game."),
# "get_proc" => proc { next $PokemonSystem.speedup_speed },
# "set_proc" => proc { |value, scene|
# next if $PokemonSystem.speedup_speed == value
# $PokemonSystem.speedup_speed = value
# }
# })# frozen_string_literal: true
#

View File

@@ -1,31 +0,0 @@
# frozen_string_literal: true
class PokemonSystem
attr_accessor :quicksurf
attr_accessor :level_caps
attr_accessor :battle_type
attr_accessor :download_sprites
attr_accessor :speedup
attr_accessor :speedup_speed
attr_accessor :max_nb_sprites_download
attr_accessor :on_mobile
attr_accessor :type_icons
attr_accessor :use_generated_dex_entries
attr_accessor :use_custom_eggs
unless method_defined?(:initialize_with_new_options)
alias_method :initialize_with_new_options, :initialize
def initialize
initialize_with_new_options
@quicksurf = 0
@battle_type = 0
@download_sprites = 0
@max_nb_sprites_download = 5
@on_mobile = false
@type_icons = true
@use_generated_dex_entries = true
@use_custom_eggs = true
end
end
end

View File

@@ -0,0 +1,88 @@
# Clefnair (Clefable) @ Life Orb
# Ability: Magic Guard
# Level: 33
# Fusion: Dragonair
# EVs: 252 HP / 252 SpD / 4 Spe
# Modest Nature
# - Dazzling Gleam
# - Dragon Breath
# - Wish
# - Water Pulse
def exportFusedPokemonForShowdown(pokemon)
if pokemon.species_data.is_a?(GameData::FusedSpecies)
head_pokemon_species = pokemon.species_data.head_pokemon
species_name = head_pokemon_species.name
else
species_name = pokemon.species_data.real_name
end
if pokemon.item
nameLine = _INTL("{1} ({2}) @ {3}", pokemon.name, species_name, pokemon.item.name)
else
nameLine = _INTL("{1} ({2})", pokemon.name, species_name)
end
abilityLine = _INTL("Ability: {1}", pokemon.ability.name)
levelLine = _INTL("Level: {1}", pokemon.level)
fusionLine = ""
if pokemon.species_data.is_a?(GameData::FusedSpecies)
body_pokemon_species = pokemon.species_data.body_pokemon
fusionLine = _INTL("Fusion: {1}\n", body_pokemon_species.name)
end
evsLine = calculateEvLineForShowdown(pokemon)
natureLine = "#{GameData::Nature.get(pokemon.nature).real_name} Nature"
ivsLine = calculateIvLineForShowdown(pokemon)
move1 = "", move2 = "", move3 = "", move4 = ""
move1 = _INTL("- {1}", GameData::Move.get(pokemon.moves[0].id).real_name) if pokemon.moves[0]
move2 = _INTL("- {1}", GameData::Move.get(pokemon.moves[1].id).real_name) if pokemon.moves[1]
move3 = _INTL("- {1}", GameData::Move.get(pokemon.moves[2].id).real_name) if pokemon.moves[2]
move4 = _INTL("- {1}", GameData::Move.get(pokemon.moves[3].id).real_name) if pokemon.moves[3]
ret = nameLine + "\n" +
abilityLine + "\n" +
levelLine + "\n" +
fusionLine +
evsLine + "\n" +
natureLine + "\n" +
ivsLine + "\n" +
move1 + "\n" +
move2 + "\n" +
move3 + "\n" +
move4 + "\n"
return ret
end
def calculateEvLineForShowdown(pokemon)
evsLine = "EVs: "
evsLine << _INTL("{1} HP /", pokemon.ev[:HP])
evsLine << _INTL("{1} Atk / ", pokemon.ev[:ATTACK])
evsLine << _INTL("{1} Def / ", pokemon.ev[:DEFENSE])
evsLine << _INTL("{1} SpA / ", pokemon.ev[:SPECIAL_ATTACK])
evsLine << _INTL("{1} SpD / ", pokemon.ev[:SPECIAL_DEFENSE])
evsLine << _INTL("{1} Spe / ", pokemon.ev[:SPEED])
return evsLine
end
def calculateIvLineForShowdown(pokemon)
ivLine = "IVs: "
ivLine << _INTL("{1} HP / ", pokemon.iv[:HP])
ivLine << _INTL("{1} Atk / ", pokemon.iv[:ATTACK])
ivLine << _INTL("{1} Def / ", pokemon.iv[:DEFENSE])
ivLine << _INTL("{1} SpA / ", pokemon.iv[:SPECIAL_ATTACK])
ivLine << _INTL("{1} SpD / ", pokemon.iv[:SPECIAL_DEFENSE])
ivLine << _INTL("{1} Spe", pokemon.iv[:SPEED])
return ivLine
end
def exportTeamForShowdown()
message = ""
for pokemon in $player.party
message << exportFusedPokemonForShowdown(pokemon)
message << "\n"
end
Input.clipboard = message
end