Skip to content

Commit

Permalink
Merge pull request #22 from Tendsty/develop
Browse files Browse the repository at this point in the history
add taunt mode
  • Loading branch information
Tendsty authored Oct 18, 2023
2 parents 33e8b4d + cd1b3b6 commit 2723dbc
Show file tree
Hide file tree
Showing 18 changed files with 222 additions and 53 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.3.2",
"version": "1.3.3",
"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.3.2
1.3.3
4 changes: 3 additions & 1 deletion src/components/partial/horde/Active.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@
class="balloon-text-dynamic"
:class="$vnode.data.staticClass"
:value="item.activeType === 'utility' && charges > 1"
:content="'x' + $formatNum(charges)"
:color="item.activeColor"
offset-x="40"
offset-y="8"
>
<v-btn class="balloon-text-dynamic px-0" :class="[item.activeColor, {'selected-primary': chosenActive === name}]" min-width="36" @click="use" v-bind="attrs" v-on="on">
<v-icon>{{ item.activeIcon }}</v-icon>
</v-btn>
<template v-slot:badge>
<span :class="{'black--text': !$vuetify.theme.dark}">x{{ $formatNum(charges) }}</span>
</template>
</v-badge>
</span>
</template>
Expand Down
37 changes: 4 additions & 33 deletions src/components/partial/horde/EnemyActive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,15 @@
</template>
</v-badge>
</template>
<div class="text-center mt-0">
<v-icon small class="mr-1">mdi-timer</v-icon>
<span>{{ $formatTime(cooldown) }}</span>
<span v-if="active.cooldown > 0 && hasUsesLeft">&nbsp;({{ $formatTime(Math.ceil(active.cooldown)) }})</span>
<template v-if="active.uses !== null">
<v-icon small>mdi-circle-small</v-icon>
<span>{{ $formatNum(active.uses) }} / {{ $formatNum(maxUses) }}</span>
</template>
</div>
<div class="mt-0" v-for="(elem, key) in effect" :key="key">
<span v-if="elem.value === null">{{ $vuetify.lang.t(`$vuetify.horde.active.${ elem.type }`) }}</span>
<template v-else>
<span>{{ $vuetify.lang.t(`$vuetify.horde.active.${ elem.type }.0`) }} </span>
<span v-if="['revive', 'divisionShield'].includes(elem.type)">{{ $formatNum(elem.value) }} </span>
<span v-else-if="['stun', 'silence'].includes(elem.type)">{{ $formatTime(elem.value) }} </span>
<span v-else>{{ $formatNum(elem.value * 100, true) }}% </span>
<span v-if="elem.type === 'poison' || elem.type.substring(0, 6) === 'damage'">({{ $formatNum(elem.value * enemyAttack) }}) </span>
<span v-else-if="elem.type === 'heal'">({{ $formatNum(elem.value * enemyMaxHealth) }}) </span>
<span>{{ $vuetify.lang.t(`$vuetify.horde.active.${ elem.type }.1`) }}</span>
</template>
</div>
<enemy-active-tooltip class="mt-0" :name="name" :level="sigilLevel"></enemy-active-tooltip>
</gb-tooltip>
</template>

<script>
import EnemyActiveTooltip from './EnemyActiveTooltip.vue';
export default {
components: { EnemyActiveTooltip },
props: {
name: {
type: String,
Expand All @@ -81,18 +64,6 @@ export default {
cooldownPercent() {
return 100 * (1 - (this.active.cooldown / this.cooldown));
},
effect() {
return this.sigil.active.effect(this.sigilLevel, this.$store.state.horde.bossFight);
},
enemyMaxHealth() {
return this.$store.state.horde.enemy.maxHealth;
},
enemyAttack() {
return this.$store.state.horde.enemy.attack;
},
maxUses() {
return this.sigil.active.uses(this.sigilLevel, this.$store.state.horde.bossFight);
},
hasUsesLeft() {
return this.active.uses === null || this.active.uses > 0;
}
Expand Down
79 changes: 79 additions & 0 deletions src/components/partial/horde/EnemyActiveTooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<template>
<div>
<div class="text-center">
<v-icon small class="mr-1">mdi-timer</v-icon>
<span>{{ $formatTime(cooldown) }}</span>
<span v-if="showBase">&nbsp;({{ $formatTime(Math.ceil(startCooldown)) }})</span>
<span v-else-if="active.cooldown > 0 && hasUsesLeft">&nbsp;({{ $formatTime(Math.ceil(active.cooldown)) }})</span>
<template v-if="maxUses !== null">
<v-icon small>mdi-circle-small</v-icon>
<span v-if="showBase">{{ $formatNum(maxUses) }}</span>
<span v-else>{{ $formatNum(active.uses) }} / {{ $formatNum(maxUses) }}</span>
</template>
</div>
<div class="mt-0" v-for="(elem, key) in effect" :key="key">
<span v-if="elem.value === null">{{ $vuetify.lang.t(`$vuetify.horde.active.${ elem.type }`) }}</span>
<template v-else>
<span>{{ $vuetify.lang.t(`$vuetify.horde.active.${ elem.type }.0`) }}&nbsp;</span>
<span v-if="['revive', 'divisionShield'].includes(elem.type)">{{ $formatNum(elem.value) }}</span>
<span v-else-if="['stun', 'silence'].includes(elem.type)">{{ $formatTime(elem.value) }}</span>
<span v-else>{{ $formatNum(elem.value * 100, true) }}%</span>
<template v-if="!showBase">
<span v-if="elem.type === 'poison' || elem.type.substring(0, 6) === 'damage'">({{ $formatNum(elem.value * enemyAttack) }})</span>
<span v-else-if="elem.type === 'heal'">({{ $formatNum(elem.value * enemyMaxHealth) }})</span>
</template>
<span>&nbsp;{{ $vuetify.lang.t(`$vuetify.horde.active.${ elem.type }.1`) }}</span>
</template>
</div>
</div>
</template>

<script>
export default {
props: {
name: {
type: String,
required: true
},
level: {
type: Number,
required: false,
default: 1
},
showBase: {
type: Boolean,
required: false,
default: false
}
},
computed: {
active() {
return this.$store.state.horde.enemy ? this.$store.state.horde.enemy.active[this.name] : {cooldown: 0, uses: 0};
},
sigil() {
return this.$store.state.horde.sigil[this.name];
},
cooldown() {
return Math.ceil(this.sigil.active.cooldown(this.level, this.$store.state.horde.bossFight));
},
startCooldown() {
return Math.ceil(this.sigil.active.startCooldown(this.level, this.$store.state.horde.bossFight));
},
effect() {
return this.sigil.active.effect(this.level, this.$store.state.horde.bossFight);
},
enemyMaxHealth() {
return this.$store.state.horde.enemy?.maxHealth;
},
enemyAttack() {
return this.$store.state.horde.enemy?.attack;
},
maxUses() {
return this.sigil.active.uses(this.level, this.$store.state.horde.bossFight);
},
hasUsesLeft() {
return this.active.uses === null || this.active.uses > 0;
}
}
}
</script>
8 changes: 6 additions & 2 deletions src/components/partial/horde/Sigil.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
</v-badge>
</template>
<display-row class="mt-0" v-for="(item, key) in stats" :key="key" :name="item.name" :type="item.type" :after="item.amount"></display-row>
<div v-if="sigil.active">{{ $vuetify.lang.t('$vuetify.horde.sigil.hasActive') }}</div>
<template v-if="sigil.active">
<div>{{ $vuetify.lang.t('$vuetify.horde.sigil.hasActive') }}:</div>
<enemy-active-tooltip :name="name" :level="Math.max(tier, 1)" show-base></enemy-active-tooltip>
</template>
<alert-text v-if="sigil.minZone === Infinity" type="info">{{ $vuetify.lang.t(`$vuetify.horde.sigil.special`) }}</alert-text>
<alert-text v-else-if="sigil.minZone > 0" type="info">{{ $vuetify.lang.t(`$vuetify.horde.sigil.min`, sigil.minZone) }}</alert-text>
</gb-tooltip>
Expand All @@ -30,9 +33,10 @@
import { capitalize } from '../../../js/utils/format';
import AlertText from '../render/AlertText.vue';
import DisplayRow from '../upgrade/DisplayRow.vue';
import EnemyActiveTooltip from './EnemyActiveTooltip.vue';
export default {
components: { DisplayRow, AlertText },
components: { DisplayRow, AlertText, EnemyActiveTooltip },
props: {
name: {
type: String,
Expand Down
15 changes: 13 additions & 2 deletions src/components/partial/horde/Status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="d-flex flex-wrap justify-center align-center">
<gb-tooltip :min-width="0">
<template v-slot:activator="{ on, attrs }">
<v-chip class="ma-1 boss-count-chip balloon-text-dynamic" :color="`pale-green ${ themeModifier }`" v-bind="attrs" v-on="on">
<v-chip @click="toggleTaunt" class="ma-1 boss-count-chip balloon-text-dynamic" :color="`${ isTaunted ? 'pale-red' : 'pale-green' } ${ themeModifier }`" v-bind="attrs" v-on="on">
<v-icon class="mr-1" size="14">mdi-emoticon-frown</v-icon>
<span v-if="enemyTimer < enemyRespawn">{{ $formatTime(enemyRespawn - enemyTimer) }}</span>
<div v-else class="d-flex align-center">
Expand All @@ -33,6 +33,13 @@
</v-chip>
</template>
<div class="mt-0">{{ $vuetify.lang.t(`$vuetify.horde.enemyRespawn`, $formatTime(enemyRespawn), $formatNum(enemyRespawnMax)) }}</div>
<h3 class="text-center">{{ $vuetify.lang.t(`$vuetify.horde.taunt.title`) }}</h3>
<div>{{ $vuetify.lang.t(`$vuetify.horde.taunt.description`) }}</div>
<div>
<span v-if="isTaunted">{{ $vuetify.lang.t(`$vuetify.horde.taunt.on`) }}</span>
<span v-else>{{ $vuetify.lang.t(`$vuetify.horde.taunt.off`) }}</span>
<span>&nbsp;({{ $vuetify.lang.t(`$vuetify.horde.taunt.clickToToggle`) }})</span>
</div>
</gb-tooltip>
<gb-tooltip v-if="canSpawnMiniboss" :title-text="$vuetify.lang.t(`$vuetify.horde.miniboss`)">
<template v-slot:activator="{ on, attrs }">
Expand Down Expand Up @@ -151,7 +158,8 @@ export default {
canSeeTower: state => state.unlock.hordeBrickTower.see,
currentTower: state => state.horde.currentTower,
towerKey: state => state.currency.horde_towerKey,
canSeeHeirloom: state => state.unlock.hordeHeirlooms.see
canSeeHeirloom: state => state.unlock.hordeHeirlooms.see,
isTaunted: state => state.horde.taunt
}),
...mapGetters({
comboRequired: 'horde/comboRequired',
Expand Down Expand Up @@ -271,6 +279,9 @@ export default {
},
toggleTowers() {
this.showTowers = !this.showTowers;
},
toggleTaunt() {
this.$store.commit('horde/updateKey', {key: 'taunt', value: !this.isTaunted});
}
}
}
Expand Down
11 changes: 8 additions & 3 deletions src/components/partial/village/Resources.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<div>
<div class="d-flex flex-wrap justify-center ma-1">
<currency large class="ma-1" name="village_coin" :baseArray="foodConversion"></currency>
<currency large class="ma-1" name="village_coin" :baseArray="foodConversion">
<alert-text type="info">{{ $vuetify.lang.t('$vuetify.village.coinNotAffected') }}</alert-text>
</currency>
</div>
<div v-if="stat.village_wood.total > 0" class="text-center mt-2">{{ $vuetify.lang.t(`$vuetify.village.material`) }}</div>
<div class="d-flex flex-wrap justify-center ma-1">
Expand All @@ -18,7 +20,9 @@
<div v-if="stat.village_knowledge.total > 0" class="text-center mt-2">{{ $vuetify.lang.t(`$vuetify.village.mental`) }}</div>
<div class="d-flex flex-wrap justify-center ma-1">
<template v-for="item in mental">
<currency :key="item" class="ma-1" :class="{'premium-glow': mental_premium.includes(item) && upgrade[`village_more${ item.charAt(8).toUpperCase() + item.slice(9) }`].level >= 1}" :name="item"></currency>
<currency :key="item" class="ma-1" :class="{'premium-glow': mental_premium.includes(item) && upgrade[`village_more${ item.charAt(8).toUpperCase() + item.slice(9) }`].level >= 1}" :name="item">
<alert-text v-if="item === 'village_faith'" type="info">{{ $vuetify.lang.t('$vuetify.village.faithNotAffected') }}</alert-text>
</currency>
</template>
</div>
<template v-if="canSeeLoot">
Expand Down Expand Up @@ -73,9 +77,10 @@ import { mapGetters, mapState } from 'vuex';
import { SECONDS_PER_HOUR, VILLAGE_COINS_PER_FOOD } from '../../../js/constants';
import Currency from '../../render/Currency.vue';
import StatBreakdown from '../../render/StatBreakdown.vue';
import AlertText from '../render/AlertText.vue';
export default {
components: { Currency, StatBreakdown },
components: { Currency, StatBreakdown, AlertText },
data: () => ({
mental_premium: ['village_knowledge', 'village_science']
}),
Expand Down
7 changes: 6 additions & 1 deletion src/js/modules/horde.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ export default {
store.commit('horde/updateEnemyKey', {key: 'stunResist', value: enemyStats.stunResist + HORDE_RAMPAGE_STUN_RESIST * rampageDiff});
store.commit('horde/updateKey', {key: 'fightRampage', value: newRampage});
}
} else if (store.state.horde.taunt && !store.state.horde.bossAvailable && store.state.horde.zone === store.state.stat.horde_maxZone.value) {
store.dispatch('horde/updateEnemyStats');
} else {
secondsSpent = Math.min(seconds, HORDE_ENEMY_RESPAWN_TIME - store.state.horde.enemyTimer);
tickEnemyRespawn(secondsSpent);
Expand Down Expand Up @@ -700,6 +702,9 @@ export default {
if (store.state.horde.towerFloor > 0) {
obj.towerFloor = store.state.horde.towerFloor;
}
if (store.state.horde.taunt) {
obj.taunt = true;
}

for (const [key, elem] of Object.entries(store.state.horde.tower)) {
if (elem.highest > 0) {
Expand All @@ -713,7 +718,7 @@ export default {
return obj;
},
loadGame(data) {
['zone', 'combo', 'respawn', 'maxRespawn', 'bossAvailable', 'bossFight', 'fightTime', 'fightRampage', 'enemyTimer', 'minibossTimer', 'nostalgiaLost', 'chosenActive', 'currentTower', 'towerFloor'].forEach(elem => {
['zone', 'combo', 'respawn', 'maxRespawn', 'bossAvailable', 'bossFight', 'fightTime', 'fightRampage', 'enemyTimer', 'minibossTimer', 'nostalgiaLost', 'chosenActive', 'currentTower', 'towerFloor', 'taunt'].forEach(elem => {
if (data[elem] !== undefined) {
store.commit('horde/updateKey', {key: elem, value: data[elem]});
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/modules/horde/achievement.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { buildNum } from "../../utils/format";

export default {
maxZone: {value: () => store.state.stat.horde_maxZone.total, default: 1, milestones: lvl => lvl * 10 + 10, relic: {7: 'ultimateGuide', 11: 'crackedSafe'}},
maxZoneSpeedrun: {value: () => store.state.stat.horde_maxZoneSpeedrun.total, default: 1, milestones: lvl => lvl * 5 + 10, relic: {6: 'dumbbell'}},
maxZoneSpeedrun: {value: () => store.state.stat.horde_maxZoneSpeedrun.total, default: 1, milestones: lvl => lvl * 5 + 10, relic: {8: 'dumbbell'}},
totalDamage: {value: () => store.state.stat.horde_totalDamage.total, milestones: lvl => Math.pow(lvl * 250 + 7500, lvl) * buildNum(10, 'K'), relic: {6: 'newBackpack'}},
maxDamage: {value: () => store.state.stat.horde_maxDamage.total, milestones: lvl => Math.pow(lvl * 250 + 7500, lvl) * 10, relic: {3: 'burningSkull'}},
bone: {value: () => store.state.stat.horde_bone.total, milestones: lvl => Math.pow(buildNum(10, 'K'), lvl) * buildNum(1, 'M'), relic: {2: 'forgottenShield'}},
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 @@ -12,6 +12,7 @@ import v1_2_0 from "./patchnote/v1_2_0";
import v1_3_0 from "./patchnote/v1_3_0";
import v1_3_1 from "./patchnote/v1_3_1";
import v1_3_2 from "./patchnote/v1_3_2";
import v1_3_3 from "./patchnote/v1_3_3";

export default {
name: 'meta',
Expand Down Expand Up @@ -47,6 +48,7 @@ export default {
store.commit('system/initTheme', {name: key, ...elem});
}
for (const [key, elem] of Object.entries({
'1.3.3': v1_3_3,
'1.3.2': v1_3_2,
'1.3.1': v1_3_1,
'1.3.0': v1_3_0,
Expand Down
43 changes: 43 additions & 0 deletions src/js/modules/patchnote/v1_3_3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
export default {
day: '2023-10-18',
content: {
village: [
{
type: 'clarity',
text: '178'
}
],
horde: [
{
type: 'new',
text: '172'
},
{
unlock: 'hordePrestige',
type: 'new',
text: '173'
},
{
unlock: 'hordeItems',
type: 'bugfix',
text: '174'
},
{
unlock: 'hordePrestige',
type: 'bugfix',
text: '176'
},
{
unlock: 'hordePrestige',
type: 'qol',
text: '177'
}
],
achievement: [
{
type: 'balance',
text: '175'
}
]
}
}
11 changes: 10 additions & 1 deletion src/lang/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,8 @@ export default {
lootNeedQuality: 'Benötigt über {0} Qualität',
buildingStat: 'Gesamte Gebäudezahl',
housingStat: 'Gesamte Wohnungszahl (erste 25 pro Gebäude)',
coinNotAffected: 'Münzen werden nicht durch gesamtes Rohstoffeinkommen beeinflusst',
faithNotAffected: 'Glaube wird nicht durch gesamtes Rohstoffeinkommen und Mentale-Ressourcen-Einkommen beeinflusst',
offering: {
name: 'Opfergaben',
description: {
Expand Down Expand Up @@ -1350,7 +1352,7 @@ export default {
recoveryDescription: 'Heile einen Prozentwert deines fehlenden Lebens, wenn du einen Gegner besiegst',
boss: 'Boss',
miniboss: 'Miniboss',
minibossDescription: 'Minibosse nehmen den Platz regulärer Gegner ein und sind etwas stärker. Sie halten wertvolle Beute und bis zu 2 können auf einmal warten',
minibossDescription: 'Minibosse nehmen den Platz regulärer Gegner ein und sind etwas stärker. Sie halten wertvolle Beute und bis zu 2 können auf einmal warten. Einen zu besiegen zählt als 4 besiegte normale Gegner',
minibossSoul: 'Minibosse halten {0} Seelen',
minibossHeirloom: 'Minibosse halten {0} Seelen und haben eine {1}% Erbstück-Chance ({2} Nostalgie)',
poisonPlayer: 'Du bist vergiftet und erleidest {0} Schaden pro Sekunde',
Expand All @@ -1365,6 +1367,13 @@ export default {
bossBioResist: 'Bosse erleiden nur 10% biologischen Schaden',
minibossBioResist: 'Minibosse erleiden nur 50% biologischen Schaden',
enemyRespawn: 'Gegner brauchen {0} zum Erscheinen und bis zu {1} Gegner können warten. Wird ein Boss besiegt, erscheinen sofort alle Gegner',
taunt: {
title: 'Spottmodus',
description: 'Im Spottmodus erscheinen Gegner auch dann, wenn keine warten. Alle Gegner, die frühzeitig erscheinen, halten aber keine Beute. Verspotten funktioniert nur auf dem Weg zum Boss',
on: 'Der Spottmodus ist an',
off: 'Der Spottmodus ist aus',
clickToToggle: 'klicke zum Umschalten'
},
reachBoss: {
title: 'Erreiche den Boss',
description: 'Um den Boss dieser Zone herauszufordern, musst du {0} Gegner in Folge besiegen, ohne zu sterben'
Expand Down
Loading

0 comments on commit 2723dbc

Please sign in to comment.