smasteroids

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeathMessages = map[string][]string{
	"Ken Owens": {
		"Heisenberg was wrong. I was certain you'd lose.",
		"All the elements in the world and you're still more dense.",
		"I think you might be missing an orbital.",
		"Put your goggles on!",
		"You're an insignificant figure.",
	},
	"Fletcher Carron": {
		"Looks like it wasn't in the budget.",
		"Maybe try a lever arm.",
	},
	"Douglas Rummel": {
		"Is your gear ratio out of order?",
		"The idea is that you get good.",
		"Artificial intelligence will always defeat natural stupidity.",
	},
	"Bonnie Flint": {
		"I thought Homo sapiens were smart. Yet here you are.",
		"Huh, did a Neanderthal sneak in?",
	},
	"John Mead": {
		"You're Homo naledi-ng me down",
	},
	"Mark Adame": {
		"It's in the spreadsheet. The excel spreadsheet.",
		"I didn't know intelligence could be negative...",
	},
	"Daniel Northcut": {
		"I was pro-conservation until I met you.",
		"You're a waste of fresh water.",
	},
	"Paul Hoehn": {
		"It's only calculus.",
	},
	"Stephen Houpt": {
		"Mr. Cloupt strikes back.",
		"If you don't get it in two minutes, give up and cry.",
		"Have confidence in yourself, even though nobody else does.",
		"Sid.",
		"You're almost as neglected as friction.",
	},
}
View Source
var Levels = []Level{
	{
		Name: "Lower School",
		Player: Ship{
			Health:       20,
			Thrust:       100,
			Turn:         3,
			Fire:         time.Second / 3,
			BulletDamage: 5,
		},
		Enemies: multiple(lowerSchoolShip, "Carrio", "Materre", "Pigg", "Wetzel", "Dillon"),
	},
	{
		Name: "Middle School",
		Player: Ship{
			Health:       30,
			Thrust:       120,
			Turn:         3,
			Fire:         time.Second / 3,
			BulletDamage: 7.5,
		},
		Enemies: multiple(middleSchoolShip, "Dillon", "Hoehn", "Kiehn", "Smith", "Mead"),
	},
	{
		Name: "The Biologists",
		Player: Ship{
			Health:       50,
			Thrust:       130,
			Turn:         3,
			Fire:         time.Second / 4,
			BulletDamage: 10,
		},
		Enemies: append(
			multiple(biologyShip, "Adame", "Flint", "Israni"),
			duplicate(2, Enemy{
				Name: "Skeleton",
				Ship: Ship{
					Health:       10,
					Thrust:       80,
					Turn:         3.75,
					Fire:         time.Second / 2,
					BulletDamage: 7.5,
				},
			})...,
		),
	},
	{
		Name: "The Chemists",
		Player: Ship{
			Health:       60,
			Thrust:       140,
			Turn:         3,
			Fire:         time.Second / 3,
			BulletDamage: 10,
		},
		Enemies: append(
			multiple(chemistryShip, "Macaraeg", "Owens"),
			duplicate(8, Enemy{
				Name: "VisorGogs",
				Ship: Ship{
					Health:       10,
					Thrust:       100,
					Turn:         3.5,
					Fire:         time.Second,
					BulletDamage: 2,
				},
			})...,
		),
	},
	{
		Name: "The Lorax",
		Player: Ship{
			Health:       80,
			Thrust:       150,
			Turn:         3,
			Fire:         time.Second / 3,
			BulletDamage: 15,
		},
		Enemies: append(
			duplicate(15, Enemy{
				Name: "Tree",
				Ship: Ship{
					Health:       1,
					Thrust:       20,
					Turn:         5,
					Fire:         time.Second / 3,
					BulletDamage: 1,
				},
			}),
			Enemy{
				Name: "Northcut",
				Ship: loraxShip,
			},
		),
	},
	{
		Name: "The Physicists",
		Player: Ship{
			Health:       100,
			Thrust:       150,
			Turn:         3,
			Fire:         time.Second / 5,
			BulletDamage: 10,
		},
		Enemies: multiple(physicsShip, "Houpt", "Hoehn", "Balog", "Carron"),
	},
	{
		Name: "Dwarf Fortress",
		Player: Ship{
			Health:       100,
			Thrust:       160,
			Turn:         3,
			Fire:         time.Second,
			BulletDamage: 7.5,
		},
		Enemies: []Enemy{
			{
				Name: "Dwarf King",
				Ship: Ship{
					Health:       100,
					Thrust:       10,
					Turn:         5,
					Fire:         time.Second * 5,
					BulletDamage: 20,
				},
			},
		},
	},
	{
		Name: "The Administration",
		Player: Ship{
			Health:       100,
			Thrust:       150,
			Turn:         3,
			Fire:         time.Second / 100,
			BulletDamage: 7.5,
		},
		Enemies: multiple(administrationShip, "Dini", "Igoe"),
	},
}

Functions

func Version

func Version() string

Types

type Enemy

type Enemy struct {
	// Name is the name of the enemy to be displayed. If blank, no name is displayed (but there is still a vertical gap
	// between the ship and its health bar).
	Name string
	Ship
}

Enemy represents an enemy in a level that must be defeated for the player to advance to the next level or win.

type Level

type Level struct {
	Name    string
	Player  Ship
	Enemies []Enemy
}

Level represents a game level the player must progress through.

type Ship

type Ship struct {
	// Health is the amount of health the ship starts with and the maximum health they can have.
	Health float64
	// Thrust is the amount of force applied at every tick the ship is thrusting.
	Thrust float64
	// Turn is the maximum angular velocity the ship can have.
	Turn float64
	// Fire is the minimum number of ticks before the ship can fire again.
	Fire time.Duration
	// BulletDamage is the damage for bullets the ship fires.
	BulletDamage float64
}

Jump to

Keyboard shortcuts

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