Skip to content

Commit

Permalink
Merge pull request #447 from scottbenton/fix/readd-adds
Browse files Browse the repository at this point in the history
Fix/readd adds
  • Loading branch information
scottbenton authored May 27, 2024
2 parents 327ec95 + ac68a0b commit 003fa5a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Added a match reminder to the roll display for oracle rolls that care about dice matching (ask the oracle moves)
- Added asset clock and counter controls working for assets that use them (ex: Snub Fighter Ability #3, or Marked Ability #2).
- Added scene challenges to Crew Link
- Added a new Hinterlands theme

### Changes

Expand All @@ -18,6 +19,7 @@

- Fixed "replaced" oracle tables not showing children
- Fixed "replaced" move tables showing up twice
- Fixed adds being removed from the move dialogs

## 3.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ export function MoveRollers(props: MoveRollersProps) {
(store) => store.campaigns.currentCampaign.currentCampaign?.conditionMeters
);

const hasCharacter = useStore(
(store) => !!store.characters.currentCharacter.currentCharacter
);
const adds = useStore(
(store) => store.characters.currentCharacter.currentCharacter?.adds ?? 0
);
const updateAdds = useStore(
(store) => store.characters.currentCharacter.updateCurrentCharacter
);

const getConditionMeterValue = (conditionMeterKey: string): number => {
const conditionMeter = conditionMeterRules[conditionMeterKey];

Expand Down Expand Up @@ -112,6 +122,15 @@ export function MoveRollers(props: MoveRollersProps) {
move={move}
/>
))}

{hasCharacter && (
<StatComponent
label={"Adds"}
updateTrack={(newValue) => updateAdds({ adds: newValue })}
value={adds}
sx={{ my: 0.5 }}
/>
)}
</Stack>
);
} else if (move.roll_type === "progress_roll") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function CharacterHeader() {
/>
</Box>
</Box>
{isMedium && (
{(isSmall || isMedium) && (
<Box
display={"flex"}
alignItems={"center"}
Expand Down

0 comments on commit 003fa5a

Please sign in to comment.