you have to approach it differently. the note tags labeled "Custom timing effects" like turn start in the help file dont interact with your skill's target by themselves. you want tags under "Custom Action Effects". Those ones refer to the skill being used directly and target refers to the target of the skill being used.
even though you can use target and user within turn start, they both refer to the battler with the state active on them. so your current code checks if the battler with the state has 0 hp at the start of the turn, and if so, then heals them by 1 and gives them state 3. That cant happen cause theyd be dead and wouldnt have the state if that were to be true without immortality
Buff, I'm sorry, I'm absolutely new to Java and my English is very basic, but I think I understood you.
something like this should do
Code:
<Custom Initiate Effect>
if (target.hp>0) user._killCheck=true;
</Custom Initiate Effect>
<Custom Conclude Effect>
if (target.hp == 0 && user._killCheck && Math.random() <= 0.08) {
user.gainHp(1);
user.addState(3);
};
delete user._killCheck;
</Custom Conclude Effect>
itll check at the start of your skills if the target has more than 1 hp(so is alive and isnt immortal at 0hp), and should from there they hit 0 hp, the effect happens at an 8% chance
This code worked perfectly, I edited it a little to show the healing in combat and it turned out perfect ^^
However, I've been building more passive abilities and I've hit some walls...again.
I'm going to put them here, in case you have a moment to give me a hand.
1- I have a couple of states that don't heal over time or after finishing a battle (states like Poison).
However I would like to create a passive state that has an 8% chance to activate and cure those states.
Is it possible to create that?
2- I wanted to create a passive state that activates at the beginning of the round with an 8% chance and that passive state grants +2 Agility.
I have the Base Parameter Control plugin (by Yanfly), so I figure I should use "<agi Plus: +2>", but I don't know how to make said passive only activate 8% of the time.
3- I want a state like the previous one, but instead of getting +2 Agility, it would be +2 Defense, so I imagine the code would be the same but with "<def Plus: +2>".
4- I wanted to make a passive state similar to the one I mentioned in the previous message, but with certain changes. I would like for attacking (not killing) to have an 8% chance of healing yourself for 2 HP.
5- A passive state that activates 8% of the time and heals 1 HP when attacking or dodging.
6- A passive state, which activates 8% of the time, and deals 2 HP to the enemy when dodging.
7- Is it possible to create a passive state that triggers a common event 8% of the time after attacking or dodging?
8- A passive state that triggers 8% at the start of the round that heals 2 HP.
9- The last one may be too complex and not possible to do, but I ask anyway.
I wanted to make a passive status that, when a character has it, changes the speed of movement on the map (the idea is that it allows you to move faster) or allows you to run.
Thank you very much for everything you can help me with, I will be eternally grateful^^