Skip to content

Multi-tile Units does not handle damage correctly #23

@perara

Description

@perara

deep-rts/src/Tile.cpp

Lines 262 to 270 in 148df8d

void Tile::update(Unit& unit) const {
// TODO - does not handle multi-tile blocks (for example Town-Hall)
// TODO - maybe this is OK?
if(hasOccupant() && damageModifier > 0){
unit.afflictDamage(std::ceil(damageModifier));
}
}

In multi-tile units, the damage is only applied to the "primary tile". Units currently only reference1 tile, but perhaps there should be a list of "secondary tiles"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions