skill: add option to pass inline variables (parameters) to other skills
Summary
Add option to define inline skill scoped variables in the meta skill to allow more reusable skills. Creators would also be able to create (and sell) reusable skills to the community.
Usage
This would allow the following:
MyMob:
Skills:
- skill{s=Bash{damage=6;duration=40}} @target ~onAttack
Bash:
Skills:
- potion{type=SLOW;d=<skill.duration>;l=7}
- effect:sound{s=block.anvil.land}
- effect:particles{p=explosion_large;speed=1}
- damage{a=<skill.damage>}
Instead of:
MyMob:
Skills:
- skill{s=Tutorial_Guard_Bash} @target ~onAttack
Tutorial_Guard_Bash:
Skills:
- setvariable{var=skill.damage;val=6}
- setvariable{var=skill.duration;val=40}
- skill{s=Bash}
Value
This would allow defining skills with inputs and reuse them across multiple projects and bosses.
Priority
Normal priority as this is just a nice addition.
Implementation
Add an additional parser for the meta skill that accepts setting (maybe increase and decrease) variables and pass them to the called skill.
Maybe this could also be implemented in a more general case and allow all mechanics to pass inline scoped variables to the called skills.