Need some help making a skill

Heyo, folks~


So I've been working on some skills for my game, and ran into a pretty major hiccup when I came to a particular ability.


The ability: Nihilism- Cleanses all enemy targets of all debuffs, then inflicts damage proportional to the amount of debuffs removed, split among all targets affected by Voidtouch. The user takes the share of any enemies not affected by Voidtouch. (ie. Targets A, B, C affected, A/B have Voidtouch-C doesn't, User takes the damage that would have gone to C instead)


Just to clarify a bit, the debuffer gets an ability called Voidtouch, which is a debuff that makes her other abilities have alternate interactions on affected targets. In the case of Nihilism, it is required on the targets to avoid self-damage. I'm really just not sure how to even start making Nihilism work.


The major help needed here is:


1) How to tell how many debuffs are removed across all targets, and attach that number to a variable for the purposes of the damage formula.


2) How to remove Voidtouch (To include it in the debuff removed count) yet still factor it into which targets are damaged.


3) Aaand, how to work the formula so that the user takes X amount of damage chunks.


I know I'll most likely need plugins for this one, but any help would be appreciated!
Hello to you too.


I've been working on game mechanics for a long time and I think I can give you few tips.


The first thing you should do is to create a COMMON EVENT to be called from the skill cast. You can do it from OTHER in skill.


You should have very wide selection from BATTLE part of event creation. There, you can calculate amount of states(if nothing, you can use a loop to cross all states and check for each - if found, add 1 to the variable). As for VOIDTOUCH, you can just use a CONDITIONAL BRANCH/STATES ON ENEMY and check manually for the state itself. Then, create the event line for damage AND VOIDTOUCH removal. In ELSE block, do the same thing but for PLAYER. Repeat for each enemy struck.


Inform me about your progress!
Thanks for the help, @Paldemaar. Worked on that, and it was a bit clumsy, but worked (mostly). But Yanfly must be psychic, because he just launched a plugin that solves this issue pretty much completely. 🤣 All good now! Thanks again for the help!~
Heh, always my pleasure to help. If you need any further help about mechanics, just contact me.


(And, just to clarify, did you use my solution?)
I did at first, but the Target Selection plugin actually made the while process a lot easier. So now I'm not. 

Original thread: https://forums.rpgmakerweb.com/threads/need-some-help-making-a-skill.60731/