Astra Militarum fixes
This commit is contained in:
+1
-1
@@ -240,7 +240,7 @@ const getPrimaryColor = (catalog) => {
|
||||
return "#536766";
|
||||
case "Adeptus Mechanicus":
|
||||
return "#536766";
|
||||
case "Astra Militarum":
|
||||
case "Imperium - Astra Militarum":
|
||||
return "#375441";
|
||||
case "Chaos - Daemons":
|
||||
return "#383c46";
|
||||
|
||||
+5
-6
@@ -76,10 +76,7 @@ const Unit = ({ unit, index, catalog, onePerPage }) => {
|
||||
} = unit;
|
||||
|
||||
const meleeWeapons = weapons
|
||||
.filter(
|
||||
(weapon) =>
|
||||
weapon.range === "Melee" && weapon.range !== "-" && weapon.range !== ""
|
||||
)
|
||||
.filter((weapon) => weapon.range === "Melee" || weapon.type === "Melee")
|
||||
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
||||
if (meleeWeapons.length === 0) {
|
||||
meleeWeapons.push({
|
||||
@@ -100,7 +97,10 @@ const Unit = ({ unit, index, catalog, onePerPage }) => {
|
||||
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
||||
|
||||
const weaponDescriptions = weapons
|
||||
.filter((weapon) => weapon.range === "-" || weapon.range === "")
|
||||
.filter(
|
||||
(weapon) =>
|
||||
(weapon.range === "-" || weapon.range === "") && weapon.abilities
|
||||
)
|
||||
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
||||
const modelsWithDifferentProfiles = weapons.filter(
|
||||
(weapon) =>
|
||||
@@ -819,5 +819,4 @@ const getOverridePrimary = (factions, keywords) => {
|
||||
if (factions.has("Tzeentch") || keywords.has("Tzeentch")) return "#1f3d7a";
|
||||
if (factions.has("Nurgle") || keywords.has("Nurgle")) return "#5c672b";
|
||||
if (factions.has("Slaanesh") || keywords.has("Slaanesh")) return "#634c74";
|
||||
console.log(factions);
|
||||
};
|
||||
|
||||
@@ -97,6 +97,17 @@ const Weapon = ({ weapon, modelStats, isMelee, className }) => {
|
||||
type = "Plague Weapon";
|
||||
}
|
||||
}
|
||||
if (abilities?.toLowerCase().includes("turret weapon")) {
|
||||
abilities = abilities
|
||||
.replaceAll("Turret weapon.", "")
|
||||
.replaceAll("Turret Weapon", "")
|
||||
.replaceAll("Turret weapon", "");
|
||||
if (type) {
|
||||
type += ", Turret weapon";
|
||||
} else {
|
||||
type = "Turret weapon";
|
||||
}
|
||||
}
|
||||
/* if (
|
||||
abilities?.includes(
|
||||
"Each time an attack made with this weapon targets an enemy within half range, that attack has a Damage characteristic of D6+2."
|
||||
|
||||
Reference in New Issue
Block a user