src/utils/faith.ts
Function faithBonusClick
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function faithBonusClick(playerCiv:Civilization) {
//playerCiv.faithPM += 30;
//updateFaithElts();
let fbs = document.querySelectorAll('.faith-bonus');
[].forEach.call(fbs, function (item:any) {
Avoid deeply nested control flow statements. Open
Open
if (playerCiv.faithBonusPantheonTotal >= playerCiv.faithBonusPantheonLimit) {
console.log('disability/ability check for religion');
disableBonuses(FaithTier.Pantheon);
enableBonuses(FaithTier.Organized);
}