Documente Academic
Documente Profesional
Documente Cultură
_
#-------------------------- Packages ------------------------------------------require(dice)
#-------------------------- Dice Objects ------------------------------------------one_plus <- getEventProb(nrolls = 1,
ndicePerRoll = 1,
nsidesPerDie = 6,
eventList = list(1:6),
orderMatters = FALSE)
two_plus <- getEventProb(nrolls = 1,
ndicePerRoll = 1,
nsidesPerDie = 6,
eventList = list(2:6),
orderMatters = FALSE)
three_plus <- getEventProb(nrolls = 1,
ndicePerRoll = 1,
nsidesPerDie = 6,
eventList = list(3:6),
orderMatters = FALSE)
four_plus <- getEventProb(nrolls = 1,
ndicePerRoll = 1,
nsidesPerDie = 6,
eventList = list(4:6),
orderMatters = FALSE)
five_plus <- getEventProb(nrolls = 1,
ndicePerRoll = 1,
nsidesPerDie = 6,
eventList = list(5:6),
orderMatters = FALSE)
six_plus <- getEventProb(nrolls = 1,
ndicePerRoll = 1,
nsidesPerDie = 6,
eventList = list(6:6),
orderMatters = FALSE)
seven_plus <- getEventProb(nrolls = 2,
ndicePerRoll = 1,
nsidesPerDie = 6,
eventList = list(6:6, 4:6),
orderMatters = TRUE)
#----------------------- Equation Objects ---------------------------------------n <HIT <- n*_plus # dice that hit
RR_HIT <- ((n-HIT)*_plus)+HIT # dice that hit (use HIT*1 if no reroll)
WOUND <- RR_HIT*_plus # dice that wound
RR_WOUND <- ((RR_HIT-WOUND)*_plus)+WOUND # dice that wound (use WOUND*1 if no re
roll)
SAVE <- RR_WOUND*(1-_plus) # wounds taken
RR_SAVE <- SAVE*(1-_plus) # wounds taken