From 841399b981513a618b32026143f8d3fd6c378e18 Mon Sep 17 00:00:00 2001 From: Alice Harris Date: Sun, 19 Jan 2014 11:53:38 +1000 Subject: [PATCH] stop wasting Stealth on todos and completed dailies If I understand the code correctly, the stealth buff was being decremented regardless of task type and completion status. This change causes stealth to be used up only for dailies that have not been completed. --- script/index.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/index.coffee b/script/index.coffee index 3d0bdfe04a..b1cf6e2380 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -1151,9 +1151,11 @@ api.wrap = (user, main=true) -> user.todos.concat(user.dailys).forEach (task) -> return unless task - return if user.stats.buffs.stealth && user.stats.buffs.stealth-- # User "evades" a certain number of tasks - {id, type, completed, repeat} = task + + return if (type is 'daily') && !completed && user.stats.buffs.stealth && user.stats.buffs.stealth-- # User "evades" a certain number of uncompleted dailies + + # Deduct experience for missed Daily tasks, but not for Todos (just increase todo's value) unless completed scheduleMisses = daysMissed