using @tool, inheritance or random vars for spell resource

Hello, I am trying to make the code clean and i dont have a lot of experience in godot ( 6 year experience as web dev , 1-2 months on godot) and i was wondering wich one of this is the best option to make the spell more clean and scalable.

My game have a spell.gd classes that have a target_mode prop

enum TargetMode {SELF, ENEMY, ALLY, GROUND, OBJECT}
var target_mode:TargetMode

Option 1
Using the @tool notation and everytime the target_mode change updated the possible @export based on what i need (for example add the max_range only on some specific target_mode), i feel this is the best option but it make the code look orrible (perhaps there are some good tutorial on how to make the @tool notation more clean?)

Option 2
use inheritance and when i create a spell scene inherit from TargetGroundSpell,TargetEnemySpell and so on (while they all inherit from Spell)

Option 3
Just @export the variables like max_range in the spell and if the spell doesnt need it just ignore it.

i understand that wich option to chose might be based on how much i want my game to scale and wich kind of game it is (im planning to do a topdown fighting game with some influence from albion online group fighting but with way smaller scope) but im just trying to understand some good godot design foundamentals

This is all very situational, and it’s impossible to predict what option is really going to work best. Sometimes the best thing to do is to experiment and see what works.

That said, I’d suggest option #3 as what I suspect will work best for you, and maybe the thing to try first.

If you go with #3, you can also use _validate_property to only show your max_range property in the inspector when it’s needed, and hide it when it doesn’t apply, if you want to.