utils

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

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

Go to latest
Published: Jun 17, 2025 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignSpell

func AssignSpell(spellList *[]structs.Spell, castingBlocks *structs.SpellCasting)

func DetectRitual

func DetectRitual(jsonData string) (bool, structs.RitualData)

func ExtractWeaknessOrResistances

func ExtractWeaknessOrResistances(jsonData string, path string) []structs.DamageModifierBlock

func GetListofJSON

func GetListofJSON(dir string) ([]string, error)

func GetMonstersInLevelRange

func GetMonstersInLevelRange(min int, max int) error

func GetRepoArchive

func GetRepoArchive(cfg config.Config) error

func GetXpBudget

func GetXpBudget(difficulty string, pSize int) (int, error)

func ItemSwitch

func ItemSwitch(item string, passiveList *[]structs.Passive, SpellCastingBlocks *structs.SpellCasting, FreeActionList *[]structs.FreeAction, ReactionList *[]structs.Reaction, actionList *[]structs.Action, SpellList *[]structs.Spell, MeleeList *[]structs.Attack, RangedList *[]structs.Attack, Inventory *[]structs.Item) error

func KickOffSync

func KickOffSync(cfg config.Config) error

func LoadEachJSON

func LoadEachJSON(cfg config.Config, path string) error

func LoadJSON

func LoadJSON(path string) (string, error)

func ManageDBSync

func ManageDBSync(cfg config.Config) error

func NewInt4

func NewInt4(value int) pgtype.Int4

func NewText

func NewText(value string) pgtype.Text

func ParseAction

func ParseAction(jsonData string) structs.Action

func ParseCoreData

func ParseCoreData(jsonData string) structs.Monster

func ParseDamageBlocks

func ParseDamageBlocks(jsonData string) []structs.DamageBlock

func ParseDamageEffects

func ParseDamageEffects(jsonData string) structs.DamageEffect

func ParseDefenseBlock

func ParseDefenseBlock(jsonData string) structs.DefenseBlock

func ParseDurationBlock

func ParseDurationBlock(jsonData string) structs.DurationBlock

func ParseFocusSpellCasting

func ParseFocusSpellCasting(jsonData string) structs.FocusSpellCasting

func ParseFoundJson

func ParseFoundJson(data string) (structs.Monster, error)

func ParseFreeAction

func ParseFreeAction(jsonData string) structs.FreeAction

func ParseInnateSpellCasting

func ParseInnateSpellCasting(jsonData string) structs.InnateSpellCasting

func ParseItem

func ParseItem(jsonData string) structs.Item

func ParseMovements

func ParseMovements(jsonData string) []structs.Movement

func ParsePassive

func ParsePassive(value string) structs.Passive

func ParsePerception

func ParsePerception(jsonData string) structs.Perception

func ParsePreparedSpellCasting

func ParsePreparedSpellCasting(jsonData string) structs.PreparedSpellCasting

func ParsePrice

func ParsePrice(jsonData string) structs.PriceBlock

func ParseReaction

func ParseReaction(jsonData string) structs.Reaction

func ParseSaves

func ParseSaves(jsonData string) structs.Saves

func ParseSenses

func ParseSenses(jsonData string) []structs.Sense

func ParseSkills

func ParseSkills(jsonData string) []structs.Skill

func ParseSpell

func ParseSpell(jsonData string) structs.Spell

func ParseSpellArea

func ParseSpellArea(jsonData string) structs.SpellArea

func ParseSpontaneousSpellCasting

func ParseSpontaneousSpellCasting(jsonData string) structs.SpontaneousSpellCasting

func ParseWeapon

func ParseWeapon(jsonData string) structs.Attack

func PrepMonsterParams

func PrepMonsterParams(monster structs.Monster) writeMonsters.InsertMonsterParams

func ProcessAction

func ProcessAction(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessAttacks

func ProcessAttacks(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessFocusMagic

func ProcessFocusMagic(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessInnateMagic

func ProcessInnateMagic(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessItems

func ProcessItems(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessLanguages

func ProcessLanguages(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessMagic

func ProcessMagic(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessMovements

func ProcessMovements(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessPassive

func ProcessPassive(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessPreparedMagic

func ProcessPreparedMagic(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessReaction

func ProcessReaction(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessSenses

func ProcessSenses(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessSkills

func ProcessSkills(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessSpontaneousMagic

func ProcessSpontaneousMagic(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func ProcessWeakAndResist

func ProcessWeakAndResist(ctx context.Context, queries *writeMonsters.Queries, monster structs.Monster, id int32) error

func SpellLevelParser

func SpellLevelParser(jsonData string) string

func StringCleaner

func StringCleaner(input string) string

func UuidRemover

func UuidRemover(input string) string

func WriteMonsterToDb

func WriteMonsterToDb(monster structs.Monster, cfg config.Config) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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