Snayff / nqp2

An exploration of a fantasy world, to autobattle your way to ruling the demesne.
https://snayff.github.io/nqp2/
Other
12 stars 5 forks source link

Traps #91

Open Snayff opened 3 years ago

Snayff commented 3 years ago

Suggested Feature

Neutral entities that do damage in a predetermined way.

Requirements

General

  1. Traps are randomly generated on a combat map.
  2. The type and number of the traps generated on a combat map are set by data files.
  3. Traps trigger their effect either by time or proximity.
  4. Traps are shown on the combat map with a sprite.
  5. Traps are animated when they trigger their effect.

Examples

  1. Pit
    1. When unit is on the trap then any entities colliding with the trap are killed.
    2. Entities killed this way are not shown on the map.
  2. Spinning blades
    1. Every X seconds the trap triggers.
    2. While triggering, any entity in range takes damage.
  3. Barricade
    1. When hit in melee, deal 1 damage to attacker.
DaFluffyPotato commented 3 years ago

I'm just now noticing this, but the barricade doesn't make any sense in the combat system we have. With A* pathfinding, the AI will just run around it (especially since they're placed randomly). There is no reason to attack them. It would function as if it were just a normal collideable tile.

Snayff commented 3 years ago

@DaFluffyPotato they'll run around and potentially in to something else or, given the rules in the ai (#77) if they can't find the target they want in time then they'll charge whatever is in the way, which could be the barricade.

DaFluffyPotato commented 3 years ago

So it only ever impacts cavalry when charging?