diff --git a/data/weapons.yml b/data/weapons.yml index 823a598..d3472d6 100644 --- a/data/weapons.yml +++ b/data/weapons.yml @@ -82,26 +82,26 @@ weapons: accuracy: "【MIG + MIG】" damage: "【HR + 10】 physical" category: "heavy" - description: One-handed w Melee w No Quality. + description: One-handed, Melee, No Quality. - name: Waraxe ✦ cost: 250 accuracy: "【MIG + MIG】" damage: "【HR + 14】 physical" category: "heavy" - description: Two-handed w Melee w No Quality. + description: Two-handed, Melee, No Quality. - name: Light Spear ✦ cost: 200 accuracy: "【DEX + MIG】" damage: "【HR + 8】 physical" category: "spear" - description: One-handed w Melee w No Quality. + description: One-handed, Melee, No Quality. - name: Heavy Spear ✦ cost: 200 accuracy: "【DEX + MIG】 【HR + 12】 physical" - damage: "Two-handed w Melee w No Quality." + damage: "Two-handed, Melee, No Quality." category: "spear" description: @@ -110,40 +110,40 @@ weapons: accuracy: "【DEX + MIG】 +1" damage: "【HR + 6】 physical" category: "sword" - description: One-handed w Melee w No Quality. + description: One-handed, Melee, No Quality. - name: Greatsword ✦ cost: 200 accuracy: "【DEX + MIG】 +1" damage: "【HR + 10】 physical" category: "sword" - description: Two-handed w Melee w No Quality. + description: Two-handed, Melee, No Quality. - name: Katana ✦ cost: 200 accuracy: "【DEX + INS】 +1" damage: "【HR + 10】 physical" category: "sword" - description: Two-handed w Melee w No Quality. + description: Two-handed, Melee, No Quality. - name: Rapier ✦ cost: 200 accuracy: "【DEX + INS】 +1" damage: "【HR + 6】 physical" category: "sword" - description: One-handed w Melee w No Quality. + description: One-handed, Melee, No Quality. - name: Improvised (Ranged) cost: 0 accuracy: "【DEX + MIG】" damage: "【HR + 2】 physical" category: "thrown" - description: One-handed w Ranged w Breaks after the attack. + description: One-handed, Ranged, Breaks after the attack. - name: Shuriken cost: 150 accuracy: "【DEX + INS】" damage: "【HR + 4】 physical" category: "thrown" - description: One-handed w Ranged w No Quality. + description: One-handed, Ranged, No Quality. diff --git a/src/CharacterSheet.tsx b/src/CharacterSheet.tsx index 6e5de3b..a02900e 100644 --- a/src/CharacterSheet.tsx +++ b/src/CharacterSheet.tsx @@ -6,12 +6,20 @@ import weaponsFile from "../data/weapons.yml"; const STATUSES = ["Slow", "Enraged", "Dazed", "Weak", "Poisoned", "Shaken"]; const FEELINGS = [ "Admiration", - "Inferiority", "Loyalty", + "Hatred", + "Inferiority", "Mistrust", "Affection", - "Hatred", ]; +const MUTUAL_EXCLUSIVE: Record = { + Admiration: "Inferiority", + Inferiority: "Admiration", + Loyalty: "Mistrust", + Mistrust: "Loyalty", + Hatred: "Affection", + Affection: "Hatred", +}; const MARTIAL_ITEMS = [ "Martial Armor", "Martial Shields", @@ -581,11 +589,13 @@ export default function CharacterSheet() { prev.map((b, i) => { if (i !== bondIdx) return b; const has = b.feelings.includes(feeling); + const partner = MUTUAL_EXCLUSIVE[feeling]; + if (!has && partner && b.feelings.includes(partner)) return b; return { ...b, feelings: has ? b.feelings.filter((f) => f !== feeling) - : [...b.feelings, feeling], + : [...b.feelings.filter((f) => f !== partner), feeling], }; }), ); @@ -1039,18 +1049,26 @@ export default function CharacterSheet() { />
- {FEELINGS.map((feeling) => ( -
toggleFeeling(idx, feeling)} - > -
- {bond.feelings.includes(feeling) ? "✓" : ""} + {FEELINGS.map((feeling) => { + const isActive = bond.feelings.includes(feeling); + const isDisabled = + !isActive && + bond.feelings.includes(MUTUAL_EXCLUSIVE[feeling]); + return ( +
+ !isDisabled && toggleFeeling(idx, feeling) + } + > +
+ {isActive ? "✓" : ""} +
+ {feeling}
- {feeling} -
- ))} + ); + })}
))} diff --git a/src/fabula-ultima-sheet.css b/src/fabula-ultima-sheet.css index 16fe2e4..a9334b7 100644 --- a/src/fabula-ultima-sheet.css +++ b/src/fabula-ultima-sheet.css @@ -582,6 +582,11 @@ input[type="number"] { color: var(--teal); } +.bond-feeling.disabled { + opacity: 0.3; + cursor: not-allowed; +} + .bond-feeling-box { width: 12px; height: 12px;