ui change
This commit is contained in:
@@ -152,6 +152,8 @@ class Roll: ObservableObject {
|
||||
@Published var saveHasRerolled = false
|
||||
|
||||
@Published var blowupUsed = false
|
||||
@Published var torrent = false
|
||||
@Published var psychic = false
|
||||
|
||||
// calculated variables
|
||||
var totalDigits: [Int] {
|
||||
@@ -216,7 +218,9 @@ class Roll: ObservableObject {
|
||||
|
||||
var hit: Int {
|
||||
get {
|
||||
return self.dice.hit(die: total, cutoff: self.hitCutoff.rawValue, modifier: self.modifier.rawValue)
|
||||
if torrent { return total }
|
||||
let mod = psychic ? Dice.RollModifiers.none.rawValue : modifier.rawValue
|
||||
return self.dice.hit(die: total, cutoff: self.hitCutoff.rawValue, modifier: mod)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +387,7 @@ class Roll: ObservableObject {
|
||||
cutoff = woundCutoff
|
||||
case .armour:
|
||||
mode = saveRerollMode
|
||||
cutoff = invulnerable ? armourSave : (armourSave - armourPenetration)
|
||||
cutoff = invulnerable ? armourSave : (armourSave + armourPenetration)
|
||||
}
|
||||
|
||||
switch mode {
|
||||
|
||||
Reference in New Issue
Block a user