From 7c39a56a43b86df4d505ecca20674ab9d76c97d5 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sun, 27 Nov 2022 22:38:47 +0000 Subject: [PATCH] =?UTF-8?q?Made=20tutored=20moves=20learnable=20by=20Pok?= =?UTF-8?q?=C3=A9mon=20if=20they=20can=20get=20the=20move=20via=20level/eg?= =?UTF-8?q?g=20move,=20followers=20won't=20follow=20the=20player=20if=20th?= =?UTF-8?q?ey=20already=20have=20a=20move=20route,=20added=20console=20war?= =?UTF-8?q?ning=20if=20a=20different=20version=20of=20mkxp-z=20is=20detect?= =?UTF-8?q?ed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Scripts/001_Settings.rb | 1 + Data/Scripts/001_Technical/001_MKXP_Compatibility.rb | 6 ++++++ Data/Scripts/004_Game classes/011_Game_Follower.rb | 1 + Data/Scripts/014_Pokemon/001_Pokemon.rb | 6 +++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index 073cf51bd..a81c938d7 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -444,4 +444,5 @@ end module Essentials VERSION = "20.1.dev" ERROR_TEXT = "" + MKXPZ_VERSION = "2.3.1" end diff --git a/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb b/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb index 6eae95ad1..c40084e58 100644 --- a/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb +++ b/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb @@ -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 diff --git a/Data/Scripts/004_Game classes/011_Game_Follower.rb b/Data/Scripts/004_Game classes/011_Game_Follower.rb index de06b11be..6b209e999 100644 --- a/Data/Scripts/004_Game classes/011_Game_Follower.rb +++ b/Data/Scripts/004_Game classes/011_Game_Follower.rb @@ -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 diff --git a/Data/Scripts/014_Pokemon/001_Pokemon.rb b/Data/Scripts/014_Pokemon/001_Pokemon.rb index a2eb88e22..9ce374827 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon.rb @@ -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?