Documentation
¶
Index ¶
- func AlignmentChange(killerAlignment int8, killedAlignment int8) int
- func ChanceToTame(s *users.UserRecord, t *mobs.Mob) int
- func Crits(sourceChar characters.Character, targetChar characters.Character) bool
- func Hits(attackSpd, defendSpd, hitModifier int) bool
- func PowerRanking(atkChar characters.Character, defChar characters.Character) float64
- type AttackResult
- func AttackMobVsMob(mobAtk *mobs.Mob, mobDef *mobs.Mob) AttackResult
- func AttackMobVsPlayer(mob *mobs.Mob, user *users.UserRecord) AttackResult
- func AttackPlayerVsMob(user *users.UserRecord, mob *mobs.Mob) AttackResult
- func AttackPlayerVsPlayer(userAtk *users.UserRecord, userDef *users.UserRecord) AttackResult
- func GetWaitMessages(stepType items.Intensity, sourceChar *characters.Character, ...) AttackResult
- type SourceTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlignmentChange ¶
func ChanceToTame ¶
func ChanceToTame(s *users.UserRecord, t *mobs.Mob) int
func Crits ¶
func Crits(sourceChar characters.Character, targetChar characters.Character) bool
Whether they crit
func PowerRanking ¶
func PowerRanking(atkChar characters.Character, defChar characters.Character) float64
Types ¶
type AttackResult ¶
type AttackResult struct {
Hit bool // defaults false
Crit bool // defaults false
BuffSource []int // defaults 0
BuffTarget []int // defaults 0
DamageToTarget int // defaults 0
DamageToTargetReduction int // defaults 0
DamageToSource int // defaults 0
DamageToSourceReduction int // defaults 0
MessagesToSource []string
MessagesToTarget []string
MessagesToSourceRoom []string
MessagesToTargetRoom []string
MessagesToRoomOld []string
}
func AttackMobVsMob ¶
func AttackMobVsMob(mobAtk *mobs.Mob, mobDef *mobs.Mob) AttackResult
Performs a combat round from a mob to a mob
func AttackMobVsPlayer ¶
func AttackMobVsPlayer(mob *mobs.Mob, user *users.UserRecord) AttackResult
Performs a combat round from a mob to a player
func AttackPlayerVsMob ¶
func AttackPlayerVsMob(user *users.UserRecord, mob *mobs.Mob) AttackResult
Performs a combat round from a player to a mob
func AttackPlayerVsPlayer ¶
func AttackPlayerVsPlayer(userAtk *users.UserRecord, userDef *users.UserRecord) AttackResult
Performs a combat round from a player to a player
func GetWaitMessages ¶
func GetWaitMessages(stepType items.Intensity, sourceChar *characters.Character, targetChar *characters.Character, sourceType SourceTarget, targetType SourceTarget) AttackResult
func (*AttackResult) SendToRoomOld ¶
func (a *AttackResult) SendToRoomOld(msg string)
func (*AttackResult) SendToSource ¶
func (a *AttackResult) SendToSource(msg string)
func (*AttackResult) SendToSourceRoom ¶
func (a *AttackResult) SendToSourceRoom(msg string)
func (*AttackResult) SendToTarget ¶
func (a *AttackResult) SendToTarget(msg string)
func (*AttackResult) SendToTargetRoom ¶
func (a *AttackResult) SendToTargetRoom(msg string)
type SourceTarget ¶
type SourceTarget string
const ( User SourceTarget = "user" Mob SourceTarget = "mob" )
Click to show internal directories.
Click to hide internal directories.