mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
Replace Hostility proto with Scala Hostility enum (#5438)
* Replace Hostility proto with Scala Hostility enum This removes direct proto imports from library/ for the Hostility type: - FactionUtils.hostilityStatus now returns Scala Hostility - ArmyStats.hostility now uses Scala Hostility type - AvailableAttackDecisionCommandFactory no longer imports proto - AvailableFreeForAllDecisionCommandFactory no longer imports proto - AttackDecisionCommandChooser uses Hostility.Enemy instead of proto - BattleFilter no longer needs protoToScalaHostility converter - AvailableCommandConverter uses HostilityConverter.toProto This completes Phase 8b of the deproto migration, reducing direct proto imports in library/ from 8 files to 4 (LLM prompt generators). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix AvailableCommandConverterTest to use Scala Hostility enum Update test to use net.eagle0.eagle.model.state.Hostility.Self instead of proto net.eagle0.common.hostility.Hostility.SELF_HOSTILITY. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# BUILD dependency baseline - updated Sun Jan 18 15:45:56 PST 2026
|
||||
# BUILD dependency baseline - updated Sun Jan 18 16:17:22 PST 2026
|
||||
# Do not increase these numbers - only decrease!
|
||||
library_proto_deps=167
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
package net.eagle0.eagle.library.actions.availability
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.common.MoreOption
|
||||
import net.eagle0.eagle.{FactionId, ProvinceId}
|
||||
import net.eagle0.eagle.library.util.{IncomingArmyUtils, ProvinceDistances}
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
package net.eagle0.eagle.library.actions.availability
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.eagle.{FactionId, ProvinceId}
|
||||
import net.eagle0.eagle.library.util.faction_utils.FactionUtils
|
||||
import net.eagle0.eagle.library.util.IncomingArmyUtils
|
||||
|
||||
+3
-3
@@ -1,7 +1,6 @@
|
||||
package net.eagle0.eagle.library.util.command_choice_helpers
|
||||
|
||||
import net.eagle0.common.{FunctionalRandom, RandomState}
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.eagle.library.settings.MinimumPercentageOfEnemyToAttack
|
||||
import net.eagle0.eagle.library.util.{BattalionPower, CommandSelection, IncomingArmyUtils}
|
||||
import net.eagle0.eagle.library.util.command_choice_helpers.AvailableCommandSelector.flatSelectionForType
|
||||
@@ -12,6 +11,7 @@ import net.eagle0.eagle.model.state.command.common.AttackDecisionType
|
||||
import net.eagle0.eagle.model.state.command.common.AttackDecisionType.{Advance, DemandTribute, SafePassage, Withdraw}
|
||||
import net.eagle0.eagle.model.state.command.selected.SelectedCommand.AttackDecisionSelected
|
||||
import net.eagle0.eagle.model.state.game_state.GameState
|
||||
import net.eagle0.eagle.model.state.Hostility
|
||||
import net.eagle0.eagle.FactionId
|
||||
|
||||
object AttackDecisionCommandChooser {
|
||||
@@ -135,7 +135,7 @@ object AttackDecisionCommandChooser {
|
||||
|
||||
// Calculate friendly power using actual battalion composition
|
||||
val friendlyPower: Double = armies
|
||||
.filter(_.hostility != Hostility.ENEMY_HOSTILITY)
|
||||
.filter(_.hostility != Hostility.Enemy)
|
||||
.map(armyStats =>
|
||||
// For friendly armies, we need to get the actual Army object to calculate real power
|
||||
province.hostileArmies
|
||||
@@ -149,7 +149,7 @@ object AttackDecisionCommandChooser {
|
||||
|
||||
// Calculate enemy power using baseline assumptions (since we don't know enemy composition)
|
||||
val enemyPower: Double = armies
|
||||
.filter(_.hostility == Hostility.ENEMY_HOSTILITY)
|
||||
.filter(_.hostility == Hostility.Enemy)
|
||||
.map(armyStats => armyStats.troopCount.toDouble * BattalionPower.baselinePowerPerTroop)
|
||||
.sum
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ scala_library(
|
||||
"//src/test/scala/net/eagle0/eagle:__subpackages__",
|
||||
],
|
||||
exports = [
|
||||
"//src/main/protobuf/net/eagle0/common:hostility_scala_proto",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state:hostility",
|
||||
],
|
||||
deps = [
|
||||
"//src/main/protobuf/net/eagle0/common:hostility_scala_proto",
|
||||
"//src/main/scala/net/eagle0/eagle:eagle_pkg",
|
||||
"//src/main/scala/net/eagle0/eagle/library/settings:min_support_for_taxes",
|
||||
"//src/main/scala/net/eagle0/eagle/library/settings:prestige_per_supported_province",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state:hostility",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/faction",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/faction:faction_relationship",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/province",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package net.eagle0.eagle.library.util.faction_utils
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.eagle.{FactionId, HeroId, ProvinceId}
|
||||
import net.eagle0.eagle.library.settings.{MinSupportForTaxes, PrestigePerSupportedProvince}
|
||||
import net.eagle0.eagle.model.state.faction.{FactionRelationship, FactionT}
|
||||
import net.eagle0.eagle.model.state.faction.FactionRelationship.RelationshipLevel.Ally
|
||||
import net.eagle0.eagle.model.state.province.ProvinceT
|
||||
import net.eagle0.eagle.model.state.Hostility
|
||||
|
||||
object FactionUtils {
|
||||
// Curly quotes and straight quotes: " " " ' ' '
|
||||
@@ -94,9 +94,9 @@ object FactionUtils {
|
||||
fid2: FactionId,
|
||||
factions: Vector[FactionT]
|
||||
): Hostility =
|
||||
if fid1 == fid2 then Hostility.SELF_HOSTILITY
|
||||
else if factionsAreHostile(fid1, fid2, factions) then Hostility.ENEMY_HOSTILITY
|
||||
else Hostility.ALLIED_HOSTILITY
|
||||
if fid1 == fid2 then Hostility.Self
|
||||
else if factionsAreHostile(fid1, fid2, factions) then Hostility.Enemy
|
||||
else Hostility.Allied
|
||||
|
||||
private def incomingHids(province: ProvinceT): Vector[HeroId] =
|
||||
province.incomingArmies
|
||||
|
||||
@@ -68,7 +68,6 @@ scala_library(
|
||||
"//src/main/scala/net/eagle0/eagle/model/view/battle:shardok_battle_view",
|
||||
],
|
||||
deps = [
|
||||
"//src/main/protobuf/net/eagle0/common:hostility_scala_proto",
|
||||
"//src/main/scala/net/eagle0/eagle:eagle_pkg",
|
||||
"//src/main/scala/net/eagle0/eagle/library/util/faction_utils",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state:hostility",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package net.eagle0.eagle.library.util.view_filters
|
||||
|
||||
import net.eagle0.common.hostility.Hostility as HostilityProto
|
||||
import net.eagle0.eagle.library.util.faction_utils.FactionUtils
|
||||
import net.eagle0.eagle.model.state.faction.FactionT
|
||||
import net.eagle0.eagle.model.state.shardok_battle.ShardokBattle
|
||||
@@ -38,14 +37,6 @@ object BattleFilter {
|
||||
)
|
||||
}
|
||||
|
||||
private def protoToScalaHostility(proto: HostilityProto): Hostility =
|
||||
proto match
|
||||
case HostilityProto.UNKNOWN_HOSTILITY => Hostility.Unknown
|
||||
case HostilityProto.SELF_HOSTILITY => Hostility.Self
|
||||
case HostilityProto.ALLIED_HOSTILITY => Hostility.Allied
|
||||
case HostilityProto.ENEMY_HOSTILITY => Hostility.Enemy
|
||||
case HostilityProto.Unrecognized(_) => Hostility.Unknown
|
||||
|
||||
private def shardokBattlePlayerInfos(
|
||||
battle: ShardokBattle,
|
||||
fid: Option[FactionId],
|
||||
@@ -57,7 +48,7 @@ object BattleFilter {
|
||||
playerId = i,
|
||||
eagleFactionId = sp.eagleFid,
|
||||
hostility = fid
|
||||
.map(f => protoToScalaHostility(FactionUtils.hostilityStatus(f, sp.eagleFid, factions)))
|
||||
.map(f => FactionUtils.hostilityStatus(f, sp.eagleFid, factions))
|
||||
.getOrElse(Hostility.Unknown)
|
||||
)
|
||||
}.toVector
|
||||
|
||||
@@ -501,7 +501,7 @@ scala_library(
|
||||
srcs = ["HostilityConverter.scala"],
|
||||
visibility = [
|
||||
"//src/main/scala/net/eagle0/eagle/library/util/view_filters:__pkg__",
|
||||
"//src/main/scala/net/eagle0/eagle/model/proto_converters/view:__subpackages__",
|
||||
"//src/main/scala/net/eagle0/eagle/model/proto_converters:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
":proto_conversion_exception",
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ import net.eagle0.eagle.common.province_order_type.ProvinceOrderType as Province
|
||||
import net.eagle0.eagle.common.tribute_amount.TributeAmount as TributeAmountProto
|
||||
import net.eagle0.eagle.library.settings.{AllianceGoldCost, BreakAllianceGoldCost, InviteGoldCost, TruceGoldCost}
|
||||
import net.eagle0.eagle.library.util.view_filters.{BattalionViewFilter, HeroViewFilter}
|
||||
import net.eagle0.eagle.model.proto_converters.{QuestConverter, UnaffiliatedHeroConverter}
|
||||
import net.eagle0.eagle.model.proto_converters.{HostilityConverter, QuestConverter, UnaffiliatedHeroConverter}
|
||||
import net.eagle0.eagle.model.proto_converters.diplomacy_offer.status.StatusConverter
|
||||
import net.eagle0.eagle.model.proto_converters.diplomacy_offer.DiplomacyOfferConverter
|
||||
import net.eagle0.eagle.model.proto_converters.view.battalion.BattalionViewConverter
|
||||
@@ -506,7 +506,7 @@ object AvailableCommandConverter {
|
||||
factionId = stats.factionId,
|
||||
heroCount = stats.heroCount,
|
||||
troopCount = stats.troopCount,
|
||||
hostility = stats.hostility,
|
||||
hostility = HostilityConverter.toProto(stats.hostility),
|
||||
originProvinceId = stats.originProvinceId
|
||||
)
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ scala_library(
|
||||
"//src/main/scala/net/eagle0/eagle/library/settings:truce_gold_cost",
|
||||
"//src/main/scala/net/eagle0/eagle/library/util/view_filters:battalion_view_filter",
|
||||
"//src/main/scala/net/eagle0/eagle/library/util/view_filters:hero_view_filter",
|
||||
"//src/main/scala/net/eagle0/eagle/model/proto_converters:hostility_converter",
|
||||
"//src/main/scala/net/eagle0/eagle/model/proto_converters:quest_converter",
|
||||
"//src/main/scala/net/eagle0/eagle/model/proto_converters:unaffiliated_hero_converter",
|
||||
"//src/main/scala/net/eagle0/eagle/model/proto_converters/diplomacy_offer",
|
||||
|
||||
+1
-1
@@ -1,10 +1,10 @@
|
||||
package net.eagle0.eagle.model.state.command.available
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.eagle.{BattalionId, FactionId, HeroId, ProvinceId}
|
||||
import net.eagle0.eagle.model.state.command.common.*
|
||||
import net.eagle0.eagle.model.state.command.CommandType
|
||||
import net.eagle0.eagle.model.state.diplomacy_offer.status.Status
|
||||
import net.eagle0.eagle.model.state.Hostility
|
||||
import AvailableCommand.*
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,12 +17,12 @@ scala_library(
|
||||
"//src/test/scala/net/eagle0/eagle/model/state/command:__subpackages__",
|
||||
],
|
||||
exports = [
|
||||
"//src/main/protobuf/net/eagle0/common:hostility_scala_proto",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state:hostility",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/command:command_type",
|
||||
],
|
||||
deps = [
|
||||
"//src/main/protobuf/net/eagle0/common:hostility_scala_proto",
|
||||
"//src/main/scala/net/eagle0/eagle:eagle_pkg",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state:hostility",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/command:command_type",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/command/common",
|
||||
"//src/main/scala/net/eagle0/eagle/model/state/diplomacy_offer/status",
|
||||
|
||||
+6
-6
@@ -1,6 +1,5 @@
|
||||
package net.eagle0.eagle.library.actions.availability
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.eagle.{FactionId, RoundId}
|
||||
import net.eagle0.eagle.library.settings.{
|
||||
MinimumAgilityForArchery,
|
||||
@@ -26,6 +25,7 @@ import net.eagle0.eagle.model.state.province.concrete.ProvinceC
|
||||
import net.eagle0.eagle.model.state.province.Neighbor
|
||||
import net.eagle0.eagle.model.state.run_status.RunStatus
|
||||
import net.eagle0.eagle.model.state.BattalionTypeId
|
||||
import net.eagle0.eagle.model.state.Hostility
|
||||
import net.eagle0.eagle.model.state.RoundPhase
|
||||
import org.scalatest.flatspec.AnyFlatSpec
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
@@ -325,7 +325,7 @@ class AvailableAttackDecisionCommandFactoryTest extends AnyFlatSpec with Matcher
|
||||
factionId = defenderFid,
|
||||
heroCount = 3,
|
||||
troopCount = 2100,
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = defenderProvinceId
|
||||
)
|
||||
)
|
||||
@@ -378,7 +378,7 @@ class AvailableAttackDecisionCommandFactoryTest extends AnyFlatSpec with Matcher
|
||||
factionId = defenderFid,
|
||||
heroCount = 3,
|
||||
troopCount = 2700,
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = defenderProvinceId
|
||||
)
|
||||
)
|
||||
@@ -430,7 +430,7 @@ class AvailableAttackDecisionCommandFactoryTest extends AnyFlatSpec with Matcher
|
||||
factionId = defenderFid,
|
||||
heroCount = 3,
|
||||
troopCount = 1300,
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = defenderProvinceId
|
||||
)
|
||||
)
|
||||
@@ -443,7 +443,7 @@ class AvailableAttackDecisionCommandFactoryTest extends AnyFlatSpec with Matcher
|
||||
factionId = attackerFid,
|
||||
heroCount = 2,
|
||||
troopCount = 1000,
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = 19
|
||||
)
|
||||
)
|
||||
@@ -519,7 +519,7 @@ class AvailableAttackDecisionCommandFactoryTest extends AnyFlatSpec with Matcher
|
||||
factionId = anotherAttackerFid,
|
||||
heroCount = 1,
|
||||
troopCount = 120,
|
||||
hostility = Hostility.ALLIED_HOSTILITY,
|
||||
hostility = Hostility.Allied,
|
||||
originProvinceId = 20
|
||||
)
|
||||
)
|
||||
|
||||
+3
-3
@@ -1,6 +1,5 @@
|
||||
package net.eagle0.eagle.library.actions.availability
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.eagle.{FactionId, ProvinceId}
|
||||
import net.eagle0.eagle.library.settings.{
|
||||
MinimumAgilityForArchery,
|
||||
@@ -23,6 +22,7 @@ import net.eagle0.eagle.model.state.hero.concrete.HeroC
|
||||
import net.eagle0.eagle.model.state.province.concrete.ProvinceC
|
||||
import net.eagle0.eagle.model.state.run_status.RunStatus
|
||||
import net.eagle0.eagle.model.state.BattalionTypeId
|
||||
import net.eagle0.eagle.model.state.Hostility
|
||||
import net.eagle0.eagle.model.state.RoundPhase
|
||||
import org.scalatest.{BeforeAndAfterEach, Inside}
|
||||
import org.scalatest.flatspec.AnyFlatSpec
|
||||
@@ -153,14 +153,14 @@ class AvailableFreeForAllDecisionCommandFactoryTest
|
||||
factionId = actingFid,
|
||||
heroCount = 1,
|
||||
troopCount = 750,
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = 16
|
||||
),
|
||||
ArmyStats(
|
||||
factionId = otherFid,
|
||||
heroCount = 1,
|
||||
troopCount = 888,
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = 18
|
||||
)
|
||||
)
|
||||
|
||||
+9
-10
@@ -1,6 +1,5 @@
|
||||
package net.eagle0.eagle.library.util.command_choice_helpers
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.common.SeededRandom
|
||||
import net.eagle0.eagle.common.battalion_type.BattalionTypeId.LIGHT_INFANTRY
|
||||
import net.eagle0.eagle.common.combat_unit.CombatUnit
|
||||
@@ -16,11 +15,11 @@ import net.eagle0.eagle.library.settings.MinimumPercentageOfEnemyToAttack
|
||||
import net.eagle0.eagle.library.util.BattalionTypesTestData
|
||||
import net.eagle0.eagle.library.util.IDable.{mapifyBattalions, mapifyFactions, mapifyHeroes, mapifyProvinces}
|
||||
import net.eagle0.eagle.model.proto_converters.game_state.GameStateConverter
|
||||
import net.eagle0.eagle.model.state.command.available.AvailableCommand
|
||||
import net.eagle0.eagle.model.state.command.available.AvailableCommand.{ArmyStats, AttackDecisionAvailable}
|
||||
import net.eagle0.eagle.model.state.command.common.AttackDecisionType
|
||||
import net.eagle0.eagle.model.state.command.common.AttackDecisionType.{Advance, Withdraw}
|
||||
import net.eagle0.eagle.model.state.command.selected.SelectedCommand.AttackDecisionSelected
|
||||
import net.eagle0.eagle.model.state.Hostility
|
||||
import org.scalatest.flatspec.AnyFlatSpec
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.BeforeAndAfterEach
|
||||
@@ -138,14 +137,14 @@ class AttackDecisionCommandChooserTest extends AnyFlatSpec with Matchers with Be
|
||||
factionId = 1,
|
||||
heroCount = 2,
|
||||
troopCount = 2000, // Total troops from both armies
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = 5
|
||||
),
|
||||
ArmyStats(
|
||||
factionId = 2,
|
||||
heroCount = 1,
|
||||
troopCount = 800,
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = 6
|
||||
)
|
||||
),
|
||||
@@ -256,14 +255,14 @@ class AttackDecisionCommandChooserTest extends AnyFlatSpec with Matchers with Be
|
||||
factionId = 1,
|
||||
heroCount = 1,
|
||||
troopCount = 500,
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = 15
|
||||
),
|
||||
ArmyStats(
|
||||
factionId = 2,
|
||||
heroCount = 1,
|
||||
troopCount = 2000,
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = 16
|
||||
)
|
||||
),
|
||||
@@ -393,14 +392,14 @@ class AttackDecisionCommandChooserTest extends AnyFlatSpec with Matchers with Be
|
||||
factionId = 1,
|
||||
heroCount = 3,
|
||||
troopCount = 1800, // Total from all three armies
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = 25
|
||||
),
|
||||
ArmyStats(
|
||||
factionId = 2,
|
||||
heroCount = 1,
|
||||
troopCount = 1000,
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = 26
|
||||
)
|
||||
),
|
||||
@@ -534,14 +533,14 @@ class AttackDecisionCommandChooserTest extends AnyFlatSpec with Matchers with Be
|
||||
factionId = 1,
|
||||
heroCount = 3,
|
||||
troopCount = 600, // Total from all three small armies
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = 35
|
||||
),
|
||||
ArmyStats(
|
||||
factionId = 2,
|
||||
heroCount = 1,
|
||||
troopCount = 2000, // Very strong enemy
|
||||
hostility = Hostility.ENEMY_HOSTILITY,
|
||||
hostility = Hostility.Enemy,
|
||||
originProvinceId = 36
|
||||
)
|
||||
),
|
||||
|
||||
@@ -87,7 +87,6 @@ scala_test(
|
||||
name = "attack_decision_command_chooser_test",
|
||||
srcs = ["AttackDecisionCommandChooserTest.scala"],
|
||||
deps = [
|
||||
"//src/main/protobuf/net/eagle0/common:hostility_scala_proto",
|
||||
"//src/main/protobuf/net/eagle0/eagle/common:battalion_type_scala_proto",
|
||||
"//src/main/protobuf/net/eagle0/eagle/common:combat_unit_scala_proto",
|
||||
"//src/main/protobuf/net/eagle0/eagle/common:date_scala_proto",
|
||||
|
||||
+3
-3
@@ -1,6 +1,5 @@
|
||||
package net.eagle0.eagle.model.proto_converters.command.available
|
||||
|
||||
import net.eagle0.common.hostility.Hostility
|
||||
import net.eagle0.eagle.api.available_command as proto
|
||||
import net.eagle0.eagle.api.command.util.attack_decision_type.{DemandTributeDecision, SafePassageDecision}
|
||||
import net.eagle0.eagle.api.command.util.captured_hero_option.CapturedHeroOption as CapturedHeroOptionProto
|
||||
@@ -17,6 +16,7 @@ import net.eagle0.eagle.model.state.game_state.GameState
|
||||
import net.eagle0.eagle.model.state.hero.concrete.HeroC
|
||||
import net.eagle0.eagle.model.state.province.concrete.ProvinceC
|
||||
import net.eagle0.eagle.model.state.run_status.RunStatus
|
||||
import net.eagle0.eagle.model.state.Hostility
|
||||
import net.eagle0.eagle.model.state.RoundPhase
|
||||
import org.scalatest.flatspec.AnyFlatSpec
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
@@ -515,7 +515,7 @@ class AvailableCommandConverterTest extends AnyFlatSpec with Matchers with Befor
|
||||
factionId = factionId,
|
||||
heroCount = 3,
|
||||
troopCount = 100,
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = provinceId
|
||||
)
|
||||
),
|
||||
@@ -844,7 +844,7 @@ class AvailableCommandConverterTest extends AnyFlatSpec with Matchers with Befor
|
||||
factionId = factionId,
|
||||
heroCount = 2,
|
||||
troopCount = 80,
|
||||
hostility = Hostility.SELF_HOSTILITY,
|
||||
hostility = Hostility.Self,
|
||||
originProvinceId = provinceId
|
||||
)
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user