Astra Militarum fixes
This commit is contained in:
+1
-1
@@ -240,7 +240,7 @@ const getPrimaryColor = (catalog) => {
|
|||||||
return "#536766";
|
return "#536766";
|
||||||
case "Adeptus Mechanicus":
|
case "Adeptus Mechanicus":
|
||||||
return "#536766";
|
return "#536766";
|
||||||
case "Astra Militarum":
|
case "Imperium - Astra Militarum":
|
||||||
return "#375441";
|
return "#375441";
|
||||||
case "Chaos - Daemons":
|
case "Chaos - Daemons":
|
||||||
return "#383c46";
|
return "#383c46";
|
||||||
|
|||||||
+5
-6
@@ -76,10 +76,7 @@ const Unit = ({ unit, index, catalog, onePerPage }) => {
|
|||||||
} = unit;
|
} = unit;
|
||||||
|
|
||||||
const meleeWeapons = weapons
|
const meleeWeapons = weapons
|
||||||
.filter(
|
.filter((weapon) => weapon.range === "Melee" || weapon.type === "Melee")
|
||||||
(weapon) =>
|
|
||||||
weapon.range === "Melee" && weapon.range !== "-" && weapon.range !== ""
|
|
||||||
)
|
|
||||||
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
||||||
if (meleeWeapons.length === 0) {
|
if (meleeWeapons.length === 0) {
|
||||||
meleeWeapons.push({
|
meleeWeapons.push({
|
||||||
@@ -100,7 +97,10 @@ const Unit = ({ unit, index, catalog, onePerPage }) => {
|
|||||||
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
||||||
|
|
||||||
const weaponDescriptions = weapons
|
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));
|
.sort((a, b) => a.selectionName.localeCompare(b.selectionName));
|
||||||
const modelsWithDifferentProfiles = weapons.filter(
|
const modelsWithDifferentProfiles = weapons.filter(
|
||||||
(weapon) =>
|
(weapon) =>
|
||||||
@@ -819,5 +819,4 @@ const getOverridePrimary = (factions, keywords) => {
|
|||||||
if (factions.has("Tzeentch") || keywords.has("Tzeentch")) return "#1f3d7a";
|
if (factions.has("Tzeentch") || keywords.has("Tzeentch")) return "#1f3d7a";
|
||||||
if (factions.has("Nurgle") || keywords.has("Nurgle")) return "#5c672b";
|
if (factions.has("Nurgle") || keywords.has("Nurgle")) return "#5c672b";
|
||||||
if (factions.has("Slaanesh") || keywords.has("Slaanesh")) return "#634c74";
|
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";
|
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 (
|
/* if (
|
||||||
abilities?.includes(
|
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."
|
"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