diff --git a/main.go b/main.go index d58ee9a..c3b35c8 100644 --- a/main.go +++ b/main.go @@ -31,10 +31,10 @@ func main() { case attacks > 1: for i := 0; i < attacks; i++ { fmt.Println() - Cast(surfaces, diceThrows, modifier) + Cast(surfaces, diceThrows) } default: - Cast(surfaces, diceThrows, modifier) + Cast(surfaces, diceThrows) } } @@ -50,7 +50,7 @@ func ParseFlags() { flag.Parse() } -func Cast(dieSurfaces, castAmount, modifier int) { +func Cast(dieSurfaces, castAmount int) { var ( casts []int cast, total int @@ -75,7 +75,11 @@ func Cast(dieSurfaces, castAmount, modifier int) { } func SimpleCast() int { - return rand.Intn(20) + 1 + + var cast = rand.Intn(20) + 1 + + fmt.Println("Without modifier:", cast) + return cast + modifier } func Advantage(x, y int) int {