package game import "fmt" // sticks.c — wand and staff setup and naming. Zapping (do_zap, drain, // fire_bolt) arrives with the combat phase. // fixStick sets up a new wand or staff (sticks.c fix_stick). func (g *RogueGame) fixStick(cur *Object) { if g.Items.WandType[cur.Which] == "staff" { cur.Damage = "2x3" } else { cur.Damage = "1x1" } cur.HurlDmg = "1x1" switch cur.Which { case WsLight: cur.SetCharges(g.rnd(10) + 10) default: cur.SetCharges(g.rnd(5) + 3) } } // chargeStr returns the charge-count suffix for an identified stick // (sticks.c charge_str). func chargeStr(g *RogueGame, obj *Object) string { if !obj.Flags.Has(IsKnow) { return "" } if g.Options.Terse { return fmt.Sprintf(" [%d]", obj.Charges()) } return fmt.Sprintf(" [%d charges]", obj.Charges()) }