Buff actions values are calculated using the following formula:

```
num = buffAction.baseParam + (total plusTypes buffs values) - (total minusTypes buff values)
if buffAction.limit in (normal, lower):
if num < 0:
num = 0
num = num - buffAction.baseValue;
if buffAction.limit in (normal, upper):
if maxRate < num:
num = maxRate
return num
```

- Buff action variables can be found here:
`baseParam`

`baseValue`

`limit`

`maxRate`

is a property of the buff item. This value can be found in the DB or API. If there are multiple buffs, the last`maxRate`

is used. Different buffs of the same buff action usually have the same`maxRate`

value.- For example: we are trying to calculate
`cardMod`

with 10 level 10 Merlin's Hero Creation applied and no buster damage down: `cardMod`

-> buff action`commandAtk`

->`plusTypes`

buff type`upCommandall`

`baseParam`

: 1000`baseValue`

: 0`limit`

: normal`maxRate`

: 5000

`num`

= 1000 + 500 * 10 = 6000 (`baseParam`

= 1000 and there are 10 Hero Creation, each has`Value`

of 500)`limit`

is normal but`num`

> 0 so lower bound is not applied`num`

=`num`

-`baseValue`

= 6000 - 0 = 6000`limit`

is normal and`num`

>`maxRate`

so upper bound is applied ->`num`

= 5000- The final
`cardMod`

value is 5000 or 500%.