Hi all,
I try to make a Tank, which only tanks magic attacks.
There for I use Yanfly Taunt plugin.
My tank got 2 different skills:
First is yanfly magic guard to transfer the hp damage on mp.
Second i got a sacfrice skill, consumes 50% of current hp and restores 30% of max mp.
Now i got some trouble, when i try to use the sacrifice skill as "heal".
The hp damage is transfered as mp damage. That means my magic guard state wears off because the damage take my mp beneath 0.
Is there a way to reduce my own current hp in the magic guard state without losing the state? So that i may use it as "heal" skill?
Need it to work that way because the p.atk and m.def of the tank raises if hp gets lower. But the tank still needs his "mp barrier"=magic guard state.
Can anyone please help me sokve this problem?
Help with Yanfly's Magic Guard & Self Damage Skill
● ARCHIVED · READ-ONLY
-
-
One possible way I thought would be an if clause in the state note tag.
For example
If skill sacrifice is used
User hp = current.hp / 2
User mp = current.mp + max mp / 3
Else
Code of yanflys magic guard.
End
But i have no idea if it works, and i cannot try it because i have no idea how to write that code :( -
Are using Yanfly's Skill Core? If yes, i think there should be a solution for this.
- First, change your Damage Type of your Sacrifice skill in database from HP Damage to None. We are not using damage formula to remove self HP.
- Second, use this note tag for your skill, in case you are using Yanfly's Skill Core:
Code:I haven't got time to test this myself, but it should be working.<After Eval> user.setHp(Math.ceil(user.hp * 0.5)); //Sets actor's HP to 50% of its current HP. Math Ceil will keep its HP at least 1 so it cannot get fainted. user.gainHp(Math.round(user.mhp * 0.3)); //Heals actor by 30% of its max HP </After Eval> -
Yes i also use yanflys skill core.
I will try it tomorrow when i got back home from work.
But i like the idea of your code and i guess it should work
Will tell you tomorrow if it was successfull -
Yes it works :)
Thank you very much