GithubHelp home page GithubHelp logo

javascriptrpgelements's Introduction

Javascript RPG Elements v0.0.1

designed by Jeffrey Jean-Pierre

Table of Contents:

##1 HP Stats HP Stats are calculated using the baseLife and the currentLife objects. At the time of writing this, baseLife has been set to 200. The currentLife is what is displayed as "HP" and always begins as the player's baseLife stat. When damage is taken, it is currentLife that is recalculated and is displayed.

##2 Attack Function The attack function will cause damage based on the dmgAmount object. It is set to challenge the currentLife object. Improvements can be made to create a better calculation for how damage should be taken. Currently, if dmgAmount is 3, only 3 points will affect the currentLife.

##3 Healing Function The healing function will restore currentLife based on the amout of the heal object. Currently, I've added some calculations to test rounding of the healing amount, but it is not founded in any particular healing logic calculation (I merely made one up). Feel free to change this to suit your needs.

##4 Auto Healing Function The auto healing function will continue to heal a player until his baseLife has been reached. Future improvements could limit how long the auto healing will last (to seconds, or even to a specified amount of healing points).

javascriptrpgelements's People

Contributors

gogosanka avatar

Watchers

 avatar  avatar

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.