Skip to content

Commit a61d7d1

Browse files
committed
Fix to jokers
1 parent 275c82f commit a61d7d1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jam-25/src/routes/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const App = () => {
155155
const validScore = await newWords.filter((w) => w.valid).reduce(async (promise, w) => promise.then(async (last) => last + await scoreWord(w, scoreRound)), Promise.resolve(0));
156156
const invalidScore = await newWords.filter((w) => !w.valid).reduce(async (promise, w) => promise.then(async (last) => last + await scoreWord(w, scoreRound)), Promise.resolve(0));
157157
let currentScore = validScore - invalidScore;
158-
await Promise.all(jokers.filter((j) => j.action).map(async (j) => {
158+
await Promise.all(jokers.filter((j) => j.props?.joker?.action).map(async (j) => {
159159
const { newScore, newMoney, delta } = j.props?.joker?.action?.({ words: [...words, newWords], grid: gridArray, totalScore: currentScore, validScore, invalidScore, target, funds }) ?? { newScore: currentScore, newMoney: 0, delta: 0 };
160160
await new Promise((resolve) => setTimeout(() => {
161161
setScoringTiles((old) => [...old, { id: j.props?.id, score: delta, placement: 'bottom', newMoney: newMoney ?? 0, scoreRound }]);

jam-25/src/upgrades.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ export const JOKERS = [
182182
validScore,
183183
invalidScore
184184
}) => {
185-
const newValid = validScore * 3;
186-
const newInvalid = invalidScore * 3;
185+
const newValid = validScore * 2;
186+
const newInvalid = invalidScore * 2;
187187
return {
188188
newScore: totalScore + (newValid - newInvalid),
189189
delta: (newValid - newInvalid),

0 commit comments

Comments
 (0)