Create a state where user survives with 1 HP.

rambunctiousRPG

Villager
Member
Joined
Jul 2, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMZ
I'm trying to create a state that makes the user survives any attack with 1 HP,

the skill basically replicates the move "Endure" from Pokemon.

Unfortunately, the other posts on this topic are only specific to MV, not MZ - as they require Yanfly Engine plugins.

Is there a way to do this in MZ? All help is appreciated!
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,996
Reaction score
2,229
First Language
English
Primarily Uses
RMMV
The non-plugin way is to give the character Death Resist, then at the end of every turn in battle, check if their HP is 0, and set it to 1. Remove Death Resist when the character is no longer affected by it.
 

rambunctiousRPG

Villager
Member
Joined
Jul 2, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMZ
The non-plugin way is to give the character Death Resist, then at the end of every turn in battle, check if their HP is 0, and set it to 1. Remove Death Resist when the character is no longer affected by it.
How to check if their HP is <= 0 through states?

1634475644723.png
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,996
Reaction score
2,229
First Language
English
Primarily Uses
RMMV
You do that in troops events. Call the Common Event that checks the HP.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,358
Reaction score
8,772
First Language
German
Primarily Uses
RMMV
How to check if their HP is <= 0 through states?
or in any other event than troop events, you use control variable to load the current HP into a variable and then conditional branch to check that variable.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,843
Reaction score
1,665
First Language
English
Primarily Uses
RMMV
And, really, all of this would work equivalently in MV. If you're finding answers/posts that do something different or more complex than this, that actually required the custom scripting in the Buffs & States Core, the MZ equivalent to Yanfly is the VisuStella library.
 

Latest Threads

Latest Posts

Latest Profile Posts

aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v
Well, I've got a party tomorrow, and my friends are coming over. I wanted to work a bit on the Fandom Scouts assets so I can be ready when that update arrives... in other news, Pizza Time Horror is getting a second teaser, and it shows Cabaret Helen's last performance before the location closed.
Also who used to be scared of Chuck E as a kid? I was! Now I love him!
The new cards and what they do:

(I am clearly not a youtuber... Haha)

Forum statistics

Threads
117,276
Messages
1,106,056
Members
153,450
Latest member
BRCMuller
Top