Alright, as promised, here's
Dark Aura.
It was waaaay back in August of 2016, when I first made this state workshop, and the wordpress blog that goes with it. On the blog (but not in here) I teased the name of another state I was working on in August, Dark Aura. But what does it do? No one ever knew. Except me. It wasn't finished until mid-January, which was an odd timeline because the state itself wasn't that difficult to make, I just didn't have any time to make it.
So what is it? Dark Aura, in my project, is a defensive/tank type passive effect that only works on the Blackguard class. This class is designed that the player can make an active choice between if they want the Blackguard to tank, or to be a damage dealer, and this state is for the former of those two options. As long as the Blackguard is wearing a shield, Dark Aura will be active.
Dark Aura itself causes incoming active damage effects to deal no damage up front, instead, it staggers all damage taken over the next three turns. Every time the battler would take damage, the three turns are reset, and the new amount is split over them again, up to a maximum of 3x the battlers max Hp, where at the end of his next turn, he will surely die.
While by itself, this effect doesn't really reduce damage, it does allow for your healing actors to have more time to take care of incoming damage, when needed. But our bonus this week is a usable skill that immediately clears all staggered damage from the Blackguard, but while this skill is on cooldown, the aura itself has no effect.
I'll save some time by not getting into the strategic uses for both of these abilities, suffice to say, however, that this can really open up the doors to some massive damage reductions, using a taunt to absorb as much damage as possible and then clear it, for example.
Anyways, let's get to the state, shall we?
We've also got some length copy+paste code for this as well, so I will break it up a bit into it's separate tags.
First, we have the enabler condition. This passive condition tag prevents the state from being active if all of it's requirements are not met.
Code:
<Custom Passive Condition>
if (user._classId == 16 && user.equips()[1] != null && user.equips()[1].atypeId != undefined && user._cooldownTurns[318] <= 0) {
condition = true
}else{
condition = false
}
</Custom Passive Condition>
What we have listed for requirements, in order:
- If the user's class is 16 (Blackguard)
- AND the user's offhand item is not empty
- AND the user's offhand weapon is a piece of armor
- AND skillId 318 is not on cooldown
Obviously, if you don't want some of those requirements on this trait, well, remove them from this section. Keep in mind that skill 318 is our bonus skill, and we're using its cooldown to disable the aura while it is on cooldown.
Next, we have the react section, which covers when the battler is hit by an effect:
Code:
<Custom React Effect>
if (value > 0 && this.isHpEffect()) {
if (target.DADamage != undefined) {
target.DADamage = target.DADamage + value
}else{
target.DADamage = value
}
if (target.DADamage > (target.mhp * 3)) {
target.DADamage = target.mhp * 3
}
target.DATurns = 3
target.setStateCounter(243, target.DATurns);
value = 0
}
</Custom React Effect>
This section checks to make sure that the incoming effect is going to deal Hp damage, and that it dealt at least 1 point of damage. When this check is successful, it adds the incoming damage value to a variable on the target (or defines that variable if it doesn't already exist). Next it makes a check to see if the effect is larger than your maxHp * 3, and if so, sets it to this amount. It then sets the number of turns this effect will last for to three, and shows the turns remaining on the state icon using the setStateCounter function.
Lastly, we have the turn end effect, which handles dealing the staggered damage to the affected battler, reducing the turn count by 1, removing the state if there are no more turns remaining, and killing the affected battler (if needed).
Code:
<Custom Turn End Effect>
if (this.DADamage != undefined && this.DADamage > 0) {
auradmg = Math.floor(this.DADamage / this.DATurns)
this.DADamage = this.DADamage - auradmg
performStateAnimationDmg(187, this, auradmg, 9);
this.DATurns = this.DATurns -1
this.setStateCounter(243, this.DATurns);
if (this.DATurns <= 0) {
this.removeStateCounter(243)
}
if (this.isDead())
{
this.performCollapse();
}
}
</Custom Turn End Effect>
Where this state deals damage, we are using my
State Animations plugin, which makes the damage phase a little bit more visually interesting.
Lastly, we have the remove and victory effects, both of which clear all stored values for this state, and remove the state counter.
Code:
<Custom Remove Effect>
this.DADamage = undefined
this.DATurns = undefined
this.removeStateCounter(243)
</Custom Remove Effect>
<Custom Victory Effect>
this.DADamage = undefined
this.DATurns = undefined
this.removeStateCounter(243)
</Custom Victory Effect>
The remove effect code is needed for our bonus skill. The victory effect prevents the stored damage from remaining after a battle, to allow each new fight to start from a fresh slate.
The final thing in our paste code is a simple tag to change the color of the stateCounter text on the icon:
So here is a total copy paste of all of the notetags for this state:
Spoiler
Code:
<Custom Passive Condition>
if (user._classId == 16 && user.equips()[1] != null && user.equips()[1].atypeId != undefined && user._cooldownTurns[318] <= 0) {
condition = true
}else{
condition = false
}
</Custom Passive Condition>
<Custom React Effect>
if (value > 0 && this.isHpEffect() && value > 0) {
if (target.DADamage != undefined) {
target.DADamage = target.DADamage + value
}else{
target.DADamage = value
}
if (target.DADamage > (target.mhp * 3)) {
target.DADamage = target.mhp * 3
}
target.DATurns = 3
target.setStateCounter(243, target.DATurns);
value = 0
}
</Custom React Effect>
<Custom Turn End Effect>
if (this.DADamage != undefined && this.DADamage > 0) {
auradmg = Math.floor(this.DADamage / this.DATurns)
this.DADamage = this.DADamage - auradmg
performStateAnimationDmg(187, this, auradmg, 9);
this.DATurns = this.DATurns -1
this.setStateCounter(243, this.DATurns);
if (this.DATurns <= 0) {
this.removeStateCounter(243)
}
if (this.isDead())
{
this.performCollapse();
}
}
</Custom Turn End Effect>
<Custom Remove Effect>
this.DADamage = undefined
this.DATurns = undefined
this.removeStateCounter(243)
</Custom Remove Effect>
<Custom Victory Effect>
this.DADamage = undefined
this.DATurns = undefined
this.removeStateCounter(243)
</Custom Victory Effect>
<Counter Text Color: 6>
Now for our bonus, a skill that clears all staggered damage from the battler, and disables the Dark Aura passive effect while it is on cooldown.
One of the most important features of this skill, is that it cannot be used when Dark Aura is no active on the user. While this won't prevent a player from 'cleansing' an aura that has no staggered damage in it, it will prevent them from using this skill at all when they don't have a shield equipped, for example.
Here is the paste code for this skill. I have included the action sequence used, because the aura values are cleared by eval codes in the action sequence.
Code:
<Instant Cast>
<Cooldown: 3>
<setup action>
camera clamp on
display action
immortal: targets, true
perform start
zoom: 300%
camera focus: user
wait for zoom
motion chant: user
cast animation
wait for animation
</setup action>
<target action>
motion spell: user
camera focus: target
zoom: 250%
wait for camera
action animation: target
wait for animation
action effect: target
eval: target.DADamage = undefined
eval: target.DATurns = undefined
eval: target.removeStateCounter(243)
</target action>
<finish action>
perform finish
clear battle log
immortal: targets, false
reset camera
reset zoom
wait for camera
camera clamp on
</finish action>
<Custom Requirement>
if (user.isStateAffected(243)) {
value = true;
} else {
value = false;
}
</Custom Requirement>
Keep in mind that state 243 is our aura state, change that value to whatever your aura state is.
Conclusion:
So we have a passive state, that only happens if the user belongs to class 16, and only if he is wearing a shield in his offhand, which becomes inactive if the cleanse skill is on cooldown. This state banks damage taken while it is active, to deal it over the following three turns. As more damage is taken, the turn count is reset to three, and the staggered damage will never exceed 3x your max HP. When it deals damage to you, it shows a neato animation, and deals dark elemental damage to you. At any time, you can use the Cleanse skill to remove all remaining banked damage, but doing so prevents the passive effect from happening until the cleanse skill is off cooldown again.
That's all for this update folks.