mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
Fix: Antidotes to Avatar Transformation Items should be added to Rewards by API (#11353)
* Fix: moved debuffPotions from vue component - Move logic of choosing proper debuf potion from vue component to website commons - introduce new function to get debuffSpellItems * Fix: move debuffPotions to server * Refactoring: move setting of debuff potion to func * Fix: sanity * Refactoring & Tests: - Create test case for get and set DebuffPotionItems functions - Fix setDebuffPotionItems function to not create duplicated debuff items - Make debuff potion type of items unpinnable - Move list of debuffs to constant to reuse it in tests and functions * Fix: typo in test describe * Fix: translation of unpin * Fix: setDebuffPotionItems on cron buffs reset * Fix: use full path for debuff potions
This commit is contained in:
committed by
Matteo Pagliazzi
parent
85eab76a71
commit
5b57d91a9b
@@ -289,6 +289,8 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.snowball = false;
|
||||
user.stats.gp -= 5;
|
||||
// Remove antidote from pinned items
|
||||
user.pinnedItems = user.pinnedItems.filter(item => !item.path.includes('spells.special.salt'));
|
||||
},
|
||||
},
|
||||
spookySparkles: {
|
||||
@@ -320,6 +322,8 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.spookySparkles = false;
|
||||
user.stats.gp -= 5;
|
||||
// Remove antidote from pinned items
|
||||
user.pinnedItems = user.pinnedItems.filter(item => !item.path.includes('spells.special.opaquePotion'));
|
||||
},
|
||||
},
|
||||
shinySeed: {
|
||||
@@ -351,6 +355,8 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.shinySeed = false;
|
||||
user.stats.gp -= 5;
|
||||
// Remove antidote from pinned items
|
||||
user.pinnedItems = user.pinnedItems.filter(item => !item.path.includes('spells.special.petalFreePotion'));
|
||||
},
|
||||
},
|
||||
seafoam: {
|
||||
@@ -382,6 +388,7 @@ spells.special = {
|
||||
cast (user) {
|
||||
user.stats.buffs.seafoam = false;
|
||||
user.stats.gp -= 5;
|
||||
user.pinnedItems = user.pinnedItems.filter(item => !item.path.includes('spells.special.sand'));
|
||||
},
|
||||
},
|
||||
nye: {
|
||||
|
||||
Reference in New Issue
Block a user