So, if you've played Final Fantasy VI, you're likely familiar with Celes's Runic ability, which draws any magic towards her and restores MP based on the spell she absorbed. I'd like to create a skill with this same mechanic, but instead of recovering MP, I want the spell itself to be absorbed and memorized. In other words, I want this to be the method of learning Blue Magic. Furthermore, I don't want the chance of the spell being learned to be guaranteed, but rather RNG based on the LUK stat. Do you think this can be done through normal plugin script, or will I need to modify the JS code itself?
This is the original script that Yanfly gave to mimic Blue Magic as it is in FFV, where being targeted with the spell will make the target automatically learn it as long as they're a Blue Mage.
Code:
<Post-Damage Eval>
if (target.isActor() && target._classId === 3) {
if (!target.isLearnedSkill(item.id)) {
target.learnSkill(item.id);
var text = target.name() + ' has learned '
text = text + item.name + '!';
$gameMessage.add(text);I think I understand some of this script, but not enough to figure out how to trigger it with a skill.