mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 20:55:44 +00:00
Lower high loyalty display threshold (#8767)
This commit is contained in:
@@ -124,7 +124,7 @@ object HeroUtils {
|
||||
scWithRanges(
|
||||
hero.loyalty.floor.toInt,
|
||||
minMedium = 50,
|
||||
minHigh = 80
|
||||
minHigh = 71
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -12,5 +12,6 @@ scala_test(
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/faction/concrete",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/hero",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/hero/concrete",
|
||||
"//src/main/scala/net/eagle0/eagle/model/view/stat_with_condition",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.eagle0.eagle.library.settings.{
|
||||
import net.eagle0.eagle.model.state.faction.concrete.FactionC
|
||||
import net.eagle0.eagle.model.state.hero.concrete.HeroC
|
||||
import net.eagle0.eagle.model.state.hero.Profession.{Mage, NoProfession}
|
||||
import net.eagle0.eagle.model.view.stat_with_condition.{Condition, StatWithCondition}
|
||||
import org.scalatest.flatspec.AnyFlatSpec
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.BeforeAndAfterEach
|
||||
@@ -92,4 +93,20 @@ class HeroUtilsTest extends AnyFlatSpec with Matchers with BeforeAndAfterEach {
|
||||
val hero = HeroC(id = 1, agility = 50, wisdom = 50, profession = NoProfession)
|
||||
HeroUtils.startFireCapable(hero) shouldBe false
|
||||
}
|
||||
|
||||
"loyaltyAsStatWithCondition" should "classify loyalty 70 as medium" in {
|
||||
val hero = HeroC(id = vassalId, loyalty = 70, profession = NoProfession)
|
||||
|
||||
HeroUtils.loyaltyAsStatWithCondition(hero, Vector(faction)) should contain(
|
||||
StatWithCondition(stat = 70, condition = Condition.Medium)
|
||||
)
|
||||
}
|
||||
|
||||
it should "classify loyalty 71 as high" in {
|
||||
val hero = HeroC(id = vassalId, loyalty = 71, profession = NoProfession)
|
||||
|
||||
HeroUtils.loyaltyAsStatWithCondition(hero, Vector(faction)) should contain(
|
||||
StatWithCondition(stat = 71, condition = Condition.High)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user