Make the rgoue branch Go-only

The port is complete, so the C sources and their build system
(autoconf/automake inputs, Makefiles, Visual Studio project, doc
templates, RPM spec, C build/modernization notes) leave this branch;
they live on in master/modern-rogue for reference.

Also ports the last missing wizard command (things.c pr_list/pr_spec,
the '*' item-probability listing), rewrites README.md for the Go port,
and updates ARCHITECTURE.md's layout notes (game/ has no third-party
imports; tcell lives in term/).

Kept: LICENSE.TXT, rogue.png, rogue.desktop, ARCHITECTURE.md.
This commit is contained in:
2026-07-06 20:19:33 +02:00
parent 41fc1042fc
commit c0b533ed2f
58 changed files with 97 additions and 33129 deletions

View File

@@ -500,3 +500,47 @@ func (g *RogueGame) nameit(pb *strings.Builder, obj *Object, typ, which string,
// nullstr returns an empty string (things.c nullstr).
func nullstr(*RogueGame, *Object) string { return "" }
// prList lists possible potions, scrolls, etc. for the wizard (things.c
// pr_list).
func (g *RogueGame) prList() {
if !g.Options.Terse {
g.addmsg("for ")
}
g.addmsg("what type")
if !g.Options.Terse {
g.addmsg(" of object do you want a list")
}
g.msg("? ")
ch := g.readchar()
switch ch {
case Potion:
g.prSpec(g.Items.Potions[:])
case Scroll:
g.prSpec(g.Items.Scrolls[:])
case Ring:
g.prSpec(g.Items.Rings[:])
case Stick:
g.prSpec(g.Items.Sticks[:])
case Armor:
g.prSpec(g.Items.Armors[:])
case Weapon:
g.prSpec(g.Items.Weapons[:MaxWeapons])
}
}
// prSpec prints a specific list of possible items to choose from
// (things.c pr_spec).
func (g *RogueGame) prSpec(info []ObjInfo) {
lastprob := 0
i := byte('0')
for idx := range info {
if i == '9'+1 {
i = 'a'
}
g.addLine("%c: %s (%d%%)", i, info[idx].Name, info[idx].Prob-lastprob)
lastprob = info[idx].Prob
i++
}
g.endLine()
}