mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00:00
fix(NYE): Card to self exploit
This commit is contained in:
parent
5623fb0078
commit
e7388822f1
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue