diff options
| author | historia <[not public]> | 2026-06-21 22:19:17 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-21 22:19:17 -0400 |
| commit | a3ae1e6aad696f584d138d9363c05dedff136a65 (patch) | |
| tree | 81e615f7227bc9d1ec79ceefc7311ecde917b074 /internal/combat | |
| parent | 84072ffe6365ad57c4976e9272762aa6db41de7e (diff) | |
| download | thehouseoficarus-a3ae1e6aad696f584d138d9363c05dedff136a65.tar.gz | |
feat: safespot system implemented
Diffstat (limited to 'internal/combat')
| -rw-r--r-- | internal/combat/formulas.go | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/internal/combat/formulas.go b/internal/combat/formulas.go index 963ee9c..f4e1ba2 100644 --- a/internal/combat/formulas.go +++ b/internal/combat/formulas.go @@ -2,12 +2,7 @@ package combat import "math/rand" -func AttackRoll(level int, styleBonus int, equipBonus int) int { - effective := level + styleBonus + 8 - return effective * (equipBonus + 64) -} - -func DefenseRoll(level int, styleBonus int, equipBonus int) int { +func EffectiveRoll(level int, styleBonus int, equipBonus int) int { effective := level + styleBonus + 8 return effective * (equipBonus + 64) } @@ -72,24 +67,7 @@ func RangedStyleBonus(style string) (ranged, defense int) { } } -func SelectAttackBonus(attackType string, stab, slash, crush, science, ranged int) int { - switch attackType { - case "stab": - return stab - case "slash": - return slash - case "crush": - return crush - case "science": - return science - case "ranged": - return ranged - default: - return crush - } -} - -func SelectDefenseBonus(attackType string, stab, slash, crush, science, ranged int) int { +func SelectBonus(attackType string, stab, slash, crush, science, ranged int) int { switch attackType { case "stab": return stab |
