From 12ae008e9cdeba069625b25f5ebdb5d02ec5f046 Mon Sep 17 00:00:00 2001 From: NilsUeter Date: Tue, 6 Jun 2023 17:00:54 +0200 Subject: [PATCH] fixed firefox issue, more weapon abilities --- src/Roster.jsx | 15 +++++++++++++-- src/Weapons.jsx | 16 +++++++++++++++- src/index.css | 4 ---- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/Roster.jsx b/src/Roster.jsx index 530547b..ca3e4c8 100644 --- a/src/Roster.jsx +++ b/src/Roster.jsx @@ -264,7 +264,11 @@ const Unit = ({ unit, index, catalog, onePerPage, forceRules }) => { }} > - +
{ />
- +
{weaponDescriptions.map((weapon, index) => ( @@ -603,6 +611,7 @@ const FancyBox = ({ children }) => { const Psykers = ({ title, psykers }) => { return (
@@ -674,6 +683,7 @@ const WoundTracker = ({ woundTracker }) => { }} >
@@ -709,6 +719,7 @@ const WoundTracker = ({ woundTracker }) => { const Spells = ({ title, spells }) => { return (
diff --git a/src/Weapons.jsx b/src/Weapons.jsx index fee6449..8e748b3 100644 --- a/src/Weapons.jsx +++ b/src/Weapons.jsx @@ -67,7 +67,7 @@ const Weapon = ({ weapon, modelStats, isMelee, className, forceRules }) => { } const differentProfiles = selectionName && - selectionName !== name && + selectionName.toLowerCase() !== name.toLowerCase() && !name.includes("(Shooting)") && !name.includes("(Melee)"); @@ -113,6 +113,7 @@ const Weapon = ({ weapon, modelStats, isMelee, className, forceRules }) => { [ "Each time an attack is made with this weapon, that attack automatically hits the target.", "This weapon automatically hits its target.", + "This weapon automatically hits its targets.", "When resolving an attack made with this weapon, do not make a hit roll: it automatically scores a hit.", ], "Torrent", @@ -123,6 +124,13 @@ const Weapon = ({ weapon, modelStats, isMelee, className, forceRules }) => { "Indirect Fire", "This weapon can target units that are not visible to the bearer." ); + replaceAbilityWithType( + [ + "Each time an attack is made with this weapon, the target does not receive the benefits of cover against that attack.", + ], + "Ignores Cover", + "Each time an attack is made with this weapon, the target does not receive the benefits of cover against that attack." + ); replaceAbilityWithType( [ "The bearer can only shoot with this weapon once per battle.", @@ -300,6 +308,9 @@ const Weapon = ({ weapon, modelStats, isMelee, className, forceRules }) => { abilities?.includes( "Each time an attack is made wit this weapon profile, make 2 hit rolls instead of 1." ) || + abilities?.includes( + "Each time an attack is made with this profile, make 2 hit rolls instead of 1." + ) || abilities?.includes( "Make 2 hit rolls for each attack made with this profile, instead of 1" ) @@ -321,6 +332,9 @@ const Weapon = ({ weapon, modelStats, isMelee, className, forceRules }) => { "Each time an attack is made wit this weapon profile, make 2 hit rolls instead of 1.", "" ) + .replaceAll( + "Each time an attack is made with this profile, make 2 hit rolls instead of 1." + ) .replaceAll( "Make 2 hit rolls for each attack made with this profile, instead of 1", "" diff --git a/src/index.css b/src/index.css index a5118ea..87f3530 100644 --- a/src/index.css +++ b/src/index.css @@ -127,10 +127,6 @@ button:focus-visible { border-radius: 8px; } -.weapons-table { - border-collapse: collapse; -} - .weapons-table th { font-size: 1.1em; padding: 2px 6px;