package game // fight.c — combat. setMname arrives first (monster wake-ups need it); the // combat resolution functions come with the combat phase. // setMname returns the monster name for the given monster (fight.c // set_mname). func (g *RogueGame) setMname(tp *Monster) string { if !g.seeMonst(tp) && !g.Player.On(SeeMonst) { if g.Options.Terse { return "it" } return "something" } var mname string if g.Player.On(IsHalu) { ch := int(g.mvinch(tp.Pos.Y, tp.Pos.X)) if !isUpper(byte(ch)) { ch = g.rnd(26) } else { ch -= 'A' } mname = monsterTable[ch].Name } else { mname = monsterTable[tp.Type-'A'].Name } return "the " + mname }