From db4c1257b9b588c55e4b251cd8c9a2240882e6e2 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 26 Oct 2018 12:40:02 +0100 Subject: fixed rand to use crypto rand fixed imp with imps but should go back to privmsg detection give the bot money when people lose lel --- wat/db.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'wat/db.go') diff --git a/wat/db.go b/wat/db.go index 5784acb..a79da09 100644 --- a/wat/db.go +++ b/wat/db.go @@ -18,6 +18,12 @@ type Player struct { Health int64 LastMined int64 LastRested int64 + CoinsLost int64 +} + +func (p *Player) LoseCoins(coins int64) { + p.Coins -= coins + p.CoinsLost += coins } func (p *Player) Conscious() bool { -- cgit v1.2.3