mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
feat(event): Shiny Seed and Egg Hunt countdowns
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="quest.event && popoverVersion">
|
<div v-if="quest.event">
|
||||||
{{ limitedString }}
|
{{ limitedString }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,10 +131,6 @@ export default {
|
|||||||
quest: {
|
quest: {
|
||||||
type: Object,
|
type: Object,
|
||||||
},
|
},
|
||||||
popoverVersion: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.event"
|
v-if="item.event && item.purchaseType !== 'quests'"
|
||||||
:class="item.purchaseType === 'gear' ? 'mt-4' : 'mt-2'"
|
:class="item.purchaseType === 'gear' ? 'mt-4' : 'mt-2'"
|
||||||
>
|
>
|
||||||
{{ limitedString }}
|
{{ limitedString }}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import statsComputed from '../libs/statsComputed'; // eslint-disable-line import
|
|||||||
import setDebuffPotionItems from '../libs/setDebuffPotionItems'; // eslint-disable-line import/no-cycle
|
import setDebuffPotionItems from '../libs/setDebuffPotionItems'; // eslint-disable-line import/no-cycle
|
||||||
import crit from '../fns/crit'; // eslint-disable-line import/no-cycle
|
import crit from '../fns/crit'; // eslint-disable-line import/no-cycle
|
||||||
import updateStats from '../fns/updateStats';
|
import updateStats from '../fns/updateStats';
|
||||||
|
import { EVENTS } from './constants';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
@@ -352,6 +353,7 @@ spells.special = {
|
|||||||
previousPurchase: true,
|
previousPurchase: true,
|
||||||
target: 'user',
|
target: 'user',
|
||||||
notes: t('spellSpecialShinySeedNotes'),
|
notes: t('spellSpecialShinySeedNotes'),
|
||||||
|
event: EVENTS.spring2021,
|
||||||
cast (user, target, req) {
|
cast (user, target, req) {
|
||||||
if (!user.items.special.shinySeed) throw new NotAuthorized(t('spellNotOwned')(req.language));
|
if (!user.items.special.shinySeed) throw new NotAuthorized(t('spellNotOwned')(req.language));
|
||||||
target.stats.buffs.snowball = false;
|
target.stats.buffs.snowball = false;
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
class: `inventory_special_${item.key}`,
|
class: `inventory_special_${item.key}`,
|
||||||
path: `spells.special.${item.key}`,
|
path: `spells.special.${item.key}`,
|
||||||
pinType: 'seasonalSpell',
|
pinType: 'seasonalSpell',
|
||||||
|
event: item.event,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'debuffPotion':
|
case 'debuffPotion':
|
||||||
@@ -215,6 +216,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
purchaseType: 'quests',
|
purchaseType: 'quests',
|
||||||
path: `quests.${item.key}`,
|
path: `quests.${item.key}`,
|
||||||
pinType: 'seasonalQuest',
|
pinType: 'seasonalQuest',
|
||||||
|
event: item.event,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'gear':
|
case 'gear':
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default {
|
|||||||
}
|
}
|
||||||
: {},
|
: {},
|
||||||
|
|
||||||
availableSpells: moment().isBetween('2021-04-06T08:00-05:00', '2021-04-30T20:00-05:00')
|
availableSpells: SHOP_OPEN && moment().isAfter('2021-04-06T08:00-05:00')
|
||||||
? [
|
? [
|
||||||
'shinySeed',
|
'shinySeed',
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user