Giter Club home page Giter Club logo

srd's People

Contributors

lesnyrumcajs avatar trisfald avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dsibilly

srd's Issues

Prototype DSL to define spells and some aspects of combat

Investigate and possible come up with a prototype DSL that will be used to define spells and perhaps some routines to calculate hits/damage.

Requirements

  • User of the library must be able to use the DSL to create his own spells or abilities.
  • DSL should be relatively fast. Ideally it shouldn't be worse than one order of magnitude than pure rust.
  • The use case is to add a logic layer in between rust code. For example we got to implement some traits like:
    fn apply_impact(
        &self,
        SomeContext,
        SomeImpact,
        EventQueue
    ) {
       <implementation>
    }

At this stage through the DSL we should be able to take SomeImpact which contains the definition of the impact (could be an attack with 1d8 damage), do some computation based on the values inside SomeContext (maybe target has damage reduction) and at the end create and push some events in the EventQueue (like AlterStatistics(target, HP-1))

Add character inventory

  • User can define what items are in the character's equipment
  • Inventory gets translated into one or more statistic/ability in Character::spawn()

Implement rules for KO and death

Acceptance criteria

  • A character should die from instant death (page 98)
  • A character at 0 hp should be incapacitated (page 98)
  • Implement death saving throws (page 98)

Characters during combat: MVP

  • implement weasel::CharacterRules

Acceptance criteria

  • Creatures must have the following stats:
    • hit points
    • all existing abilities from the compendium
    • proficiency bonus
    • all existing skills from the compendium
  • Creatures must have the following abilities:
    • move
    • attack

Replace `String` with `ArrayString` in IDs

In order to use less memory we should investigate replacing String with ArrayString (documentation).

Acceptance criteria

  • Confirm ArrayString uses significantly less memory than String for small string (1-30 chars)
  • Replace String with ArrayString in ID structs

Order of initiative: MVP

  • implement weasel::RoundsRules

Acceptance Criteria

  • SRDRules must expose a method to get who is the next actor.
  • Adding / removing an actor should modify the global order of initiative.
  • After actor completes his turn, he should not be able to move again in the same round.

Implement `CharacterHandle`

This struct should make it easier for the user of the library to get what a character can do and to issue orders.

Acceptance criteria

  • Contains the Character ID
  • the user can check what actions can the character do
  • the user can perform character actions
  • has convenience methods to access the most used stuff (HP, race, class, etc)

Verify skill proficiencies in character creation

Return an error when setting a skill proficiency which is not part of the character's class skill list.
Return an error when setting more than the allowed number of skill proficiency.

The error can be returned immediately in add_skill or later in spawn.

Implement smart narrator

  • Something user can define and pass to the rules
  • Accessible inside every rule
  • Can process 'combat event' for instance: Character X does a standard attack or Character Y rolls 1d20+3 = 8

Implement `Character::spawn`

A new method of Character, to spawn it in a battle.

Acceptance criteria

  • spawns a creature with correct statistics and abilities
  • returns a CharacterHandle
  • returns an error if the character definition is not correct

Abilities (move and attack)

  • implement weasel::ActorRules
    ..primarily

Acceptance criteria

  • method to get if a character can move
  • method to get if a character can attack
  • (maybe) methods in character handle to do same as above
  • method in character handle to perform movement
  • method in character handle to perform an attack
  • resolve attack and movement in ActorRules

Milestone 1 example (part 1)

At least with pseudocode

  • Create two characters
  • Initialize the server and the battle
  • Spawn both characters
  • Print the characters stats
  • Retrieve the current actor
  • Move the character if it's too far to attack
  • Make the character do an attack

Combat and damage: MVP

  • implement weasel::FightRules

Acceptance criteria

  • define the Impact type
  • For a start impacts can contain: target (area or entity?), damage, damagetype
  • Process impacts: alter statistics (hit points) of impacted targets

Movement on the map: MVP

  • implement weasel::SpaceRules

Acceptance criteria

  • define the Position type: an occupied square area on some coordinates. (page 92)
  • define a struct representing the map on which characters will move
  • support for movement in 2 dimensions
  • method to know if a position B is in 'reach' of X ft from a position A.

Maybe we can simplify everything by assuming the world is made up of squares (2½ by 2½ ft)?

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.