Commit Graph

45 Commits

Author SHA1 Message Date
Phillip Thelen
709a14fd51 add some spell related tests 2024-05-17 11:35:14 +02:00
Phillip Thelen
c56c07a0f8 fix buying transformation items 2024-05-16 20:19:26 +02:00
Natalie
3e5226de67 update(content): add 2024 Spring Fling (#15168)
* update(content): add spring fling images, items, and placeholder text

* update(dates) : set canonical dates

* update(dates/quests): set canonical dates for both, add egg quest availability

* update(date): update quest availability start date

* update(content): add magic hatching potions

* fix(dates): canonical dates

* fix(event): add correct event name to potions

* fix(dates): canonical dates

* fix(dates): fix UTC offset, remove package.json and package-lock.json

* fix(dates): canonical

* fix: re-added package.json and package-lock.json

* update(content): add gear strings

* update(content): add Rogue off-hand string, canonical dates
2024-03-13 16:34:41 -05:00
Natalie
0b5ce61555 feat(content): add February items (#15090)
* update(content): add February 2024 items

* feat(content): add October content

* feat(content):update February Content

* feat(content): finish up February content

* fix(backgrounds): tweak consistency

* fix(strings): remove extra whitespace

* fix(event): add missing Valentine features

---------

Co-authored-by: Sabe Jones <sabrecat@gmail.com>
Co-authored-by: Sabe Jones <sabe@habitica.com>
2024-01-26 16:35:02 -06:00
Phillip Thelen
f8d315ff6e Upgrade to mongoose 7 (#14971)
* remove some unused dependencies

* update mongoose version

* make common tests pass

* Make unit tests pass

* make api v3 integration tests pass

* fix lint issues

* fix issue with package-lock

* fix(lint): we don't need no .js

* fix(lint): update to latest config-habitrpg

* chore(npm): update package locks

* fix(test): replace deprecated fn

* chore(package): update eslint-habitrpg again

* fix(lint): server linting

* fix(lint): client linting

* fix(client): correct mangled common imports

* chore(npm): update package-locks

* fix(lint): punctuation, module

---------

Co-authored-by: SabreCat <sabrecat@gmail.com>
Co-authored-by: SabreCat <sabe@habitica.com>
2024-01-16 15:18:47 -06:00
SabreCat
8a45f753ca Merge branch '2023-winner-funderlamb' into release
by @CuriousMagpie
2023-12-17 19:36:15 -06:00
Natalie
f72eef6bff feat(content): prebuild Fall Festival (#14869)
* feat(content): prebuild Fall Festival

* fix(typos): because 2023 is not the same as 2024

* feat(css): having stylesheets is important

* feat(content): ready for review & testing

* fix(tests): account for Sept 09 bundle

* fix(gala): use multi event list more
fix a couple of strings too

* feat(content): Warrior and Rogue text
also fix timing of quest bundle feature

* fix(strings): correct stat boosts

* fix(content): missing mage
also adds missing margin to purchase gems button in buy modal

---------

Co-authored-by: SabreCat <sabe@habitica.com>
2023-09-20 19:46:34 -05:00
Natalie L
c7ed693e18 feat(gala): Add 2023 Summer Splash Gala Items (#14712)
* feat(content): add June subscriber items

* feat(gala): add images

* feat(gala): add code

* feat(gala): text strings

* feat(gala): testing and final updates

* feat(gala): fixed a couple of typos

* fix(event): proofread strings and dates
Also replace empty descriptions for Rogue and Healer

* fix(event): NO EGG

---------

Co-authored-by: SabreCat <sabe@habitica.com>
2023-06-19 16:36:05 -05:00
Phillip Thelen
8150fef993 Database Access optimisations (#14544)
* Optimize database access during spell casting

* load less data when casting spells

* Begin migrating update calls to updateOne and updateMany

* Only update user objects that don’t have notification yet

* fix test

* fix spy

* Don’t unnecessarily update user when requesting invalid guild

* fix sort order for middlewares to not load user twice every request

* fix tests

* fix integration test

* fix skill usage not always deducting mp

* addtest case for blessing spell

* fix healAll

* fix lint

* Fix error for when some spells are used outside of party

* Add check to not run bulk spells in web client

* fix(tags): change const to let

---------

Co-authored-by: SabreCat <sabe@habitica.com>
2023-05-16 12:21:45 -05:00
Natalie L
a363e68080 feat(cont): 2023 Spring Fling content (#14525)
* feat(cont): 2023 Spring Fling

* feat(content): 2023 Spring Fling (attempt to add Jungle Buddies Quest Bundle)

* fix(event): various typos and date ranges

* fix(event): correct countdown on Shiny Seed

* fix(quests): correct TypeError in featured list

* feat(content): update Spring gear to canon desc

---------

Co-authored-by: SabreCat <sabe@habitica.com>
2023-03-17 15:05:04 -05:00
SabreCat
f9db4b9b5b fix(event): correct logic for various Valentine's items 2023-02-13 11:25:02 -06:00
SabreCat
f72224f9f1 fix(event): more date corrections 2022-12-28 11:42:56 -06:00
SabreCat
3adbc33546 fix(event): update Snowball dates 2022-12-27 11:59:15 -06:00
Natalie L
f030135c82 chore(content): add 2022 Fall Festival (#14244)
* chore(submodule): add August 2022 Mystery Items

* update(content): add 2022 Fall Festival content

* update(content): add 2022 Fall Festival content

* update(content): update event dates for release

* fix(lint): remove extra spaces
also correct typo in gear string keys

* feat(content): remaining descriptions

* fix(event): correct spell availability

* fix(test): work around first-match logic

Co-authored-by: Sabe Jones <sabrecat@gmail.com>
Co-authored-by: SabreCat <sabe@habitica.com>
2022-09-19 16:55:53 -05:00
SabreCat
9a879d566e fix(content): correct availability range for Seafoam 2022-07-12 10:05:02 -05:00
SabreCat
d0c736a7a6 fix(gala): correct dates on seeds and customizations 2022-04-12 14:36:59 -05:00
SabreCat
5973bca327 feat(event): New Year's Eve 2021 2021-12-30 13:34:04 -06:00
Sabe Jones
f4bf576c2f feat(content): enable Spooky Sporklies 2021-10-12 16:01:33 -05:00
Sabe Jones
ee7fa99172 feat(content): Armoire and Backgrounds 2021-07 2021-07-06 15:17:12 -05:00
Sabe Jones
46b8e7f725 fix(event): filter out past seasonal sets in Market
also block purchase of special spells outside their events
also remove hardcoded dates from seasonal shop intro text used on mobile
2021-04-09 15:14:18 -05:00
Sabe Jones
9c402152e8 feat(event): Shiny Seed and Egg Hunt countdowns 2021-04-08 16:26:32 -05:00
Jalansh
c0bf2cffea Casting Chilling Frost and Stealth skill again will not be processed and return an error instead. Fixes #12361. (#12404)
* Added logic for a repeating Chilling Frost skill. Added test case for redundant chilling frost skill cast. Added comments for the logic of repeating Stealth skill because of an error.

* Added logic for a repeating Stealth skill. Avoiding MP reduction still pending because of console error. Test cases pending.

* Completed the logic for a repeated Stealth skill. Added repeated frost skill cast check in common. Removed exclusive test. Test cases are pending.

* Added test case for Stealth skill recast. Fixed lint errors. Fixed a flaw in if statement which led to test case failure.

* Fixed lint errors in test case.

* Added a common JSON entry for skil recasts in three files. Other files remaining. Added Chilling Frost recast check in common code. Modified test cases.

* Added spellDisabled condition in client code.

* Reverted JSON messages for three languages. Added spellAlreadyCast attribute to JSON file in locales/en. Made changes for showing appropriate message in client code.

* Added an import for throwing BadRequest in common code. Modified test case accordingly.

* Update website/common/script/content/spells.js

Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>

* Added target and req attributes in cast() method arguments.

* Changed common code test case because of increased function parameters. Moved chilling frost test casse to common tests instead of server tests.

* Changed the test case format in common tests.

* Added a missing done statement.

* Fixed a minor error which led to failing test case. Removed the exclusive test which led to lint error.

* Fixed lint errors.

* Added a class named 'disabled' for the frontend change.

* fix(skills): style cleanup

* fix(skills): unfix

Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
2020-08-09 18:25:59 +02:00
Alexandrea Beh
da60f44356 Issue 12220 stealth tooltip show protected dailies (#12255)
* Issue 12220 - Show dailies protected by Stealth

A feature on the old site showed the number of
dailies protected by casting Stealth. This is
now showing again in the Stealth tooltip. The
skillNotes section was not being called. It
adds additional skill-specific info: the dailies
avoided by stealth, whether stealth no longer
needs to be cast (dailies already avoided) and
whether frost is no longer useful to cast.

Speculation: the spellDisabled method had some
commented out code regarding Stealth, which
may have broken due to a change in how dailies
are referenced. I have fixed this line, so it
seemed alright to keep the entirety of the
skillNotes function as it had been. However,
this includes more than just showing dailies
in the tooltip.

Behavior changes:
- tooltip shows dailies avoided for Stealth
- tooltip shows maxed out message for
Stealth when all dailies are covered
- tooltip shows frost already cast message
when frost has already been cast

* clean up conditions in skillNotes

* use future tense for rogue stealth dailies tooltip

* use getter for accurate task length

* consider stealth disabled based on incomplete dailies due, not all dailies

* Issue 12220 - Show dailies protected by Stealth

A feature on the old site showed the number of
dailies protected by casting Stealth. This is
now showing again in the Stealth tooltip. The
skillNotes section was not being called. It
adds additional skill-specific info: the dailies
avoided by stealth, whether stealth no longer
needs to be cast (dailies already avoided) and
whether frost is no longer useful to cast.

Speculation: the spellDisabled method had some
commented out code regarding Stealth, which
may have broken due to a change in how dailies
are referenced. I have fixed this line, so it
seemed alright to keep the entirety of the
skillNotes function as it had been. However,
this includes more than just showing dailies
in the tooltip.

Behavior changes:
- tooltip shows dailies avoided for Stealth
- tooltip shows maxed out message for
Stealth when all dailies are covered
- tooltip shows frost already cast message
when frost has already been cast

* factor out stealthBuffsToAdd for casting stealth + tooltip previewing dailies avoided

* fix merge conflict
2020-06-29 11:12:19 +02:00
Xaz16
aedabd2266 Fix
- Rewrite exports of debuffPotion functions
- Force clear debuffPotions in setDebuffPotionItems to make the same behavior as in develop branch
- Change class of debuffPotion items to shop_{key}
- Resolve lint warnings
2019-10-29 00:27:41 +03:00
Xaz16
60a12e8090 after merge 2019-10-28 23:15:45 +03:00
Matteo Pagliazzi
e0e9811ab6 lint common 2019-10-09 20:08:36 +02:00
Matteo Pagliazzi
0c27fb24a5 start fixing commong 2019-10-09 16:51:17 +02:00
Matteo Pagliazzi
621787915c start upgrading eslint 2019-10-08 16:57:10 +02:00
Matteo Pagliazzi
90f732f545 Revert "Revert "Fix: Antidotes to Avatar Transformation Items should be added to Rewards by API (#11353)" (#11406)"
This reverts commit 50cae0165c.
2019-10-07 16:55:55 +02:00
Matteo Pagliazzi
50cae0165c Revert "Fix: Antidotes to Avatar Transformation Items should be added to Rewards by API (#11353)" (#11406)
This reverts commit 5b57d91a9b.
2019-10-07 16:55:44 +02:00
Aleksey
5b57d91a9b 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
2019-10-06 18:41:39 +02:00
Matteo Pagliazzi
cca5b8492b fix exports 2019-10-01 17:53:48 +02:00
Rene Cordier
7630c02e13 Fixing healing light not being castable when user full hp (#10603)
* Fixing healing light not being castable on server and client sides when user has already full health

Adding integration test for spell cast of healing light when full health

Adding test for heal cast if user has full health

* Fixing ESLint syntax in the spells test files
2018-08-17 12:06:58 +02:00
negue
f3c041a561 antidote display and functionality (#10199)
* update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

* clean up / refactor

* prevent unpin of all items which don't have a pinType

* remove the double boolean casting / fix lint
2018-03-31 13:39:26 +02:00
Mateus Etto
c21726ec61 No Ethereal Surge on Mages (#10121)
* problem location identified (breaks code)

* problem identification notes

* Add class checking to ES (does not yet notify user)

* Add error message

* Add .gitattributes

Attempting to fix line ending disaster

* package stuff

so I can see what's broken

* add reminder and hopefully fix gitattributes

* Fix lint errors

* Redo surge fail notifs

* exterminate rogue comment, fix gitattributes

* Remove unused import 

As per @paglias' request.

* fix(lint): remove extraneous expression

* Delete .gitattributes

* Fix skill key surge -> mpheal

* Show notification only when there are mages in party

* Fix notification being too big and appearing outside the notification div

* Remove unused code

* Only show the notification on parties with 2 or more mages

The caster is a mage, so certainly at least 1 mage will be counted.

* Automated test: mpheal does not heal other mages

* Fix lint error

* Fix typo in test description

* Increase performance of test

* Using target instead of requestion partyMembers again

* Rename variable 'party' to 'partyMembers'

* Update strings in English

* spell -> Skill
2018-03-31 13:34:39 +02:00
Matteo Pagliazzi
33b249d078 Notifications v2 and Bailey API (#9716)
* Added initial bailey api

* wip

* implement new panel header

* Fixed lint

* add ability to mark notification as seen

* add notification count, remove top badge from user and add ability to mark multiple notifications as seen

* add support dismissall and mark all as read

* do not dismiss actionable notif

* mark as seen when menu is opened instead of closed

* implement ordering, list of actionable notifications

* add groups messages and fix badges count

* add notifications for received cards

* send card received notification to target not sender

* rename notificaion field

* fix integration tests

* mark cards notifications as read and update tests

* add mystery items notifications

* add unallocated stats points notifications

* fix linting

* simplify code

* refactoring and fixes

* fix dropdown opening

* start splitting notifications into their own component

* add notifications for inbox messages

* fix unit tests

* fix default buttons styles

* add initial bailey support

* add title and tests to new stuff notification

* add notification if a group task needs more work

* add tests and fixes for marking a task as needing more work

* make sure user._v is updated

* remove console.log

* notification: hover status and margins

* start styling notifications, add separate files and basic functionalities

* fix tests

* start adding mystery items notification

* wip card notification

* fix cards text

* initial implementation inbox messages

* initial implementation group messages

* disable inbox notifications until mobile is ready

* wip group chat messages

* finish mystery and card notifications

* add bailey notification and fix a lot of stuff

* start adding guilds and parties invitations

* misc invitation fixes

* fix lint issues

* remove old code and add key to notifications

* fix tests

* remove unused code

* add link for public guilds invite

* starts to implement needs work notification design and feature

* fixes to needs work, add group task approved notification

* finish needs work feature

* lots of fixes

* implement quest notification

* bailey fixes and static page

* routing fixes

* fixes #      this.$store.dispatch(guilds:join, {groupId: group.id, type: party});

* read notifications on click

* chat notifications

* fix tests for chat notifications

* fix chat notification test

* fix tests

* fix tests (again)

* try awaiting

* remove only

* more sleep

* add bailey tests

* fix icons alignment

* fix issue with multiple points notifications

* remove merge code

* fix rejecting guild invitation

* make remove area bigger

* fix error with notifications and add migration

* fix migration

* fix typos

* add cleanup migration too

* notifications empty state, new counter color, fix marking messages as seen in guilds

* fixes

* add image and install correct packages

* fix mongoose version

* update bailey

* typo

* make sure chat is marked as read after other requests
2018-01-31 11:55:39 +01:00
Alys
8ccec0ed9d New client 2017 09 16 - Fox_town, adjust URLs in links, etc (#9042)
New client 2017 09 16 - Fox_town, adjust URLs in links, etc
2017-09-16 22:19:07 +10:00
Matteo Pagliazzi
3c2cad43d0 fix linting 2017-09-12 18:53:49 +02:00
Matteo Pagliazzi
de67c130fa Client Fixes Sept 11th (#9030)
* fix issues with loading screen on static pages

* another try at timezone issue

* interval -> timeout

* remove references to user.fns
2017-09-12 18:39:33 +02:00
Matteo Pagliazzi
c3ba70f5d6 Tasks scoring and misc fixes (#8925)
* wip: add task scoring and persist checklist items

* remove unused files, fix checklist scoring and start adding support for groups tasks

* amke group and challenge tasks not scoreable
2017-08-04 23:27:11 +02:00
SabreCat
3af756a90d feat(cards): Good Luck card and achievement 2017-07-19 18:24:10 +00:00
MathWhiz
c9427ad34c New cards — Congratulations, Get Well (#8655)
* Add card and achievement sprite for Congrats card

* Add data regarding Congrats card

* Add Get Well card

* Add Get Well images

* Add schema

* Remove `if (!target.flags) target.flags = {};` code from cards

* Remove white backgrounds for congrats sprites

* add inital tests for cards

* Fix card tests

* Fix invalid urls in tests

* Update POST-user_class_cast_spellId.test.js

* Update POST-user_class_cast_spellId.test.js

* Update POST-user_class_cast_spellId.test.js

* Update congrats card sprite

* Fix card logic

* Fix user schema

* Change achievement values for new cards to Number

* Resize congrats and getwell cards

This will make them be sized properly

* Separate Market from Drops

* Extract cards to new section

* fix(sprites): revert spritesheet changes

* Add flags if target does not have them
2017-06-06 19:04:54 -07:00
Matteo Pagliazzi
98c019a0b6 Upgrade lodash to v4 and lint more files (#8495)
* common: import lodash modules separately

* remove test/content from .eslintignore, fix with eslint --fix content/index

* lint test/content

* lint content/index except for lodash methods

* upgrade server/models

* upgrade server/middlewares and server/libs

* port server/controllers/top-level

* port server/controllers/api-v3

* port views and tests

* client old port lodash and _(, missing _.

* upgrade client-old

* port common/script (root level files only)

* port common/script/fns

* port common/libs

* port common/script/ops

* port common/script/content and common/script/libs/shops.js

* misc fixes

* misc fixes

* misc fixes

* more tests fixes

* fix payments test stubbing, down to 2 failing tests

* remove more instances of lodash wrapping

* fix bug where toObject does not clone object

* fix tests

* upgrade migration or add lodash 4 note

* update shrinkwrap

* fix linting

* upgrade eslint-config-habitrpg

* update shrinkwrap

* recompile shrinkwrap
2017-03-01 17:10:48 +01:00
Blade Barringer
248fd1d912 chore(docs): Add documentation for valid skill ids 2016-09-19 21:54:02 -05:00
Blade Barringer
81b7eeeb71 Common reorg (#8025)
* Re-organize common folder

* fix: Correct paths in tests

* fix: move new content to proper folder

* chore: Move audio folder to assets

* Move sprites to sprites assets directory

* Move css sprites to assets directory

* Split out readmes for common code and sprites

* Move images to assets directory

* Move destinatin of shared browserified file

* remove unused file

* move compiled js to client-old

* Fix karma tests

* fix: Correct paths for sprites
2016-09-16 17:18:07 +02:00