5cd0039 added regression where reset on new user would fail because user.items.gear.owned is undefined
This patch allows tests to get *much* further than before
This checks if the user actually owns the pet, mount or gear they are trying to equip. This also prevents users from setting things that do not exist. (before users could set the value for pets and mounts to any string. Not sure if this leaves possiblilities for xss attacks. but this fix also prevents that).
At @deilann's request, divide the drop chance bonus for contributor levels in half and add a +1/level contributor bonus (subject to the subscription multiplier once implemented in private code) to drop cap.
Currently, when you put on equipment, you see the messageBought notification. There was no messageEquipped notification in the code so I've added one.
I've updated ALL locale files IN ENGLISH, following the convention already in place for using English when there is no translation (e.g., locales/pl/messages.json, locales/sv/messages.json).
When a to-do is checked off, the rewards are increased by the number of checklist items that have been completed. However as reported in https://github.com/HabitRPG/habitrpg/issues/3474, if the to-do is later un-checked, then the rewards subtracted are not being similarly increased by the number of checklist items completed. This fix will change that - the number of checklist items completed will have an equal effect on checking and unchecking a to-do.
This of course won't fix the problem of, upon unchecking, not being able to calculate the exact value of the rewards that had been given upon checking, so there will still be a discrepancy between checking and unchecking, but it will be much smaller than it is currently.
Currently, when you feed a pet enough to turn it into a mount, you see the messageAlreadyMount notification ("You already have that mount. Try feeding another pet."). This fix changes it to the messageEvolve notification ("You have tamed <%= egg %>, let's go for a ride!").
Previously, users gained MP very early in the cron process. This meant that no buffs affected daily MP gain. Now, MP gain happens after the Perfect Day bonus is applied, so getting an INT boost that pushes you over 100 max MP gives you a tangible benefit.
Orb of Rebirth now only spits out "not enough gems" if user is under level 100 and has less than 8 gems. It also only charges if the user is below level 100.
Makes collection quests maybe, possibly take more than a single day to complete for an average party. Doubled chances not fed through diminishingReturns: overkill.
Quick and dirty fix to Golden potions being more common than Zombie etc. Golden potions are now 2% of drops (down from 3%); Zombie and Cotton Candy potions each 2.33% of drops (up from 2%); Red, Shade, and Skeleton 3% of drops (unchanged); Base, White, and Desert 4% of drops (unchanged).
Fixes#169.
+1 drop/day per 10 PER was a bit too much. A tricked-out subscriber could keep getting drops unto 50 or so! This commit cuts the boost by more than half; should still be noticeable, but not quite so overkill at the high end.
Ups the base drop chance to an expected 15% for typical tasks, brings back diminishing returns for super bonuses, reduces effect of checklists. Should be acceptable to most people?
Tweaks the STR attribute's algorithmic effects. (1) Task "redness" no longer declines faster with high STR. (2) The 3% chance of a critical hit is multiplied by a percentage factor equal to STR. (3) The value of STR in dealing damage to bosses is increased by 25% (.5% instead of .4%).
Fixes HabitRPG/habitrpg/#2464.
Initial feedback from the drop chance overhaul was that non-minmaxed characters had their drops severely curtailed, while tricked-out Rogues with enormous streaks were still scoring drops every time. Lots of complaining ensued! This commit doubles the base chance, establishes a minimum base chance of 2%, and halves the effectiveness of the high-end offenders.