Skip to content

Commit

Permalink
fix: [#279, #280] Fixed XP & Noise bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
annabranco committed Feb 26, 2021
1 parent 3a096e2 commit 0823e1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Sections/PlayersSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ const PlayersSection = ({
(char.actionsLeft && [...char.actionsLeft]) || [...char.actions]
);
} else if (updatedChar.abilities.length === 1) {
return null;
return updatedChar;
} else {
updatedChar.abilities = [];
updatedChar.actions = [3, 0, [0, 0, 0], 0, 0];
Expand Down Expand Up @@ -923,7 +923,7 @@ const PlayersSection = ({
const setNoise = (noise = 1) => {
const updatedCharacter = cloneDeep(character);
updatedCharacter.noise += noise;
// updateData(updatedCharacter); TOFIX
updateData(updatedCharacter);
};

/* --- */
Expand Down Expand Up @@ -2189,7 +2189,7 @@ const PlayersSection = ({
{canMove && character.location !== CAR && (
<ActionButton
actionType={MOVE_ACTION}
// callback={() => spendAction(MOVE)}
callback={() => spendAction(MOVE)}
changeActionLabel={changeActionLabel}
isMobile={device.current === MOBILE}
label={MOVE}
Expand Down
1 change: 1 addition & 0 deletions src/components/SoundBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const SoundBlock = ({
}, 4000);
}
};

useEffect(() => {
if (!sound.current || currentRound.current !== round) {
sound.current = new Audio(
Expand Down

0 comments on commit 0823e1a

Please sign in to comment.