Skip to content

Commit

Permalink
Merge pull request #39 from Tendsty/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Tendsty authored Nov 14, 2023
2 parents 2f8e7b3 + bc771a2 commit ca67867
Show file tree
Hide file tree
Showing 40 changed files with 585 additions and 257 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gooboo",
"version": "1.4.0",
"version": "1.4.1",
"description": "An idle game",
"author": "Tendsty",
"main": "main.js",
Expand Down
2 changes: 1 addition & 1 deletion public/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
1.4.1
8 changes: 4 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
.theme--light .bg-tile-background {
background-color: #FFFFFF80;
}
.css-shadow-2 .balloon-text-black, .css-shadow-2.theme--dark .balloon-text-dynamic {
.css-shadow-2 .balloon-text-black, .css-shadow-2.theme--dark .balloon-text-dynamic, .css-shadow-2.theme--light .balloon-text-inverted {
text-shadow: -1px 0 0 #000000, 1px 0 0 #000000, 0 -1px 0 #000000, 0 1px 0 #000000, 1px 1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000, -1px -1px 0 #000000, 0 0 1px #000000, 0 0 2px #000000, 0 0 3px #000000, 0 0 4px #000000;
}
.css-shadow-2 .balloon-text-white, .css-shadow-2.theme--light .balloon-text-dynamic {
.css-shadow-2 .balloon-text-white, .css-shadow-2.theme--light .balloon-text-dynamic, .css-shadow-2.theme--dark .balloon-text-inverted {
text-shadow: -1px 0 0 #FFFFFF, 1px 0 0 #FFFFFF, 0 -1px 0 #FFFFFF, 0 1px 0 #FFFFFF, 1px 1px 0 #FFFFFF, 1px -1px 0 #FFFFFF, -1px 1px 0 #FFFFFF, -1px -1px 0 #FFFFFF, 0 0 1px #FFFFFF, 0 0 2px #FFFFFF, 0 0 3px #FFFFFF, 0 0 4px #FFFFFF;
}
.css-shadow-1 .balloon-text-black, .css-shadow-1.theme--dark .balloon-text-dynamic {
.css-shadow-1 .balloon-text-black, .css-shadow-1.theme--dark .balloon-text-dynamic, .css-shadow-1.theme--light .balloon-text-inverted {
text-shadow: -2px 0 0 #000000, -1px -1px 0 #000000, 0 -2px 0 #000000, 1px -1px 0 #000000, 2px 0 0 #000000, 1px 1px 0 #000000, 0 2px 0 #000000, -1px 1px 0 #000000;
}
.css-shadow-1 .balloon-text-white, .css-shadow-1.theme--light .balloon-text-dynamic {
.css-shadow-1 .balloon-text-white, .css-shadow-1.theme--light .balloon-text-dynamic, .css-shadow-1.theme--dark .balloon-text-inverted {
text-shadow: -2px 0 0 #FFFFFF, -1px -1px 0 #FFFFFF, 0 -2px 0 #FFFFFF, 1px -1px 0 #FFFFFF, 2px 0 0 #FFFFFF, 1px 1px 0 #FFFFFF, 0 2px 0 #FFFFFF, -1px 1px 0 #FFFFFF;
}
.selected-primary {
Expand Down
4 changes: 2 additions & 2 deletions src/components/partial/mining/PrestigeStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<script>
import { mapGetters, mapState } from 'vuex';
import { MINING_DWELLER_OVERCAP_MULT } from '../../../js/constants';
import { MINING_DWELLER_OVERCAP_MULT, MINING_DWELLER_OVERFLOW } from '../../../js/constants';
import PriceTag from '../../render/PriceTag.vue';
import StatusTemplate from '../prestige/StatusTemplate.vue';
import AlertText from '../render/AlertText.vue';
Expand Down Expand Up @@ -130,7 +130,7 @@ export default {
current += 0.5;
const currentFloored = Math.floor(current * 2) / 2;
const bonusPercent = baseValue > 0 ? (currentFloored / maxValue) : 1;
const dwellerSpeed = 0.1 * this.$store.getters['mult/get']('miningDepthDwellerSpeed') / max;
const dwellerSpeed = MINING_DWELLER_OVERFLOW * this.$store.getters['mult/get']('miningDepthDwellerSpeed') / max;
let currentProgress = current - 0.5;
while (currentProgress < currentFloored) {
const breakpointCount = Math.floor(10 * (currentProgress + 0.000000000001) / max) - 10;
Expand Down
4 changes: 2 additions & 2 deletions src/components/partial/snackbar/AchievementMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</div>
<div v-for="relic in relics" :key="relic.name">
<span>{{ $vuetify.lang.t(`$vuetify.message.achievement.relicGained`) }}: </span>
<span :class="`${relic.color}--text`">{{ $vuetify.lang.t(`$vuetify.relic.${ relic.name }`) }}</span>
<v-icon :color="relic.color">{{ relic.icon }}</v-icon>
<span class="balloon-text-inverted" :class="`${relic.color}--text`">{{ $vuetify.lang.t(`$vuetify.relic.${ relic.name }`) }}</span>
<v-icon class="balloon-text-inverted ml-1" :color="relic.color">{{ relic.icon }}</v-icon>
</div>
</v-card-text>
</v-card>
Expand Down
2 changes: 1 addition & 1 deletion src/components/partial/village/BuildingStatBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
}
},
powerBonus() {
return this.power * 0.5 + 1;
return this.power * 0.2 + 1;
},
nextPollutionPenalty() {
const tolerance = this.$store.getters['mult/get']('villagePollutionTolerance');
Expand Down
30 changes: 27 additions & 3 deletions src/components/partial/village/OfferingInventory.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
<template>
<div class="d-flex justify-center flex-wrap ma-1">
<currency class="ma-1" name="village_offering"></currency>
<div>
<div class="d-flex justify-center flex-wrap ma-1">
<currency class="ma-1" name="village_offering"></currency>
</div>
<div class="ma-2 mt-1">
<gb-tooltip>
<template v-slot:activator="{ on, attrs }">
<v-progress-linear rounded height="24" :value="offeringGen * 100" v-bind="attrs" v-on="on">
<span v-if="timeLeft === null">-</span>
<span v-else>{{ $formatTime(timeLeft) }}</span>
</v-progress-linear>
</template>
<div class="mt-0">{{ $vuetify.lang.t('$vuetify.village.offering.autoGen', $formatNum(offeringAmount)) }}</div>
</gb-tooltip>
</div>
</div>
</template>

<script>
import { mapState } from 'vuex';
import Currency from '../../render/Currency.vue';
export default {
components: { Currency }
components: { Currency },
computed: {
...mapState({
offeringGen: state => state.village.offeringGen,
offeringAmount: state => state.stat.village_offeringAmount.value
}),
timeLeft() {
const gain = this.$store.getters['village/offeringPerSecond'];
return gain > 0 ? Math.ceil((1 - this.offeringGen) / gain) : null;
}
}
}
</script>
11 changes: 7 additions & 4 deletions src/components/partial/village/OfferingItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
</v-chip>
<v-spacer></v-spacer>
<price-tag class="ma-1" :currency="`village_${name}`" :amount="sacrificeCost"></price-tag>
<v-btn small class="ma-1" color="primary" :disabled="!canAffordSacrifice || disabled" @click="buySacrifice(true)">{{ $vuetify.lang.t('$vuetify.gooboo.max') }}</v-btn>
<v-btn small class="ma-1" color="primary" :disabled="!canAffordSacrifice || !isUnlocked || disabled" @click="buySacrifice(true)">{{ $vuetify.lang.t('$vuetify.gooboo.max') }}</v-btn>
<gb-tooltip>
<template v-slot:activator="{ on, attrs }">
<div v-bind="attrs" v-on="on">
<v-btn class="ma-1" color="primary" :disabled="!canAffordSacrifice || disabled" @click="buySacrifice(false)">{{ $vuetify.lang.t('$vuetify.village.offering.sacrifice') }}</v-btn>
<v-btn class="ma-1" color="primary" :disabled="!canAffordSacrifice || !isUnlocked || disabled" @click="buySacrifice(false)">{{ $vuetify.lang.t('$vuetify.village.offering.sacrifice') }}</v-btn>
</div>
</template>
<div class="mt-0">
Expand All @@ -47,7 +47,7 @@
{{ offering.upgradeBought }}
</v-chip>
<v-spacer></v-spacer>
<price-tag class="ma-1" currency="village_offering" :amount="offering.amount"></price-tag>
<price-tag class="ma-1" currency="village_offering" :amount="upgradeCost"></price-tag>
<v-btn small class="ma-1" color="primary" :disabled="!canAffordUpgrade || disabled" @click="buyUpgrade(true)">{{ $vuetify.lang.t('$vuetify.gooboo.max') }}</v-btn>
<gb-tooltip>
<template v-slot:activator="{ on, attrs }">
Expand Down Expand Up @@ -94,11 +94,14 @@ export default {
sacrificeCost() {
return this.offering.cost(this.offering.offeringBought);
},
upgradeCost() {
return this.offering.amount + this.offering.increment * this.offering.upgradeBought;
},
canAffordSacrifice() {
return this.$store.getters['currency/value']('village_' + this.name) >= this.sacrificeCost;
},
canAffordUpgrade() {
return this.$store.getters['currency/value']('village_offering') >= this.offering.amount;
return this.$store.getters['currency/value']('village_offering') >= this.upgradeCost;
},
capName() {
return 'currencyVillage' + capitalize(this.name) + 'Cap';
Expand Down
80 changes: 43 additions & 37 deletions src/components/render/Upgrade.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,33 @@
<slot></slot>
</v-card-text>
<v-card-actions>
<gb-tooltip key="upgrade-subtype" v-if="subtype !== null" :min-width="0">
<template v-slot:activator="{ on, attrs }">
<v-icon class="ma-1" small v-bind="attrs" v-on="on">{{ subtypeIcon }}</v-icon>
</template>
<div class="mt-0">{{ $vuetify.lang.t(`$vuetify.upgrade.subtype.${ subtype }`) }}</div>
</gb-tooltip>
<gb-tooltip key="upgrade-bought" v-if="upgrade.bought || (upgrade.cap !== null && !upgrade.hideCap)" :min-width="0">
<template v-slot:activator="{ on, attrs }">
<v-chip
:small="$vuetify.breakpoint.xsOnly"
:label="$vuetify.breakpoint.xsOnly"
class="ma-1"
:class="{'px-2': $vuetify.breakpoint.xsOnly, 'reduced-height': $vuetify.breakpoint.smAndUp}"
v-bind="attrs"
v-on="on"
>
<v-icon class="mr-1">mdi-chevron-double-up</v-icon>
<span>{{ upgrade.level }}{{ upgrade.level !== upgrade.bought ? (' (+' + Math.round(upgrade.bought - upgrade.level) + ')') : '' }}</span>
<span v-if="upgrade.cap !== null && !upgrade.hideCap">&nbsp;/ {{ upgrade.cap }}</span>
</v-chip>
</template>
<div class="mt-0">{{ $vuetify.lang.t(`$vuetify.upgrade.keyset.${ translationSet }.bought`) }}</div>
</gb-tooltip>
<div>
<gb-tooltip key="upgrade-subtype" v-if="subtype !== null" :min-width="0">
<template v-slot:activator="{ on, attrs }">
<v-icon class="ma-1" small v-bind="attrs" v-on="on">{{ subtypeIcon }}</v-icon>
</template>
<div class="mt-0">{{ $vuetify.lang.t(`$vuetify.upgrade.subtype.${ subtype }`) }}</div>
</gb-tooltip>
</div>
<div>
<gb-tooltip key="upgrade-bought" v-if="upgrade.bought || (upgrade.cap !== null && !upgrade.hideCap)" :min-width="0">
<template v-slot:activator="{ on, attrs }">
<v-chip
:small="$vuetify.breakpoint.xsOnly"
:label="$vuetify.breakpoint.xsOnly"
class="ma-1"
:class="{'px-2': $vuetify.breakpoint.xsOnly, 'reduced-height': $vuetify.breakpoint.smAndUp}"
v-bind="attrs"
v-on="on"
>
<v-icon class="mr-1">mdi-chevron-double-up</v-icon>
<span>{{ upgrade.level }}{{ upgrade.level !== upgrade.bought ? (' (+' + Math.round(upgrade.bought - upgrade.level) + ')') : '' }}</span>
<span v-if="upgrade.cap !== null && !upgrade.hideCap">&nbsp;/ {{ upgrade.cap }}</span>
</v-chip>
</template>
<div class="mt-0">{{ $vuetify.lang.t(`$vuetify.upgrade.keyset.${ translationSet }.bought`) }}</div>
</gb-tooltip>
</div>
<v-chip
key="upgrade-time"
:small="$vuetify.breakpoint.xsOnly"
Expand All @@ -122,20 +126,22 @@
<v-icon class="mr-1">mdi-timer</v-icon>
{{ $formatTime(timeNeededNext) }}
</v-chip>
<gb-tooltip key="upgrade-other" v-if="upgrade.raiseOtherCap" :min-width="350" :title-text="$vuetify.lang.t(`$vuetify.upgrade.${ upgrade.raiseOtherCap }`)">
<template v-slot:activator="{ on, attrs }">
<v-icon class="mx-1" v-bind="attrs" v-on="on">mdi-book-arrow-up</v-icon>
</template>
<div class="mt-n1 mb-2 text-center">
<v-icon small class="mr-1">mdi-chevron-double-up</v-icon>
<span>{{ otherUpgrade.level }}{{ otherUpgrade.level !== otherUpgrade.bought ? (' (+' + Math.round(otherUpgrade.bought - otherUpgrade.level) + ')') : '' }}</span>
<span v-if="otherUpgrade.cap !== null && !otherUpgrade.hideCap">&nbsp;/ {{ otherUpgrade.cap }}</span>
</div>
<display-row v-for="(item, key) in otherDisplay" class="mt-0 mx-1" :key="`other-display-${item.name}-${item.type}-${key}`" :name="item.name" :type="item.type" :before="item.before" :after="item.after"></display-row>
<div class="d-flex flex-wrap mt-0">
<price-tag class="ma-1" v-for="(amount, currency, index) in otherPrice" :key="'other-price-' + currency + '-' + index" :currency="currency" :amount="amount"></price-tag>
</div>
</gb-tooltip>
<div>
<gb-tooltip key="upgrade-other" v-if="upgrade.raiseOtherCap" :min-width="350" :title-text="$vuetify.lang.t(`$vuetify.upgrade.${ upgrade.raiseOtherCap }`)">
<template v-slot:activator="{ on, attrs }">
<v-icon class="mx-1" v-bind="attrs" v-on="on">mdi-book-arrow-up</v-icon>
</template>
<div class="mt-n1 mb-2 text-center">
<v-icon small class="mr-1">mdi-chevron-double-up</v-icon>
<span>{{ otherUpgrade.level }}{{ otherUpgrade.level !== otherUpgrade.bought ? (' (+' + Math.round(otherUpgrade.bought - otherUpgrade.level) + ')') : '' }}</span>
<span v-if="otherUpgrade.cap !== null && !otherUpgrade.hideCap">&nbsp;/ {{ otherUpgrade.cap }}</span>
</div>
<display-row v-for="(item, key) in otherDisplay" class="mt-0 mx-1" :key="`other-display-${item.name}-${item.type}-${key}`" :name="item.name" :type="item.type" :before="item.before" :after="item.after"></display-row>
<div class="d-flex flex-wrap mt-0">
<price-tag class="ma-1" v-for="(amount, currency, index) in otherPrice" :key="'other-price-' + currency + '-' + index" :currency="currency" :amount="amount"></price-tag>
</div>
</gb-tooltip>
</div>
<v-spacer></v-spacer>
<v-btn key="upgrade-buy-max" small v-if="!isMax" color="primary" :disabled="!canAfford || disabled" @click="buyMax">{{ $vuetify.lang.t('$vuetify.gooboo.max') }}</v-btn>
<v-btn key="upgrade-buy" v-if="!isMax" :data-cy="`upgrade-${ name }-buy`" color="primary" :disabled="!canAfford || disabled" @click="buy">{{ $vuetify.lang.t(upgradeTranslation) }}</v-btn>
Expand Down
2 changes: 2 additions & 0 deletions src/components/render/UpgradeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ export default {
pages(newVal) {
if (this.page > newVal) {
this.page = Math.max(newVal, 1);
} else if (this.page <= 0 && newVal > 0) {
this.page = 1;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const MINING_ENHANCEMENT_FINAL = 10;
export const MINING_ENHANCEMENT_BAR_AMOUNT = 10;
export const MINING_ENHANCEMENT_CHANCE_EXPONENT = 0.5;
export const MINING_DWELLER_OVERCAP_MULT = 0.9;
export const MINING_DWELLER_OVERFLOW = 5;

export const VILLAGE_COINS_PER_FOOD = 0.25;
export const VILLAGE_JOY_MIN_HAPPINESS = 1.25;
Expand Down
2 changes: 2 additions & 0 deletions src/js/modules/cryolab.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const data = {
],
village: [
{village_blessing: 'village_bestPrestige'},
{village_blessing: 'village_bestPrestige'},
],
horde: [
{horde_soulEmpowered: 'horde_bestPrestige'},
Expand All @@ -31,6 +32,7 @@ const effect = {
{name: 'currencyVillageFaithGain', type: 'mult', value: lvl => lvl * 0.1 + 1},
{name: 'currencyVillageFaithCap', type: 'mult', value: lvl => lvl * 0.1 + 1}
],
[],
],
horde: [
[
Expand Down
Loading

0 comments on commit ca67867

Please sign in to comment.