Sturdy (Pokemon)

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
Just curious, is there someway to replicate the Pokemon ability sturdy using Yanfly's Passive States Plugin (or any combinations of his plugins)?


For those that don't know, story essentially means if you are at MAX HP, you cannot be reduced below 1 HP in a single blow. If someone makes multiple attacks against you in a single attack, that will still result in your death.


ADDITIONALLY:


I am also curious to know if there is someway to extend the duration of Immortality by a round or 2 when used under specific circumstances. For example, how would I make a Racial Passive Ability that increased magical healing by 50% and extended the duration of the Immortal Status by 2 rounds?


Can it be done?
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,381
Reaction score
8,537
First Language
English
Primarily Uses
RMMV
I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.
 

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.


I didn't know if it was a plugin or if it could be done in the builder or if it was an evening thing or what. Which is what I was asking. No one is going to make a yanfly compatible plugin for me for sturdy out of the kindness of their heart. lol
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,381
Reaction score
8,537
First Language
English
Primarily Uses
RMMV
I may have slightly misread and thought you were requesting for a plugin/plugins that would do the job. However, your whole question revolves around how to accomplish it with plugins and not how to do it without a plugin, so it should either be here or plugin support.


Even asking for existing plugins is something that would go in plugin requests. However, you never know, depending on the complexity of this, there are people who may be willing to do it for you.


I'm going to leave this here at the moment and see how the topic develops before moving it. If it turns out there are ways to do with eventing, it can be moved back.
 
Last edited by a moderator:

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
Truthfully, I dont care where the topic goes at the end of the day... or even how its done... I just have certain mechanics I want to be able to implement and do not know how to do so. ^_^
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
Just curious, is there someway to replicate the Pokemon ability sturdy using Yanfly's Passive States Plugin (or any combinations of his plugins)?


For those that don't know, story essentially means if you are at MAX HP, you cannot be reduced below 1 HP in a single blow. If someone makes multiple attacks against you in a single attack, that will still result in your death.





 






2


You need Yanfly Buff & States Core and Yanlfy Auto-Passive States for this code to work, It's based on Yanfly Second Chance Tips & Trick video, I just altered some things.


<Custom React Effect>
// Check to see if the party is in battle.
if ($gameParty.inBattle()) {
// Sets the flag if the target has all of his/her HP at the time of death.
target._Sturdy = target.hp === target.mhp;
}
</Custom React Effect>

<Custom Respond Effect>
// Check to see if the party is in battle, has the Sturdy flag, and if the target is dead with 0 HP.
if ($gameParty.inBattle() && target._Sturdy && target.hp <= 0) {
// Play the revival animation, this can be delete without repercutions
target.startAnimation(49);
// Set the target's HP to 1.
target.setHp(1);
}
</Custom Respond Effect>


The second can be done easily using this code in a skill that targets someone already affected by immortal. Thinking that Immortal is the default one(State ID 3 in the database)


<State 3 Turns: +1>


or +2 depending on what you want.


If you want to make a passive that increases healing then you can use this code in the state note tag.


<Custom Confirm Effect>
// Check if the action heals HP.
if (this.isHpEffect() && value < 0) {
// Then increase the healing to 150%.
value = Math.ceil(value * 1.50);
} else {
}
</Custom Confirm Effect>


This will make it.
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
A simplier version would be something like l made in my games for bosses phases, expect l reduced it to 1%


You can add target.removeState(X) whereever you want.


Regenerate are for DoTs if you have any.


<Custom Respond Effect>


var hprate = (target.hp / target.mhp);


if (hprate < 0.01) {


target.setHp(Math.floor(target.mhp * 0.01))


}


</Custom Respond Effect>


<Custom Regenerate Effect>


var hprate = (target.hp / target.mhp);


if (hprate < 0.01) {


target.setHp(Math.floor(target.mhp * 0.01))


}


</Custom Regenerate Effect>


1 life instead of 1% life


<Custom Respond Effect>


var hprate = (target.hp);


if (hprate <= 1) {


target.setHp(1)


}


</Custom Respond Effect>


<Custom Regenerate Effect>


var hprate = (target.hp);


if (hprate <= 1) {


target.setHp(1)


}


</Custom Regenerate Effect>
 

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
@Diogonse the code sets the flag automatically as long as the party is in battle. So you don,t actually need to worry about it.
 

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
But will this apply to every Actor/Battler?


Because I actually only want it to apply to an Actor if they have acquired a specific passive skill?
 
Last edited by a moderator:

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
But will this apply to every Actor/Battler?


Because I actually only want it to apply to an Actor if they have acquired a specific passive skill?
 Only if they have the state as passive.
 

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
Thank you so much mate, you're a champ. I really appreciate you taking the time to help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top