I've created a Minify Skill. It visually shrinks the enemy and reduces their Max HP to 50% for a few turns.
The shrinking is done via a VisuStella Battle Core Action Sequence in a Minify Common Event:
◆Common Event:Hunt Start
◆Comment:----Pow!
◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Attack Animation
:Plugin Command:Targets = ["current target"]
:Plugin Command:Mirror Animation = false
:Plugin Command:Wait For Animation? = true
◆Comment:----Shrink
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Scale/Grow/Shrink
:Plugin Command:Targets = ["current target"]
:Plugin Command:Scale X = 0.5
:Plugin Command:Scale Y = 0.5
:Plugin Command:Duration = 30
:Plugin Command:Scale Easing = Linear
:Plugin Command:Wait For Scale? = true
◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:Plugin Command:Targets = ["current target"]
◆Common Event:Hunt End
I created a Mini State so that the state will expire in a few rounds
Traits
Parameter: Max HP * 50%
The problem is I want the enemy to return to normal size after the state wears off. The Action Sequence commands have a Target parameter, but by the time the state wears off I could be targeting a different enemy, so "current target" doesn't work. I get around this by putting the enemy ID in a variable, and use the Art_BCTargetExtension plugin which adds "enemy index var x" as an option in the Target parameters.
Notetag
<JS On Expire State>
const enemyIndex = $gameTroop.members().indexOf(this);
$gameVariables.setValue(1, enemyIndex);
$gameTemp.reserveCommonEvent(38); //Magnify
</JS On Expire State>
I have the Magnify Common Event action sequence to change the enemy back to normal.
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Scale/Grow/Shrink
:Plugin Command:Targets = ["enemy index var 1"]
:Plugin Command:Scale X = 1
:Plugin Command:Scale Y = 1
:Plugin Command:Duration = 30
:Plugin Command:Scale Easing = Linear
:Plugin Command:Wait For Scale? = true
This does all work, but I can't help thinking I've made things way more complicated than they need to be. Can anyone suggest a better way for an expiring state to triggering an action sequence and have the actions apply to the afflicted enemy? And what if I want the Mini state to also be able to affect actors?
The shrinking is done via a VisuStella Battle Core Action Sequence in a Minify Common Event:
◆Common Event:Hunt Start
◆Comment:----Pow!
◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Attack Animation
:Plugin Command:Targets = ["current target"]
:Plugin Command:Mirror Animation = false
:Plugin Command:Wait For Animation? = true
◆Comment:----Shrink
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Scale/Grow/Shrink
:Plugin Command:Targets = ["current target"]
:Plugin Command:Scale X = 0.5
:Plugin Command:Scale Y = 0.5
:Plugin Command:Duration = 30
:Plugin Command:Scale Easing = Linear
:Plugin Command:Wait For Scale? = true
◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:Plugin Command:Targets = ["current target"]
◆Common Event:Hunt End
I created a Mini State so that the state will expire in a few rounds
Traits
Parameter: Max HP * 50%
The problem is I want the enemy to return to normal size after the state wears off. The Action Sequence commands have a Target parameter, but by the time the state wears off I could be targeting a different enemy, so "current target" doesn't work. I get around this by putting the enemy ID in a variable, and use the Art_BCTargetExtension plugin which adds "enemy index var x" as an option in the Target parameters.
Notetag
<JS On Expire State>
const enemyIndex = $gameTroop.members().indexOf(this);
$gameVariables.setValue(1, enemyIndex);
$gameTemp.reserveCommonEvent(38); //Magnify
</JS On Expire State>
I have the Magnify Common Event action sequence to change the enemy back to normal.
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Scale/Grow/Shrink
:Plugin Command:Targets = ["enemy index var 1"]
:Plugin Command:Scale X = 1
:Plugin Command:Scale Y = 1
:Plugin Command:Duration = 30
:Plugin Command:Scale Easing = Linear
:Plugin Command:Wait For Scale? = true
This does all work, but I can't help thinking I've made things way more complicated than they need to be. Can anyone suggest a better way for an expiring state to triggering an action sequence and have the actions apply to the afflicted enemy? And what if I want the Mini state to also be able to affect actors?