mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Merge branch 'develop' into TheHollidayInn-skills-burst-backstap-leveling-fix
This commit is contained in:
@@ -16,12 +16,12 @@ export const EVENTS = {
|
||||
birthday: { start: '2013-01-30', end: '2014-02-01' },
|
||||
spring: { start: '2014-03-21', end: '2014-05-01' },
|
||||
summer: { start: '2014-06-20', end: '2014-08-01' },
|
||||
gaymerx: { start: '2014-07-02', end: '2014-08-01' },
|
||||
fall: { start: '2014-09-21', end: '2014-11-01' },
|
||||
winter2015: { start: '2014-12-21', end: '2015-02-02' },
|
||||
spring2015: { start: '2015-03-20', end: '2015-05-02' },
|
||||
summer2015: { start: '2015-06-20', end: '2015-08-02' },
|
||||
fall2015: { start: '2015-09-21', end: '2015-11-01' },
|
||||
gaymerx: { start: '2015-12-01', end: '2015-12-14' },
|
||||
};
|
||||
|
||||
export const GEAR_TYPES = [
|
||||
|
||||
@@ -77,6 +77,15 @@ let armor = {
|
||||
set: 'royal',
|
||||
canOwn: ownsItem('armor_armoire_royalRobes'),
|
||||
},
|
||||
crystalCrescentRobes: {
|
||||
text: t('armorArmoireCrystalCrescentRobesText'),
|
||||
notes: t('armorArmoireCrystalCrescentRobesNotes', { attrs: 7 }),
|
||||
value: 100,
|
||||
per: 7,
|
||||
con: 7,
|
||||
set: 'crystalCrescent',
|
||||
canOwn: ownsItem('armor_armoire_crystalCrescentRobes'),
|
||||
},
|
||||
};
|
||||
|
||||
let eyewear = {
|
||||
@@ -232,6 +241,15 @@ let head = {
|
||||
set: 'shepherd',
|
||||
canOwn: ownsItem('head_armoire_shepherdHeaddress'),
|
||||
},
|
||||
crystalCrescentHat: {
|
||||
text: t('headArmoireCrystalCrescentHatText'),
|
||||
notes: t('headArmoireCrystalCrescentHatNotes', { attrs: 7 }),
|
||||
value: 100,
|
||||
int: 7,
|
||||
per: 7,
|
||||
set: 'crystalCrescent',
|
||||
canOwn: ownsItem('head_armoire_crystalCrescentHat'),
|
||||
},
|
||||
};
|
||||
|
||||
let shield = {
|
||||
@@ -338,6 +356,25 @@ let weapon = {
|
||||
set: 'shepherd',
|
||||
canOwn: ownsItem('weapon_armoire_shepherdsCrook'),
|
||||
},
|
||||
crystalCrescentStaff: {
|
||||
text: t('weaponArmoireCrystalCrescentStaffText'),
|
||||
notes: t('weaponArmoireCrystalCrescentStaffNotes', { attrs: 7 }),
|
||||
value: 100,
|
||||
int: 7,
|
||||
str: 7,
|
||||
set: 'crystalCrescent',
|
||||
canOwn: ownsItem('weapon_armoire_crystalCrescentStaff'),
|
||||
},
|
||||
blueLongbow: {
|
||||
text: t('weaponArmoireBlueLongbowText'),
|
||||
notes: t('weaponArmoireBlueLongbowNotes', { per: 9, con: 8, str: 7 }),
|
||||
value: 100,
|
||||
per: 9,
|
||||
con: 8,
|
||||
str: 7,
|
||||
twoHanded: true,
|
||||
canOwn: ownsItem('weapon_armoire_blueLongbow'),
|
||||
},
|
||||
};
|
||||
|
||||
let armoireSet = {
|
||||
|
||||
@@ -1030,6 +1030,14 @@ api.premiumHatchingPotions = {
|
||||
canBuy: (function() {
|
||||
return false;
|
||||
})
|
||||
},
|
||||
Peppermint: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionPeppermint'),
|
||||
limited: true,
|
||||
canBuy: (function() {
|
||||
return true;
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3214,7 +3222,21 @@ api.backgrounds = {
|
||||
text: t('backgroundSunsetOasisText'),
|
||||
notes: t('backgroundSunsetOasisNotes')
|
||||
}
|
||||
}
|
||||
},
|
||||
backgrounds122015: {
|
||||
alpine_slopes: {
|
||||
text: t('backgroundAlpineSlopesText'),
|
||||
notes: t('backgroundAlpineSlopesNotes')
|
||||
},
|
||||
snowy_sunrise: {
|
||||
text: t('backgroundSnowySunriseText'),
|
||||
notes: t('backgroundSnowySunriseNotes')
|
||||
},
|
||||
winter_town: {
|
||||
text: t('backgroundWinterTownText'),
|
||||
notes: t('backgroundWinterTownNotes')
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
api.subscriptionBlocks = {
|
||||
|
||||
@@ -2063,23 +2063,25 @@ api.wrap = function(user, main) {
|
||||
return content.gear.flat[type + "_base_0"];
|
||||
}
|
||||
return item;
|
||||
},
|
||||
},
|
||||
handleTwoHanded: function(item, type, req) {
|
||||
var message, ref, weapon;
|
||||
var message, currentWeapon, currentShield;
|
||||
if (type == null) {
|
||||
type = 'equipped';
|
||||
}
|
||||
if (item.type === "shield" && ((ref = (weapon = content.gear.flat[user.items.gear[type].weapon])) != null ? ref.twoHanded : void 0)) {
|
||||
currentShield = content.gear.flat[user.items.gear[type].shield];
|
||||
currentWeapon = content.gear.flat[user.items.gear[type].weapon];
|
||||
|
||||
if (item.type === "shield" && (currentWeapon ? currentWeapon.twoHanded : false)) {
|
||||
user.items.gear[type].weapon = 'weapon_base_0';
|
||||
message = i18n.t('messageTwoHandled', {
|
||||
gearText: weapon.text(req.language)
|
||||
}, req.language);
|
||||
}
|
||||
if (item.twoHanded) {
|
||||
user.items.gear[type].shield = "shield_base_0";
|
||||
message = i18n.t('messageTwoHandled', {
|
||||
gearText: item.text(req.language)
|
||||
message = i18n.t('messageTwoHandedUnequip', {
|
||||
twoHandedText: currentWeapon.text(req.language), offHandedText: item.text(req.language),
|
||||
}, req.language);
|
||||
} else if (item.twoHanded && (currentShield && user.items.gear[type].shield != "shield_base_0")) {
|
||||
user.items.gear[type].shield = "shield_base_0";
|
||||
message = i18n.t('messageTwoHandedEquip', {
|
||||
twoHandedText: item.text(req.language), offHandedText: currentShield.text(req.language),
|
||||
}, req.language);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
@@ -106,11 +106,10 @@ angular.module('habitrpg')
|
||||
}
|
||||
if (err) {
|
||||
var message = err.code ? err.message : err;
|
||||
console.log(message);
|
||||
if (MOBILE_APP) Notification.push({type:'text',text:message});
|
||||
else Notification.text(message);
|
||||
// In the case of 200s, they're friendly alert messages like "Your pet has hatched!" - still send the op
|
||||
if ((err.code && err.code >= 400) || !err.code) return;
|
||||
if ((err.code && err.code >= 400) || !err.code) return;
|
||||
}
|
||||
userServices.log({op:k, params: req.params, query:req.query, body:req.body});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user