So I have three different burn effects that are all worse than the previous one. How would I go at making a spell do more damage based on which burn status is afflicted and make it see which one is one them and have a fire spell have a chance to burn them worse. For example: Fireball has a 10% chance to inflict 1st degree burn. I want inferno spiral to do more damage if they are afflicted with 1st degree and do double if they have 2nd degree, but if they have 1st then it also gives a 25% chance for 2nd to be afflicted while taking off 1st. However they can only get 2nd if they have 1st and 3rd if they have second. Hope this makes sense. Thanks for any and all help.
Status Help
RPG Maker MV SupportYou're already using yanfly's skill core and buffs & states. Both of those can do what you want
You can use the <pre-damage eval> tag within each of those skills to increase their damage accordingly if the states are active. Can also just be done through the skill's damage formula without the plugin, but its easier to see in a notetag
Assuming theyre all separate states, you can use a <post-damage eval> tag to roll a random number and if it succeeds, give the lv 1 burn or remove the current burn and apply the next one up the chain to the target
how would it look in the notetag after this part:
Sorry, still new to this code stuff.
ill assume your burns are states 14, 15, and 16
for the damage portion, your pre damage tag could look like this
Code:
<pre-damage eval>
if (target.isStateAffected(14)) value = Math.ceil(value * 1.5);
else if (target.isStateAffected(15)) value = Math.ceil(value * 2);
else if (target.isStateAffected(16)) value = Math.ceil(value * 2.5);
</pre-damage eval>
then for the burn applications, remove the add state effect and you can have it done through the tag like this:
Code:
<post-damage eval>
if (target.isStateAffected(15) && Math.random() < .25){
target.removeState(15);
target.addState(16);
} else if (target.isStateAffected(14) && Math.random() < .25){
target.removeState(14);
target.addState(15);
}
</post-damage eval>
if either one of the last 2 failed, check if the target has 1st degree burns. if so, roll a 25% chance, and if both are true, remove 1st degree burns and add 2nd.
With that out of the way, some advice. the more unique you want your effects to be, the greater the odds youll have to interact with javascript to make them work. Take some time to read a guide and learn the basics so that youll be able to have an idea of how to go about making your effects. after then, use the script call list to find the relevant functions to make them happen. Yanfly's tips and tricks section can also be helpful in learning about how to go about different effects
Do I put my own info in for the value part? Could I put something like ((a.mat + 50) * 1.5)?
no. inside the help file for the plugin it says that value is an automatically generated variable that corresponds to the damage/healing of the skill.
Ok, so I put the damage value in the actual damage formula part?
yes. give your skill an actual damage formula youd like to use. the notetag will grab the damage once its calculated and multiply it according to the burns before its dealt
And unless I am mistaken, it will deal the regular damage in there is no burn status, correct?
Edit: Nevermind, just tested it and found out. Thanks for all the help.
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!
Original thread: https://forums.rpgmakerweb.com/threads/status-help.167113/