mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Adds rare move tutor game events
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Data/Map765.rxdata
Normal file
BIN
Data/Map765.rxdata
Normal file
Binary file not shown.
BIN
Data/Map766.rxdata
Normal file
BIN
Data/Map766.rxdata
Normal file
Binary file not shown.
Binary file not shown.
@@ -56,6 +56,7 @@ class MoveRelearner_Scene
|
|||||||
def pbDrawMoveList
|
def pbDrawMoveList
|
||||||
overlay=@sprites["overlay"].bitmap
|
overlay=@sprites["overlay"].bitmap
|
||||||
overlay.clear
|
overlay.clear
|
||||||
|
if @pokemon
|
||||||
type1_number = GameData::Type.get(@pokemon.type1).id_number
|
type1_number = GameData::Type.get(@pokemon.type1).id_number
|
||||||
type2_number = GameData::Type.get(@pokemon.type2).id_number
|
type2_number = GameData::Type.get(@pokemon.type2).id_number
|
||||||
type1rect=Rect.new(0, type1_number * 28, 64, 28)
|
type1rect=Rect.new(0, type1_number * 28, 64, 28)
|
||||||
@@ -66,8 +67,11 @@ class MoveRelearner_Scene
|
|||||||
overlay.blt(366,70,@typebitmap.bitmap,type1rect)
|
overlay.blt(366,70,@typebitmap.bitmap,type1rect)
|
||||||
overlay.blt(436,70,@typebitmap.bitmap,type2rect)
|
overlay.blt(436,70,@typebitmap.bitmap,type2rect)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
text = @pokemon ? "Teach which move?" : "Moves list"
|
||||||
textpos=[
|
textpos=[
|
||||||
[_INTL("Teach which move?"),16,2,0,Color.new(88,88,80),Color.new(168,184,184)]
|
[_INTL(text),16,2,0,Color.new(88,88,80),Color.new(168,184,184)]
|
||||||
]
|
]
|
||||||
imagepos=[]
|
imagepos=[]
|
||||||
yPos=76
|
yPos=76
|
||||||
@@ -132,7 +136,7 @@ class MoveRelearner_Scene
|
|||||||
end
|
end
|
||||||
if Input.trigger?(Input::BACK)
|
if Input.trigger?(Input::BACK)
|
||||||
return nil
|
return nil
|
||||||
elsif Input.trigger?(Input::USE)
|
elsif Input.trigger?(Input::USE) && @pokemon
|
||||||
return @moves[@sprites["commands"].index]
|
return @moves[@sprites["commands"].index]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -180,6 +184,10 @@ class MoveRelearnerScreen
|
|||||||
@scene.pbStartScene(pkmn, moves)
|
@scene.pbStartScene(pkmn, moves)
|
||||||
loop do
|
loop do
|
||||||
move = @scene.pbChooseMove
|
move = @scene.pbChooseMove
|
||||||
|
if !pkmn
|
||||||
|
@scene.pbEndScene
|
||||||
|
return false
|
||||||
|
end
|
||||||
if move
|
if move
|
||||||
if @scene.pbConfirm(_INTL("Teach {1}?", GameData::Move.get(move).name))
|
if @scene.pbConfirm(_INTL("Teach {1}?", GameData::Move.get(move).name))
|
||||||
if pbLearnMove(pkmn, move)
|
if pbLearnMove(pkmn, move)
|
||||||
|
|||||||
@@ -14,13 +14,75 @@ def pbSpecialTutor(pokemon)
|
|||||||
return retval
|
return retval
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def pbShowRareTutorFullList(includeLegendaries=false)
|
||||||
|
tutorUtil = FusionTutorService.new(nil)
|
||||||
|
tutorUtil.setShowList(true)
|
||||||
|
pbFadeOutIn {
|
||||||
|
scene = MoveRelearner_Scene.new
|
||||||
|
screen = MoveRelearnerScreen.new(scene)
|
||||||
|
moves = tutorUtil.getCompatibleMoves(includeLegendaries)
|
||||||
|
screen.pbStartScreen(nil, moves)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
def pbCheckRareTutorCompatibleMoves(pokemon,includeLeshgendaries)
|
||||||
|
tutorUtil = FusionTutorService.new(pokemon)
|
||||||
|
return tutorUtil.has_compatible_move(includeLeshgendaries)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def showRandomRareMoveConditionExample(legendary=false)
|
||||||
|
example = legendary ? getlegendaryConditionExample : getRegularConditionExample
|
||||||
|
text = "For example, " + example
|
||||||
|
pbMessage(text)
|
||||||
|
end
|
||||||
|
|
||||||
|
def getRegularConditionExample()
|
||||||
|
list = [
|
||||||
|
"a Sandslash fusion which has the electric type will be able to learn the move Zing Zap.",
|
||||||
|
"any Pokémon that is both Flying and Fighting type will be able to learn the move Flying Press.",
|
||||||
|
"the move Shadow Bone can only be learned by ghost-type Marowak fusions.",
|
||||||
|
"any Pokémon that is both Ghost and Grass type will be able to learn the move Trick or Treat.",
|
||||||
|
"the move Forest's Curse can only be learned by Ghost/Grass typed Pokémon.",
|
||||||
|
"a grass-type fusion of a spiky Pokémon such as Jolteon will be able to learn the move Spiky Shield.",
|
||||||
|
"any ice-type fusion that can already learn the move Crabhammer will also be able to learn the move Ice Hammer.",
|
||||||
|
"only water-type fusions of a ninja-like Pokémon such as Ninjask or Zoroark will be able to learn the move Water Shuriken.",
|
||||||
|
]
|
||||||
|
return list.sample
|
||||||
|
end
|
||||||
|
|
||||||
|
def getlegendaryConditionExample()
|
||||||
|
list = [
|
||||||
|
"any Rotom fusion that can already learn the move Thunder Punch can also be taught the move Plasma Fists.",
|
||||||
|
"only an Electric-type fusion of a legendary Ice-type Pokémon will be able to learn the move Freeze Shock.",
|
||||||
|
"only a Fire-type fusion of a legendary Ice-type Pokémon will be able to learn the move Ice Burn.",
|
||||||
|
"any Pokémon that is both Flying and Dark type will be able to learn the move Oblivion Wing.",
|
||||||
|
"a ground-type fusion of a spiky Pokémon such as Ferrothorn will be able to learn the move Thousand Arrows.",
|
||||||
|
"any steel-type Pokémon that can already learn the move Double Slap will be able to learn Double Iron Bash.",
|
||||||
|
"any Pokémon that is both Fairy and Rock type will be able to learn the move Diamond Storm.",
|
||||||
|
"any water-type Pokémon that can already learn the move Eruption can also be taught the move Steam Eruption",
|
||||||
|
]
|
||||||
|
return list.sample
|
||||||
|
end
|
||||||
|
|
||||||
class FusionTutorService
|
class FusionTutorService
|
||||||
|
|
||||||
|
def has_compatible_move(include_legendaries=false)
|
||||||
|
return !getCompatibleMoves(include_legendaries).empty?
|
||||||
|
end
|
||||||
|
|
||||||
def initialize(pokemon)
|
def initialize(pokemon)
|
||||||
@pokemon = pokemon
|
@pokemon = pokemon
|
||||||
|
@show_full_list=false
|
||||||
end
|
end
|
||||||
|
|
||||||
def getCompatibleMoves
|
def setShowList(value)
|
||||||
|
@show_full_list = value
|
||||||
|
end
|
||||||
|
|
||||||
|
def getCompatibleMoves(includeLegendaries = false)
|
||||||
compatibleMoves = []
|
compatibleMoves = []
|
||||||
#normal moves
|
#normal moves
|
||||||
compatibleMoves << :ATTACKORDER if is_fusion_of([:BEEDRILL])
|
compatibleMoves << :ATTACKORDER if is_fusion_of([:BEEDRILL])
|
||||||
@@ -72,12 +134,11 @@ class FusionTutorService
|
|||||||
compatibleMoves << :SPARKLINGARIA if (is_fusion_of([:JYNX, :JIGGLYPUFF, :WIGGLYTUFF]) && hasType(:WATER)) || is_fusion_of([:LAPRAS])
|
compatibleMoves << :SPARKLINGARIA if (is_fusion_of([:JYNX, :JIGGLYPUFF, :WIGGLYTUFF]) && hasType(:WATER)) || is_fusion_of([:LAPRAS])
|
||||||
compatibleMoves << :WATERSHURIKEN if is_fusion_of([:NINJASK, :LUCARIO, :ZOROARK, :BISHARP]) && hasType(:WATER)
|
compatibleMoves << :WATERSHURIKEN if is_fusion_of([:NINJASK, :LUCARIO, :ZOROARK, :BISHARP]) && hasType(:WATER)
|
||||||
|
|
||||||
|
if includeLegendaries
|
||||||
#legendary moves (only available after a certain trigger, maybe a different npc)
|
#legendary moves (only available after a certain trigger, maybe a different npc)
|
||||||
compatibleMoves << :HYPERSPACEFURY if is_fusion_of([:GIRATINA, :PALKIA, :DIALGA, :ARCEUS])
|
compatibleMoves << :HYPERSPACEFURY if is_fusion_of([:GIRATINA, :PALKIA, :DIALGA, :ARCEUS])
|
||||||
compatibleMoves << :COREENFORCER if is_fusion_of([:GIRATINA, :PALKIA, :DIALGA, :RAYQUAZA])
|
compatibleMoves << :COREENFORCER if is_fusion_of([:GIRATINA, :PALKIA, :DIALGA, :RAYQUAZA])
|
||||||
|
|
||||||
compatibleMoves << :PLASMAFISTS if is_fusion_of([:ELECTABUZZ, :ELECTIVIRE, :ZEKROM]) || (is_fusion_of([:ROTOM]) && canLearnMove(:THUNDERPUNCH))
|
compatibleMoves << :PLASMAFISTS if is_fusion_of([:ELECTABUZZ, :ELECTIVIRE, :ZEKROM]) || (is_fusion_of([:ROTOM]) && canLearnMove(:THUNDERPUNCH))
|
||||||
|
|
||||||
compatibleMoves << :LIGHTOFRUIN if is_fusion_of([:ARCEUS, :MEW, :CELEBI, :JIRACHI])
|
compatibleMoves << :LIGHTOFRUIN if is_fusion_of([:ARCEUS, :MEW, :CELEBI, :JIRACHI])
|
||||||
compatibleMoves << :FLEURCANNON if is_fusion_of([:GARDEVOIR, :GALLADE, :SYLVEON, :WIGGLYTUFF])
|
compatibleMoves << :FLEURCANNON if is_fusion_of([:GARDEVOIR, :GALLADE, :SYLVEON, :WIGGLYTUFF])
|
||||||
compatibleMoves << :NATURESMADNESS if is_fusion_of([:CELEBI, :KYOGRE, :GROUDON, :ABSOL])
|
compatibleMoves << :NATURESMADNESS if is_fusion_of([:CELEBI, :KYOGRE, :GROUDON, :ABSOL])
|
||||||
@@ -104,10 +165,12 @@ class FusionTutorService
|
|||||||
compatibleMoves << :SUNSTEELSTRIKE if is_fusion_of([:CHARIZARD, :VOLCARONA, :FLAREON, :NINETALES, :ENTEI, :HOOH, :RAPIDASH]) && hasType(:STEEL)
|
compatibleMoves << :SUNSTEELSTRIKE if is_fusion_of([:CHARIZARD, :VOLCARONA, :FLAREON, :NINETALES, :ENTEI, :HOOH, :RAPIDASH]) && hasType(:STEEL)
|
||||||
compatibleMoves << :DOUBLEIRONBASH if canLearnMove(:DOUBLESLAP) && hasType(:STEEL)
|
compatibleMoves << :DOUBLEIRONBASH if canLearnMove(:DOUBLESLAP) && hasType(:STEEL)
|
||||||
compatibleMoves << :STEAMERUPTION if canLearnMove(:ERUPTION) && hasType(:WATER)
|
compatibleMoves << :STEAMERUPTION if canLearnMove(:ERUPTION) && hasType(:WATER)
|
||||||
|
end
|
||||||
return compatibleMoves
|
return compatibleMoves
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_fusion_of(pokemonList)
|
def is_fusion_of(pokemonList)
|
||||||
|
return true if @show_full_list
|
||||||
is_species = false
|
is_species = false
|
||||||
for fusionPokemon in pokemonList
|
for fusionPokemon in pokemonList
|
||||||
if @pokemon.isFusionOf(fusionPokemon)
|
if @pokemon.isFusionOf(fusionPokemon)
|
||||||
@@ -118,10 +181,12 @@ class FusionTutorService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def hasType(type)
|
def hasType(type)
|
||||||
|
return true if @show_full_list
|
||||||
return @pokemon.hasType?(type)
|
return @pokemon.hasType?(type)
|
||||||
end
|
end
|
||||||
|
|
||||||
def canLearnMove(move)
|
def canLearnMove(move)
|
||||||
|
return true if @show_full_list
|
||||||
return @pokemon.compatible_with_move?(move)
|
return @pokemon.compatible_with_move?(move)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user