Made tutored moves learnable by Pokémon if they can get the move via level/egg move, followers won't follow the player if they already have a move route, added console warning if a different version of mkxp-z is detected

This commit is contained in:
Maruno17
2022-11-27 22:38:47 +00:00
parent 427cc45629
commit 7c39a56a43
4 changed files with 13 additions and 1 deletions

View File

@@ -444,4 +444,5 @@ end
module Essentials
VERSION = "20.1.dev"
ERROR_TEXT = ""
MKXPZ_VERSION = "2.3.1"
end

View File

@@ -46,3 +46,9 @@ def pbSetResizeFactor(factor)
Graphics.center
end
end
if System::VERSION != Essentials::MKXPZ_VERSION
printf(sprintf("\e[1;33mWARNING: mkxp-z version %s detected, but this version of Pokémon Essentials was designed for mkxp-z version %s.\e[0m\r\n",
System::VERSION, Essentials::MKXPZ_VERSION))
printf("\e[1;33mWARNING: Pokémon Essentials may not work properly.\e[0m\r\n")
end

View File

@@ -112,6 +112,7 @@ class Game_Follower < Game_Event
end
def follow_leader(leader, instant = false, leaderIsTrueLeader = true)
return if @move_route_forcing
maps_connected = $map_factory.areConnected?(leader.map.map_id, self.map.map_id)
target = nil
# Get the target tile that self wants to move to

View File

@@ -707,7 +707,11 @@ class Pokemon
# @return [Boolean] whether the Pokémon is compatible with the given move
def compatible_with_move?(move_id)
move_data = GameData::Move.try_get(move_id)
return move_data && species_data.tutor_moves.include?(move_data.id)
return false if !move_data
return true if species_data.tutor_moves.include?(move_data.id)
return true if getMoveList.any? { |m| m[1] == move_data.id }
return true if species_data.get_egg_moves.include?(move_data.id)
return false
end
def can_relearn_move?