Custom Enchantment

Aloha! I'm currently working on a spell for my vampire character, where she can cast an enchantment on an allies' weapon and if said ally damages an enemy, it would infect the enemy with an HP draining effect and heal the vampire. I'll provide screenshots for what I think I was on the right track. If you cant, can you tell me how to make an actor's weapon poisonous mid battle?
Thank you for your time.
you are on the wrong path - that state would have your ally being damaged with negative regeneration.
you'll need two different states, one being on the ally and giving the ally the ability to inflict the second state.

additionally, the common event would only be activates once and in the current form only check the first enemy, no matter which enemy was targeted in the troop.
you are on the wrong path - that state would have your ally being damaged with negative regeneration.
you'll need two different states, one being on the ally and giving the ally the ability to inflict the second state.

additionally, the common event would only be activates once and in the current form only check the first enemy, no matter which enemy was targeted in the troop.
Thanks for the feedback. I really made some progress with this spell. Though now I only have to make it, so it's limited to the one enemy the ally attacks. Do you know how to do that? I'd greatly appreciate it.😀
it will not work for a lot of reasons, especially since you didn't do what I described.

I said a state that gives the actor with the state the ability to inflict the state on attacking.
That does not require any common event, that is simply the trait "attack state vampiric venom +100%"
That trait makes it that any regular attack will apply the state to the target. It does not need to be on the weapon, it can also be on a state or anything with a trait.

then you make a troop event (autorun common events do NOT work while on the battlescreen) with span=turn and condition = turn end, that checks all 8 enemy indices for the state and applies the results.

you might want to look for a base troop event plugin to prevent having to copy that troop event everywhere.
it will not work for a lot of reasons, especially since you didn't do what I described.

I said a state that gives the actor with the state the ability to inflict the state on attacking.
That does not require any common event, that is simply the trait "attack state vampiric venom +100%"
That trait makes it that any regular attack will apply the state to the target. It does not need to be on the weapon, it can also be on a state or anything with a trait.

then you make a troop event (autorun common events do NOT work while on the battlescreen) with span=turn and condition = turn end, that checks all 8 enemy indices for the state and applies the results.

you might want to look for a base troop event plugin to prevent having to copy that troop event everywhere.
Where can I find one for MZ?
A state can change the attack skill. So, I believe the healing portion can be handled in that new skill's damage formula. Although I don't know the best way to heal the vampire. If it's just 1 unique character I guess you can just heal it directly with a function in the damage formula.

Edit:
so something like this in the damage formula?
$gameActors._data[1].gainHp(a.atk * 4 - b.def * 2); a.atk * 4 - b.def * 2

Although I don't think that factors in variance or critical hits, just the base damage. But Maybe that's ok?
You can just change the [1] to whatever the vampire actor's id is. Unless you've have some advanced mimicry system where multiple characters would need to benefit from the same status independently. But that's a problem for another day.
A state can change the attack skill. So, I believe the healing portion can be handled in that new skill's damage formula. Although I don't know the best way to heal the vampire. If it's just 1 unique character I guess you can just heal it directly with a function in the damage formula.

Edit:
so something like this in the damage formula?
$gameActors._data[1].gainHp(a.atk * 4 - b.def * 2); a.atk * 4 - b.def * 2

Although I don't think that factors in variance or critical hits, just the base damage. But Maybe that's ok?
You can just change the [1] to whatever the vampire actor's id is. Unless you've have some advanced mimicry system where multiple characters would need to benefit from the same status independently. But that's a problem for another day.
Thank you for the feedback! That actually helped a lot.😀

Original thread: https://forums.rpgmakerweb.com/threads/custom-enchantment.154513/