Page 1 of 1

Bonuses?

Posted: Thu Aug 09, 2018 3:21 am
by Belfry777
How do you calculate bonuses? 200% + 5 power is = to what? Thanks!

Re: Bonuses?

Posted: Thu Aug 09, 2018 3:42 am
by COOLguy
Belfry777 wrote:
Thu Aug 09, 2018 3:21 am
How do you calculate bonuses? 200% + 5 power is = to what? Thanks!
200% bonus * 5 power = 10 potential damage - 2 armor = 8 damage dealt

Re: Bonuses?

Posted: Thu Aug 09, 2018 4:30 am
by Stratego (dev)
i was not sure the case Belfry wrote but here is how calculated:

if
- unit has power 5
- and has +200% bonus on a specific target
- target has armor 2

than it will damage:

attack damage: 5 + 2*5 = 15
actual damage(considering armor): 15 - 2 = 13

Re: Bonuses?

Posted: Thu Aug 09, 2018 5:45 am
by makazuwr32
Exactly.

Code: Select all

Y = X + X*B% - A
Where
Y – Actual damage
X – Base attack
B – Bonus against attacked unit, 0 if no bonus
A – Armor or p.armor of attacked unit

Re: Bonuses?

Posted: Thu Aug 09, 2018 8:36 am
by godOfKings
Also wen writing jsons with damage modifier, 1 means 100% bonus, 2 is 200%, 0.5 is 50% etc. Before writing a number on the modifier, calculate the effective damage to units in this category first with the equation makazuwr just gave, I hope u at least have knowledge to solve basic algebraic equations

Re: Bonuses?

Posted: Thu Aug 09, 2018 11:44 pm
by Belfry777
Thanks for the help mates! Enemy armor is subtracted from the sum of the bonus?

Is this the formula? Some power + bonus against something - armor

Thanks maka for the coding example!

Re: Bonuses?

Posted: Fri Aug 10, 2018 12:32 pm
by COOLguy
Lol yeah my math was bad. Follow the formula

Re: Bonuses?

Posted: Fri Aug 10, 2018 5:10 pm
by Belfry777
Thanks! So if it's a 200% bonus you multiply by 5?

Re: Bonuses?

Posted: Fri Aug 10, 2018 7:08 pm
by General Brave
So here is what I think I have learned, regular attack is 5, but if it has 100% bonus against one of the unit. That should be 5+. 200% will be 10.