mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
Merge branch 'develop' into release
This commit is contained in:
@@ -180,6 +180,35 @@ const basicAchievs = {
|
||||
};
|
||||
Object.assign(achievementsData, basicAchievs);
|
||||
|
||||
const onboardingAchievs = {
|
||||
createdTask: {
|
||||
icon: 'achievement-createdTask',
|
||||
titleKey: 'achievementCreatedTask',
|
||||
textKey: 'achievementCreatedTaskText',
|
||||
},
|
||||
completedTask: {
|
||||
icon: 'achievement-completedTask',
|
||||
titleKey: 'achievementCompletedTask',
|
||||
textKey: 'achievementCompletedTaskText',
|
||||
},
|
||||
hatchedPet: {
|
||||
icon: 'achievement-hatchedPet',
|
||||
titleKey: 'achievementHatchedPet',
|
||||
textKey: 'achievementHatchedPetText',
|
||||
},
|
||||
fedPet: {
|
||||
icon: 'achievement-fedPet',
|
||||
titleKey: 'achievementFedPet',
|
||||
textKey: 'achievementFedPetText',
|
||||
},
|
||||
purchasedEquipment: {
|
||||
icon: 'achievement-purchasedEquipment',
|
||||
titleKey: 'achievementPurchasedEquipment',
|
||||
textKey: 'achievementPurchasedEquipmentText',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, onboardingAchievs);
|
||||
|
||||
const specialAchievs = {
|
||||
contributor: {
|
||||
icon: 'achievement-boot',
|
||||
|
||||
@@ -2,6 +2,7 @@ import each from 'lodash/each';
|
||||
import t from './translation';
|
||||
import { NotAuthorized } from '../libs/errors';
|
||||
import statsComputed from '../libs/statsComputed'; // 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 updateStats from '../fns/updateStats';
|
||||
|
||||
@@ -287,6 +288,7 @@ spells.special = {
|
||||
if (!target.achievements.snowball) target.achievements.snowball = 0;
|
||||
target.achievements.snowball += 1;
|
||||
user.items.special.snowball -= 1;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
salt: {
|
||||
@@ -300,6 +302,7 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.snowball = false;
|
||||
user.stats.gp -= 5;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
spookySparkles: {
|
||||
@@ -318,6 +321,7 @@ spells.special = {
|
||||
if (!target.achievements.spookySparkles) target.achievements.spookySparkles = 0;
|
||||
target.achievements.spookySparkles += 1;
|
||||
user.items.special.spookySparkles -= 1;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
opaquePotion: {
|
||||
@@ -331,6 +335,7 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.spookySparkles = false;
|
||||
user.stats.gp -= 5;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
shinySeed: {
|
||||
@@ -349,6 +354,7 @@ spells.special = {
|
||||
if (!target.achievements.shinySeed) target.achievements.shinySeed = 0;
|
||||
target.achievements.shinySeed += 1;
|
||||
user.items.special.shinySeed -= 1;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
petalFreePotion: {
|
||||
@@ -362,6 +368,7 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.shinySeed = false;
|
||||
user.stats.gp -= 5;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
seafoam: {
|
||||
@@ -380,6 +387,7 @@ spells.special = {
|
||||
if (!target.achievements.seafoam) target.achievements.seafoam = 0;
|
||||
target.achievements.seafoam += 1;
|
||||
user.items.special.seafoam -= 1;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
sand: {
|
||||
@@ -393,6 +401,7 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.seafoam = false;
|
||||
user.stats.gp -= 5;
|
||||
setDebuffPotionItems(user);
|
||||
},
|
||||
},
|
||||
nye: {
|
||||
|
||||
Reference in New Issue
Block a user