diff --git a/website/client/assets/images/npc/broken/seasonal_shop_broken_background.png b/website/client/assets/images/npc/broken/seasonal_shop_broken_background.png new file mode 100644 index 0000000000..0c4a79919c Binary files /dev/null and b/website/client/assets/images/npc/broken/seasonal_shop_broken_background.png differ diff --git a/website/client/assets/images/npc/broken/seasonal_shop_broken_layer.png b/website/client/assets/images/npc/broken/seasonal_shop_broken_layer.png new file mode 100644 index 0000000000..f071210b10 Binary files /dev/null and b/website/client/assets/images/npc/broken/seasonal_shop_broken_layer.png differ diff --git a/website/client/assets/images/npc/broken/seasonal_shop_broken_npc.png b/website/client/assets/images/npc/broken/seasonal_shop_broken_npc.png new file mode 100644 index 0000000000..897faf3154 Binary files /dev/null and b/website/client/assets/images/npc/broken/seasonal_shop_broken_npc.png differ diff --git a/website/client/assets/images/world-boss/rage_strike-market@2x.png b/website/client/assets/images/world-boss/rage_strike-market@2x.png new file mode 100644 index 0000000000..3f98a6ed9c Binary files /dev/null and b/website/client/assets/images/world-boss/rage_strike-market@2x.png differ diff --git a/website/client/assets/images/world-boss/rage_strike-quests@2x.png b/website/client/assets/images/world-boss/rage_strike-quests@2x.png new file mode 100644 index 0000000000..1501155b56 Binary files /dev/null and b/website/client/assets/images/world-boss/rage_strike-quests@2x.png differ diff --git a/website/client/assets/images/world-boss/rage_strike-seasonalShop@2x.png b/website/client/assets/images/world-boss/rage_strike-seasonalShop@2x.png new file mode 100644 index 0000000000..1b74cef647 Binary files /dev/null and b/website/client/assets/images/world-boss/rage_strike-seasonalShop@2x.png differ diff --git a/website/client/assets/images/rage_strike2x.png b/website/client/assets/images/world-boss/rage_strike@2x.png similarity index 100% rename from website/client/assets/images/rage_strike2x.png rename to website/client/assets/images/world-boss/rage_strike@2x.png diff --git a/website/client/components/groups/tavern.vue b/website/client/components/groups/tavern.vue index 0314ade398..17b32e8a19 100644 --- a/website/client/components/groups/tavern.vue +++ b/website/client/components/groups/tavern.vue @@ -69,12 +69,15 @@ .col-sm-5.d-flex strong {{ $t('rageStrikes') }} .svg-icon.boss-icon.information-icon.ml-2(v-html="icons.informationIcon", v-b-tooltip.hover.top="questData.boss.rage.description()") - .col-sm-2 - img.rage-strike(src="~assets/images/rage_strike2x.png") - .col-sm-2 - img.rage-strike(src="~assets/images/rage_strike2x.png") - .col-sm-2 - img.rage-strike(src="~assets/images/rage_strike2x.png") + .col-sm-2.text-center + img.rage-strike(src="~assets/images/world-boss/rage_strike@2x.png", v-if="!group.quest.extra.worldDmg.seasonalShop") + img.rage-strike-active(src="~assets/images/world-boss/rage_strike-seasonalShop@2x.png", v-if="group.quest.extra.worldDmg.seasonalShop") + .col-sm-2.text-center + img.rage-strike(src="~assets/images/world-boss/rage_strike@2x.png", v-if="!group.quest.extra.worldDmg.market") + img.rage-strike-active(src="~assets/images/world-boss/rage_strike-market@2x.png", v-if="group.quest.extra.worldDmg.market") + .col-sm-2.text-center + img.rage-strike(src="~assets/images/world-boss/rage_strike@2x.png", v-if="!group.quest.extra.worldDmg.quests") + img.rage-strike-active(src="~assets/images/world-boss/rage_strike-quests@2x.png", v-if="group.quest.extra.worldDmg.quests") .boss-description.p-3(:style="{'border-color': questData.colors.extralight}", @click="sections.worldBoss = !sections.worldBoss") strong.float-left {{ $t('worldBossDescription') }} .float-right @@ -478,6 +481,11 @@ height: auto; } + .rage-strike-active { + max-width: 75px; + height: auto; + } + .world-boss-info-button { width: 100%; background-color: $gray-500; diff --git a/website/client/components/shops/seasonal/index.vue b/website/client/components/shops/seasonal/index.vue index 1c30460371..7ee8ae4f52 100644 --- a/website/client/components/shops/seasonal/index.vue +++ b/website/client/components/shops/seasonal/index.vue @@ -23,7 +23,8 @@ ) .standard-page div.featuredItems - .background(:class="{opened: seasonal.opened}") + .background(:class="{opened: seasonal.opened && !broken, broken: broken}") + .background(:class="{cracked: broken, broken: broken}") div.npc div.featured-label span.rectangle @@ -32,7 +33,8 @@ div.content(v-if="!seasonal.opened") div.featured-label.with-border.closed span.rectangle - span.text(v-once, v-html="seasonal.notes") + span.text(v-if="!broken", v-html="seasonal.notes") + span.text(v-if="broken") {{ $t('seasonalShopBrokenText') }} span.rectangle div.content(v-else-if="seasonal.featured.items.length !== 0") div.featured-label.with-border(v-if='!featuredGearBought') @@ -237,6 +239,18 @@ background-repeat: repeat-x; } + .background.broken { + background: url('~assets/images/npc/broken/seasonal_shop_broken_background.png'); + + background-repeat: repeat-x; + } + + .background.cracked { + background: url('~assets/images/npc/broken/seasonal_shop_broken_layer.png'); + + background-repeat: repeat-x; + } + .content { display: flex; flex-direction: column; @@ -259,10 +273,15 @@ } } - .opened .npc{ + .opened .npc { background: url('~assets/images/npc/#{$npc_seasonal_flavor}/seasonal_shop_opened_npc.png'); background-repeat: no-repeat; } + + .broken .npc { + background: url('~assets/images/npc/broken/seasonal_shop_broken_npc.png'); + background-repeat: no-repeat; + } } } @@ -355,8 +374,14 @@ featuredGearBought: false, backgroundUpdate: new Date(), + + broken: false, }; }, + async mounted () { + let worldState = await this.$store.dispatch('worldState:getWorldState'); + this.broken = worldState.worldBoss.extra.worldDmg.seasonalShop; + }, computed: { ...mapState({ content: 'content', diff --git a/website/client/store/actions/index.js b/website/client/store/actions/index.js index bbf917552a..4fc0b035f3 100644 --- a/website/client/store/actions/index.js +++ b/website/client/store/actions/index.js @@ -15,6 +15,7 @@ import * as tags from './tags'; import * as hall from './hall'; import * as shops from './shops'; import * as snackbars from './snackbars'; +import * as worldState from './world-state'; // Actions should be named as 'actionName' and can be accessed as 'namespace:actionName' // Example: fetch in user.js -> 'user:fetch' @@ -35,6 +36,7 @@ const actions = flattenAndNamespace({ hall, shops, snackbars, + worldState, }); export default actions; diff --git a/website/client/store/actions/world-state.js b/website/client/store/actions/world-state.js new file mode 100644 index 0000000000..c5b09cea91 --- /dev/null +++ b/website/client/store/actions/world-state.js @@ -0,0 +1,7 @@ +import axios from 'axios'; + +export async function getWorldState () { + let url = '/api/v3/world-state'; + let response = await axios.get(url); + return response.data.data; +} diff --git a/website/common/locales/en/limited.json b/website/common/locales/en/limited.json index 1d68545b6c..52785e0b94 100644 --- a/website/common/locales/en/limited.json +++ b/website/common/locales/en/limited.json @@ -34,6 +34,7 @@ "seasonalShopFallText": "Happy Fall Festival!! Would you like to buy some rare items? They’ll only be available until October 31st!", "seasonalShopWinterText": "Happy Winter Wonderland!! Would you like to buy some rare items? They’ll only be available until January 31st!", "seasonalShopFallTextBroken": "Oh.... Welcome to the Seasonal Shop... We're stocking autumn Seasonal Edition goodies, or something... Everything here will be available to purchase during the Fall Festival event each year, but we're only open until October 31... I guess you should to stock up now, or you'll have to wait... and wait... and wait... *sigh*", + "seasonalShopBrokenText": "My pavilion!!!!!!! My decorations!!!! Oh, the Dysheartener's destroyed everything :( Please help defeat it in the Tavern so I can rebuild!", "seasonalShopRebirth": "If you bought any of this equipment in the past but don't currently own it, you can repurchase it in the Rewards Column. Initially, you'll only be able to purchase the items for your current class (Warrior by default), but fear not, the other class-specific items will become available if you switch to that class.", "candycaneSet": "Candy Cane (Mage)", "skiSet": "Ski-sassin (Rogue)", diff --git a/website/common/locales/en/questsContent.json b/website/common/locales/en/questsContent.json index 74354df408..6f16b9661c 100644 --- a/website/common/locales/en/questsContent.json +++ b/website/common/locales/en/questsContent.json @@ -662,7 +662,7 @@ "questDysheartenerCompletionChat": "`The Dysheartener is DEFEATED!`\n\nTogether, everyone in Habitica strikes a final blow to their tasks, and the Dysheartener rears back, shrieking with dismay. “What's wrong, Dysheartener?” AnnDeLune calls, eyes sparkling. “Feeling discouraged?”\n\nGlowing pink fractures crack across the Dysheartener's carapace, and it shatters in a puff of pink smoke. As a renewed sense of vigor and determination sweeps across the land, a flurry of delightful sweets rains down upon everyone.\n\nThe crowd cheers wildly, hugging each other as their pets happily chew on the belated Valentine's treats. Suddenly, a joyful chorus of song cascades through the air, and gleaming silhouettes soar across the sky.\n\nOur newly-invigorated optimism has attracted a flock of Hopeful Hippogriffs! The graceful creatures alight upon the ground, ruffling their feathers with interest and prancing about. “It looks like we've made some new friends to help keep our spirits high, even when our tasks are daunting,” Lemoness says.\n\nBeffymaroo already has her arms full with feathered fluffballs. “Maybe they'll help us rebuild the damaged areas of Habitica!”\n\nCrooning and singing, the Hippogriffs lead the way as all the Habitcans work together to restore our beloved home.", "questDysheartenerBossRageTitle": "Shattering Heartbreak", "questDysheartenerBossRageDescription": "The Rage Attack gauge fills when Habiticans miss their Dailies. If it fills up, the Dysheartener will unleash its Shattering Heartbreak attack on one of Habitica's shopkeepers, so be sure to do your tasks!", - "questDysheartenerBossRageSeasonal": "`The Dysheartener uses SHATTERING HEARTBREAK!`\n\nOh, no! After feasting on our undone Dailies, the Dysheartener has gained the strength to unleash its Shattering Heartbreak attack. With a shrill shriek, it brings its spiny forelegs down upon the gazebo that houses the Seasonal Shop! The concussive blast of magic shreds the wood, and the Seasonal Sorceress is overcome by sorrow at the sight.\n\nQuickly, let's keep doing our Dailies so that the beast won't strike again!", + "questDysheartenerBossRageSeasonal": "`The Dysheartener uses SHATTERING HEARTBREAK!`\n\nOh, no! After feasting on our undone Dailies, the Dysheartener has gained the strength to unleash its Shattering Heartbreak attack. With a shrill shriek, it brings its spiny forelegs down upon the pavilion that houses the Seasonal Shop! The concussive blast of magic shreds the wood, and the Seasonal Sorceress is overcome by sorrow at the sight.\n\nQuickly, let's keep doing our Dailies so that the beast won't strike again!", "questDysheartenerBossRageMarket": "`The Dysheartener uses SHATTERING HEARTBREAK!`\n\nHelp! After feasting on our incomplete Dailies, the Dysheartener lets out another Shattering Heartbreak attack, smashing the walls and floor of the Market! As stone rains down, Alex the Merchant weeps at his crushed merchandise, stricken by the destruction.\n\nWe can't let this happen again! Be sure to do all our your Dailies to prevent the Dysheartener from using its final strike.", "questDysheartenerBossRageQuests": "`The Dysheartener uses SHATTERING HEARTBREAK!`\n\nAaaah! We've left our Dailies undone again, and the Dysheartener has mustered the energy for one final blow against our beloved shopkeepers. The countryside around Ian the Quest Master is ripped apart by its Shattering Heartbreak attack, and Ian is struck to the core by the horrific vision. We're so close to defeating this monster.... Hurry! Don't stop now!", "questDysheartenerDropHippogriffPet": "Hopeful Hippogriff (Pet)",