fix(NYE): Card to self exploit

This commit is contained in:
Sabe Jones 2014-12-30 20:33:45 -06:00
parent 5623fb0078
commit e7388822f1

View file

@ -697,9 +697,13 @@ api.spells =
target: 'user'
notes: t('nyeCardNotes')
cast: (user, target) ->
_.each [user,target], (t)->
if user == target
t.achievements.nye ?= 0
t.achievements.nye++
else
_.each [user,target], (t)->
t.achievements.nye ?= 0
t.achievements.nye++
(target.items.special.nyeReceived ?= []).push user.profile.name
target.markModified? 'items.special.nyeReceived'
user.stats.gp -= 10