ui change

This commit is contained in:
Rory Hinnen
2026-09-07 13:48:32 -05:00
parent 2c10c7c093
commit ac4d4a670a
4 changed files with 71 additions and 45 deletions
+6 -2
View File
@@ -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 {