Adjust formatting in footer controller

This commit is contained in:
Blade Barringer
2015-09-13 02:19:34 -05:00
parent 14fabfbe40
commit cd4ec5bd12

View File

@@ -69,53 +69,62 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl) {
* Debug functions. Note that the server route for gems is only available if process.env.DEBUG=true
*/
if (_.contains(['development','test'],window.env.NODE_ENV)) {
$scope.setHealthLow = function(){
User.set({
'stats.hp': 1
});
}
};
$scope.addMissedDay = function(numberOfDays){
if (!confirm("Are you sure you want to reset the day by " + numberOfDays + " day(s)?")) return;
var dayBefore = moment(User.user.lastCron).subtract(numberOfDays, 'days').toDate();
User.set({'lastCron': dayBefore});
Notification.text('-' + numberOfDays + ' day(s), remember to refresh');
}
};
$scope.addTenGems = function(){
$http.post(ApiUrl.get() + '/api/v2/user/addTenGems').success(function(){
User.log({});
})
}
};
$scope.addHourglass = function(){
User.set({
'purchased.plan.consecutive.trinkets': User.user.purchased.plan.consecutive.trinkets + 1,
});
}
};
$scope.addGold = function(){
User.set({
'stats.gp': User.user.stats.gp + 500,
});
}
};
$scope.addMana = function(){
User.set({
'stats.mp': User.user.stats.mp + 500,
});
}
};
$scope.addLevelsAndGold = function(){
User.set({
'stats.exp': User.user.stats.exp + 10000,
'stats.gp': User.user.stats.gp + 10000,
'stats.mp': User.user.stats.mp + 10000
});
}
};
$scope.addOneLevel = function(){
User.set({
'stats.exp': User.user.stats.exp + (Math.round(((Math.pow(User.user.stats.lvl, 2) * 0.25) + (10 * User.user.stats.lvl) + 139.75) / 10) * 10)
});
}
};
$scope.addBossQuestProgressUp = function(){
User.set({
'party.quest.progress.up': User.user.party.quest.progress.up + 1000
});
}
};
}
}])