miki151 / keeperrl

Source code of KeeperRL
GNU General Public License v2.0
890 stars 112 forks source link

allow percentual damage against undead with effect #2032

Closed samuellsk closed 1 year ago

samuellsk commented 1 year ago

Now doing "guaranteed" damage is done through bleeding

for example: Bleed 0.25 "crushed by claw"

But this will not goona do anydmg against undead, since they are immune to bleeding mechanics. This way many custom spells do fail agains them.

Fixed damage function will gonna do fixed stat dmg eg , 80 damage, but that can be fatal to many creatures and to some higher xp would not gonna do much...

Please consider doing a copy of the Bleed effect that could be used as universal percentual dmg against minions unless invulnerable.

miki151 commented 1 year ago

Try this: Filter Not HasAnyHealth Chance [Percentage] { CreatureMessage "lose a limb" "loses a limb" ChooseRandom { InjureBodyPart LEG InjureBodyPart ARM ... }

This will do almost the same thing as the regular attack code. You can choose to include BACK or TORSO depending on whether you want the attack to be lethal.

Please reopen if something doesn't work.