Commit Graph

131 Commits

Author SHA1 Message Date
negue
bad3f82dfb Inventory: fixes / layout (#11948)
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
2020-10-19 23:54:51 +02: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
PitiTheGrey
e89ff95a21 Add Bulk Feed via query parameter (#12384)
* Update feed.js

New Tests for bulk feeding

* Update POST-user_feed_pet_food.test.js

Added test for bulk-feeding

* Update user.js

Added 'query paramter' for bulk feeding

* Update pets.json

Added "tooMuchFood" for bulk feeding pets

* Update feed.js

Added query parameter option for bulk feeding pets.

* Update feed.js

fixing lint
(bulk feeding)

* Update POST-user_feed_pet_food.test.js

adjustments for testing bulk feeding

* Update feed.js

Bulk feeding 
amount as integer

* Update pets.json

added invalidAmount for bulk feeding

* Update feed.js

Bulk feeding  
Error handling

* Update feed.js

Bulk - feed  
no hardcoded values

* Update pets.json

Get rid of my german accent.
2020-07-13 16:04:03 +02:00
Matteo Pagliazzi
3d5630d5a2 chore: update sub-deps and fix lint 2020-07-01 18:20:18 +02:00
Matteo Pagliazzi
692d02984b unlock: fix unlocking hair items 2020-06-09 22:13:22 +02:00
Matteo Pagliazzi
d63aafc7f1 fix lint 2020-06-03 18:03:25 +02:00
Matteo Pagliazzi
4c653aa511 unlock: minor fixes and increase tests coverage 2020-06-03 17:56:06 +02:00
Matteo Pagliazzi
0896837528 working code and original tests pass 2020-06-02 23:58:48 +02:00
Matteo Pagliazzi
44ded945dd Merge branch 'develop' into unlock-fixes 2020-05-25 19:00:56 +02:00
Frank Maximus
ea44af0929 buyMysterySet records every item in Amplitude. (#12197)
* buyMysterySet records every item in Amplitude.

Record only the mysterySet

Fixes: #11705

* buyMysterySet records every item in Amplitude.

Extend unit test

Fixes: #11705
2020-05-19 16:39:48 +02:00
Matteo Pagliazzi
613895e294 Merge branch 'develop' into unlock-fixes 2020-05-06 11:49:28 +02:00
Matteo Pagliazzi
ca4efa21cf Reset should unassign Stat Points
Squashed commit of the following:

commit c3c2c364118a90f893ea7fca0a943ea64299234a
Author: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Date:   Sun May 3 22:36:57 2020 +0200

    increase timeout to 100ms to allow a correct route change before reload

commit 5fd85345ce4a1d3684ca991db7f666803c899e63
Merge: a73b5c942b 33331554d3
Author: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Date:   Sun May 3 22:35:33 2020 +0200

    Merge branch 'develop' of https://github.com/PitiTheGrey/habitica into PitiTheGrey-develop

commit 33331554d3
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Sun May 3 22:14:33 2020 +0200

    Order fixed.

    Rekord after reset

commit 3374ed29db
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Sun May 3 22:01:07 2020 +0200

    Return to page  then reset

commit a73b5c942b577dd357ce76380a0102c6823f66c1
Merge: 888f2c8217 0887141ec4
Author: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Date:   Sun May 3 21:44:16 2020 +0200

    Merge branch 'develop' of https://github.com/PitiTheGrey/habitica into PitiTheGrey-develop

commit 0887141ec4
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Sun May 3 20:42:50 2020 +0200

    Remove 2nd try (sorry)

commit e5534a7cba
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Sun May 3 20:14:49 2020 +0200

    removed unnecessary lines of code

commit 888f2c8217611d367bee912b63d4cc3f4def59bb
Merge: aeba14f2e9 e5c5f7f1d0
Author: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Date:   Sun May 3 19:43:02 2020 +0200

    Merge branch 'develop' of https://github.com/PitiTheGrey/habitica into PitiTheGrey-develop

commit e5c5f7f1d0
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Sat May 2 14:54:14 2020 +0200

    Page reload after reset button pressed

commit 1c7385f774
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Tue Apr 28 22:23:59 2020 +0200

    Update reset.js

commit 6a8ad34aa6
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Tue Apr 28 22:15:08 2020 +0200

    Update reset.js

    Resets int, con, per, str to 0
    and Points to 1

commit ba6de48ee3
Author: PitiTheGrey <35431804+PitiTheGrey@users.noreply.github.com>
Date:   Tue Apr 28 22:10:16 2020 +0200

    Update reset.js

    Test if habitica/Website/common/script/ops/reset.js resets
    int, con, per, str to 0
    and Points to 1.
2020-05-03 22:37:34 +02:00
Alys
aeba14f2e9 update API's monthly Gem cap messages to use the friendly website version (#12150)
* allow subscribers to buy their final monthly gem

* replace old montly Gem cap messages with friendlier new ones
2020-05-02 21:49:38 +02:00
Matteo Pagliazzi
26437e7e2e wip: valid unlocked sets 2020-04-24 19:01:03 +02:00
Bart Enkelaar
dc9800d88a Don't bill (subtract gems) multiple times for multiple unlock item set calls (#12116)
* Issue 11050 - Small tuneups to unlock.js

- Use includes i.o. indexOf
- Extract small function for object setting duplication
- Use every instead of custom counter

* Issue 11050 - Properly store purchased items when purchasing them

* Issue 11050 - Couple more tuneups in unlock.js and implemented partial failure scenario

* Issue 11050 - Fix last lint issue

* Issue 11050 - Check path for gear i.o. failing to write it to purchased

* Issue 11050 - Guarantee variation coverage in tests

* Issue 11050 - Use startsWith instead of includes for background check

* Issue 11050 - Don't unlock lost items
2020-04-24 16:16:34 +02:00
Jack Somers
6d6adfd919 Fixes #11119: Added check for wacky pet before feeding (#12106)
* Added check for wacky pet before feeding

* added test for feeding wacky pets

* Fixed typo in test for feeding wacky pets

Co-authored-by: Jack Somers <somersjw9@gmail.com>
2020-04-20 22:17:42 +02:00
Sabe Jones
92c3a640ee feat(content): Bug Bonanza achievement 2020-03-17 09:11:41 -05:00
Sabe Jones
e94631a002 fix(test): food expectation, sigh 2020-03-13 11:10:28 -05:00
Sabe Jones
bd8e67a2ea Adventure Guide Prep (#11883)
* WIP(adventure): prereqs

* WIP(drops): new modal

* WIP(adventure): analytics fixes etc

* feat(adventure): random egg+potion on 2nd task

* fix(lint): noworkies

* fix(modal): correctly construct classes

* fix(tests): expectations and escape

* fix(first-drops): address comments

* fix(first-drops): don't give random drops until first drops

* fix(drops): remove more Level 3 references

* refactor(drops): no need for cloning

* refactor(drops): unnecessary export

* fix(first-drops): force sync

* fix(first-drops): move to server

* fix(first-drops): escape in case we get here with >0 items

* fix(lint): line length

* fix(pet-food): remove unused string
2020-03-07 13:03:13 -06:00
Sabe Jones
34145ed8ca fix(event): decakeify 2020-02-01 12:07:23 -06:00
Sabe Jones
5a065b8a8a fix(test): food expectation 2020-01-28 15:49:50 -06:00
Yo
04a9c97393 Fix Typos (#11644)
* Fix Typos

* Fix More Typos
2019-12-23 17:52:55 +01:00
Matteo Pagliazzi
8f5a0cfe79 Onboarding guide and initial achievements refactoring (#11536)
* add achievements to user

* add placeholder strings

* add to achievements to common script

* add onboarding achievements category

* add notifications

* more notifications

* award achievements

* wip notification panel

* add achievements icons and copy

* do not count onboarding tasks for the created task achievement

* add notes

* sprites, fixes and completion status and reward

* add onboarding panel

* add toggle

* fix toggle size

* fix tests

* fix typo

* add notification

* start adding modal

* fix remove button positionin, timeout, progress bar

* modal + fixes

* disable broken social links from level up modal

* change toggle icon color on hover

* add border bottom to onboarding guide panel

* add collapse animation

* expanded onboarding on first open

* onboarding: flip toggle colors

* onboarding: show progress bar all the time

* onboarding: fix panel closing on click

* onboarding modal: add close icon and fix padding

* wip: add migration for existing users

* fix titles in guide

* fix achievements copy

* do not award completed task achievement when direction is down

* start implementing new achievements

* start migrating client

* remove social links from achievements modals

* prevent skipping tutorial + fix achievement notification

* sync fixes

* start redesign achievement modal

* misc fixes to achievements, polish generic achievement modal and hatched pet modal

* add special badge for onboarding

* fix badge condition

* modals fixes

* hatched pet modal: add close icon

* fix badge typo

* fix justin button

* new scrolling behavior for dropdowns

* fix strings capitalization

* add common tests

* add api unit tests

* add date check

* achievements modal polishing

* typos

* add toggle for achievements categories

* typo

* fix test

* fix edit avatar modal cannot be closed

* finish migration and correct launch date

* fix migration

* migration fixes

* fix tests
2019-12-16 17:20:47 +01:00
Matteo Pagliazzi
85fb5f33aa fix test lint 2019-10-08 20:45:38 +02:00
Matteo Pagliazzi
90c917f69e fix duplicates in code 2019-10-08 15:05:48 +02:00
cheng-shiqi
ca7399f6c1 Repair negative quest scrolls on (gem)purchase (#11399)
* Fix: Reset negative quest scrolls number to zero on purchase(gem)

* Refactor: rename website/common/script/ops/buy/buyQuest.js to website/common/script/ops/buy/buyQuestGold.js and update related files

* Test: add two tests related to negative quest scrolls
2019-10-06 17:06:02 +02:00
Matteo Pagliazzi
17c7a2bad1 fix common tests 2019-10-03 16:27:44 +02:00
negue
3aa2e30815 Purchase API Refactoring: Mounts [Hourglass] (#10482)
* AbstractGemItemOperation - BuyQuestWithGemOperation

* fix purchase
2019-09-20 16:52:15 +02:00
Sabe Jones
56b4008835 Merge branch 'release' into develop 2019-09-17 16:11:30 -05:00
Sabe Jones
7d732b5612 feat(content): new pet color achievements 2019-09-17 16:10:32 -05:00
Gurkirpal
9bf380039e Add test for code preventing sale of saddles 2019-09-11 20:18:30 +05:30
Aleksey
65906f0b71 Fix: reset streak for habits after rebirth (#11345)
* Fix: reset streak for habits after rebirth

- Modify current test of reseting streaks
- Add new if branch for task with "habit" type

* Fix: reset habits by another keys (counterDown/counterUp):

- Fix test for correct way of reseting habits
- Use another keys for reseting habits
2019-09-09 15:46:49 +02:00
Phillip Thelen
6784d23a7c Add translated gear name to open-mystery-item call (#11306)
* Add translated gear name to open-mystery-item call

* Fix test

* fix mystery item text language
2019-08-16 19:40:49 +02:00
Sabe Jones
6de5fed47a fix(test): change expectation of empty streak achievement 2019-08-12 16:17:01 -05:00
Matteo Pagliazzi
ee867a9d30 add tests 2019-06-17 21:04:22 +02:00
Sabe Jones
7094e75dd8 feat(achievements): new pet-related cheevos 2019-06-04 10:31:25 -05:00
Sabe Jones
3a8312832c feat(content): new freebie glasses
Fixes #11171
2019-05-30 15:13:23 -05:00
Sabe Jones
e9163a1bb2 fix(test): Feathered Friends date range 2019-05-09 14:53:55 -05:00
Sabe Jones
6f7cd96e9f Improved number validation (#11131)
* fix(purchasing): more number validation

* test(purchasing): add error cases
Also refactor NaN check and create client mixin

* fix(purchasing): cover "purchase" cases
2019-04-23 15:19:49 -05:00
Sabe Jones
6b933914ef fix(pets): disallow hatching quest pets with Wacky potions 2019-04-09 16:25:49 -05:00
Matteo Pagliazzi
0b8ce63c76 WIP: Improve User model performances (#10832)
* wip: define items as mixed objects

* add default owned gear

* mark modified

* more mark modified

* more mark modified

* more mark modified

* more mark modified

* fix common tests

* fix common tests

* update mongoose

* add itemsUtils

* use new util function in hall controller

* add tests for items utils

* update website/server to mark all items as modified

* start updating common code

* update login incentives

* update unlock

* remove changes to package-lock.json

* remove changes to package.json
2019-04-01 19:24:18 +02:00
negue
f35ef3a046 Multiple checks for pinnedItems (#11031)
* remove null/undefined entries from pinnedItems when an item is toggled - more inner checks + test

* drawer: fix when there isn't a page available

* rollback cleaning up pinnedEntries on item-toggle

* remove "re-setting" pinnedItems

* remove the filter
2019-03-31 20:41:37 +02:00
Sabe Jones
2a225c2376 chore(event): end Pi Day 2019-03-15 10:31:08 -05:00
Sabe Jones
9ad50be6ca fix(test): update food const 2019-03-14 07:32:32 -05:00
Sabe Jones
4d1b239231 Track specific items dropped by Armoire (#10977)
* feat(analytics): track specific items dropped by Armoire

* fix(lint): remove console log

* fix(analytics): address test failures

* fix(analytics): add missed if block

* fix(analytics): seriously tho actually fix
2019-02-10 19:30:49 +01:00
Sabe Jones
5b7c4bf03f fix(event): end Cake 2019-02-02 13:10:56 -06:00
Sabe Jones
b1f42dcac9 feat(content): Habitica Birthday 2019 2019-01-31 17:10:56 -06:00
negue
e2c5b9058b more checks on the item.klass, also added the specialClass checks (#10859) 2018-11-22 14:35:34 +01:00
negue
074837b274 check every armoire gear 'canOwn' method (#10760) 2018-10-15 20:11:28 +02:00
Carl Vuorinen
71c0939a15 Fix API early Stat Point allocation (#10680)
* Refactor hasClass check to common so it can be used in shared & server-side code

* Check that user has selected class before allocating stat points
2018-09-21 16:55:55 +02:00