Skip to content

Commit

Permalink
fix lich and add gameEffects to replay
Browse files Browse the repository at this point in the history
  • Loading branch information
Await-0x committed Mar 4, 2025
1 parent 7f1796c commit cb53c53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/battle/summonUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const summonEffect = ({
else if (creature.cardId === 18) {
if (magicalCount > 0) {
increaseEnergy(1);
healHero(1);
healHero(2);
}
}

Expand Down
9 changes: 7 additions & 2 deletions client/src/contexts/replayContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const ReplayProvider = ({ children }) => {

battle.utils.resetBattleState()
game.endGame()

navigate('/')
}

Expand All @@ -109,7 +109,7 @@ export const ReplayProvider = ({ children }) => {
}
}

const spectateGame = (game) => {
const spectateGame = (game) => {
setSpectatingGame(game)
}

Expand All @@ -131,6 +131,11 @@ export const ReplayProvider = ({ children }) => {
}
}

const gameEffects = events.find(e => e.componentName === 'GameEffects')
if (gameEffects) {
game.setGameEffects(gameEffects)
}

const draftValues = events.find(e => e.componentName === 'Draft')
if (draftValues) {
draft.update.setCards(draftValues.cards.map(card => CARD_DETAILS(card)))
Expand Down

0 comments on commit cb53c53

Please sign in to comment.