From d87326c1f412aebf672e916c767ede46c756bd34 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sat, 8 Nov 2014 15:57:41 -0500 Subject: [PATCH] tweak cooldowns --- commands.go | 8 ++++---- session.go | 17 ++++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/commands.go b/commands.go index df03a52..bd21444 100644 --- a/commands.go +++ b/commands.go @@ -273,13 +273,13 @@ var bombCommand = &Command{ var mkBombCommand = &Command{ name: "mkbomb", - help: "make a bomb. Costs 800 space duckets", + help: "make a bomb. Costs 500 space duckets", handler: func(conn *Connection, args ...string) { - if conn.money < 800 { - fmt.Fprintf(conn, "not enough money! Bombs cost 800 space duckets to build, you only have %d in the bank.\n", conn.money) + if conn.money < 500 { + fmt.Fprintf(conn, "not enough money! Bombs cost 500 space duckets to build, you only have %d in the bank.\n", conn.money) return } - conn.Withdraw(800) + conn.Withdraw(500) conn.bombs += 1 fmt.Fprintf(conn, "built a bomb!\n") fmt.Fprintf(conn, "bombs: %d\n", conn.bombs) diff --git a/session.go b/session.go index 98500f9..d038091 100644 --- a/session.go +++ b/session.go @@ -95,6 +95,7 @@ func (c *Connection) InTransit() bool { } func (c *Connection) RecordScan() { + fmt.Fprintln(c, "scanning known systems for signs of life") c.lastScan = time.Now() After(1*time.Minute, func() { fmt.Fprintln(c, "scanner ready") @@ -103,7 +104,7 @@ func (c *Connection) RecordScan() { func (c *Connection) RecordBomb() { c.lastBomb = time.Now() - After(1500*time.Millisecond, func() { + After(15*time.Second, func() { fmt.Fprintln(c, "bomb arsenal reloaded") }) } @@ -113,7 +114,7 @@ func (c *Connection) CanScan() bool { } func (c *Connection) CanBomb() bool { - return time.Since(c.lastBomb) > 1500*time.Millisecond + return time.Since(c.lastBomb) > 15*time.Second } func (c *Connection) NextScan() time.Duration { @@ -121,7 +122,7 @@ func (c *Connection) NextScan() time.Duration { } func (c *Connection) NextBomb() time.Duration { - return -time.Since(c.lastBomb.Add(1500 * time.Millisecond)) + return -time.Since(c.lastBomb.Add(15 * time.Second)) } func (c *Connection) MadeKill(victim *Connection) { @@ -174,19 +175,13 @@ func (c *Connection) Win() { } func (c *Connection) Die() { - fmt.Fprintf(c, "you were bombed. You will respawn in 2 minutes.\n") + fmt.Fprintf(c, "you were bombed. You will respawn in 1 minutes.\n") c.dead = true c.System().Leave(c) After(30*time.Second, func() { - fmt.Fprintf(c, "respawn in 90 seconds.\n") - }) - After(time.Minute, func() { - fmt.Fprintf(c, "respawn in 60 seconds.\n") - }) - After(90*time.Second, func() { fmt.Fprintf(c, "respawn in 30 seconds.\n") }) - After(2*time.Minute, c.Respawn) + After(time.Minute, c.Respawn) } func (c *Connection) Respawn() {