Skip to content

Commit

Permalink
Merge pull request #76 from Tendsty/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Tendsty authored Jan 18, 2025
2 parents 42a21d6 + fd42019 commit 850f823
Show file tree
Hide file tree
Showing 26 changed files with 258 additions and 88 deletions.
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.5.5",
"version": "1.5.6",
"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.5.5
1.5.6
7 changes: 6 additions & 1 deletion src/components/partial/horde/ActiveTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export default {
type: Number,
required: false,
default: null
},
isEnemy: {
type: Boolean,
required: false,
default: false
}
},
computed: {
Expand Down Expand Up @@ -96,7 +101,7 @@ export default {
return this.effect.canCrit ?? 0;
},
healingMult() {
return this.effect.type === 'heal' ? this.$store.state.horde.cachePlayerStats.healing : 1;
return this.effect.type === 'heal' && !this.isEnemy ? this.$store.state.horde.cachePlayerStats.healing : 1;
},
statDisplayName() {
if (this.effect.stat) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/partial/horde/EnemyActiveTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<span v-else>{{ $formatNum(active.uses) }} / {{ $formatNum(maxUses) }}</span>
</template>
</div>
<active-tooltip v-for="(elem, key) in effect" :key="`active-effect-${ key }`" class="mt-0" :effect="elem" :attack="enemyAttack" :health="enemyMaxHealth"></active-tooltip>
<active-tooltip v-for="(elem, key) in effect" :key="`active-effect-${ key }`" class="mt-0" :effect="elem" :attack="enemyAttack" :health="enemyMaxHealth" is-enemy></active-tooltip>
</div>
</template>

Expand Down
9 changes: 8 additions & 1 deletion src/components/partial/upgrade/DisplayRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div v-else-if="type === 'tag'">{{ this.$vuetify.lang.t(`$vuetify.tag.${ name }`, ...tagArgs) }}</div>
<div v-else class="d-flex align-center">
<v-icon v-if="showIcon && featureIcon" small class="mr-2">{{ featureIcon }}</v-icon>
<div class="flex-grow-1">{{ text }}{{ showStar ? '*' : '' }}{{ isBuff ? ` ${ $vuetify.lang.t(`$vuetify.horde.active.buff.suffix`) }` : '' }}:</div>
<div class="flex-grow-1">{{ isLocked ? '???' : text }}{{ showStar ? '*' : '' }}{{ isBuff ? ` ${ $vuetify.lang.t(`$vuetify.horde.active.buff.suffix`) }` : '' }}:</div>
<div class="pl-1" v-if="showRelative">
<mult-stat :mult="name" :type="type" :value="relativeValue"></mult-stat>
</div>
Expand Down Expand Up @@ -68,6 +68,13 @@ export default {
return el;
}
});
},
isLocked() {
if (!['base', 'mult', 'bonus'].includes(this.type)) {
return false;
}
const mult = this.$store.state.mult.items[this.name];
return mult && mult.unlock !== null && !this.$store.state.unlock[mult.unlock].see;
}
},
props: {
Expand Down
16 changes: 5 additions & 11 deletions src/components/partial/village/OfferingInventory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
<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>
<v-progress-linear rounded height="24" :value="offeringGen * 100">
<span v-if="timeLeft === null">-</span>
<span v-else>{{ $formatTime(timeLeft) }}</span>
</v-progress-linear>
</div>
</div>
</template>
Expand All @@ -25,8 +20,7 @@ export default {
components: { Currency },
computed: {
...mapState({
offeringGen: state => state.village.offeringGen,
offeringAmount: state => state.stat.village_offeringAmount.value
offeringGen: state => state.village.offeringGen
}),
timeLeft() {
const gain = this.$store.getters['village/offeringPerSecond'];
Expand Down
15 changes: 10 additions & 5 deletions src/components/partial/village/OfferingItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@
</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 || !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 || !isUnlocked || 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">{{ $vuetify.lang.t('$vuetify.village.offering.sacrifice') }}</v-btn>
</div>
</template>
<div class="mt-0">
<span>{{ $vuetify.lang.t('$vuetify.village.offering.description.0') }}</span>
<span>{{ $formatNum(sacrificeCost) }}&nbsp;</span>
<currency-icon :name="'village_' + name"></currency-icon>
<span>{{ $vuetify.lang.t('$vuetify.village.offering.description.1') }}</span>
<span>{{ $formatNum(offering.amount) }}&nbsp;</span>
<span>{{ $formatNum(offering.amount * (offering.offeringBought + 1)) }}&nbsp;</span>
<currency-icon name="village_offering"></currency-icon>
<span>{{ $vuetify.lang.t('$vuetify.village.offering.description.2') }}</span>
<span>{{ $formatNum(offering.amount * offeringPassiveGain, true) }}</span>
<span>{{ $vuetify.lang.t('$vuetify.village.offering.description.3') }}</span>
</div>
</gb-tooltip>
</div>
Expand All @@ -64,6 +65,7 @@

<script>
import { mapState } from 'vuex';
import { VILLAGE_OFFERING_PASSIVE_GAIN } from '../../../js/constants';
import { capitalize } from '../../../js/utils/format';
import Currency from '../../render/Currency.vue';
import CurrencyIcon from '../../render/CurrencyIcon.vue';
Expand Down Expand Up @@ -117,11 +119,14 @@ export default {
},
isUnlocked() {
return this.offering.unlock === null || this.$store.state.unlock[this.offering.unlock].use;
},
offeringPassiveGain() {
return VILLAGE_OFFERING_PASSIVE_GAIN;
}
},
methods: {
buySacrifice(max) {
this.$store.dispatch('village/buyOffering', {name: this.name, max});
buySacrifice() {
this.$store.dispatch('village/buyOffering', this.name);
},
buyUpgrade(max) {
this.$store.dispatch('village/upgradeOffering', {name: this.name, buyMax: max});
Expand Down
1 change: 1 addition & 0 deletions src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const VILLAGE_JOY_MIN_HAPPINESS = 1.25;
export const VILLAGE_JOY_PER_HAPPINESS = 0.2;
export const VILLAGE_JOY_HAPPINESS_REDUCTION = 1.2;
export const VILLAGE_MIN_HAPPINESS = 0.01;
export const VILLAGE_OFFERING_PASSIVE_GAIN = 0.02;

export const HORDE_COMBO_ATTACK = 1.025;
export const HORDE_COMBO_HEALTH = 1.01;
Expand Down
2 changes: 1 addition & 1 deletion src/js/modules/event/cinders/tick.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { logBase } from "../../../utils/math";
export default function(seconds) {
const candleDuration = store.state.cinders.activeCandle ? store.state.cinders.activeCandle.duration : 0
const candleTime = Math.min(candleDuration, seconds);
const lightGain = store.getters['cinders/totalProduction'] * Math.pow(1.01, store.getters['meta/globalEventLevel']);
const lightGain = store.getters['cinders/totalProduction'] * Math.pow(1.015, store.getters['meta/globalEventLevel']);

let totalLight = lightGain * (seconds - candleTime);
if (candleTime > 0) {
Expand Down
26 changes: 17 additions & 9 deletions src/js/modules/event/cinders/upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,56 +175,63 @@ export default {
}, price() {
return {gem_topaz: 500};
}, effect: [
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.2 : null}
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
glowfishEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_glowfish.level > 0;
}, price() {
return {gem_topaz: 600};
}, effect: [
{name: 'cindersFirstProducerCost', type: 'mult', value: lvl => lvl >= 1 ? 0.25 : null}
{name: 'cindersFirstProducerCost', type: 'mult', value: lvl => lvl >= 1 ? 0.25 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
lanternEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_lantern.level > 0;
}, price() {
return {gem_topaz: 700};
}, effect: [
{name: 'currencyEventSootGain', type: 'mult', value: lvl => lvl >= 1 ? 2 : null}
{name: 'currencyEventSootGain', type: 'mult', value: lvl => lvl >= 1 ? 2 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
campfireEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_campfire.level > 0;
}, price() {
return {gem_topaz: 800};
}, effect: [
{name: 'currencyEventCindersTokenGain', type: 'mult', value: lvl => lvl >= 1 ? 1.05 : null}
{name: 'currencyEventCindersTokenGain', type: 'mult', value: lvl => lvl >= 1 ? 1.05 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
coralEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_coral.level > 0;
}, price() {
return {gem_topaz: 900};
}, effect: [
{name: 'cindersUpgradeProducerRequirement', type: 'base', value: lvl => lvl >= 1 ? -10 : null}
{name: 'cindersUpgradeProducerRequirement', type: 'base', value: lvl => lvl >= 1 ? -10 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
jellyfishEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_jellyfish.level > 0;
}, price() {
return {gem_topaz: 1000};
}, effect: [
{name: 'cindersCandlePower', type: 'mult', value: lvl => lvl >= 1 ? 2 : null}
{name: 'cindersCandlePower', type: 'mult', value: lvl => lvl >= 1 ? 2 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
nightbloomEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_nightbloom.level > 0;
}, price() {
return {gem_topaz: 1100};
}, effect: [
{name: 'cindersNonFirstProducerCost', type: 'mult', value: lvl => lvl >= 1 ? 0.5 : null}
{name: 'cindersNonFirstProducerCost', type: 'mult', value: lvl => lvl >= 1 ? 0.5 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
neonlightEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_neonlight.level > 0;
}, price() {
return {gem_topaz: 1200};
}, effect: [
{name: 'cindersUpgradeLightCost', type: 'mult', value: lvl => lvl >= 1 ? 0.5 : null}
{name: 'cindersUpgradeLightCost', type: 'mult', value: lvl => lvl >= 1 ? 0.5 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]},
sunEnlightened: {type: 'cinders', cap: 1, requirement() {
return store.state.upgrade.item.event_sun.level > 0;
Expand All @@ -240,6 +247,7 @@ export default {
{name: 'cindersProductionJellyfish', type: 'mult', value: lvl => lvl >= 1 ? 1.4 : null},
{name: 'cindersProductionNightbloom', type: 'mult', value: lvl => lvl >= 1 ? 1.3 : null},
{name: 'cindersProductionNeonlight', type: 'mult', value: lvl => lvl >= 1 ? 1.2 : null},
{name: 'cindersProductionSun', type: 'mult', value: lvl => lvl >= 1 ? 1.1 : null}
{name: 'cindersProductionSun', type: 'mult', value: lvl => lvl >= 1 ? 1.1 : null},
{name: 'currencyEventLightGain', type: 'mult', value: lvl => lvl >= 1 ? 1.5 : null}
]}
}
12 changes: 6 additions & 6 deletions src/js/modules/gallery/idea.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export default {
{name: 'galleryColorGain', type: 'mult', value: lvl => lvl * 0.12 + 1},
]},
buildRedReservoir: {tier: 2, icon: 'mdi-hoop-house', color: 'red', effect: [
{name: 'currencyGalleryRedDrumCap', type: 'mult', value: lvl => lvl * 0.35 + 1},
{name: 'currencyGalleryRedDrumCap', type: 'mult', value: lvl => lvl * 0.4 + 1},
]},
orderMassiveSafe: {tier: 2, icon: 'mdi-safe-square', color: 'dark-grey', effect: [
{name: 'galleryColorDrumCap', type: 'base', value: lvl => lvl * 2},
{name: 'galleryColorDrumCap', type: 'base', value: lvl => lvl * 3},
{name: 'galleryCanvasSpeed', type: 'mult', value: lvl => 1 - (lvl / (lvl + 10))},
]},
buyPen: {tier: 2, icon: 'mdi-pen', color: 'indigo', effect: [
Expand All @@ -73,7 +73,7 @@ export default {
{name: 'galleryColorDrumChance', type: 'mult', value: lvl => lvl * 0.4 + 1},
]},
buildOrangeReservoir: {tier: 3, icon: 'mdi-hoop-house', color: 'orange', effect: [
{name: 'currencyGalleryOrangeDrumCap', type: 'mult', value: lvl => lvl * 0.35 + 1},
{name: 'currencyGalleryOrangeDrumCap', type: 'mult', value: lvl => lvl * 0.4 + 1},
]},
thinkHarder: {tier: 3, icon: 'mdi-head-lightbulb', color: 'amber', effect: [
{name: 'galleryInspirationStart', type: 'base', value: lvl => lvl * 2},
Expand All @@ -98,7 +98,7 @@ export default {
{name: 'currencyGalleryDeep-orangeGain', type: 'mult', value: lvl => Math.pow(0.5, lvl / 2)},
]},
buildYellowReservoir: {tier: 4, icon: 'mdi-hoop-house', color: 'yellow', effect: [
{name: 'currencyGalleryYellowDrumCap', type: 'mult', value: lvl => lvl * 0.35 + 1},
{name: 'currencyGalleryYellowDrumCap', type: 'mult', value: lvl => lvl * 0.4 + 1},
]},
paintForFun: {tier: 4, icon: 'mdi-emoticon-happy', color: 'pink', effect: [
{name: 'currencyGalleryBeautyGain', type: 'mult', value: lvl => Math.pow(4, lvl)},
Expand Down Expand Up @@ -127,7 +127,7 @@ export default {
{name: 'currencyGalleryLight-greenGain', type: 'mult', value: lvl => Math.pow(0.5, lvl / 2)},
]},
buildGreenReservoir: {tier: 5, icon: 'mdi-hoop-house', color: 'green', effect: [
{name: 'currencyGalleryGreenDrumCap', type: 'mult', value: lvl => lvl * 0.35 + 1},
{name: 'currencyGalleryGreenDrumCap', type: 'mult', value: lvl => lvl * 0.4 + 1},
]},
beMysterious: {tier: 5, icon: 'mdi-wizard-hat', color: 'pale-purple', effect: [
{name: 'currencyGalleryMysteryShapeGain', type: 'base', value: lvl => lvl},
Expand All @@ -145,6 +145,6 @@ export default {
{name: 'currencyGalleryLight-blueGain', type: 'mult', value: lvl => Math.pow(0.5, lvl / 2)},
]},
buildBlueReservoir: {tier: 6, icon: 'mdi-hoop-house', color: 'blue', effect: [
{name: 'currencyGalleryBlueDrumCap', type: 'mult', value: lvl => lvl * 0.35 + 1},
{name: 'currencyGalleryBlueDrumCap', type: 'mult', value: lvl => lvl * 0.4 + 1},
]},
}
6 changes: 5 additions & 1 deletion src/js/modules/horde.js
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,9 @@ export default {
if (store.state.horde.autocast.length > 0) {
obj.autocast = store.state.horde.autocast;
}
if (store.state.horde.sacrificeLevel > 0) {
obj.sacrificeLevel = store.state.horde.sacrificeLevel;
}

for (const [key, elem] of Object.entries(store.state.horde.tower)) {
if (elem.highest > 0) {
Expand Down Expand Up @@ -1228,7 +1231,8 @@ export default {
[
'zone', 'combo', 'respawn', 'maxRespawn', 'bossAvailable', 'bossFight', 'fightTime', 'fightRampage', 'enemyTimer',
'playerBuff', 'minibossTimer', 'nostalgiaLost', 'chosenActive', 'currentTower', 'towerFloor', 'taunt',
'selectedClass', 'selectedArea', 'expLevel', 'skillPoints', 'bossStage', 'trinketDrop', 'bossBonusDifficulty', 'autocast'
'selectedClass', 'selectedArea', 'expLevel', 'skillPoints', 'bossStage', 'trinketDrop', 'bossBonusDifficulty',
'autocast', 'sacrificeLevel'
].forEach(elem => {
if (data[elem] !== undefined) {
store.commit('horde/updateKey', {key: elem, value: data[elem]});
Expand Down
2 changes: 2 additions & 0 deletions src/js/modules/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import v1_5_2 from "./patchnote/v1_5_2";
import v1_5_3 from "./patchnote/v1_5_3";
import v1_5_4 from "./patchnote/v1_5_4";
import v1_5_5 from "./patchnote/v1_5_5";
import v1_5_6 from "./patchnote/v1_5_6";

export default {
name: 'meta',
Expand Down Expand Up @@ -60,6 +61,7 @@ export default {
store.commit('system/initTheme', {name: key, ...elem});
}
for (const [key, elem] of Object.entries({
'1.5.6': v1_5_6,
'1.5.5': v1_5_5,
'1.5.4': v1_5_4,
'1.5.3': v1_5_3,
Expand Down
28 changes: 28 additions & 0 deletions src/js/modules/migration/v1_5_6.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export default function(save) {
// Fix event token values
if (save.stat.event_bloomToken !== undefined) {
save.stat.event_bloomToken[0] = 0;
}
if (save.stat.event_weatherChaosToken !== undefined) {
save.stat.event_weatherChaosToken[0] = 0;
}
if (save.stat.event_summerFestivalToken !== undefined) {
save.stat.event_summerFestivalToken[0] = 0;
}
if (save.stat.event_nightHuntToken !== undefined) {
save.stat.event_nightHuntToken[0] = 0;
}
if (save.stat.event_snowdownToken !== undefined) {
save.stat.event_snowdownToken[0] = 0;
}

// Give missing cinders tokens
if (save.stat.event_cindersToken !== undefined && save.stat.event_cindersHighscore !== undefined && save.stat.event_cindersHighscore[1] > save.stat.event_cindersHighscore[0]) {
const missingTokens = save.stat.event_cindersToken[1] - save.stat.event_cindersHighscore[0];
if (missingTokens > 0) {
save.stat.event_cindersToken[0] -= missingTokens;
}
}

return save;
}
Loading

0 comments on commit 850f823

Please sign in to comment.