Giter VIP home page Giter VIP logo

simranfarrukh / fairytale Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23 KB

Using inheritance, association, overriding, enums, lombok, and static methods to translate a description of the inhabitants of a game world into a set of classes that could serve as part of a model for a game or gaming utility.

License: GNU General Public License v3.0

Java 100.00%
association enums inheritance overriding game-utility lombok static-method game-world

fairytale's Introduction

The Inhabitants of Amestris

In the town of Amestris in the magical land of Fairytale there are three kinds of Monsters:

* Orcs
* Goblins
* Manticores 

Attributes

  • All Monsters have a clan affiliation that cannot change.
  • They all have numeric ratings for three basic attributes that describe their abilities:
* Ferocity
* Defense
* Magic
  • These attributes can be raised or lowered by one point at a time, within the range of 0 to 20.
  • The clan affiliation and basic attributes of a Monster are obvious and can be easily retrieved by anyone.
  • All Monsters have 0 or more treasure.
  • They all have a numeric health rating. If they have health > 0 they are alive, otherwise, they are dead.
  • The clan affiliation of a Monster cannot change, unless that monster is a Manticore – they’re fickle and change clans all the time.
  • Every Goblin has exactly one other Goblin that is its sworn enemy. This enemy is fixed at birth and never changes, even if it dies.
  • An Orc can be Infantry or Warlord. Warlords have an integer leadership rating from 1 to 5. This rating can be raised or lowered by 1 point at a time.
  • Every warlord has exactly 5 Infantry in his or her command, and every Infantry member has exactly one Warlord that commands it.
  • The assignments of Infantry to Warlord are frequently changed.

Abilities

Attack and Defense

  • When a Monster attacks, it produces a battle score equal to the average of its Ferocity, Defense, and Magic scores. If its opponent’s attack score is higher, it loses health points equal to the difference in attack scores. (e.g. if a Manticore with an attack score of 18.5 fights a Goblin with an attack score of 10.7, the Goblin will lose 7.8 health.)
  • When a Manticore or a Warlord attacks, its battle score is greater than a normal Monster’s score by a factor of 1.5.
  • Dead Monsters cannot attack or defend themselves.

Healing

  • When a Warlord sounds its battle cry, it produces a health boost score equal to its leadership rating multiplied by 5 and raises the health score of each of the Infantry in its command by that amount.
  • Dead Warlords cannot sound their battle cry and dead Infantry cannot be healed.

Treasure

  • A monster can gain or lose treasure as a result of a fight.
  • A Dead monster cannot gain treasure.

fairytale's People

Contributors

simranfarrukh avatar

Watchers

 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.