Anooo...
May i ask about sequence?
How to add state to target with chance?
Sankyu.. ?
There might be better way but I did it as workaround - i am newbie
🙂
I made invisible "temporary state" ID 30
In action sequence I used
add state 30: target
This add state as 100% (if target has no state imunity) - you probably know that.
Inside this temporary state 30 i used notetag
<Custom Apply Effect>
var RelativeDamage = target.result().hpDamage / (target.mhp / 100);
- this part check how big % damage target received
var bleed = Math.randomInt(RelativeDamage-20);
- this part do math and set chance for state to apply. In this scenario, if damage is bellow 20% of target.mhp - there is 0% chance to apply, for every 1% of relative damage done by single blow chance goes up by 1%
if (bleed > 0) {
- eval, if randomInt test was sucsess
target.addState(7); If yes then apply state.
}
</Custom Apply Effect>
Of course you can use another math formula for your state chance. Also, you can use more temporary states - with various apply math chances for each - in my case I have 3 temporary physical states pierceDMG/slashDMG/bluntDMG. If I am using Spear Attack action sequence, I add pierceDMG state, with hammer I add bluntDMG, with axe I add slashDMG. Each has different math in it - cos blunt injury has higher chance to break bones than pierce, which has bigger chance to internal organ injury etc..
Disadvantage: target state rate does not matter (I dont know how to deal with it but I dont need it in this skill, state resist work and it is enough for me to Skeleton not bleeding
🙂
At the end of sequence I silently remove state 30 off target using
remove state 30: target
red is temporary state
blue is % wanted state
Of yourse you will need multiple yanfly plugins, like
Buffs & States Core, Core engine, Battle Engine Core, and at least Action Sequence 1 pack.
-------------------------------------------------------------
EDIT:
If you dont want link state apply chance to relative (or absolute) damage done you can use simplier version:
<Custom Apply Effect>
var chance = 20;
this is %chance to apply state
var bleed = Math.randomInt(100); this is random check 0-100%
if (bleed > chance) {
- eval, if randomInt test was sucsess
target.addState(7); If yes then apply state.
}
</Custom Apply Effect>
it is just me, I simply hate "add state heavy bleeding"
🙂 in case of 1HP damage to dragon
🙂