Skip to content

Commit

Permalink
Merge pull request #74 from Tendsty/develop
Browse files Browse the repository at this point in the history
1.5.4 update
  • Loading branch information
Tendsty authored Nov 23, 2024
2 parents 9ab9c77 + 42675eb commit bdf9cce
Show file tree
Hide file tree
Showing 40 changed files with 878 additions and 304 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.5.3",
"version": "1.5.4",
"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.3
1.5.4
37 changes: 35 additions & 2 deletions src/components/partial/event/SnowballFight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="d-flex justify-center align-center pa-1">
<div class="ma-1">{{ $vuetify.lang.t(`$vuetify.event.snowdown.fightCount`) }} #{{ fightsWon + 1 }}</div>
<price-tag class="ma-1" currency="event_snowball" :amount="snowballFightCost"></price-tag>
<gb-tooltip :min-width="0">
<gb-tooltip key="snowball-fight-win">
<template v-slot:activator="{ on, attrs }">
<div class="ma-1" v-bind="attrs" v-on="on">
<v-btn color="primary" :disabled="rewardProducer || rewardItem !== null || snowball < snowballFightCost" @click="snowballFight">
Expand All @@ -13,6 +13,27 @@
</div>
</template>
<div class="mt-0">{{ $vuetify.lang.t('$vuetify.event.snowdown.fightDescription') }}</div>
<div>{{ $vuetify.lang.t('$vuetify.event.snowdown.fightWin') }}:</div>
<ul class="mt-0">
<li>{{ $vuetify.lang.t('$vuetify.event.snowdown.fightWinProducer') }}</li>
<li v-if="winItemGain">{{ $vuetify.lang.t('$vuetify.event.snowdown.fightWinItem') }}</li>
<li><price-tag currency="event_snowdownToken" add :amount="winTokenGain"></price-tag></li>
</ul>
</gb-tooltip>
<gb-tooltip key="snowball-fight-revenge" v-if="revenge > 0" :title-text="$vuetify.lang.t('$vuetify.event.snowdown.revenge.name')">
<template v-slot:activator="{ on, attrs }">
<div v-bind="attrs" v-on="on">
<v-badge color="orange" class="balloon-text-dynamic" offset-x="14" offset-y="20" bottom overlap>
<v-icon large>mdi-emoticon-angry</v-icon>
<template v-slot:badge>
<span :class="{'black--text': !$vuetify.theme.dark}">{{ $formatInt(revenge) }}</span>
</template>
</v-badge>
</div>
</template>
<div class="mt-0">{{ $vuetify.lang.t('$vuetify.event.snowdown.revenge.description', $formatInt(revenge)) }}</div>
<div v-if="revengeStats > 0">{{ $vuetify.lang.t('$vuetify.event.snowdown.revenge.statsScaling', $formatNum(revengeCrit, true), $formatNum(revengeBlock, true), $formatNum(revengeStats * 100, true)) }}</div>
<div v-else>{{ $vuetify.lang.t('$vuetify.event.snowdown.revenge.statsBase') }}</div>
</gb-tooltip>
</div>
<div class="d-flex justify-center flex-wrap pa-1 mt-4">
Expand Down Expand Up @@ -56,14 +77,26 @@ export default {
rewardProducer: state => state.snowdown.rewardProducer,
rewardItem: state => state.snowdown.rewardItem,
replayBase: state => state.snowdown.result,
revenge: state => state.snowdown.revenge,
snowball: state => state.currency.event_snowball.value
}),
...mapGetters({
playerStats: 'snowdown/playerStats',
enemyStats: 'snowdown/enemyStats'
enemyStats: 'snowdown/enemyStats',
winTokenGain: 'snowdown/winTokenGain',
winItemGain: 'snowdown/winItemGain',
}),
snowballFightCost() {
return SNOWDOWN_FIGHT_COST;
},
revengeStats() {
return this.$store.getters['mult/get']('snowdownRevengeStats');
},
revengeCrit() {
return this.$store.getters['mult/get']('snowdownRevengeCrit');
},
revengeBlock() {
return this.$store.getters['mult/get']('snowdownRevengeBlock');
}
},
methods: {
Expand Down
21 changes: 19 additions & 2 deletions src/components/partial/event/SnowdownFighter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@

<template>
<div class="snowdown-fighter bg-tile-default d-flex flex-column justify-space-between align-center rounded-lg elevation-2" :class="{'snowdown-fighter-mobile': $vuetify.breakpoint.xsOnly}">
<div :class="{'pt-1': $vuetify.breakpoint.smAndUp}">{{ $vuetify.lang.t(`$vuetify.event.snowdown.fighter.${stats.name}`) }}</div>
<div :class="{'pt-1': $vuetify.breakpoint.smAndUp}">
<span v-if="type === 'player' || stats.name === 'player'">{{ playerName }}</span>
<span v-else>{{ $vuetify.lang.t(`$vuetify.event.snowdown.fighter.${stats.name}`) }}</span>
</div>
<div class="snowdown-fighter-stun" v-if="stats.stun !== undefined && stats.stun > 0">
<v-icon class="mr-1" x-small>mdi-octagram-outline</v-icon>
<span class="snowdown-fighter-text">{{ $formatNum(stats.stun) }}</span>
Expand Down Expand Up @@ -71,7 +74,7 @@
<template v-slot:activator="{ on, attrs }">
<div class="d-flex align-center" v-bind="attrs" v-on="on">
<v-icon class="mr-1" x-small>mdi-exclamation-thick</v-icon>
<span class="snowdown-fighter-text">{{ $formatNum(critChance(stats.critRating) * 100) }}% +{{ $formatNum(Math.round(critDamage(stats.critRating))) }}</span>
<span class="snowdown-fighter-text">{{ $formatNum(critChance(stats.critRating) * 100) }}% +{{ $formatNum(Math.round(critDamage(stats.critRating) * critMult)) }}</span>
</div>
</template>
<div>{{ $vuetify.lang.t('$vuetify.event.snowdown.critDescription') }}</div>
Expand Down Expand Up @@ -155,6 +158,20 @@ export default {
return null;
}
return this.$store.state.snowdown.pet[this.stats.name];
},
critMult() {
if (this.stats.critMult !== undefined) {
return this.stats.critMult;
} else if (this.stats.name === 'player') {
return this.$store.state.mult.items.snowdownAttack.multCache;
} else if (this.type === 'pet') {
return this.$store.state.mult.items.snowdownPetAttack.multCache;
} else {
return 1;
}
},
playerName() {
return this.$store.state.system.playerName ?? this.$vuetify.lang.t('$vuetify.info.statistics.defaultPlayerName');
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/partial/event/SnowdownInventory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import PriceTag from '../../render/PriceTag.vue';
export default {
components: { Currency, PriceTag },
data: () => ({
currencies: ['dough', 'cinnamon', 'sapling', 'water', 'snow', 'yarn', 'snowball', 'snowdownToken']
currencies: ['sapling', 'yarn', 'dough', 'snow', 'snowball', 'snowdownToken']
}),
computed: {
...mapState({
Expand Down
27 changes: 24 additions & 3 deletions src/components/partial/event/SnowdownItemList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@
<div class="mt-0">{{ $vuetify.lang.t('$vuetify.event.snowdown.buyItemDescription') }}</div>
</gb-tooltip>
</div>
<div class="d-flex align-center bg-tile-default rounded ma-1 pa-1">
<price-tag class="ma-1" currency="gem_topaz" :amount="itemTopazCost"></price-tag>
<gb-tooltip :min-width="0">
<template v-slot:activator="{ on, attrs }">
<div class="ma-1" v-bind="attrs" v-on="on">
<v-btn :disabled="rewardItem !== null || topaz < itemTopazCost" @click="buyTopazItem" color="primary">
<v-icon class="mr-2">mdi-plus</v-icon>
{{ $vuetify.lang.t(`$vuetify.event.snowdown.buyItem`) }}
</v-btn>
</div>
</template>
<div class="mt-0">{{ $vuetify.lang.t('$vuetify.event.snowdown.buyItemDescription') }}</div>
</gb-tooltip>
</div>
</div>
</div>
</template>
Expand All @@ -60,10 +74,12 @@ export default {
rewardProducer: state => state.snowdown.rewardProducer,
rewardItem: state => state.snowdown.rewardItem,
snowball: state => state.currency.event_snowball.value,
snow: state => state.currency.event_snow.value
snow: state => state.currency.event_snow.value,
topaz: state => state.currency.gem_topaz.value,
}),
...mapGetters({
itemSnowCost: 'snowdown/itemSnowCost'
itemSnowCost: 'snowdown/itemSnowCost',
itemTopazCost: 'snowdown/itemTopazCost',
}),
itemList() {
let arr = [];
Expand Down Expand Up @@ -98,7 +114,7 @@ export default {
this.rerollMode = !this.rerollMode;
},
rerollItem(name) {
if (this.rerollMode && this.snowball >= this.rerollCost && this.rewardItem === null) {
if (this.rerollMode && this.snowball >= this.rerollCost && this.rewardItem === null && this.$store.state.snowdown.item[name].type !== 'producer') {
this.$store.dispatch('snowdown/rerollItem', name);
this.rerollMode = false;
}
Expand All @@ -107,6 +123,11 @@ export default {
if (this.snow >= this.itemSnowCost && this.rewardItem === null) {
this.$store.dispatch('snowdown/buySnowItem');
}
},
buyTopazItem() {
if (this.topaz >= this.itemTopazCost && this.rewardItem === null) {
this.$store.dispatch('snowdown/buyTopazItem');
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/partial/farm/CropCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
</template>
<stat-breakdown name="farmExperience" :baseArray="this.cropGeneStats.mult.farmExperience.baseArray" :multArray="this.cropGeneStats.mult.farmExperience.multArray"></stat-breakdown>
<div>{{ $vuetify.lang.t(`$vuetify.farm.expToLevelUp`, $formatNum(harvestsNeeded)) }}</div>
<alert-text v-if="Math.max(crop.level, crop.levelMax) >= 10" type="info">{{ $vuetify.lang.t(`$vuetify.farm.prestige.increasedGLRequirement`) }}</alert-text>
</gb-tooltip>
</div>
<div v-if="currentGenePicker !== null" key="crop-gene-picker">
Expand Down
2 changes: 1 addition & 1 deletion src/components/partial/gallery/Color.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default {
return [
{type: 'mult', name: `currencyGallery${ capitalize(this.name) }Gain`, before: level > 0 ? Math.pow(2, level) : null, after: Math.pow(2, nextLevel)},
{type: 'mult', name: `gallery${ capitalize(this.name) }Conversion`, before: level > 0 ? Math.pow(2, level) : null, after: Math.pow(2, nextLevel)},
{type: 'base', name: `currencyGallery${ capitalize(this.name) }DrumCap`, before: level > 0 ? (25 * level) : null, after: 25 * nextLevel}
{type: 'base', name: `currencyGallery${ capitalize(this.name) }DrumCap`, before: level > 0 ? (10 * level) : null, after: 10 * nextLevel}
];
},
canvasUntilNext() {
Expand Down
3 changes: 2 additions & 1 deletion src/gbPlugin.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const { formatNum, formatTime, formatRoman } = require("./js/utils/format");
const { formatNum, formatTime, formatRoman, formatInt } = require("./js/utils/format");

export default {
install: function(Vue) {
Vue.prototype.$formatNum = formatNum;
Vue.prototype.$formatTime = formatTime;
Vue.prototype.$formatRoman = formatRoman;
Vue.prototype.$formatInt = formatInt;
}
}
6 changes: 3 additions & 3 deletions src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export const WEATHER_CHAOS_BAIT_COST = 90;

export const NIGHT_HUNT_HINT_PENALTY = 0.1;

export const SNOWDOWN_FIGHT_COST = 5;
export const SNOWDOWN_REROLL_COST = 50;
export const SNOWDOWN_BOOST_COST = 140;
export const SNOWDOWN_FIGHT_COST = 8;
export const SNOWDOWN_REROLL_COST = 30;
export const SNOWDOWN_BOOST_COST = 55;

export const NIGHT_HUNT_GL_BOOST = 1.01;
2 changes: 1 addition & 1 deletion src/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ function loadGame(file, runPrepare = true) {

store.commit('system/updateKey', {key: 'currentDay', value: getDay(new Date(store.state.system.timestamp * 1000))});
store.commit('system/generatePlayerId');
store.dispatch('farm/updateFieldCaches');
store.dispatch('farm/applyEarlyGameBuff');
store.dispatch('farm/updateFieldCaches');
store.dispatch('meta/globalLevelUnlocks');
advance();

Expand Down
38 changes: 28 additions & 10 deletions src/js/modules/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,25 @@ export default {
// snowdown mults
snowdownAttack: {baseValue: 4},
snowdownHealth: {baseValue: 40, round: true},
snowdownDefense: {},
snowdownDefense: {round: true},
snowdownCritRating: {},
snowdownBlockRating: {},
snowdownLootRating: {},
snowdownPetAttack: {},
snowdownPetHealth: {round: true},
snowdownPetDefense: {},
snowdownPetDefense: {round: true},
snowdownPetCritRating: {},
snowdownPetBlockRating: {},
snowdownAllAttack: {group: ['snowdownAttack', 'snowdownPetAttack']},
snowdownAllHealth: {group: ['snowdownHealth', 'snowdownPetHealth']}
snowdownAllHealth: {group: ['snowdownHealth', 'snowdownPetHealth']},
snowdownAllDefense: {group: ['snowdownDefense', 'snowdownPetDefense']},
snowdownRevengeStats: {display: 'percent'},
snowdownRevengeCrit: {},
snowdownRevengeBlock: {},
snowdownResourceGain: {},
},
multGroup: [
{mult: 'snowdownResourceGain', name: 'currencyGain', subtype: 'snowdownResource'},
],
currency: {
// cinders currencies
light: {type: 'cinders', color: 'yellow', icon: 'mdi-lightbulb-on', gainMult: {}},
Expand Down Expand Up @@ -248,12 +255,10 @@ export default {
feather: {type: 'nightHunt', color: 'skyblue', icon: 'mdi-feather'},

// snowdown currencies
dough: {type: 'snowdown', color: 'beige', icon: 'mdi-liquid-spot'},
cinnamon: {type: 'snowdown', color: 'brown', icon: 'mdi-script'},
sapling: {type: 'snowdown', color: 'green', icon: 'mdi-sprout'},
water: {type: 'snowdown', color: 'blue', icon: 'mdi-water'},
snow: {type: 'snowdown', color: 'light-blue', icon: 'mdi-snowflake'},
yarn: {type: 'snowdown', color: 'red', icon: 'mdi-link'},
sapling: {type: 'snowdown', subtype: 'snowdownResource', color: 'green', icon: 'mdi-sprout', gainMult: {display: 'perSecond'}, showGainMult: true, showGainTimer: true},
yarn: {type: 'snowdown', subtype: 'snowdownResource', color: 'red', icon: 'mdi-link', gainMult: {display: 'perSecond'}, showGainMult: true, showGainTimer: true},
dough: {type: 'snowdown', subtype: 'snowdownResource', color: 'beige', icon: 'mdi-liquid-spot', gainMult: {display: 'perSecond'}, showGainMult: true, showGainTimer: true},
snow: {type: 'snowdown', subtype: 'snowdownResource', color: 'light-blue', icon: 'mdi-snowflake', gainMult: {display: 'perSecond'}, showGainMult: true, showGainTimer: true},

// topaz drop replacement currencies
wax: {type: 'cinders', color: 'pale-yellow', icon: 'mdi-beehive-outline'},
Expand Down Expand Up @@ -541,6 +546,12 @@ export default {
if (store.state.snowdown.itemsBought > 0) {
obj.snowdown_itemsBought = store.state.snowdown.itemsBought;
}
if (store.state.snowdown.itemsBoughtTopaz > 0) {
obj.snowdown_itemsBoughtTopaz = store.state.snowdown.itemsBoughtTopaz;
}
if (store.state.snowdown.revenge > 0) {
obj.snowdown_revenge = store.state.snowdown.revenge;
}

let items = {};
let hasItems = false;
Expand Down Expand Up @@ -745,6 +756,13 @@ export default {
if (data.snowdown_itemsBought !== undefined) {
store.commit('snowdown/updateKey', {key: 'itemsBought', value: data.snowdown_itemsBought});
}
if (data.snowdown_itemsBoughtTopaz !== undefined) {
store.commit('snowdown/updateKey', {key: 'itemsBoughtTopaz', value: data.snowdown_itemsBoughtTopaz});
}
if (data.snowdown_revenge !== undefined) {
store.commit('snowdown/updateKey', {key: 'revenge', value: data.snowdown_revenge});
store.dispatch('snowdown/applyRevengeEffect');
}
if (data.snowdown_item !== undefined) {
for (const [key, elem] of Object.entries(data.snowdown_item)) {
store.commit('snowdown/updateItemKey', {name: key, key: 'amount', value: elem});
Expand Down
Loading

0 comments on commit bdf9cce

Please sign in to comment.