Skip to content

Multiple npcs can attack in single combat #920

@GregHib

Description

@GregHib

Due to "under_attack":

if (character.target == null || !Target.attackable(character, target)) {
   character.mode = EmptyMode
   return
}

npcCombatStop { target ->
    if (target.dead) {
        set("face_entity", target)
    } else {
        clearWatch()
    }
    target.stop("under_attack")
    target.attackers.remove(this)
    this.target = null
}

!attackable resets combat which removes the targets "under_attack" allowing the npc to attack, they take it in turns hitting and then the previous resets the under_attack flag allowing the next to attack.

Could really do with tidying up starting combat

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions