Description Usage Arguments Value Examples
When a unit attacks another unit, dice are rolled against the ballistic or weapon skill of the attacker. Successful attacks have the opportunity to wound the defender.
1 2 |
n |
integer scalar number of attacks |
skill |
integer scalar minimum successful roll for relevant attack skill (e.g. BS 3+ would be skill = 3). |
reroll |
integer scalar what MAXIMUM result rerolls (default NULL). |
explode |
integer scalar what MINIMUM result explodes (default NULL). |
expand |
named list of arguments for |
trigger |
integer vector length >= 1 which values trigger special effects (default NULL). |
integer scalar number of successful hits UNLESS !is.null(trigger) then named list with number of successes (success) and triggers (trigger).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # a single SM tactical attacks.
to_attack(n = 1, skill = 3)
# a single SM tactical attacks while within 6" of a Captain.
to_attack(n = 1, skill = 3, reroll = 1)
# a single CSM attacks with Death to the False Emperor.
to_attack(n = 1, skill = 3, explode = 6)
# with expanding attacks
to_attack(n = 1, skill = 3, expand = list(lvl = 6, rate = 3))
# a single SM tactical attacks with an overcharged plasma
to_attack(n = 1, skill = 3, trigger = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.