Skill that can only affects characters with certain state

Helel257

Villager
Member
Joined
Aug 18, 2020
Messages
18
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hey all,

This is my first time posting in the forums so be sure to move this if it's in the wrong place. Still collecting my bearings.

Basically, I want to make a skill that instantly kills all enemies that have a specific state.

One example in a game I can point to is Persona 4: there's a boss with a move that inflicts Fear on the entire party, then on its next turn uses another move that insta-kills all party members with the Fear status. Is something like that also possible in MV? I've also got Yanfly's Target Core if that's necessary for pulling this off. Thanks in advance
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,523
Reaction score
1,415
First Language
English
Primarily Uses
RMMV
If you have Yanfly's action sequences, this is super easy to do in a really clean-looking way:

Code:
<Whole Action>
perform action
</Whole Action>
<Target Action>
if (target.isStateAffected(n) && Math.random() < target.stateRate(1) && !target.isStateResist(1))
  action animation: target
  eval: target._hp = 0;
  collapse: target
end
</Target Action>
<Finish Action>
wait for animation
perform finish
</Finish Action>
Something like that. Replace the "n" in isStateAffected with the ID of your to-be-killed state.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
554
Reaction score
229
First Language
english
Primarily Uses
RMMV
damage formula
b.isStateAffected(X) ? b.die();

change X to the ID of the state required for them to die instantly to (Fear)
the issue with this formula however is if a boss could be effected by Fear but you dont want the boss to be able to be 1 shoted.
in this case the easyest way to avoid that is change b.die() into b.mhp and make the skill a special element type that bosses and certain mobs can be immune to.

damage formulas can do ALOT in MV.
 

Helel257

Villager
Member
Joined
Aug 18, 2020
Messages
18
Reaction score
2
First Language
English
Primarily Uses
RMMV
Thank you both for your replies!

I was sadly unable to get the action sequence Aesica left to work, but I was able to get the damage formula strat to work as so:

Code:
b.isStateAffected(X) ? b.die: 0;
This instakills the target, but displays a '0' damage number on my end, so I amended the formula slightly to this:

Code:
b.isStateAffected(X) ? 999: 0;
Since in my RPG the max Actor HP is 999, it's mechanically the exact same but gives off a nice, big, dangerous damage number for the player to gawk at. If anyone in the future is also using this formula just slap a few extra 9s onto the formula depending on how much max HP your players can have.
 
Last edited:

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,523
Reaction score
1,415
First Language
English
Primarily Uses
RMMV
I admit I didn't really test it out, but if you're fine with the damage appearing then I guess I don't need to. :D
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top