Skip to content

Commit

Permalink
Fixed Elder power play
Browse files Browse the repository at this point in the history
  • Loading branch information
238SAMIxD committed Oct 2, 2023
1 parent f69bb1f commit 70d0b4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Binary file modified frontend/gfx/img/elder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/gfx/ingame.css
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ body {
font-family: var(--primary-font-family);
font-weight: 900;
letter-spacing: 1.5px;
font-size: 20px;
}

/* --------------------------------- */
Expand Down
10 changes: 8 additions & 2 deletions frontend/gfx/ingame.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ function calcK(amount) {
case amount === undefined:
return 0
case amount > 1000:
return `${(amount / 1000).toFixed(1)} K`
return `${(amount / 1000).toFixed(1)}K`
case amount < -1000:
return `${(amount / 1000).toFixed(1)} K`
return `${(amount / 1000).toFixed(1)}K`
default:
return amount.toFixed(0)
}
Expand Down Expand Up @@ -329,6 +329,7 @@ function ppUpdate(e) {
const title = teamDiv.querySelector('.pp-text')
const timer = teamDiv.querySelector('.timer')
const gold = teamDiv.querySelector('h1')
const image = teamDiv.querySelector('img')

if (!e.ongoing) {
title.innerText = e.type
Expand All @@ -352,6 +353,11 @@ function ppUpdate(e) {
e.percent
}%, var(--background-light-color) ${e.percent + 3}%)`
}
if(e.type === 'Dragon') {
image.src = 'img/elder.png'
} else {
image.src = 'img/baron.png'
}

if (teamDiv.classList.contains('hide')) {
setTimeout(() => {
Expand Down

0 comments on commit 70d0b4f

Please sign in to comment.