Code Monkey home page Code Monkey logo

dungeon's People

Contributors

montyr75 avatar

Watchers

 avatar  avatar

dungeon's Issues

Allow monsters to be "slotted" in one of 12 numbered slots.

If a monster is fought but not defeated, it needs to be placed in the next available numbered slot, and the corresponding token should be placed on the Dungeon! board. When slotted, the monster should probably be couched in a Slot object that includes a reference to the deck the monster came from. Need to find out the rules regarding what happens if all 12 slots are full....

Add button to show collapsed slots area

In the upper right, we need a button that, when tapped, will reveal the slots area if it's currently collapsed. If the button's ID is "slots-btn", it should have some CSS like this to make it visible only when the drawer panel is collapsed:

core-drawer-panel:not([narrow]) #slots-btn { display: none; }

Restructure JSON data

Separate dungeon.json into encounters.json and treasures.json. Each of these should just be a List of List, with the first being level 1, next 2, and so on.

Create <slot-view>

Slots are just <td> elements right now, but they should become more robust, able to display more information (monster stats, treasures in the slot, etc.). It's likely that it will need to be compact by default (monster name, number of treasures...), but expandable to show details.

Give monsters an attack button.

If a hero encounters and fails to destroy a monster, the monster can return fire. We need an attack button that automates a 2d6 roll behind the scenes and displays the result from the game's monster attack table.

Create a Deck class.

This class should be able to handle encounter cards like monsters and traps, and also treasure cards and special items. It should closely emulate the behavior of an actual deck in the board game.

For traps, all special actions (e.g. rolls) should be automatically resolved and inserted into the description.

Trap card descriptions should have a special data insertion point that will be automatically filled in the constructor. Cage traps will cause a player to lose 1 or 2 turns (50/50 odds) and slide traps will always deposit a player one level deeper than the trap's level. Any approach will probably be made easier by including a "subtype" property that identifies the specific kind of trap.

The Trap class could handle all trap types (since there are only two), or there could be subclasses for each subtype that contain the appropriate special data handling.

Create a <card-view> element.

This element's layout will be modeled loosely on the board game's cards. Traps will display a description section instead of the attack numbers, and they will not display "Attack" or "Slot" UI. The user will need to be able to perform these actions with the view:

  • Return card to deck (use Deck.add())
  • Discard (use Deck.discard())
  • Attack (use CardView.attack())
  • Slot

The view will need to have an attack() method that rolls on the monster attack table and displays the result. Would be great if the result popped out of the attack button itself (<core-dropdown>).

Trap card descriptions should have a special data insertion point that will be automatically filled when the card comes into view (in the Trap class's description getter). Cage traps will cause a player to lose 1 or 2 turns (50/50 odds) and slide traps will always deposit a player one level deeper than the trap's level.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.