MV Absorption Shield and Additional Cost

Hey all!

I have two questions:

1. I'm trying to create an absorption shield (using Yanfly's plugin) to have a spell deal damage = to magic attack plus base damage, but then also grant the caster an absorption shield equal to the damage dealt. Any help?

2. I would like for certain spells to grant malice (or a stack), then certain spells to remove said malice in order to cast them.
Moved to: Plugin Support
1. To have the skill deal damage equal to anything you can simply use the damage formula. I assume you know how to do that. To then gain absorption barrier equal to the damage dealt I would try something along those lines:
JavaScript:
<Post-Damage Eval>
   a.gainBarrier(value, turn);
</Post-Damage Eval>
The notetag is from Yanfly's free plugin Skill Core http://www.yanfly.moe/wiki/Skill_Core_(YEP)
Leave value actually as the word value, as during the pre- and post-damage eval there exists a variable named value that contains the damage to be dealt/just dealt. Replace turn with the number of turns you want your barrier to last. If you want it to be non-expiring set it to 0.
Word of warning though: I pieced this together reading the plugin instructions. I have not actually tested it.

2. I assume malice is simply a state that can be used as a resource for certain skills? In that case I recommend taking a look at Yanfly's tips and tricks regarding stockpile and tweaking them to your own needs.
Thanks a ton! Yeah, basically I wanted an ability to give state (Malice, able to stack x3); then certain skills cost malice to cast. But this works perfectly! THanks for the shield one! I read through the plugin and couldn't figure out how it worked.

You're awesome, fr. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/absorption-shield-and-additional-cost.143150/