Looking at Yanfly's example, I think for MZ it's like:
<JS Post-Damage>
const states = target.states();
let category = 'test';
category = category.toUpperCase();
for (let i = 0; i < states.length; ++i) {
const state = states[i];
if (state && state.categories.contains(category)) {
target.addStateTurns(state.id, 5);
}
}
</JS Post-Damage>
EDIT: Edited the i in there, cropped it out earlier.
Hi, I would like to create a skill that deals more damage when an enemy is afflicted by State "x"
for example :
Poison Blade = Increase physical damage by 100% if the enemy is affected with the "Poison" state.
I think you can just use b.isStateAffected(stateID) as a condition in the damage formula.
e.g. if you poison state has ID of 99:
b.isStateAffected(99) ? a.atk * 8 - b.def * 2 : a.atk * 4 - b.def * 2
Use the JS notetag, something like:
<JS Drops>
if (Math.random() < 0.05) {drops.push($dataWeapons[1]);}
if (Math.random() < 0.10) {drops.push($dataWeapons[2]);}
if (Math.random() < 0.25) {drops.push($dataWeapons[3]);}
if (drops.length === 0) {drops.push($dataWeapons[4]);}
</JS Drops>
Hi guys, I'm using VS Battle Core, I'd like to make a conditional skill based on the target's remaining HP
This is the detailed background :
deals damage to 1 enemy, the effect is varied based on the remaining HP.
- if the target's HP is at 50%- 100% , inflicts "Poison"
- if the target's HP is below 50%, deals additional 100%ATK
Hey guys! Looking to have a Armor piece give bonus Crit damage, the two note tags ive found:
<Modify Critical Bonus Damage: x%>
and
<Modify Critical Multiplier: x%>
But both only work on Items and Skills.
Anyone know how to apply this on an Armor piece?
I'd prefer not to do it with a passive state.
The mechanics notetags work on armors (instead of + you can use *):
<JS Pre-Damage as User>
if (target.result().critical){
value += X;
}
</JS Pre-Damage as User>
theyd stack multiplicatively. the tag would be ran for each piece of equipment that has them
Hi, I'm looking for a new skill notetag that deals damage based on the total sum of all party member's ATK or any stats.
For example :
Union Strike -> A slow attack that deals damage : 25% of the total ATK of all party members.
a few notes :
1. only counts the alive party members (including the attacker)
2. Doesn't count the sub / inactive party members.
The formula you get that with is like:
$gameParty.aliveMembers().reduce((sum, actor) => sum + actor.atk, 0)
EDIT: This gives you the total sum of attack. Then you can multiply it with what you want.