D
deem93
Guest
Hello.
I am working on my turn based combat system and I have a bit of a problem.
All the weapons in the game can deal either slash, stab or blunt damage.
While attacking, the system randomly picks which attack, of the three, will be performed by the character.
Right now I am using a simple choose() function for this. And here is my problem.
How do I take attacks that yield 0 damage out of this equation?
For example, a morning star deals only blunt damage, slash and stab are set to 0.
Is there a way to make the system omit attacks that will always deal 0 damage without copy-pasting the formula 7 times like so:
if attack1 = 0 then choose attack2 and attack3, if attack1 and attack2 = 0 then choose attack3 etc.
Thanks!
I am working on my turn based combat system and I have a bit of a problem.
All the weapons in the game can deal either slash, stab or blunt damage.
While attacking, the system randomly picks which attack, of the three, will be performed by the character.
Right now I am using a simple choose() function for this. And here is my problem.
How do I take attacks that yield 0 damage out of this equation?
For example, a morning star deals only blunt damage, slash and stab are set to 0.
Is there a way to make the system omit attacks that will always deal 0 damage without copy-pasting the formula 7 times like so:
if attack1 = 0 then choose attack2 and attack3, if attack1 and attack2 = 0 then choose attack3 etc.
Thanks!