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,506
Reaction score
8,144
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 Profile Posts

Create Anime Art w/ AI, Tall Sprites with Aurora, Customize Variable Display | RPG Maker News #34

[My favorite slow moving track I've made so far]
dd_airport2.jpgdd_combat.jpg
dd_town.jpg
I did an experiment to try to solve the art style problem between RTP and 3D models.
But, it feels this grimdark world is going to end even faster. :kaoswt2:
Solovei wrote on caethyril's profile.
Hi, just wanted to say, thank you for helping me fix that event with the step count! I followed your example exactly and it works now:kaojoy:
still waiting for original character contest 3 bust/face dlc release :kaoluv:

Forum statistics

Threads
111,189
Messages
1,059,126
Members
144,437
Latest member
foxiee05
Top