p1nto

package module
v0.0.0-...-7f54ae6 Latest Latest
Warning

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

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

README

p1nto

A Discord Bot made for fun.

Its main functionality is to host a role playing text game on Discord.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NPCs = make(map[int]*NPC)
)

Functions

func BuyHandle

func BuyHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func CheckPlayer

func CheckPlayer(user *discordgo.User)

func CombatHandle

func CombatHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func CombatNPC

func CombatNPC(s *discordgo.Session, m *discordgo.MessageCreate, p *player, n *NPC)

func DamageCalc

func DamageCalc(hp *int, atk int, def int, crt int, eva int) (bool, bool, int)

func DungeonHandle

func DungeonHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func Equip

func Equip(user *discordgo.User, itemID int) bool

func EquipHandle

func EquipHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func EquipmentHandle

func EquipmentHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func FarmHandle

func FarmHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func HelpHandle

func HelpHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func Hit

func Hit(s *discordgo.Session, m **discordgo.Message, chanID *string, p1 *player, p2 *player, hp1 *int, hp2 *int) bool

func HitNPC

func HitNPC(s *discordgo.Session, m *discordgo.Message, p *player, n *NPC, hpp *int, hpn *int) bool

func InitDungeon

func InitDungeon()

func InitItem

func InitItem()

func InitNPC

func InitNPC()

func InventoryHandle

func InventoryHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func LoadData

func LoadData()

func Loop

func Loop(s *discordgo.Session)

func Max

func Max(x, y int) int

func MessageCreate

func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate)

func MessageHandle

func MessageHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func Min

func Min(x, y int) int

func NPCHandle

func NPCHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func RNG

func RNG(x int) bool

func RecalcStats

func RecalcStats(p *player)

func SaveData

func SaveData()

func SellHandle

func SellHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func ShopHandle

func ShopHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func StatsHandle

func StatsHandle(s *discordgo.Session, m *discordgo.MessageCreate)

func Unequip

func Unequip(user *discordgo.User, SlotID int) bool

func UnequipHandle

func UnequipHandle(s *discordgo.Session, m *discordgo.MessageCreate)

Types

type NPC

type NPC struct {
	Name       string
	Loot       []int
	Bounty     int
	Hp         int
	Atk        int
	Def        int
	Evasion    int
	CritChance int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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