summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralex2018-10-27 14:05:12 +0100
committeralex2018-10-27 14:05:12 +0100
commitecb988a3d916bf9e1b3a33fec4d19cc82b1acfdc (patch)
tree911f48e9677795dfef0d5faf5aa8283d4ebd7538
parentdb4c1257b9b588c55e4b251cd8c9a2240882e6e2 (diff)
downloadwatbot-ecb988a3d916bf9e1b3a33fec4d19cc82b1acfdc.tar.gz
watbot-ecb988a3d916bf9e1b3a33fec4d19cc82b1acfdc.tar.bz2
watbot-ecb988a3d916bf9e1b3a33fec4d19cc82b1acfdc.zip
nm
-rw-r--r--wat/game.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/wat/game.go b/wat/game.go
index 7ccdde0..7246ba1 100644
--- a/wat/game.go
+++ b/wat/game.go
@@ -142,7 +142,7 @@ func (g *WatGame) Punch(player *Player, fields []string) string {
ret := fmt.Sprintf("%s rolls a d6... %s ", player.Nick, player.Nick)
if chance > 3 {
dmg += player.Level(player.Anarchy)
- ret += fmt.Sprintf("hits %s for %d points of damage!", target.Nick, dmg)
+ ret += fmt.Sprintf("hits %s for %d points of damage! ", target.Nick, dmg)
target.Health -= dmg
g.db.Update(target)
if target.Health <= 0 {
@@ -267,6 +267,8 @@ func (g *WatGame) Leech(player *Player, fields []string) string {
player.Health += hpDown
player.Anarchy += 1
reply += fmt.Sprintf("The deal is done, you took %d HP from %s. They now have %d HP, you have %d.", hpDown, target.Nick, target.Health, player.Health)
+ g.db.Update(target)
+ g.db.Update(player)
} else {
reply += "The gods do not smile upon you this waturday. Your money vanishes and nothing happens."
}
@@ -323,12 +325,12 @@ func (g *WatGame) Send(player *Player, fields []string) string {
func (g *WatGame) Mine(player *Player, _ []string) string {
delta := time.Now().Unix() - player.LastMined
- if delta < 1800 {
+ if delta < 600 {
return fmt.Sprintf("wat? 2 soon. u earn more when u wait long (%d)", delta)
}
value := int64(0)
if delta < 36000 {
- value = delta/1800
+ value = delta/600
} else if delta < 86400 {
value = 10
} else if delta < 2592000 {