For yet the third time, I have come back to this section of the forum. While my conundrum seems difficult, I have actually made enough of a headway to know what I am working with, and notetags to make the effect function. At least in its most basic form.
First and foremost, this is what I am attempting to recreate, having noticed Yanfly has quite the array of Tips&Tricks to re-create other Items from the same Game:
This is the Active Ability of Zhonya's Hourglass, referenced from the game itself. For those less familiar with this specific effect, I will provide a slightly more descriptive description: Activating Stasis will prevent you from being affected by anything and everything for 2.5 Seconds at the cost of all control over your Champion for the duration, who will be incapable of doing anything themselves.
Re-creating this effect as a Consumable Item is out of the question as it would simply remove any semblance of balance within the game, ergo, I considered the option of transforming it into a Passive Effect that would trigger the "Stasis" effect in response to a fatal Blow. I achieved success, but only in part: The Stasis effect is indeed applied, and Battlers affected by Stasis cannot be targeted by anything, neither Ally nor Enemy. However, Skills and Spells that target entire troops still find a way to pierce through Stasis: Unless my Eyes have been playing tricks on me, my White Mage was able to heal the Black Mage who was forced into Stasis with a Party-Wide Healing Spell, nor was the incoming damage negated prior to the activation of the Stasis effect.
It would be for the best if I let the Notetags and Lunatic Code speak for themselves. The only one thing I have not done was convert the condition to calculate if the incoming damage would indeed be a killing blow-That is, because I am uncertain as to how to format the condition itself, so it currently applies the Stasis effect in response to an Attack if the Battler's Health has already been reduced to or below 25%.
Passive State Tied to the "Equipment" Itself:
I am certain I absolutely butchered quite a few things within these codes, but to explain my original thought process: I had intended for the effect to only activate once per battle, hence my attempt to control it through Switch 91. There is no one single Notetag that incorporates every "Battle End" Scenario, so I had assumed it would be okay if I added the same condition and effect to each possible outcome. It was recommended by the Help File within the Buffs&States Core Plugin itself to remove the "Remove at the end of Battle" check in the database itself, for the use I had intended of it, and so I did. However, the Damage was not negated, despite the Stasis State being applied correctly, and the State itself will not be applied more than once per Battle as I had hoped. (Unless I am overlooking something here.)
The Stasis State itself. There is no more than what I have shown through this screenshot-and I am already prey to paranoia from seeing the size of the screenshot itself as I am writing this Opening Post. It is however a detail I feel I should add, in the event I am missing a Notetag or two to make this state work as intended.
And that is all. The Equipment itself is linked to the "Hourglass" State as its Passive State, which uses the above Code as its Notetags, and while I would like to just ask for guidance on the simple "How to correct this Problem", I would like to possibly set a Turn-Based Cooldown, rather than allowing just one use Per Battle. That eludes my problem-solving skills at present, which is the second reason I have returned a third time. Any input is very highly appreciated. Many thanks in advance.
~Noel Ardiens
First and foremost, this is what I am attempting to recreate, having noticed Yanfly has quite the array of Tips&Tricks to re-create other Items from the same Game:
This is the Active Ability of Zhonya's Hourglass, referenced from the game itself. For those less familiar with this specific effect, I will provide a slightly more descriptive description: Activating Stasis will prevent you from being affected by anything and everything for 2.5 Seconds at the cost of all control over your Champion for the duration, who will be incapable of doing anything themselves.
Re-creating this effect as a Consumable Item is out of the question as it would simply remove any semblance of balance within the game, ergo, I considered the option of transforming it into a Passive Effect that would trigger the "Stasis" effect in response to a fatal Blow. I achieved success, but only in part: The Stasis effect is indeed applied, and Battlers affected by Stasis cannot be targeted by anything, neither Ally nor Enemy. However, Skills and Spells that target entire troops still find a way to pierce through Stasis: Unless my Eyes have been playing tricks on me, my White Mage was able to heal the Black Mage who was forced into Stasis with a Party-Wide Healing Spell, nor was the incoming damage negated prior to the activation of the Stasis effect.
It would be for the best if I let the Notetags and Lunatic Code speak for themselves. The only one thing I have not done was convert the condition to calculate if the incoming damage would indeed be a killing blow-That is, because I am uncertain as to how to format the condition itself, so it currently applies the Stasis effect in response to an Attack if the Battler's Health has already been reduced to or below 25%.
Passive State Tied to the "Equipment" Itself:
JavaScript:
<Custom React Effect>
if(target.hpRate() <= 0.25 && !$gameSwitches.value(91))
value = 0
target.addState(84)
$gameSwitches.setValue(91, true)
</Custom React Effect>
<Custom Victory Effect>
$gameSwitches.setValue(91, false)
target.removeState(84)
</Custom Victory Effect>
<Custom Escape Effect>
$gameSwitches.setValue(91, false)
target.removeState(84)
</Custom Escape Effect>
<Custom Defeat Effect>
$gameSwitches.setValue(91, false)
target.removeState(84)
</Custom Defeat Effect>
I am certain I absolutely butchered quite a few things within these codes, but to explain my original thought process: I had intended for the effect to only activate once per battle, hence my attempt to control it through Switch 91. There is no one single Notetag that incorporates every "Battle End" Scenario, so I had assumed it would be okay if I added the same condition and effect to each possible outcome. It was recommended by the Help File within the Buffs&States Core Plugin itself to remove the "Remove at the end of Battle" check in the database itself, for the use I had intended of it, and so I did. However, the Damage was not negated, despite the Stasis State being applied correctly, and the State itself will not be applied more than once per Battle as I had hoped. (Unless I am overlooking something here.)
The Stasis State itself. There is no more than what I have shown through this screenshot-and I am already prey to paranoia from seeing the size of the screenshot itself as I am writing this Opening Post. It is however a detail I feel I should add, in the event I am missing a Notetag or two to make this state work as intended.
And that is all. The Equipment itself is linked to the "Hourglass" State as its Passive State, which uses the above Code as its Notetags, and while I would like to just ask for guidance on the simple "How to correct this Problem", I would like to possibly set a Turn-Based Cooldown, rather than allowing just one use Per Battle. That eludes my problem-solving skills at present, which is the second reason I have returned a third time. Any input is very highly appreciated. Many thanks in advance.
~Noel Ardiens