attack

package
v0.0.0-...-75eaa32 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activation

type Activation struct {
	Opts
	DefenderToughness int64
}

func New

func New(opts Opts) Activation

func (Activation) ResolveActivation

func (a Activation) ResolveActivation() Result

type Decisions

type Decisions struct {
	WeaponProfileSelections map[*unit.WeaponKind]*unit.WeaponProfileKind
	WeaponProfileOrder      WeaponProfileOrder
}

type Opts

type Opts struct {
	AttackerUnit          *unit.Unit
	DefenderUnit          *unit.Unit
	InitialAttackerHealth unit.Health
	InitialDefenderHealth unit.Health
	DistanceInches        int64
}

type Result

type Result struct {
	Decisions      Decisions
	AttackerHealth prob.Dist[unit.Health]
	DefenderHealth prob.Dist[unit.Health]
}

type WeaponProfileOrder

type WeaponProfileOrder string
const (
	WeaponProfileOrderAscending  WeaponProfileOrder = "ASC"
	WeaponProfileOrderDescending WeaponProfileOrder = "DESC"
)

Jump to

Keyboard shortcuts

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