
Hello forum, i need help with a simple macro that i just dont understand how to make: in my WH40k game we use a simple damage calculator that looks like this: /em Damage Calculator /r ?{Total Damage|0} - ?{TB + AP|0} however i wanted a more sophisticated damage calculator that takes into account the stat known as penetration, i figured that i would need some conditional statements, i tried, i really did, but i cant crack this, i read the wiki and all but still, im not particularly good at math or complex macros... This is what im looking for: Total damage - Soak = damage inflicted (if result is 0 No damage is inflicted, this is not important) *Total damage is just a number, no modifiers. *Soak is composed of TB (Toughness Bonus) + AP (armour points) *AP is reduced by PEN (penetration) down to 0 if PEN exceeds AP. *TB is NOT reduced by PEN as per the rules. The problem that i have is that if PEN is higher that AP then PEN also reduces TB on a regular subtraction (-) equation. Example: Total damage (30), PEN (11), TB (20), AP (10), 30 - (20+ (10-11)) = 30 - 19 = 11 i would need a conditional statement that works like: if PEN exceeds AP then PEN = AP (thus cancelling each other) 30 - (20+ (10 - 11 conditional )) = 30 - (20+0) = 10 Help!