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,227
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,227
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,354
Reaction score
8,770
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,830
Reaction score
1,657
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

Imagine having a game broken up into a whole bunch of chapters? Like Chapter 11 should be about the party members going bankrupt.
Over 1/4th of the calendars are already out :eek: Have you already put something to a good use?
Where would you go if you're looking to hire someone on here? I'm in need of a writer to take my story concept and turn it into npcs/dialog in my game.
Evening humans! How goes the game make?

Forum statistics

Threads
117,258
Messages
1,105,898
Members
153,429
Latest member
NiricoMino
Top