소스 검색

Fix global prod bonuses messing up percentages

tags/v0.0.2
Fen Dweller 5 년 전
부모
커밋
17a0e288ad
1개의 변경된 파일14개의 추가작업 그리고 6개의 파일을 삭제
  1. +14
    -6
      gorge.js

+ 14
- 6
gorge.js 파일 보기

@@ -17,18 +17,24 @@ let clickBonus = 0;

let lastTime = 0;

function calculateProductivity() {
let productivity = 0;
for (const [key, value] of Object.entries(belongings)) {
productivity += productivityOf(key);
}

function applyGlobalProdBonuses(productivity) {
for (let effect of effects["prod-all"]) {

if (ownedUpgrades[effect.parent]) {
productivity = effect.apply(productivity);
}
}

return productivity;
}

function calculateProductivity() {
let productivity = 0;

for (const [key, value] of Object.entries(belongings)) {
productivity += productivityOf(key);
}

return productivity;
}

@@ -59,6 +65,8 @@ function productivityOf(type) {

let prod = baseProd * productivityMultiplierOf(type);

prod = applyGlobalProdBonuses(prod);

return prod * belongings[type].count;
}



불러오는 중...
취소
저장