more colors and keywords

This commit is contained in:
NilsUeter
2023-05-26 19:10:13 +02:00
parent 53cb17b27d
commit 85622ff429
4 changed files with 24 additions and 4 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ const getPrimaryColor = (catalog) => {
case "Imperium - Astra Militarum": case "Imperium - Astra Militarum":
return "#375441"; return "#375441";
case "Imperium - Grey Knights": case "Imperium - Grey Knights":
return "#465056"; return "#4a6672";
case "Imperium - Imperial Knights": case "Imperium - Imperial Knights":
return "#03495e"; return "#03495e";
case "Chaos - Daemons": case "Chaos - Daemons":
+1 -1
View File
@@ -863,7 +863,7 @@ const getOverridePrimary = (factions, keywords) => {
) )
return; return;
if (factions.has("Khorne") || keywords.has("Khorne")) return "#883531"; if (factions.has("Khorne") || keywords.has("Khorne")) return "#883531";
if (factions.has("Tzeentch") || keywords.has("Tzeentch")) return "#1f3d7a"; if (factions.has("Tzeentch") || keywords.has("Tzeentch")) return "#015d68";
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";
}; };
+17
View File
@@ -149,12 +149,29 @@ const Weapon = ({ weapon, modelStats, isMelee, className, forceRules }) => {
); );
replaceAbilityWithType( replaceAbilityWithType(
[ [
"Each time an attack is made with this weapon, an unmodified hit roll of 6 automatically wounds the target.",
"Each time an attack is made with this weapon profile, an unmodified hit roll of 6 automatically wounds the target.", "Each time an attack is made with this weapon profile, an unmodified hit roll of 6 automatically wounds the target.",
"Each unmodified hit roll of 6 made for this weapon's attacks automatically hits and results in a wound (do not make a wound roll for that attack).", "Each unmodified hit roll of 6 made for this weapon's attacks automatically hits and results in a wound (do not make a wound roll for that attack).",
], ],
"Lethal Hits", "Lethal Hits",
"Each time an attack is made with this weapon profile, an unmodified hit roll of 6 automatically wounds the target." "Each time an attack is made with this weapon profile, an unmodified hit roll of 6 automatically wounds the target."
); );
replaceAbilityWithType(
[
"When resolving an attack made with this weapon, an unmofidied hit roll of 6 scores 1 additional hit.",
"Each time an attack is made with this weapon, an unmodified hit roll of 6 scores 1 additional hits.",
],
"Sustained Hits 1",
"When resolving an attack made with this weapon, an unmofidied hit roll of 6 scores 1 additional hit."
);
replaceAbilityWithType(
[
"When resolving an attack made with this weapon, an unmofidied hit roll of 6 scores 2 additional hit.",
"Each time an attack is made with this weapon, an unmodified hit roll of 6 scores 2 additional hits.",
],
"Sustained Hits 2",
"When resolving an attack made with this weapon, an unmofidied hit roll of 6 scores 2 additional hit."
);
if ( if (
abilities?.includes( abilities?.includes(
+5 -2
View File
@@ -295,8 +295,11 @@ export class Unit extends BaseNotes {
normalize() { normalize() {
// Sort force units by role and name // Sort force units by role and name
this.models.sort(CompareModel); this.models.sort(CompareModel);
this.modelStats.sort((a, b) => { console.log(this.modelStats);
var wounds_order = parseInt(a.wounds) - parseInt(b.wounds); this.modelStats = this.modelStats.sort((a, b) => {
var wounds_order =
(isNaN(parseInt(a.wounds)) ? -1 : parseInt(a.wounds)) -
(isNaN(parseInt(b.wounds)) ? -1 : parseInt(b.wounds));
var leadership_order = parseInt(a.leadership) - parseInt(b.leadership); var leadership_order = parseInt(a.leadership) - parseInt(b.leadership);
var move_order = parseInt(a.move) - parseInt(b.move); var move_order = parseInt(a.move) - parseInt(b.move);
return ( return (