Hi everyone,
I want to have a state that makes every Skill cost 15% of Max HP. What would be the easiest way to achieve this? I know that YEP Skillcore can make skills cost HP by default, but I only want this to happen when the user has a state, not by default.
Thanks for your input!
One possibility is to make the cost conditional on having a state, and then get that conditional cost to every skill.
That way the state is only a placeholder without its own function, but I can't think of a way to code what you want into the state, it would be easier to come at it from the skill side.
Hummmm
I think you should use yep passive state and yep buffandstate core( and skill core)
First, in your skill, on note:
<custom hp cost>
If user.isStateAffected(yourstateid) {
Cost += user.mhp * 0.15; } ;
</custom hp cost>
I have a state in my game called blood magic. Blood magic state is applied to a character when they use blood magic.
In each of my skills are these note tags.
<Custom MP Cost>
if (user.isStateAffected(19)) {
cost = 0;
}
</Custom MP Cost>
<Custom HP Cost>
if (user.isStateAffected(19)) {
cost += skill.mpCost;
}
</Custom HP Cost>
State 19 is my blood magic state. You can replace cost += skill.mpCost; with cost = user.mhp * 0.15; I believe that should work. You can replace 19 with a state id number that you want to use. I set my state to remove at battle end and remove by restriction.