gamelogic

package
v0.0.0-...-59cac3b Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package gamelogic provides functions for game logic

Package gamelogic provides functions for game logic

Package gamelogic provides functions for game logic

Package gamelogic provides functions for game logic

Index

Constants

This section is empty.

Variables

View Source
var Capacity_Harvester float64 = 10
View Source
var Capacity_Invoker float64 = 0

Golem Capacity

Functions

func CalculateManaRegen

func CalculateManaRegen(userData schema.User) schema.User

Update mana value based on time since last update, return the updated userData

func CalculateTravelArrived

func CalculateTravelArrived(userData schema.User) schema.User

Update whether golem arrived at destination, return the updated userData

func CalculateUserUpdates

func CalculateUserUpdates(userData schema.User) schema.User

Calculates all updates to the user object based on game logic, saving to db & returns the updated user

func TryManaPurchase

func TryManaPurchase(w http.ResponseWriter, mana float64, manaCost float64) (bool, float64)

Attempt to do something using mana, return if successful and the new mana value

Types

This section is empty.

Jump to

Keyboard shortcuts

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