Mana Shield

~ Mana Shield  ~​
 ​
For the latest updates please visit my blog. I won't update this thread anymore.​
Hi again!

I know there are several scripts covering this, but I'm all for diversity. 😀

The script will allow your weapons, armours and states to have mana shield capability.

New in V1.1:

I removed the shield types and replaced their functions with several notetags. You can now have a mana shield with 20% split, 30% absorb and 50% replenish if you want.

This enables you to have more flexible mana shields and it enables me to add new tags easier.

You may use these notetags:

Spoiler
<absorb_damage: x%> or optional <absorb_damage_x: y%>

Will reduce incoming damage by x%.

The optional version will allow you to reduce x (= HP or MP) damage only.

<reduce_damage: x> or optional <reduce_damage_x: y>
Will reduce incoming damage by x.
The optional version will allow you to reduce x (= HP or MP) damage only.

<split_damage: x%>
Will split incoming damage by x% between HP and MP.

<replenish_x: y%>
Will replenish x by y% of the damage.
Replace x with either HP or MP.

<ignore_damage: y%> or optional <ignore_damage_x: y%>

Will ignore (nullify) all the damage with a probability of y%
The optional version will allow you to nullify x (= HP or MP) damage only.
Instructions:

Place this script below most of your other scripts. I mostly only use Yanfly Scripts so there MAY be compatibility issues with other scripts which modify the same methods.

Screenshot:

This shield will absorb 40% of HP damage, split the damage between HP and MP and has a 10% chance of ignoring the damage altogether.

jbfc7whf.png


Script:

Get it at my Dropbox.

Changelog:

Spoiler
V 1.1

- Completely changed the way mana shields work. You may now use several note tags to grant a shield various effects.

- Transformed Split, Absorb and Replenish into note tags.

- Added two new types: Ignore and Reduce

V 1.0

- First release
Future Versions:

Tell me your ideas and I'll see if I find some time.

Thanks to:

- Yanfly for his scripts from which I've learnt a lot about scripting

Terms of Use:

Direct link to my Terms of Use document: CLICK
Pretty neat script! You could do a lot with this.
Wow, this is awesome!
I'm not completely sure how the Absorb shield works. You say it absorbs a % of damage so your HP will only take a fraction of the damage. Is this a typo and you meant to say MP? If not, how is this different from Split?

I've tested this script and it works perfectly, unlike the other mana shield scripts I've tried which have had flaws, but I'm just wondering about that specific aspect.

Additionally, as an idea for a future version, I wonder if you could implement a type of shield that absorbs a percentage of incoming damage like the Split shield does, but then allow the mana damage to be reduced.

As an example, say an enemy throws an attack that does 1000 damage, and your shield is set to absorb 60% of the damage and block 2 damage per 1 mana point. 400 damage is dealt to HP, and 300 damage is dealt to MP. If you've ever played Warcraft 3 or Dota, this is how Medusa's mana shield works. It's just a suggestion, but I don't know how difficult it would be or if it's even possible.
That is indeed a typo. I meant to say MP.

The difference between Split and Absorb is that absorb will reduce the actual damage whilst split only apportions the damage between HP and MP without actually decreasing it.

I'm not sure if I understand your suggestion. You say the attack deals 1000 damage and 60% of it is split between HP and MP, causing the HP to decrease by 400 and the MP by 300...

Where'd the remaining 300 points go to? I'm pretty sure I didn't get it, but if I did, this is essentially the same as what a Split shield will do.
This is an awesome script, gonna use that! =)
I'm not sure if I understand your suggestion. You say the attack deals 1000 damage and 60% of it is split between HP and MP, causing the HP to decrease by 400 and the MP by 300...

Where'd the remaining 300 points go to? I'm pretty sure I didn't get it, but if I did, this is essentially the same as what a Split shield will do.
It's a bit hard to explain, but essentially what I was thinking of is a combination of the Split and Absorb style shields. So in my example, of the 1000 damage, 60% of the damage goes to MP and 40% goes to HP. Therefore 400 damage is directly done to HP. However, while 600 damage is being directed at MP, it is reduced by 50% to deal only 300 damage to MP instead. Essentially it means that every 1 point of MP can absorb 2 points of damage.

This is just an idea since none of the mana shield scripts I've seen have had the ability to do this, and it's how Medusa's mana shield in Dota works (I play Dota a lot).
I think I got it now. I'll see what I can do.
Made big changes to the script. See the first post.

@JokingJames2

You should be able to create your desired shield by using

<split_damage: 40%>

<absorb_damage_mp: 50%>

That should work.
I was thinking about the same thing as JokingJames2, but there was no point on posting the same thing twice.

But yeah, it works perfectly now and it's AWESOME!
Very cool! Thanks a lot!  😀
Very nice ^^
Glad you all like it, thanks.
Hello.
So... Umm... I know that I'm 3 years late, and I'm really sorry for bothering you, but I really need help as I am a complete newbie, and my english isn't all that great.
I am using the RPGM VX Ace version of your script, and I wanted to do the following but I just don't know which notetags I should add:
A mana shield that would absorb 20 HP for 1 MP (so if you got attacked for 100 HP you would lose 5 MP). I have only managed to do it by adding
<split_damage: 1%> and <absorb_damage_MP: 95%>, but I don't like the fact that it has to take some HP aswell as MP ):
I would be really really grateful if you took the time to help me out.
This works for rpg maker mv?
@GutoCardoso No, it does not. Ace scripts are written in Ruby (RGSS3, to be exact) and MV plugins are written in Javascript. They are completely incompatible.
@GutoCardoso No, it does not. Ace scripts are written in Ruby (RGSS3, to be exact) and MV plugins are written in Javascript. They are completely incompatible.
And have a plugin like this for MV ?
@GutoCardoso You'll have to make a thread in JS Plugin Requests for that. You can link back to this thread, if you like, to help explain exactly what you are looking for.

Original thread: https://forums.rpgmakerweb.com/threads/mana-shield.39179/