PeteS1772

Warper
Member
Joined
Apr 1, 2019
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hey all, I'm very new to RPG maker MZ (and RPG maker in general), so I don't know if what I want to do is possible or not.

I'm going to have a character in the game who is a vampire. I'm hoping to create a skill that will serve as his basic attack, and its effect changes based on the target's state. If he uses this skill on a target that does not have the "Vampire Mark" state, it will deal normal damage and add that state to the target. If he uses the skill on that enemy a second time (or any enemy already afflicted with "Vampire Mark"), then the attack will instead deal extra damage (say, 20%) and have partial HP drain (say, 25%).

Is this a possible idea? Since my hope is to use this skill as his basic attack command, I'm trying to avoid breaking this apart into 2 separate skills. I'm currently using the VisuStella MZ Battle Core and Core Engine, if that helps.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,866
Reaction score
8,238
First Language
German
Primarily Uses
RMMV
yes, it can be done - and without any plugins.

what you need is javascript code inside the damage formula of the skill.
there should be a pinned topic on how to use the damage formula in the forum for the maker you use.
 

PeteS1772

Warper
Member
Joined
Apr 1, 2019
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
I had found something and tried using the following formula to modify the amount of damage that the target takes if they currently have the state applied to them, and it seems to work so far! But I can't figure out where/how to add the HP drain mechanic.


b.isStateAffected(9) ? a.atk*5 - b.def*2 : a.atk*4 - b.def*2;
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Gotta love when RM just decides it's done with existence and closes when you're in an event.
Good grief am I ever so dusty on music creation. Never move, gentleman and ladies!
After waiting for several months to observe the results of vaccines, I finally decided to go for Comirnaty, because now my job needs me to either be vaccinated or take a regular testing every 2 weeks(240 HKD per test), and it seems to me that Comirnaty is safe enough in my case :)
So, to create multiple faces one needs to first export, then import, over and over... who came up with this weird mechanism...
Away from home now since it reduce COVID spread

Forum statistics

Threads
112,315
Messages
1,067,283
Members
145,939
Latest member
fooples
Top