Damage in the area of ​​effect / Re-equip automatically item

I have a doubt and would like to help.

I'm working on a shield-throwing ability in my game, it should work as follows:

1 - Darts shield causing damage to the enemy and two nearby targets.

2 - Applies the loss of shield for 2 turns (the shield and unequipped, removing its defense bonus and avoiding use other skills that depend on it)

3 - After the end of 2 turns the shield and re-equiped automatically.

My current problems are:

1 - In the first part I wish only targets close to the target's ability could be affected

Eg:

Spoiler
Enemy 1
Enemy 2
Enemy 3
Enemy 4
Enemy 5


If the target is the Enemy 2, only 1 and 3 (besides himself) would target.
If the target is the Enemy 3, only 2 and 4 (besides himself) would target.
2/3 - The solution I found for the second and third parts of the skill was to apply a status that causes Seal Shield, however when the status leaves it does not reequips the shield (tried many things and has not yet out of it)

I'm open to any solution.
It cannot be done without changes to the engine, which means you either need a script or a plugin depending on which maker you use.


Please specify that so that this topic can be moved into the correct forum - your profile claims that you're using Ace, but you posted in MV.
The doubt was for the MV , I forgot to change my primarily uses to MV.

 

Sorry about that!

Original thread: https://forums.rpgmakerweb.com/threads/damage-in-the-area-of-effect-re-equip-automatically-item.53590/