mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
misty gym & learned moves stuff wip
This commit is contained in:
Binary file not shown.
@@ -261,7 +261,9 @@ class PokeBattle_Battle
|
|||||||
return if pkmn.moves.any? { |m| m && m.id == newMove }
|
return if pkmn.moves.any? { |m| m && m.id == newMove }
|
||||||
# Pokémon has space for the new move; just learn it
|
# Pokémon has space for the new move; just learn it
|
||||||
if pkmn.moves.length < Pokemon::MAX_MOVES
|
if pkmn.moves.length < Pokemon::MAX_MOVES
|
||||||
pkmn.moves.push(Pokemon::Move.new(newMove))
|
move = Pokemon::Move.new(newMove)
|
||||||
|
pkmn.moves.push(move)
|
||||||
|
pkmn.add_learned_move(move)
|
||||||
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
||||||
if battler
|
if battler
|
||||||
battler.moves.push(PokeBattle_Move.from_pokemon_move(self, pkmn.moves.last))
|
battler.moves.push(PokeBattle_Move.from_pokemon_move(self, pkmn.moves.last))
|
||||||
@@ -279,7 +281,9 @@ class PokeBattle_Battle
|
|||||||
if forgetMove >= 0
|
if forgetMove >= 0
|
||||||
oldMoveName = pkmn.moves[forgetMove].name
|
oldMoveName = pkmn.moves[forgetMove].name
|
||||||
pkmn.moves[forgetMove] = Pokemon::Move.new(newMove) # Replaces current/total PP
|
pkmn.moves[forgetMove] = Pokemon::Move.new(newMove) # Replaces current/total PP
|
||||||
|
pkmn.add_learned_move(newMove)
|
||||||
battler.moves[forgetMove] = PokeBattle_Move.from_pokemon_move(self, pkmn.moves[forgetMove]) if battler
|
battler.moves[forgetMove] = PokeBattle_Move.from_pokemon_move(self, pkmn.moves[forgetMove]) if battler
|
||||||
|
|
||||||
pbDisplayPaused(_INTL("1, 2, and... ... ... Ta-da!"))
|
pbDisplayPaused(_INTL("1, 2, and... ... ... Ta-da!"))
|
||||||
pbDisplayPaused(_INTL("{1} forgot how to use {2}. And...", pkmnName, oldMoveName))
|
pbDisplayPaused(_INTL("{1} forgot how to use {2}. And...", pkmnName, oldMoveName))
|
||||||
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
pbDisplay(_INTL("{1} learned {2}!", pkmnName, moveName)) { pbSEPlay("Pkmn move learnt") }
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ class Pokemon
|
|||||||
|
|
||||||
# @return [Array<Pokemon::Move>] the moves known by this Pokémon
|
# @return [Array<Pokemon::Move>] the moves known by this Pokémon
|
||||||
attr_accessor :moves
|
attr_accessor :moves
|
||||||
|
|
||||||
|
# @return [Array<Pokemon::Move>] All the moves ever learned by this Pokémon
|
||||||
|
attr_accessor :learned_moves
|
||||||
|
|
||||||
# @return [Array<Integer>] the IDs of moves known by this Pokémon when it was obtained
|
# @return [Array<Integer>] the IDs of moves known by this Pokémon when it was obtained
|
||||||
attr_accessor :first_moves
|
attr_accessor :first_moves
|
||||||
# @return [Array<Symbol>] an array of ribbons owned by this Pokémon
|
# @return [Array<Symbol>] an array of ribbons owned by this Pokémon
|
||||||
@@ -868,10 +872,17 @@ class Pokemon
|
|||||||
first_move_index = knowable_moves.length - MAX_MOVES
|
first_move_index = knowable_moves.length - MAX_MOVES
|
||||||
first_move_index = 0 if first_move_index < 0
|
first_move_index = 0 if first_move_index < 0
|
||||||
for i in first_move_index...knowable_moves.length
|
for i in first_move_index...knowable_moves.length
|
||||||
@moves.push(Pokemon::Move.new(knowable_moves[i]))
|
move = Pokemon::Move.new(knowable_moves[i])
|
||||||
|
@moves.push(move)
|
||||||
|
@learned_moves << move if !@learned_moves.include?(move)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def add_learned_move(move)
|
||||||
|
@learned_moves << move unless @learned_moves.include?(move)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# Silently learns the given move. Will erase the first known move if it has to.
|
# Silently learns the given move. Will erase the first known move if it has to.
|
||||||
# @param move_id [Symbol, String, Integer] ID of the move to learn
|
# @param move_id [Symbol, String, Integer] ID of the move to learn
|
||||||
def learn_move(move_id)
|
def learn_move(move_id)
|
||||||
@@ -884,10 +895,13 @@ class Pokemon
|
|||||||
@moves.delete_at(i)
|
@moves.delete_at(i)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
move = Pokemon::Move.new(move_data.id)
|
||||||
# Move is not already known; learn it
|
# Move is not already known; learn it
|
||||||
@moves.push(Pokemon::Move.new(move_data.id))
|
@moves.push(move)
|
||||||
# Delete the first known move if self now knows more moves than it should
|
# Delete the first known move if self now knows more moves than it should
|
||||||
@moves.shift if numMoves > MAX_MOVES
|
@moves.shift if numMoves > MAX_MOVES
|
||||||
|
@learned_moves << move if !@learned_moves.include?(move)
|
||||||
|
echoln @learned_moves
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deletes the given move from the Pokémon.
|
# Deletes the given move from the Pokémon.
|
||||||
@@ -1521,6 +1535,7 @@ class Pokemon
|
|||||||
@item = nil
|
@item = nil
|
||||||
@mail = nil
|
@mail = nil
|
||||||
@moves = []
|
@moves = []
|
||||||
|
@learned_moves = []
|
||||||
reset_moves if withMoves
|
reset_moves if withMoves
|
||||||
@first_moves = []
|
@first_moves = []
|
||||||
@ribbons = []
|
@ribbons = []
|
||||||
|
|||||||
Binary file not shown.
@@ -1,2 +1,2 @@
|
|||||||
1740846646
|
1740862074
|
||||||
1740846668
|
1740862132
|
||||||
@@ -634,3 +634,27 @@ Graphics/CustomBattlers/spritesheets/spritesheets_custom/428/428b.png
|
|||||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/428/428a.png
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/428/428a.png
|
||||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/30/30.png
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/30/30.png
|
||||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/187/187.png
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/187/187.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/463.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/448/448.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/342.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/35/35a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/17.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/17/17.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/323/323.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/289/289.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/182.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/182/182.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/63/63.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/60/60a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/102.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/422.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/422/422.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/147.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/412/412c.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/61/61.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/215/215.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/276.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/276/276.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/67/67.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/130.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/130/130.png
|
||||||
|
|||||||
BIN
Graphics/Autotiles/water_pool.png
Normal file
BIN
Graphics/Autotiles/water_pool.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 446 KiB |
Reference in New Issue
Block a user