I mean, you can do this with a bunch of script calls yourself, but if it's an entire on map battle system you're better off using an existing open source SRPG/tactics, roguelike, ABS, or similar system that you tweak to your use cases.
Magic outside combat
RPG Maker MV Supporti googled couple of those and yea they are alright looking systems but my vision is bit different so I believe I'm better of doing my custom tactics engine 🙂
You do you. It was a suggestion to save you time. Only you know if your vision can be accomplished faster by writing an engine yourself as opposed to editing an existing one.
Original thread: https://forums.rpgmakerweb.com/threads/magic-outside-combat.163066/