we should not ceil the value

This commit is contained in:
Héctor Giménez
2024-05-05 12:21:41 +09:00
parent bb0ec2555d
commit 753f303978

View File

@@ -2,7 +2,6 @@ package nip
import ( import (
"fmt" "fmt"
"math"
"regexp" "regexp"
"slices" "slices"
"strconv" "strconv"
@@ -217,7 +216,5 @@ func (r Rule) calculateEnhancedDefense(i data.Item) int {
return 0 return 0
} }
res := float64(defenseStat.Value-itemTypeMaxDefense) / float64(itemTypeMaxDefense) * 100 return int(float64(defenseStat.Value-itemTypeMaxDefense) / float64(itemTypeMaxDefense) * 100)
return int(math.Ceil(res))
} }