Try a vanilla CoffeeScript (haha) solution

This commit is contained in:
Sabe Jones 2013-12-24 17:24:05 -06:00
parent 50ffe4dcda
commit baa2e2a8fd
2 changed files with 7 additions and 7 deletions

View file

@ -11192,11 +11192,13 @@ var process=require("__browserify_process");(function() {
_.each(user.tasks, function(task) {
return task.value = 0;
});
_.each(user.tasks, function(task) {
if (task.type = 'daily') {
return task.streak = 0;
_ref = user.tasks;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
task = _ref[_i];
if (task.type === 'daily') {
task.streak = 0;
}
}
});
stats = user.stats;
stats.buffs = {};
stats.hp = 50;

View file

@ -408,9 +408,7 @@ api.wrap = (user) ->
# Turn tasks yellow, zero out streaks
_.each user.tasks, (task) ->
task.value = 0
_.each user.tasks, (task) ->
if task.type = 'daily'
task.streak = 0
task.streak = 0 for task in user.tasks when task.type is 'daily'
# Reset all dynamic stats
stats = user.stats
stats.buffs = {}