Squashed commit of the following:

commit 866f074a15512e2f897d007ad1a5379ffee456d7
Author: Kalista Payne <kalista@habitica.com>
Date:   Wed Mar 18 15:51:18 2026 -0500

    fix(quests): remove backticks from text

commit d06fc2825e8638d5c127277f92ef94f26f3daba0
Author: Kalista Payne <kalista@habitica.com>
Date:   Wed Mar 18 13:16:32 2026 -0500

    fix(background): add missing data

commit 55156c5f808e3ad9bf16d6465b5b7596fce12631
Author: Kalista Payne <kalista@habitica.com>
Date:   Wed Mar 18 13:00:43 2026 -0500

    fix(lint): max-len

commit db88092acfceac7c465c1e01638ae18bd1572ee3
Author: Kalista Payne <kalista@habitica.com>
Date:   Wed Mar 18 12:56:30 2026 -0500

    fix(customization): show event backgrounds for AF

commit d6fd1ce7fa1b15771786518656a6663e46ba42bc
Author: Phillip Thelen <phillip@habitica.com>
Date:   Tue Mar 17 15:55:53 2026 +0100

    set release date

commit b876d8c78928283a81fadfeb1116e09c73f3e25f
Author: Phillip Thelen <phillip@habitica.com>
Date:   Tue Mar 17 11:40:17 2026 +0100

    Improve swap handling

commit f75a4d01473b492ef28b2324f2defe46cb3845f8
Author: Phillip Thelen <phillip@habitica.com>
Date:   Tue Mar 17 11:22:42 2026 +0100

    use correct name for bear sprites

commit 195db1b1328a73043e1a1c9014e9ce22a3df72f3
Author: Phillip Thelen <phillip@habitica.com>
Date:   Mon Mar 16 23:01:35 2026 +0100

    more fix

commit a42d3f08d749abf2a072805e4c54f67564c1e320
Author: Phillip Thelen <phillip@habitica.com>
Date:   Mon Mar 16 18:43:21 2026 +0100

    fix test

commit 9c06299c343fd29c5dcddfe62e83d410f6c93115
Author: Phillip Thelen <phillip@habitica.com>
Date:   Mon Mar 16 09:13:13 2026 +0100

    AF tweaks

commit 5465e23e679cad1d81404a0911204aaf18c231b7
Author: Kalista Payne <kalista@habitica.com>
Date:   Wed Mar 11 19:43:01 2026 -0500

    fix(sprites): add missing gif redirects

commit 5721ecc6f2b21fd6049a028fddc79fb6dea0434e
Author: Kalista Payne <kalista@habitica.com>
Date:   Tue Mar 10 16:34:26 2026 -0500

    chore(css): run sprites

commit 2184ff2e6937459c404f3067c9d0662c9d908074
Author: Kalista Payne <kalista@habitica.com>
Date:   Tue Mar 10 10:38:34 2026 -0500

    fix(test): date

commit d684a7297c2f86f417677a1f0fa7ae47c8d4d1d6
Author: Kalista Payne <kalista@habitica.com>
Date:   Tue Mar 10 10:32:04 2026 -0500

    fix(test): update for 2026, also more lint

commit 82e7947fd7bc99d1dd33ff08490f2bda0ff74d2b
Author: Kalista Payne <kalista@habitica.com>
Date:   Tue Mar 10 10:22:05 2026 -0500

    fix(event): lint and missing pieces

commit 96818b2d778848fdbff99afdf50b9f305c25b1a9
Author: Kalista Payne <kalista@habitica.com>
Date:   Mon Mar 9 20:11:22 2026 -0500

    feat(event): finished Alien build

commit 4c9763b676f5873d83c4c9c249e7e0ffb5905a2e
Author: Kalista Payne <kalista@habitica.com>
Date:   Fri Mar 6 16:30:36 2026 -0600

    wip(event): April Fools 2026 build

commit 2f16a016e63f523c81a9425d5d7c49e9138c46a5
Author: Phillip Thelen <phillip@habitica.com>
Date:   Wed Feb 4 14:16:50 2026 +0100

    add april fools tests

commit cd1d926c9898f5faf4fe82e4ecccc4d801248f06
Author: Phillip Thelen <phillip@habitica.com>
Date:   Wed Feb 4 14:09:16 2026 +0100

    make april fools cycle through

commit d8a4216c412437448ea15f8fd456765ebd5f53f9
Author: Phillip Thelen <phillip@habitica.com>
Date:   Mon Feb 2 14:41:26 2026 +0100

    fix lint

commit 8265a15923f34ad1afdaab05992c3def5cb4d202
Author: Phillip Thelen <phillip@habitica.com>
Date:   Mon Feb 2 12:34:46 2026 +0100

    name key more generic

commit 9c7bde8ad563bd346b548fdf59fb0454910ae256
Author: Phillip Thelen <phillip@habitica.com>
Date:   Mon Feb 2 12:26:43 2026 +0100

    right date for april fools

commit c2b92c6311d60a609e8b8743fc0efe3cbac853b6
Author: Phillip Thelen <phillip@habitica.com>
Date:   Mon Feb 2 12:26:19 2026 +0100

    rework how april fools works
This commit is contained in:
Kalista Payne
2026-03-19 15:09:32 -05:00
parent d37d3bc5ac
commit 31b2781333
19 changed files with 246 additions and 202 deletions
@@ -696,6 +696,9 @@ const backgrounds = {
birthday_bash: {
price: 0,
},
on_a_strange_planet: {
price: 0,
},
},
timeTravelBackgrounds: {
airship: {
@@ -0,0 +1,39 @@
import eggs from '../eggs';
import stable from '../stable';
const SWAPS = [
'Veggie',
'Dessert',
'VirtualPet',
'TeaShop',
'Fungi',
'Cryptid',
'Alien',
];
export function getMatchingSwap (date = new Date()) {
const year = date.getFullYear();
const diff = year - 2020;
return SWAPS[diff % SWAPS.length];
}
export function makeSubstitutionMap (swappedPotion) {
const substitutions = {
pets: {
default: `Pet-Dragon-${swappedPotion}`,
noPet: `Pet-Wolf-${swappedPotion}`,
noPetIOS: `Pet-TigerCub-${swappedPotion}`,
noPetAndroid: `Pet-Cactus-${swappedPotion}`,
},
};
for (const pet of Object.keys(stable.specialPets)) {
substitutions.pets[`Pet-${pet}`] = `Pet-Dragon-${swappedPotion}`;
}
for (const egg of Object.keys(eggs.drops)) {
substitutions.pets[`Pet-${egg}-`] = `Pet-${egg}-${swappedPotion}`;
}
for (const egg of Object.keys(eggs.quests)) {
substitutions.pets[`Pet-${egg}-`] = `Pet-BearCub-${swappedPotion}`;
}
return substitutions;
}
@@ -1,5 +1,6 @@
/* eslint-disable key-spacing */
import moment from 'moment';
import { getMatchingSwap, makeSubstitutionMap } from './aprilFools';
// gem block: number of gems
const gemsPromo = {
@@ -53,7 +54,7 @@ export const REPEATING_EVENTS = {
aprilFools: {
start: new Date('1970-04-01T04:00-04:00'),
end: new Date('1970-04-02T03:59-04:00'),
aprilFools: 'Cryptid',
spriteSubstitutions: makeSubstitutionMap(getMatchingSwap()),
},
aprilFoolsResale: {
start: new Date('1970-04-03T04:00-04:00'),
@@ -65,6 +66,7 @@ export const REPEATING_EVENTS = {
'virtualpet',
'waffle',
'fungi',
'alien',
],
},
{
@@ -15,6 +15,7 @@ export default [
'Mount_Body_Gryphon-Gryphatrice',
'Mount_Head_Dragon-Hydra',
'Mount_Head_Gryphon-Gryphatrice',
'Pet_HatchingPotion_Alien',
'Pet_HatchingPotion_Cryptid',
'Pet_HatchingPotion_Dessert',
'Pet_HatchingPotion_Fungi',
@@ -24,6 +25,8 @@ export default [
'Pet-Gryphatrice-Jubilant',
'Pet-Gryphon-Gryphatrice',
'Pet-Wolf-Cerberus',
'quest_alien',
'quest_lostMasterclasser4',
'quest_solarSystem',
'quest_virtualpet',
'quest_windup',
@@ -53,4 +53,5 @@ export const HATCHING_POTIONS_RELEASE_DATES = {
Cryptid: { year: 2025, month: 4, day: 3 },
Balloon: { year: 2025, month: 4, day: 21 },
Opal: { year: 2025, month: 5, day: 14 },
Alien: { year: 2026, month: 4, day: 3 },
};
@@ -155,6 +155,10 @@ const wacky = {
canBuy: hasQuestAchievementFunction('fungi'),
},
Cryptid: {},
Alien: {
questPotion: true,
canBuy: hasQuestAchievementFunction('alien'),
},
};
each(drops, (pot, key) => {
@@ -233,6 +233,45 @@ const QUEST_SEASONAL = {
unlock: t('questFungiUnlockText'),
},
},
alien: {
text: t('questAlienText'),
notes: t('questAlienNotes'),
completion: t('questAlienCompletion'),
value: 4,
category: 'hatchingPotion',
boss: {
name: t('questAlienBoss'),
hp: 500,
str: 2,
rage: {
title: t('questAlienRageTitle'),
description: t('questAlienRageDescription'),
value: 50,
healing: 0.3,
effect: t('questAlienRageEffect'),
},
},
drop: {
items: [
{
type: 'hatchingPotions',
key: 'Alien',
text: t('questAlienDropAlienPotion'),
}, {
type: 'hatchingPotions',
key: 'Alien',
text: t('questAlienDropAlienPotion'),
}, {
type: 'hatchingPotions',
key: 'Alien',
text: t('questAlienDropAlienPotion'),
},
],
gp: 40,
exp: 500,
unlock: t('questAlienUnlockText'),
},
},
};
export default QUEST_SEASONAL;
+1 -3
View File
@@ -1,6 +1,4 @@
import each from 'lodash/each';
import moment from 'moment';
import { EVENTS } from './constants/events';
import allEggs from './eggs';
import allPotions from './hatching-potions';
import t from './translation';
@@ -193,7 +191,7 @@ function buildInfo () {
Object.assign(petInfo['Gryphatrice-Jubilant'], {
canBuy () {
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
return false;
},
currency: 'gems',
event: 'birthday10',