pnpdev

package
v0.0.0-...-60c38a5 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Minion

type Minion struct {
	X, H int //X=XP, H=Health
}

Minion represents a minion P&P player The zero value is a dead minion player.

func NewMinion

func NewMinion() *Minion

NewMinion returns a minion with 100 Health and 0 XP

func (Minion) Alive

func (m Minion) Alive() bool

Alive checks if the player is (still) alive

func (*Minion) ApplyHealthDiff

func (m *Minion) ApplyHealthDiff(health int) int

ApplyHealthDiff adds the given health to the player's health down to a minimum of 0 and up to 100

func (*Minion) ApplyXPDiff

func (m *Minion) ApplyXPDiff(xp int) int

ApplyXPDiff adds the given xp to the player's xp down to a minimum of 0

func (Minion) AsciiArt

func (m Minion) AsciiArt() string

AsciiArt returns the minion's ascii-art

func (Minion) Health

func (m Minion) Health() int

Health returns the player's health level

func (Minion) Skills

func (m Minion) Skills() []pnp.Skill

Skills returns the minion's skills which are Banana.

func (Minion) String

func (m Minion) String() string

func (Minion) XP

func (m Minion) XP() int

XP returns the player's xp level

Jump to

Keyboard shortcuts

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