Obstacles - Orhu/Summer2023Project GitHub Wiki
Mechanics
General
Obstacles are features placed into rooms, each of which has its own unique behaviors. Broadly, there are 5 categories of obstacles: containers, blockers, turrets, floor traps, and pits. Some obstacles may have "variants" which are alternate versions of the obstacle that can be randomly swapped in for the generic form of the obstacle (i.e., a golden pot).
Obstacles are placed into templates by category (i.e. blockers are placed in as blockers rather than specific obstacles) as "generic obstacles". They may have preferred forms, basically a specific obstacle of the category that the template wants to make the generic obstacle into. If that preferred form is not accounted for in the dungeon deck (the dungeon cards associated with the cards in the player's deck), then the obstacle will be set as the generic obstacle of it's category. If there is no preferred form for an obstacle, its form will be selected at random from the pool of cards created by all cards in the dungeon deck for obstacles of the generic obstacle's category. [DEPRECATED]
(OPTION: We may choose to randomly assign the obstacles with preferred forms based on a random selection like with obstacles without preferred forms. This may be a time consuming to have play out during room generation, though, so just setting each obstacle to a generic form is probably preferable.)
Hazards, a subclass of obstacles, are features which damage or impede the player in some way. Props, another subclass of obstacles, are features that can be destroyed and may produce items, gold, or other pickups as a result. [DEPRECATED]
Obstacle Categories
Containers
Container obstacles are obstacles that can be easily destroyed by the player with attacks and often drop pickups like hearts and gold.
Blockers
Blockers are obstacles that are either difficult or impossible to destroy. Typically, if a blocker can be destroyed at all, it would only be able to be destroyed by explosive damage (i.e. bombs).
Turrets
Turrets are obstacles that fire projectiles. They are impossible to destroy. The manner in which the turret fires projectiles (i.e. on a trigger or automatically), the projectiles they fire, and their fire rate can be adjusted.
Floor Traps
Floor traps are floor-based obstacles that the player and enemies can move over. They cannot be destroyed. These traps may deal damage, apply status effects, or have other effects that trigger when the player walks over them.
Pits
Pits are floor-based obstacles that are impassible by the player. They cannot be destroyed but can be crossed over by flying entities and projectiles. The type of pit that spawns will be the same as all connected pits (i.e., if a pool of water is the type of pit, all connected pit obstacles are pools of water).
Obstacle List
In the below list, the basic behaviors of each obstacle are outlined.
Containers
-
Pot: Pots are the generic container obstacle. They cannot be moved through, but can be destroyed by attacks. They have a random chance of dropping items from their loot table when broken (will be documented later).
-
Gold Pot: Gold Pots are a variant of pots that drop gold only.
-
Red Pot: Red Pots are a variant of pots that drop hearts only.
-
Box: Boxes are a container obstacle. They cannot be moved through, but can be destroyed by attacks. They are guaranteed to drop an item from their loot table when broken (will be documented later).
Blockers
-
Rock: Rocks are the generic blocker obstacle. They cannot be moved through, but can be destroyed by anything explosive.
-
Spike Rock: Spike Rocks are a variant of rocks that deal damage to the player when contacted. Deals 0.5 hearts of damage.
Turrets
-
Dart Trap: Dart Traps are a turret variant variants of turrets that fire poison blade attacks whenever an entity walks in front of them.
-
Fireball Turret: Fireball Turrets are a turret variant that shoots fireballs every 2 seconds in whatever direction they are facing.
-
Magic Turret: Magic Turrets are the generic turret obstacle. They a turret variant that fire Mana Bullet projectiles forward in whatever direction they are facing.
Note — Turrets fire projectiles either on an interval or based on a trigger. The projectile the turret fires, the time between projectiles, the way the turret triggers, etc. are all values that can be adjusted, and so turrets come in many variants.
Floor Traps
-
Embers: Embers are floor traps that apply a stack of the burning status effect to entities walking on them every 0.25s.
-
Spider Web: Spider webs are a floor trap that slows entities that walk over them.
-
Spikes: Spikes are floor trap that damage the player when they walk into them. They cannot be destroyed. They also come in a few variants, such as spikes that can retract and activate on a time interval, or when walked over.
Pits
- Pit: Pits are the generic pit obstacle. They are impassible obstacles that can only be crossed by flying entities and projectiles. They do not count as targets when hit and will never be involved in collisions with projectiles.