ranged: Perform Ranged Attacks

Description Usage Arguments Value Examples

View source: R/ranged.R

Description

Perform Ranged Attacks

Usage

1
2
3
ranged(warjack, target = list(stats = c(DEF = 12, ARM = 18, BASE = 50)),
  boost_hit = TRUE, boost_damage = TRUE, foc = 3, kd = FALSE,
  dist = 0, dice = sample(1:6, size = 30, replace = TRUE))

Arguments

warjack

list attacker warjack object with elements stats, range and melee and special

target

list target warjack object with elements stats and special stats has elements

  1. DEF single numeric NB should include effect of being knocked down (no adjustment here due to possible effect of other modifiers)

  2. ARM single numeric armour value

  3. BASE single numeric diameter of base (mm)

boost_hit

single logical

boost_damage

single logical

foc

single numeric

kd

single logical

dice

numeric vector

Value

single numeric

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
redbandit <- list(stats = c(SPD = 4, MAT = 6, RAT = 4, DEF = 10, ARM = 20, BASE = 50),
        range = list(bombard = list(
                stats = c(RNG = 14, ROF = 1, AOE = 3, POW = 14),
                special = "arcing")
        ),
        melee = list(axe = list(stats = c(RNG = 0.5, PAS = 12),
                special = "critical amputation")),
        special = character(0))
ranged(redbandit, target = list(stats = c(DEF = 10, ARM = 14, BASE = 40)),
    boost_hit = TRUE, boost_damage = TRUE,
    foc = 2, dist = 2, dice = rep(6, 6))
ranged(redbandit,
    target = list(stats = c(DEF = 13, ARM = 13, BASE = 30)), boost_hit = FALSE, boost_damage = TRUE,
    foc = 3, dist = 0.1, dice = rep(5, 10))

CSJCampbell/WMTools documentation built on May 6, 2019, 9:26 a.m.