Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Do you think this plugin could work as a damage sponge?
Example: The spell Shield gives a buff that absorbs 60 dmg before it collapses.
Furthermore, the number of dmg absorbed is equal to 50% of M.Def.

You can do mostly anything you want in a custom block effect, so technically it would be possible, you just need the know-how to program it in.

Blocking can be enabled by a state already, so your barrier magic just needs to turn on blocking, add a 100% block chance to the state and set a specific effect on it's <Block Effect: name> tag. 

Then you need to define in that custom block effect what needs to happen. Block trigger off the block rate, and if yours is set to 100%, it will always trigger. So to remove a set amount of damage from an incoming attack, you'd just do what the standard block effect would do with the flat block value, and take it away from the damage result. If it fully mitigates it, it would show the 'block' text popup, and the actor wouldn't take any damage at all.

Now, you'd have to define the block amount ahead of time, and adjust it as the actor blocks incoming hits, and also remove the state when that total blocked amount reaches that M.Def amount you talked about. But that shouldn't be too difficult. The real difficulty would be if you had this effect happening on an actor who also had a shield that could block using some regular effect, since block effects don't stack, so he'd either get this barrier effect when he blocked, or he'd have 100% chance to do a regular block, taking no damage at all for the duration of the state.