Alright, I have an update.
The problem with using <Before Eval> and <After Eval> with Skill Core from Yanfly
This is so confusing, that I can't find a way to explain my theories, so I will just give up on it. Just know that my THEORY is that this plugin is bugged for adding and removing states when outside battle.
This is a very good solution, but it is not working for me. To boring and complicated to explain. That's unfortunate...
I found a solution to our problem
I don't think you will like it, but I will try my best to explain.
These are the plugins you need:
- Yanfly Skill Core: adds a bunch of new funtions to skills
- Yanfly Special Parameters: adds new ways to change Special Parameters
--- My idea: change Recovery to 100% before the skill or item heals MP. Change Recovery back to what it was after your heal MP.
--- Step 1: Add two variables to the Recovery formula, one that multiples and the other that adds
(Image 1)
This is the formula I'm using:
Code:
(base + plus) * rate * $gameVariables.value(17) + flat + $gameVariables.value(18)
(In my case, I'm using variables 17 and 18).
--- Step 2:
(Image 2)
<Before Eval>: Change value of variable 17 to 0. Change value of variable 18 to 1
Code:
<Before Eval>
$gameVariables.setValue(17, 0);
$gameVariables.setValue(18, 1);
</Before Eval>
<After Eval>: Change value of variable 17 to 1. Change value of variable 18 to 0.
Code:
<After Eval>
$gameVariables.setValue(17, 1);
$gameVariables.setValue(18, 0);
</After Eval>
--- Step 3:
(Image 3)
When a player starts the game, you set the value of variable 17 to 1, and the value of variable 18 to 0.
--- Why the solution is not that good:
1) Need to use 2 variables just for this issue
2) Need to customize every single skill and item that recover MP
3) The skill and item cannot change HP too, otherwise it will affect HP
4) Need to set the variables when the game starts, which is a pain in the *** for us that are testing the game in multiple maps.