Documentation
¶
Index ¶
- func CmdRepeater(gs *GameState, count int, cmd func(*GameState))
- func GetMapSize(gs GameState) (height, width int)
- func IsWall(gs GameState, line, col int) bool
- func ToLines(gs GameState) []string
- func ToText(lines []string) string
- type AttackType
- type Camera
- type CombatLog
- type EnemyInfo
- type EnemyType
- type GameState
- func (gs *GameState) AttackMob(e *EnemyInfo, style AttackType) CombatLog
- func (gs GameState) BlockedTile(line, col, idx int) bool
- func (gs *GameState) ChasePlayer() string
- func (gs *GameState) CurrentSnapShot() SnapShot
- func (gs *GameState) DeleteAt()
- func (gs *GameState) DeleteDirection(input string)
- func (gs *GameState) DropGold(line, col int) int
- func (gs *GameState) DropItem(line, col, amount int, itemType ItemType)
- func (gs *GameState) DropPotion(line, col int)
- func (gs GameState) EnemyAt(line, col int) (EnemyInfo, bool)
- func (gs *GameState) GetLootFromKill(line, col int, style AttackType)
- func (gs GameState) GetTile(line, col int) rune
- func (gs *GameState) GrabItem() string
- func (gs *GameState) HaveFeather() bool
- func (gs GameState) ItemAt(line, col int) (Item, bool)
- func (gs *GameState) JumpToEnd()
- func (gs *GameState) JumpToEndOrPunct()
- func (gs *GameState) JumpToLast()
- func (gs *GameState) JumpToNext()
- func (gs *GameState) JumpToNextWord()
- func (gs *GameState) JumpToPrev()
- func (gs *GameState) JumpToPrevWord()
- func (gs *GameState) JumpToStart()
- func (gs *GameState) LevelStats(input string)
- func (gs *GameState) MapComplete() bool
- func (gs *GameState) MeleeAttack() CombatLog
- func (gs *GameState) OpenChest(line, col int) string
- func (gs *GameState) RangedAttack(direction string) CombatLog
- func (gs *GameState) Redo()
- func (gs *GameState) ReplaceAt(input string)
- func (gs *GameState) SpawnEnemy(maxEnemies int)
- func (gs *GameState) SpawnPlayer() Position
- func (gs *GameState) TakeSnapShot(pos Position, mapLines []string)
- func (gs *GameState) TryDamagePlayer() string
- func (gs *GameState) Undo()
- func (gs *GameState) UseFeather()
- func (gs *GameState) UseMerchant(option int) (string, bool)
- func (gs *GameState) UsePotion()
- type Item
- type ItemType
- type MapInfo
- type MapType
- type PlayerInfo
- type Position
- type SnapShot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdRepeater ¶
func GetMapSize ¶
Types ¶
type CombatLog ¶
type EnemyInfo ¶
func MakeChaser ¶
func MakeMeleer ¶
func (EnemyInfo) GetExperience ¶
func (e EnemyInfo) GetExperience(attack AttackType) int
type GameState ¶
type GameState struct {
Player Position
Stats PlayerInfo
Enemies []EnemyInfo
Items []Item
MapInfo MapInfo
// contains filtered or unexported fields
}
func (*GameState) AttackMob ¶
func (gs *GameState) AttackMob(e *EnemyInfo, style AttackType) CombatLog
func (GameState) BlockedTile ¶
func (*GameState) ChasePlayer ¶
func (*GameState) CurrentSnapShot ¶
func (*GameState) DeleteDirection ¶
H and L aren't wrong or bugged, for some reason this is how actual VIM accepts these deletes based on position J and K also aren't bugged.. VIM doesn't seem to like trying to delete current + next if there isnt a next
func (*GameState) DropPotion ¶
func (*GameState) GetLootFromKill ¶
func (gs *GameState) GetLootFromKill(line, col int, style AttackType)
func (*GameState) HaveFeather ¶ added in v0.1.4
func (*GameState) JumpToEndOrPunct ¶
func (gs *GameState) JumpToEndOrPunct()
Jumps to end of word or next punct
func (*GameState) JumpToNext ¶
func (gs *GameState) JumpToNext()
Jumps to either next new word OR punctuation
func (*GameState) JumpToNextWord ¶
func (gs *GameState) JumpToNextWord()
Only jumps to next word after a space
func (*GameState) JumpToPrev ¶
func (gs *GameState) JumpToPrev()
Jumps to last beginning of word or punctuation
func (*GameState) JumpToStart ¶
func (gs *GameState) JumpToStart()
Jumps to first index of line (shuffled to 1 because hardcoded maps start at index 1, normally is index 0)
func (*GameState) LevelStats ¶
func (*GameState) MapComplete ¶
func (*GameState) MeleeAttack ¶
func (*GameState) RangedAttack ¶
func (*GameState) SpawnEnemy ¶
func (*GameState) SpawnPlayer ¶
func (*GameState) TakeSnapShot ¶
func (*GameState) TryDamagePlayer ¶
func (*GameState) UseFeather ¶ added in v0.1.4
func (gs *GameState) UseFeather()
func (*GameState) UseMerchant ¶
Add more options in the future, items instead of potion + xp
type MapInfo ¶
type MapInfo struct {
Level int
LevelMap levels.LevelMap
AnswerMap levels.LevelMap
MapType MapType
}
func GetMapInfo ¶
type PlayerInfo ¶
type Position ¶
func (*Position) AdjustPlayer ¶
Click to show internal directories.
Click to hide internal directories.