summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--battles/src/Builder.cpp7
-rw-r--r--battles/src/scenarios.cpp34
-rw-r--r--universe/include/kurator/universe/ShipType.h1
-rw-r--r--universe/src/SampleRepository.cpp8
4 files changed, 28 insertions, 22 deletions
diff --git a/battles/src/Builder.cpp b/battles/src/Builder.cpp
index 4ead634..d7cc893 100644
--- a/battles/src/Builder.cpp
+++ b/battles/src/Builder.cpp
@@ -30,7 +30,12 @@ Builder::operator()(const universe::ShipType& ship_type, const int team) const
registry.emplace<universe::ShipType>(entity, ship_type);
registry.emplace<Team>(entity, team);
registry.emplace<Transform>(entity, spawner.get(team));
- registry.emplace<FloatingMovement>(entity, 0.5, 2.0, 3.0, 0.1);
+ registry.emplace<FloatingMovement>(
+ entity,
+ ship_type.max_speed,
+ ship_type.max_speed * 2.0,
+ ship_type.max_speed * 3.0,
+ 100.0);
registry.emplace<AIState>(entity, Point{0.0, 0.0});
registry.emplace<HitPoints>(entity, ship_type.base_health_points);
return entity;
diff --git a/battles/src/scenarios.cpp b/battles/src/scenarios.cpp
index 7a79942..34b4a24 100644
--- a/battles/src/scenarios.cpp
+++ b/battles/src/scenarios.cpp
@@ -15,24 +15,24 @@ Scenario
example()
{
return {
- "example",
+ "Example",
{
- {0, "halo", {"cannon"}},
- {0, "halo", {"cannon"}},
- {0, "cube", {"cannon", "cannon"}},
- {0, "cube", {"cannon", "cannon"}},
- {0, "cube", {"cannon", "cannon"}},
- {0, "bell", {"cannon"}},
- {0, "bell", {"cannon"}},
- {0, "bell", {"cannon"}},
- {1, "halo", {"cannon"}},
- {1, "halo", {"cannon"}},
- {1, "bell", {"cannon"}},
- {1, "cube", {"cannon", "cannon"}},
- {1, "cube", {"cannon", "cannon"}},
- {1, "cube", {"cannon", "cannon"}},
- {1, "bell", {"cannon"}},
- {1, "bell", {"cannon"}},
+ {0, "Anvil", {"ChargeLaser", "ChargeLaser"}},
+ {0, "Anvil", {"ChargeLaser", "ChargeLaser"}},
+ {0, "Anvil", {"ChargeLaser", "ChargeLaser"}},
+ {0, "Warbringer", {"ChargeLaser"}},
+ {0, "Warbringer", {"ChargeLaser"}},
+ {0, "Eclipse", {"ChargeLaser"}},
+ {0, "Eclipse", {"ChargeLaser"}},
+ {0, "Eclipse", {"ChargeLaser"}},
+ {1, "Anvil", {"ChargeLaser", "ChargeLaser"}},
+ {1, "Anvil", {"ChargeLaser", "ChargeLaser"}},
+ {1, "Anvil", {"ChargeLaser", "ChargeLaser"}},
+ {1, "Warbringer", {"ChargeLaser"}},
+ {1, "Warbringer", {"ChargeLaser"}},
+ {1, "Eclipse", {"ChargeLaser"}},
+ {1, "Eclipse", {"ChargeLaser"}},
+ {1, "Eclipse", {"ChargeLaser"}},
},
};
}
diff --git a/universe/include/kurator/universe/ShipType.h b/universe/include/kurator/universe/ShipType.h
index 5f5eec1..fccf970 100644
--- a/universe/include/kurator/universe/ShipType.h
+++ b/universe/include/kurator/universe/ShipType.h
@@ -13,6 +13,7 @@ struct ShipType
{
std::string name;
double base_health_points;
+ double max_speed;
};
diff --git a/universe/src/SampleRepository.cpp b/universe/src/SampleRepository.cpp
index 2886e3d..31f7807 100644
--- a/universe/src/SampleRepository.cpp
+++ b/universe/src/SampleRepository.cpp
@@ -16,14 +16,14 @@ namespace universe
static const std::unordered_map<std::string, ShipType> ships {
- {"cube", {"Cube", 10.0}},
- {"halo", {"Halo", 4.0}},
- {"bell", {"Bell", 18.0}},
+ {"Anvil", {"Anvil", 600.0, 218.0}},
+ {"Eclipse", {"Eclipse", 600.0, 263.0}},
+ {"Warbringer", {"Warbringer", 600.0, 336.0}},
};
static const std::unordered_map<std::string, TurretType> turrets {
- {"cannon", {"Cannon", 1.0, 1.0, 1.5, 0.5, 0.2}},
+ {"ChargeLaser", {"ChargeLaser", 85.0, 4.5, 7000.0, 0.05, 0.2}},
};