-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c60f09
commit 5ad7201
Showing
8 changed files
with
256 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/resources/static/js/dark-avarice.js → ...es/static/js/dark-avarice/dark-avarice.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* 주문서 버튼 | ||
*/ | ||
let darkAvariceTenPercentBtn = document.getElementById('dark-avarice-10-percent-button'); | ||
let darkAvariceSixtyPercentBtn = document.getElementById('dark-avarice-60-percent-button'); | ||
let darkAvariceHundredPercentBtn = document.getElementById('dark-avarice-100-percent-button'); | ||
let darkAvaricePriceResetBtn = document.getElementById('dark-avarice-price-reset-btn'); | ||
|
||
/** | ||
* 주문서 시도 횟수 | ||
*/ | ||
let darkAvariceTenTrial = 0; | ||
let darkAvariceSixtyTrial = 0; | ||
let darkAvariceHundredTrial = 0; | ||
|
||
/** | ||
* 주문서 버튼 클릭 로직 | ||
* 주문서 시도횟수가 증가한다. | ||
*/ | ||
darkAvariceTenPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
darkAvariceTenTrial++; | ||
recalculateDarkAvariceTotalPrice(); | ||
}) | ||
|
||
darkAvariceSixtyPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
darkAvariceSixtyTrial++; | ||
recalculateDarkAvariceTotalPrice(); | ||
}); | ||
|
||
darkAvariceHundredPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
darkAvariceHundredTrial++; | ||
recalculateDarkAvariceTotalPrice(); | ||
}); | ||
|
||
/** | ||
* 사용가격 리셋 | ||
*/ | ||
darkAvaricePriceResetBtn.addEventListener('click', function () { | ||
darkAvariceTenTrial = 0; | ||
darkAvariceSixtyTrial = 0; | ||
darkAvariceHundredTrial = 0; | ||
recalculateDarkAvariceTotalPrice(); | ||
}); | ||
|
||
function recalculateDarkAvariceTotalPrice() { | ||
let tenInputElem = document.getElementById('dark-avarice-10-price'); | ||
let sixtyInputElem = document.getElementById('dark-avarice-60-price'); | ||
let hundredInputElem = document.getElementById('dark-avarice-100-price'); | ||
let usedPriceElem = document.getElementById('dark-avarice-total-used-price'); | ||
|
||
let tenInput = parseInt(tenInputElem.value); | ||
let sixtyInput = parseInt(sixtyInputElem.value); | ||
let hundredInput = parseInt(hundredInputElem.value); | ||
|
||
usedPriceElem.textContent = ( | ||
tenInput * darkAvariceTenTrial + | ||
sixtyInput * darkAvariceSixtyTrial + | ||
hundredInput * darkAvariceHundredTrial | ||
).toLocaleString(); | ||
} | ||
|
||
function checkCanProceed() { | ||
let availableCount = document.getElementById('dark-avarice-upgrade-available-count'); | ||
let count = parseInt(availableCount.textContent); | ||
return count > 0; | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/static/js/evil-wings.js → ...ources/static/js/evil-wings/evil-wings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import * as util from "./util.js"; | ||
import * as util from "../util.js"; | ||
|
||
// 속성 값들 | ||
let defaultAtkSpeed = 4; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* 주문서 버튼 | ||
*/ | ||
let evilWingsTenPercentBtn = document.getElementById('evil-wings-10-percent-button'); | ||
let evilWingsSixtyPercentBtn = document.getElementById('evil-wings-60-percent-button'); | ||
let evilWingsHundredPercentBtn = document.getElementById('evil-wings-100-percent-button'); | ||
let evilWingsResetBtn = document.getElementById('evil-wings-price-reset-btn'); | ||
|
||
/** | ||
* 주문서 시도 횟수 | ||
*/ | ||
let evilWingsTenTrial = 0; | ||
let evilWingsSixtyTrial = 0; | ||
let evilWingsHundredTrial = 0; | ||
|
||
/** | ||
* 주문서 버튼 클릭 로직 | ||
* 주문서 시도횟수가 증가한다. | ||
*/ | ||
evilWingsTenPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
evilWingsTenTrial++; | ||
recalculateEvilWingsTotalPrice(); | ||
}); | ||
|
||
evilWingsSixtyPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
evilWingsSixtyTrial++; | ||
recalculateEvilWingsTotalPrice(); | ||
}); | ||
|
||
evilWingsHundredPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
evilWingsHundredTrial++; | ||
recalculateEvilWingsTotalPrice(); | ||
}); | ||
|
||
/** | ||
* 사용가격 리셋 | ||
*/ | ||
evilWingsResetBtn.addEventListener('click', function () { | ||
evilWingsTenTrial = 0; | ||
evilWingsSixtyTrial = 0; | ||
evilWingsHundredTrial = 0; | ||
recalculateEvilWingsTotalPrice(); | ||
}); | ||
|
||
function recalculateEvilWingsTotalPrice() { | ||
let tenInputElem = document.getElementById('evil-wings-10-price'); | ||
let sixtyInputElem = document.getElementById('evil-wings-60-price'); | ||
let hundredInputElem = document.getElementById('evil-wings-100-price'); | ||
let usedPriceElem = document.getElementById('evil-wings-total-used-price'); | ||
|
||
let tenInput = parseInt(tenInputElem.value); | ||
let sixtyInput = parseInt(sixtyInputElem.value); | ||
let hundredInput = parseInt(hundredInputElem.value); | ||
|
||
usedPriceElem.textContent = ( | ||
tenInput * evilWingsTenTrial + | ||
sixtyInput * evilWingsSixtyTrial + | ||
hundredInput * evilWingsHundredTrial | ||
).toLocaleString(); | ||
} | ||
|
||
function checkCanProceed() { | ||
let availableCount = document.getElementById('evil-wings-upgrade-available-count'); | ||
let count = parseInt(availableCount.textContent); | ||
return count > 0; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* 주문서 버튼 | ||
*/ | ||
let workGloveTenPercentBtn = document.getElementById('work-glove-10-percent-button'); | ||
let workGloveSixtyPercentBtn = document.getElementById('work-glove-60-percent-button'); | ||
let workGloveHundredPercentBtn = document.getElementById('work-glove-100-percent-button'); | ||
let workGlovePriceResetBtn = document.getElementById('work-glove-price-reset-btn'); | ||
|
||
/** | ||
* 주문서 시도 횟수 | ||
*/ | ||
let workGloveTenTrial = 0; | ||
let workGloveSixtyTrial = 0; | ||
let workGloveHundredTrial = 0; | ||
|
||
/** | ||
* 주문서 버튼 클릭 로직 | ||
* 주문서 시도횟수가 증가한다. | ||
*/ | ||
workGloveTenPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
workGloveTenTrial++; | ||
recalculateWorkGloveTotalPrice(); | ||
}); | ||
|
||
workGloveSixtyPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
workGloveSixtyTrial++; | ||
recalculateWorkGloveTotalPrice(); | ||
}); | ||
|
||
workGloveHundredPercentBtn.addEventListener('click', function () { | ||
if (!checkCanProceed()) return; | ||
workGloveHundredTrial++; | ||
recalculateWorkGloveTotalPrice(); | ||
}); | ||
|
||
/** | ||
* 사용가격 리셋 | ||
*/ | ||
workGlovePriceResetBtn.addEventListener('click', function () { | ||
workGloveTenTrial = 0; | ||
workGloveSixtyTrial = 0; | ||
workGloveHundredTrial = 0; | ||
recalculateWorkGloveTotalPrice(); | ||
}); | ||
|
||
function recalculateWorkGloveTotalPrice() { | ||
let tenInputElem = document.getElementById('work-glove-10-price'); | ||
let sixtyInputElem = document.getElementById('work-glove-60-price'); | ||
let hundredInputElem = document.getElementById('work-glove-100-price'); | ||
let usedPriceElem = document.getElementById('work-glove-total-used-price'); | ||
|
||
let tenInput = parseInt(tenInputElem.value); | ||
let sixtyInput = parseInt(sixtyInputElem.value); | ||
let hundredInput = parseInt(hundredInputElem.value); | ||
|
||
usedPriceElem.textContent = ( | ||
tenInput * workGloveTenTrial + | ||
sixtyInput * workGloveSixtyTrial + | ||
hundredInput * workGloveHundredTrial | ||
).toLocaleString(); | ||
} | ||
|
||
function checkCanProceed() { | ||
let availableCount = document.getElementById('work-glove-upgrade-available-count'); | ||
let count = parseInt(availableCount.textContent); | ||
return count > 0; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters