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,230
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,230
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,366
Reaction score
8,775
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,849
Reaction score
1,667
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 Profile Posts

I keep thinking up of new changes or improvements... Edit: Forgot to add the image Gimpwork.JPG
Hello, my nickname is Rigomor, but I am also known as Mopsikus. I work on RPG Maker games, and are currently working on a game called Peony of War.
If the world treats you like an enemy... Then the world must be your enemy...
What started as 1 RPG in development on the Nintendo DS, turned into 4 RPGs in development (1 on VX and 3 on VX Ace). Wish me luck.

Forum statistics

Threads
117,293
Messages
1,106,251
Members
153,480
Latest member
Varlen
Top