Skip to content

Commit

Permalink
Merge pull request #19 from 238SAMIxD/power-play
Browse files Browse the repository at this point in the history
[ Bug ] Elder power play
  • Loading branch information
Himyu authored Nov 3, 2023
2 parents 0d7aade + 70d0b4f commit 943cac0
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 @@ -957,6 +957,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 @@ -94,9 +94,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 @@ -332,6 +332,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 @@ -355,6 +356,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 943cac0

Please sign in to comment.