mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Super shininess can now be set for a Pokémon, and trainers.txt can define a Pokémon as super shiny
This commit is contained in:
@@ -28,6 +28,7 @@ module GameData
|
|||||||
"EV" => [:ev, "uUUUUU"],
|
"EV" => [:ev, "uUUUUU"],
|
||||||
"Happiness" => [:happiness, "u"],
|
"Happiness" => [:happiness, "u"],
|
||||||
"Shiny" => [:shininess, "b"],
|
"Shiny" => [:shininess, "b"],
|
||||||
|
"SuperShiny" => [:super_shininess, "b"],
|
||||||
"Shadow" => [:shadowness, "b"],
|
"Shadow" => [:shadowness, "b"],
|
||||||
"Ball" => [:poke_ball, "e", :Item],
|
"Ball" => [:poke_ball, "e", :Item],
|
||||||
}
|
}
|
||||||
@@ -130,7 +131,7 @@ module GameData
|
|||||||
pkmn.ability = pkmn_data[:ability]
|
pkmn.ability = pkmn_data[:ability]
|
||||||
pkmn.gender = pkmn_data[:gender] || ((trainer.male?) ? 0 : 1)
|
pkmn.gender = pkmn_data[:gender] || ((trainer.male?) ? 0 : 1)
|
||||||
pkmn.shiny = (pkmn_data[:shininess]) ? true : false
|
pkmn.shiny = (pkmn_data[:shininess]) ? true : false
|
||||||
pkmn.super_shiny = false
|
pkmn.super_shiny = (pkmn_data[:super_shininess]) ? true : false
|
||||||
if pkmn_data[:nature]
|
if pkmn_data[:nature]
|
||||||
pkmn.nature = pkmn_data[:nature]
|
pkmn.nature = pkmn_data[:nature]
|
||||||
else # Make the nature random but consistent for the same species used by the same trainer type
|
else # Make the nature random but consistent for the same species used by the same trainer type
|
||||||
|
|||||||
@@ -629,6 +629,7 @@ module TrainerPokemonProperty
|
|||||||
initsetting[:form],
|
initsetting[:form],
|
||||||
initsetting[:gender],
|
initsetting[:gender],
|
||||||
initsetting[:shininess],
|
initsetting[:shininess],
|
||||||
|
initsetting[:super_shininess],
|
||||||
initsetting[:shadowness]
|
initsetting[:shadowness]
|
||||||
]
|
]
|
||||||
Pokemon::MAX_MOVES.times do |i|
|
Pokemon::MAX_MOVES.times do |i|
|
||||||
@@ -652,6 +653,7 @@ module TrainerPokemonProperty
|
|||||||
[_INTL("Form"), LimitProperty2.new(999), _INTL("Form of the Pokémon.")],
|
[_INTL("Form"), LimitProperty2.new(999), _INTL("Form of the Pokémon.")],
|
||||||
[_INTL("Gender"), GenderProperty, _INTL("Gender of the Pokémon.")],
|
[_INTL("Gender"), GenderProperty, _INTL("Gender of the Pokémon.")],
|
||||||
[_INTL("Shiny"), BooleanProperty2, _INTL("If set to true, the Pokémon is a different-colored Pokémon.")],
|
[_INTL("Shiny"), BooleanProperty2, _INTL("If set to true, the Pokémon is a different-colored Pokémon.")],
|
||||||
|
[_INTL("SuperShiny"), BooleanProperty2, _INTL("Whether the Pokémon is super shiny (shiny with a special shininess animation).")],
|
||||||
[_INTL("Shadow"), BooleanProperty2, _INTL("If set to true, the Pokémon is a Shadow Pokémon.")]
|
[_INTL("Shadow"), BooleanProperty2, _INTL("If set to true, the Pokémon is a Shadow Pokémon.")]
|
||||||
]
|
]
|
||||||
Pokemon::MAX_MOVES.times do |i|
|
Pokemon::MAX_MOVES.times do |i|
|
||||||
@@ -677,15 +679,16 @@ module TrainerPokemonProperty
|
|||||||
:form => oldsetting[3],
|
:form => oldsetting[3],
|
||||||
:gender => oldsetting[4],
|
:gender => oldsetting[4],
|
||||||
:shininess => oldsetting[5],
|
:shininess => oldsetting[5],
|
||||||
:shadowness => oldsetting[6],
|
:super_shininess => oldsetting[6],
|
||||||
:ability => oldsetting[7 + Pokemon::MAX_MOVES],
|
:shadowness => oldsetting[7],
|
||||||
:ability_index => oldsetting[8 + Pokemon::MAX_MOVES],
|
:ability => oldsetting[8 + Pokemon::MAX_MOVES],
|
||||||
:item => oldsetting[9 + Pokemon::MAX_MOVES],
|
:ability_index => oldsetting[9 + Pokemon::MAX_MOVES],
|
||||||
:nature => oldsetting[10 + Pokemon::MAX_MOVES],
|
:item => oldsetting[10 + Pokemon::MAX_MOVES],
|
||||||
:iv => oldsetting[11 + Pokemon::MAX_MOVES],
|
:nature => oldsetting[11 + Pokemon::MAX_MOVES],
|
||||||
:ev => oldsetting[12 + Pokemon::MAX_MOVES],
|
:iv => oldsetting[12 + Pokemon::MAX_MOVES],
|
||||||
:happiness => oldsetting[13 + Pokemon::MAX_MOVES],
|
:ev => oldsetting[13 + Pokemon::MAX_MOVES],
|
||||||
:poke_ball => oldsetting[14 + Pokemon::MAX_MOVES],
|
:happiness => oldsetting[14 + Pokemon::MAX_MOVES],
|
||||||
|
:poke_ball => oldsetting[15 + Pokemon::MAX_MOVES],
|
||||||
}
|
}
|
||||||
moves = []
|
moves = []
|
||||||
Pokemon::MAX_MOVES.times do |i|
|
Pokemon::MAX_MOVES.times do |i|
|
||||||
|
|||||||
@@ -863,19 +863,26 @@ PokemonDebugMenuCommands.register("setshininess", {
|
|||||||
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
|
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
|
||||||
cmd = 0
|
cmd = 0
|
||||||
loop do
|
loop do
|
||||||
msg = [_INTL("Is shiny."), _INTL("Is normal (not shiny).")][pkmn.shiny? ? 0 : 1]
|
msg_idx = pkmn.shiny? ? (pkmn.super_shiny? ? 1 : 0) : 2
|
||||||
|
msg = [_INTL("Is shiny."), _INTL("Is super shiny."), _INTL("Is normal (not shiny).")][msg_idx]
|
||||||
cmd = screen.pbShowCommands(msg, [
|
cmd = screen.pbShowCommands(msg, [
|
||||||
_INTL("Make shiny"),
|
_INTL("Make shiny"),
|
||||||
|
_INTL("Make super shiny"),
|
||||||
_INTL("Make normal"),
|
_INTL("Make normal"),
|
||||||
_INTL("Reset")], cmd)
|
_INTL("Reset")], cmd)
|
||||||
break if cmd < 0
|
break if cmd < 0
|
||||||
case cmd
|
case cmd
|
||||||
when 0 # Make shiny
|
when 0 # Make shiny
|
||||||
pkmn.shiny = true
|
pkmn.shiny = true
|
||||||
when 1 # Make normal
|
pkmn.super_shiny = false
|
||||||
|
when 1 # Make super shiny
|
||||||
|
pkmn.super_shiny = true
|
||||||
|
when 2 # Make normal
|
||||||
pkmn.shiny = false
|
pkmn.shiny = false
|
||||||
when 2 # Reset
|
pkmn.super_shiny = false
|
||||||
|
when 3 # Reset
|
||||||
pkmn.shiny = nil
|
pkmn.shiny = nil
|
||||||
|
pkmn.super_shiny = nil
|
||||||
end
|
end
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -593,7 +593,8 @@ module Compiler
|
|||||||
f.write(sprintf(" Name = %s\r\n", pkmn[:name])) if pkmn[:name] && !pkmn[:name].empty?
|
f.write(sprintf(" Name = %s\r\n", pkmn[:name])) if pkmn[:name] && !pkmn[:name].empty?
|
||||||
f.write(sprintf(" Form = %d\r\n", pkmn[:form])) if pkmn[:form] && pkmn[:form] > 0
|
f.write(sprintf(" Form = %d\r\n", pkmn[:form])) if pkmn[:form] && pkmn[:form] > 0
|
||||||
f.write(sprintf(" Gender = %s\r\n", (pkmn[:gender] == 1) ? "female" : "male")) if pkmn[:gender]
|
f.write(sprintf(" Gender = %s\r\n", (pkmn[:gender] == 1) ? "female" : "male")) if pkmn[:gender]
|
||||||
f.write(" Shiny = yes\r\n") if pkmn[:shininess]
|
f.write(" Shiny = yes\r\n") if pkmn[:shininess] && !pkmn[:super_shininess]
|
||||||
|
f.write(" SuperShiny = yes\r\n") if pkmn[:super_shininess]
|
||||||
f.write(" Shadow = yes\r\n") if pkmn[:shadowness]
|
f.write(" Shadow = yes\r\n") if pkmn[:shadowness]
|
||||||
f.write(sprintf(" Moves = %s\r\n", pkmn[:moves].join(","))) if pkmn[:moves] && pkmn[:moves].length > 0
|
f.write(sprintf(" Moves = %s\r\n", pkmn[:moves].join(","))) if pkmn[:moves] && pkmn[:moves].length > 0
|
||||||
f.write(sprintf(" Ability = %s\r\n", pkmn[:ability])) if pkmn[:ability]
|
f.write(sprintf(" Ability = %s\r\n", pkmn[:ability])) if pkmn[:ability]
|
||||||
|
|||||||
Reference in New Issue
Block a user