-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crafting traps, part 1: initial implementation.
With this commit, it is now possible for the player to build their own traps using a new object called a 'trap kit'. A trap kit comes with 10-30 'charges', and Rogue's will always start the game with one in their inventory. These kits can spawn randomly as well, but are very rare. These can be 'recharged' with a scroll of charging as many times as needed. The charges simulate the materials and tools needed to build a trap, much like the charges in a tinning kit simulate the number of tins available to preserve corpses. The initial implementation, only arrow traps can be built for now - there's a LOT more to do here, but this commit basically sets the framework, and shows that this actually works. How it works: the player applies their trap kit, they're asked to supply a component. If the correct component (type and quantity) is provided, a trap is created and will appear in inventory (in this case, an 'arrow trap'). The player can then apply the newly created trap to activate it on the tile space they are standing on, same rules apply as with setting a bear trap or a land mine. Because of the changes made here, if the player were to wish for an arrow trap, they'll actually receive an arrow trap in inventory that they can use. In wizard mode, typically you'd wish for 'arrow trap' to make a set trap on the tile space you're standing on - now you'd use 'arrow trap set' instead to create a set trap on the current tile space. Traps I had in mind that could actually be crafted: arrow traps (implemented), land mines, bear traps, bolt traps, dart traps, sleeping gas traps, rust traps, fire traps, ice traps, teleportation traps (not levelport), magic traps, antimagic traps, polymorph traps, spear traps, magic beam traps, squeaky board traps, and falling rock traps. Trap doors, maybe? Turning a pit into a spiked pit, also maybe? Would need to figure out suitable components, and in what quantities. Case in point - right now, it only takes 20 arrows to craft an arrow trap, but depending on your luck, disarming it could yield twice as many arrows, or more. Will need to think on that. Other to-do's - create a new skill for building/setting/disarming traps. All traps could be possible to create, but the more advanced traps (poly traps, magic beam traps, etc) would require higher skill to ensure a decent chance of success. Then figure out which roles should have access to this skill (some are obvious choice, others not so much). Also have a look at xNetHack's trap ammo revamp, this would allow using a specific material type for a component to create a trap using that material (use silver arrows to make an arrow trap, it'll fire silver arrows).
- Loading branch information
Showing
16 changed files
with
279 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.