diff options
author | alex | 2018-10-26 12:40:02 +0100 |
---|---|---|
committer | alex | 2018-10-26 12:40:27 +0100 |
commit | db4c1257b9b588c55e4b251cd8c9a2240882e6e2 (patch) | |
tree | ec1f70df84ce12a2f787dd09ebae1a08395f8273 /wat/db.go | |
parent | 2b1c9889e58cf11fd9df941924c4f8372c41550b (diff) | |
download | watbot-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.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 { |