attack: Attack

Description Usage Arguments Value

Description

Attack

Usage

1
2
3
4
attack(adv = 0, sharpShoot = F, attackStat = c("Str", "Dex", "Con", "Wis",
  "Int", "Cha"), damageDice = "1d6", proficient = TRUE, modToHit = 0,
  modToDamage = 0, ammo = NULL, vocal = TRUE, critRange = 20,
  char = getOption("defaultCharacter"))

Arguments

adv

integer. 0: Normal, -1 Disadvantage, +1 Advantage

sharpShoot

logical. are we sharpshooting

attackStat

character. which stat to use for attack. 3 letter. Added to hit and damage rolls

damageDice

character vector. attack dice. If more than one dice type is used (as in sneak attack) add them as a vector (damageDice = c('1d8','1d6'))

proficient

logical. is the attacker proficient in the weapon. If so proficiency bonus will be added to hit rolls

modToHit

integer. hit modifier

modToDamage

integer. damage modifier

ammo

character. If provided ammo will be used. Before using, you need to set your ammo count manually by character$ammoName = 30 (character$bolt = 30)

vocal

logical. Should dice rolls and crit notifications be printed.

critRange

vector of integers. Which rolls to count as a critical hit

char

A list outputted from importCharacter or processCharacter, or a character naming such a list

Value

Named vector. Attack roll and damage. If a 1 is rolled damage is always 0


oganm/import5eChar documentation built on Dec. 22, 2020, midnight