Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.
This repository was archived by the owner on Apr 26, 2025. It is now read-only.

Clarify some concerns about returning some turnSpent values #78

@VedVid

Description

@VedVid

"Leftovers" of #70

To investigate further:

In MoveOrAttack in monsters.go is

	if target != nil {
		c.AttackTarget(target)
		turnSpent = true

consider changing it to (need to change AttackTarget a bit) (need to check if it makes a sense - if execution of attack can't fail, it may remain as is)

	if target != nil {
		turnSpent = c.AttackTarget(target)
		turnSpent = true

=====
In DropFromInventory, add proper error handling, or return always true - because now setting turnSpent := false at start and adding turnSpent = true doesn't make much sense (except explicitness)

Similarly in EquipItem in monsters.go - it has error handling, but will always return true anyway.

Same for DequipItem in monsters.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestmedium[priority]

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions