summaryrefslogtreecommitdiffstats
path: root/wat/db.go
diff options
context:
space:
mode:
authoralex2018-10-26 12:40:02 +0100
committeralex2018-10-26 12:40:27 +0100
commitdb4c1257b9b588c55e4b251cd8c9a2240882e6e2 (patch)
treeec1f70df84ce12a2f787dd09ebae1a08395f8273 /wat/db.go
parent2b1c9889e58cf11fd9df941924c4f8372c41550b (diff)
downloadwatbot-db4c1257b9b588c55e4b251cd8c9a2240882e6e2.tar.gz
watbot-db4c1257b9b588c55e4b251cd8c9a2240882e6e2.tar.bz2
watbot-db4c1257b9b588c55e4b251cd8c9a2240882e6e2.zip
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
Diffstat (limited to 'wat/db.go')
-rw-r--r--wat/db.go6
1 files changed, 6 insertions, 0 deletions
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 {