This community request for support is part 2 of my "Metroid-like" enemy post.
Link below:
forums.rpgmakerweb.com
Issue:
Now that my enemy has a killable weakness solved in my last post, I need to fix its LEECH skill. Currently, LEECH skill places the actor being fed on and the feeding enemy in the STUN state, and with each turn, it steals HP from the actor utilizing Yanfly's LEECH SEED, which created LEECHED (state 126). The enemy must be FROZEN (state 35) or KILLED to remove LEECHING (state 125; it just ensures the enemy cannot move) from the enemy, which should also remove LEECHED (state 126) from the player. I believe the issue lies in LINE 5 of FREEZE.
Desired End State:
Currently, if I FREEZE the enemy, it only removes the LEECHING skill from the enemy and not LEECHED state from the player.
Community assistance is appreciated!
JavaScript codes for LEECHED and FREEZE are below:
LEECHED:
FREEZE:
Link below:
MV - YEP_AutoPassiveStates / Greater Undead JavaScript Support
I am attempting to design an enemy that has to be frozen and then physically attacked to kill it, similar to Metroids in Metroid for Nintendo. I realize this will take an auto-passive state (124) specific to the enemy and that once placed in FROZEN state (125), any physical attack (elements 1...
forums.rpgmakerweb.com
Issue:
Now that my enemy has a killable weakness solved in my last post, I need to fix its LEECH skill. Currently, LEECH skill places the actor being fed on and the feeding enemy in the STUN state, and with each turn, it steals HP from the actor utilizing Yanfly's LEECH SEED, which created LEECHED (state 126). The enemy must be FROZEN (state 35) or KILLED to remove LEECHING (state 125; it just ensures the enemy cannot move) from the enemy, which should also remove LEECHED (state 126) from the player. I believe the issue lies in LINE 5 of FREEZE.
Desired End State:
Currently, if I FREEZE the enemy, it only removes the LEECHING skill from the enemy and not LEECHED state from the player.
Community assistance is appreciated!
JavaScript codes for LEECHED and FREEZE are below:
LEECHED:
JavaScript:
<Custom Remove Effect>
origin.removeState(125);
</Custom Remove Effect>
<Custom Regenerate Effect>
// Check if the original caster isn't the target and that the original target is alive.
if (origin !== target && origin.isAlive()) {
// Determine the damage dealt.
var damage = target.hp / 8;
// Round up the damage.
damage = Math.ceil(damage);
// Cap the damage to 500.
damage = Math.min(500, damage);
// Play the healing animation on the original caster.
origin.startAnimation(41);
// Original caster gains HP.
origin.gainHp(damage);
// Show the HP gained.
origin.startDamagePopup();
// Clears the original caster's HP popup.
origin.clearResult();
// Play the poison animation on the target.
target.startAnimation(58);
// Damage the target's HP.
target.gainHp(-damage);
// Check if the target is dead.
if (target.isDead()) {
// If the target is dead, make it collapse.
target.performCollapse();
}
}
</Custom Regenerate Effect>
FREEZE:
JavaScript:
<Category: Ailment>
<Custom Apply Effect>
target._customDotValue = origin.atk * 2;
target.removeState(125);
aliveMembers.removeState(126);
</Custom Apply Effect>
<Custom Remove Effect>
target._customDotValue = undefined;
</Custom Remove Effect>
<Custom Regenerate Effect>
if (target._customDotValue !== undefined) {
var value = target._customDotValue;
target.gainHp(-value);
target.startDamagePopup();
if (target.isDead()) {
target.performCollapse();
}
target.clearResult();
}
</Custom Regenerate Effect>
<Custom Respond Effect>
// Get the fire element ID.
var fire = 2;
// Check if physical damage is dealt.
if (this.isPhysical() && target.result().hpDamage > 0) {
// Remove immortal state.
target.removeState(3);
// Set the target's HP to 0.
target.setHp(0);
// Check if fire damage is dealt.
} else if (this.item().damage.elementId === fire) {
// Get the Freeze status effect ID.
var stateId = 35;
// Remove the status effect from target.
target.removeState(stateId);
}
</Custom Respond Effect>