Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/games.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Commands:
!bang shoot an active duck
!bef befriend an active duck, if enabled
!befriend same as !bef
!ducklaunch flock launch a random flock manually
!ducklaunch flock launch a random flock manually (`!launch` also works)
!shop / !store list arcade gear, consumables, and point prices
!buy peashooter buy the starter Peashooter (!buy gun also works)
!buy quacker buy the larger Quacker Blaster
Expand All @@ -218,13 +218,13 @@ Commands:
!use <1-7|item> use a Duck Hunt consumable
!ammo show ammo, spare magazines, and points
!reload load a spare magazine
!unjam clear a jammed weapon without using ammunition
!ducks [nickname] show persistent scores, points, level, and XP
!duckstats [nickname] show detailed title, accuracy, gear, and item stats
!achievements [nickname] show one-time Duck Hunt achievements
!level [nickname] show level, XP, points, and Duck Hunt scores
!unjam clear a jammed weapon without using ammunition (`!clearjam` also works)
!ducks [nickname] show persistent scores, points, level, and XP (`!duckscore` also works)
!duckstats [nickname] show detailed title, accuracy, gear, and item stats (`!dstats` also works)
!achievements [nickname] show one-time Duck Hunt achievements (`!achieve`/`!ach` also work)
!level [nickname] show level, XP, points, and Duck Hunt scores (`!lvl` also works)
!xp [nickname] alias for !level
!profile [nickname] alias for !level
!profile [nickname] alias for !level (`!prof` also works)
!dh show Duck Hunt status
!dh status show Duck Hunt status
!dh start enable automatic activity for this channel (owner only)
Expand Down
16 changes: 8 additions & 8 deletions plugins/duckhunt.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ type DuckHunt struct {

func (p *DuckHunt) Name() string { return "duckhunt" }
func (p *DuckHunt) Commands() []string {
return []string{"duckhunt", "dh", "ducklaunch", "bang", "befriend", "bef", "ducks", "duckstats", "achievements", "level", "xp", "profile", "shop", "store", "buy", "use", "reload", "unjam", "ammo"}
return []string{"duckhunt", "dh", "ducklaunch", "launch", "bang", "befriend", "bef", "ducks", "duckscore", "duckstats", "dstats", "achievements", "achieve", "ach", "level", "lvl", "xp", "profile", "prof", "shop", "store", "buy", "use", "reload", "unjam", "clearjam", "ammo"}
}
func (p *DuckHunt) Help() string {
return "!bang shoots an active duck; !bef befriends it; !ducklaunch flock starts a random flock; !shop lists gear and items; !buy <item> (weapons, magazine/mag/ammo, or items 1-7); !use <1-7|item> activates a Duck Hunt item; !ammo, !reload, and !unjam manage gear; !ducks [nick] shows scores; !duckstats [nick] shows a detailed title, accuracy, gear, and inventory profile; !achievements [nick] shows unlocked achievements; !level [nick] shows XP and level; !dh status|start|stop controls activity"
return "!bang shoots an active duck; !bef/!befriend befriends it; !ducklaunch/!launch flock starts a random flock; !shop/!store lists gear and items; !buy <item> (weapons, magazine/mag/ammo, or items 1-7); !use <1-7|item> activates a Duck Hunt item; !ammo, !reload, and !unjam/!clearjam manage gear; !ducks/!duckscore [nick] shows scores; !duckstats/!dstats [nick] shows a detailed title, accuracy, gear, and inventory profile; !achievements/!achieve/!ach [nick] shows unlocked achievements; !level/!lvl [nick] shows XP and level; !profile/!prof [nick] aliases !level; !dh status|start|stop controls activity"
}

// shopWeapons keeps the arsenal deliberately arcade-like. The names are game
Expand Down Expand Up @@ -520,7 +520,7 @@ func (p *DuckHunt) Handle(b *bot.Bot, m bot.Message) bool {
case "duckhunt", "dh":
p.control(b, m, arg)
return true
case "ducklaunch":
case "ducklaunch", "launch":
p.launch(b, m, arg)
return true
case "bang":
Expand All @@ -533,16 +533,16 @@ func (p *DuckHunt) Handle(b *bot.Bot, m bot.Message) bool {
b.Send(m.ReplyTarget(), ircColor(ircYellow, "befriending is disabled"))
}
return true
case "ducks":
case "ducks", "duckscore":
p.ducks(b, m, arg)
return true
case "duckstats":
case "duckstats", "dstats":
p.duckStats(b, m, arg)
return true
case "achievements":
case "achievements", "achieve", "ach":
p.achievements(b, m, arg)
return true
case "level", "xp", "profile":
case "level", "lvl", "xp", "profile", "prof":
p.profile(b, m, arg)
return true
case "shop", "store":
Expand All @@ -557,7 +557,7 @@ func (p *DuckHunt) Handle(b *bot.Bot, m bot.Message) bool {
case "reload":
p.reload(b, m)
return true
case "unjam":
case "unjam", "clearjam":
p.unjam(b, m)
return true
case "ammo":
Expand Down
7 changes: 6 additions & 1 deletion plugins/duckhunt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestDuckHuntIncludesBefriendAlias(t *testing.T) {
if !found {
t.Fatal("expected !bef command alias")
}
for _, command := range []string{"ducklaunch", "shop", "store", "buy", "use", "reload", "unjam", "ammo", "duckstats", "achievements", "level", "xp", "profile"} {
for _, command := range []string{"ducklaunch", "launch", "shop", "store", "buy", "use", "reload", "unjam", "clearjam", "ammo", "ducks", "duckscore", "duckstats", "dstats", "achievements", "achieve", "ach", "level", "lvl", "xp", "profile", "prof"} {
found = false
for _, candidate := range plugin.Commands() {
if candidate == command {
Expand All @@ -164,6 +164,11 @@ func TestDuckHuntIncludesBefriendAlias(t *testing.T) {
if !strings.Contains(plugin.Help(), "!achievements") {
t.Fatal("expected achievements command in help")
}
for _, alias := range []string{"!achieve", "!ach", "!launch", "!duckscore", "!dstats", "!lvl", "!prof", "!clearjam"} {
if !strings.Contains(plugin.Help(), alias) {
t.Fatalf("expected %s alias in help", alias)
}
}
}

func TestDuckHuntUseItemAliases(t *testing.T) {
Expand Down