squad

package
v0.0.0-...-47a16e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Recipes = map[RecipeID]Recipe{
	SoloSkellington: Recipe{
		{1.0, baddy.Skellington},
	},
	WolfPack1: Recipe{
		{1.0, baddy.Wolf},
		{0.5, baddy.Wolf},
		{0.5, baddy.Wolf},
	},
	SoloNecro: Recipe{
		{1.0, baddy.Necro},
	},
	NecroCohort: Recipe{
		{1.0, baddy.Necro},
		{0.5, baddy.Necro},
		{0.5, baddy.Necro},
	},
}

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	Chance float64
	ID     baddy.RecipeID
}

type Recipe

type Recipe []Candidate

Recipe describes how to construct an enemy squad.

func (Recipe) Construct

func (recipe Recipe) Construct(rng *rand.Rand) []baddy.RecipeID

Construct a squad of baddies from a Recipe.

type RecipeID

type RecipeID int

RecipeID identifies squad recipes.

const (
	SoloSkellington RecipeID = iota
	WolfPack1
	SoloNecro
	NecroCohort
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL