Goinza's Plugins
PluginsAboutTutorialsContact

© Copyright (c) 2020-2025 Goinza

Back to Plugins

HP Cost for Weapons and Items

Version 1.1•Updated August 15, 2021•With contributions from Repeat
Description

With this script, you can make weapons and items cost HP to use.

It is important to notice that if the unit doesn't have enought HP to use a weapon that costs life, it can't initiate an attack. The unit also won't be able to counterattack. On the other hand, if the unit had another weapon available in its inventory, it will use that second weapon to counterattack.

If the unit can make two attacks during a round of combat, but doesn't have enough HP to make the second attack, it won't do it, even if it has other available weapons. This also applies to counterattacks: if the unit has enough HP to wield the weapon, but receives too much damage before being able to counterattack, it won't counterattack.

Custom Items

This script does not work for items with the Custom type. For those items, you need to find the script that created that specific custom item type modify it to make it work. Because this requires modifying another script, it is not possible to give precise instructions to solve the problem

Installation

You need to use the custom parameter "lifeCost" on the weapons/items and write as value the HP cost of each attack of that weapon.

For example, a weapon with {lifeCost:5} costs 5 HP for every attack, even if the unit misses.

Version History

1.1

August 15, 2021
  • Easy battle now shows the self damage animation correctly. Thanks to Repeat for this change.

1.0

February 23, 2020
  • Initial version.