Specific attack to win

In the Paper Mario games, there have been cases where midway in the battle, you require a certain attack to progress in the battle without dying in a matter of turns, or an action that allows you to block the attack entirely. Is there a way I can replicate this?

Here is what I mean, through battles in Color Splash:



In the first battle, you needed the fire extinguisher to extinguish Morton's hammer, else his attacks would be too strong for you to handle.

In the second battle, you needed to use the bone to destroy all the chariots, else you wouldn't be able to hit him.

In the third battle, you needed the balloons to raise the submarine to land, else you wouldn't be able to hit him.

In the fourth battle, you needed the camera to create a decoy so you wouldn't die to the monstrous amount of coins.

In the fifth battle, you needed the cork to plug up the smokestack, else you would miss all the attacks.

In the sixth battle, you needed 2 attacks: The disco ball to distract Lemmy, and the ice pick to pop his ball, else you would die instantly.
It can certainly be done. Using troop events would be the first thing that comes to mind. If you give a more specific example of what you want to accomplish in your own game, I may be able to give more help.
Midway into the battle, the enemy raises a shield that can only break with a certain spell.
Yanfly's Buff and States core lets you do this pretty easily. For your example, the following notebox code can make a shield that blocks all attacks except the ones you want to remove it.

Spoiler: Notetag Code
Code:
<Custom React Effect>
//Sets up an array of ID's able to break the shield
var okSkills = [];
okSkills.push(3,12);
//Checks if the skill can break the shield
if(okSkills.contains(this._item._itemId)){
 //If the skill is good, remove the shield and play an animation
 var text = '<CENTER>\\c[6]' + user.name() + '\\c[0] broke the shield!';
 var wait = 90;
 // Display the message.
 BattleManager.addText(text, wait);
 target.startAnimation(56);
 target.removeState(stateId);
} else {
 //If not, reduce damage to 0 and play an animation.
  value = 0;
  target.startAnimation(53);
  var text = '<CENTER>\\c[6]' + target.name() + '\\c[0] blocked the attack with their shield!';
  var wait = 90;
  BattleManager.addText(text, wait);
}
</Custom React Effect>

Original thread: https://forums.rpgmakerweb.com/threads/specific-attack-to-win.124890/