Monster - JayhawkZombie/EECS581Project GitHub Wiki

Abstract

The monster class handles all methods corresponding to the monster itself - regardless of what type it is

Extends

FightActor

Dependencies

Member Variables

  • int m_generation;
  • Monster m_mother;
  • Monster m_father;
  • std::string m_name;
  • MonsterType m_type;
  • Element m_secondary;
  • int m_physicalAttacks;
  • int m_magicalAttacks;

Functions

  • getters and setters
  • constructors
  • Taking care of virtual methods from inheriting classes

BaseDamage

*Its inherited from the battle actor class *Total damage needs to be split three ways

  • 30% elemental
  • 40% Physical/Magical Ratio Based
  • 30% Tree Placement Based

Design principles

Design principles are there to guide the development of the class

Battle Principle 1: 4-hit rule for low levels

All other things being equal, at level x, 1<=x<=5, a level x monster should kill another level x monster in four hits

Battle Principle 2: 3-hit rule for low-level advantage

All other things being equal, A level y=x+1 should kill a level x in three hits

Battle Principle 3: 8-hit rule for high-level, same physical-magical ratio

All other things being equal, at level z, z>5 (stage 2 and higher monsters), a monster should kill a fellow level z monster in 8 hits if they have the same physical-magical association (physical vs physical or balanced vs balanced or magical vs magical)

Battle Principle 4: 6-hit rule for high-level, same ration

All other things being equal, at level m=z+1, a monster should kill a fellow level z monster in 6 hits if they have the same physical-magical association.

Battle Principle 5: Elemental Dominance outweighs tempo advantage

All other things being equal, even with a tempo disadvantage, an elementally-dominant monster should win an equally-leveled matchup

Leveling Principle 1: Monsters Level Faster

Monsters level 25% faster than humans to balance level cap

Leveling Principle 2: Monsters have level cap

Monsters will have a level cap of generation*10

Leveling Principle 3a: Type Changing

Monsters will evolve into new Types at levels 5 (to adolescent), 15(to adult) and 25(to elder)

Leveling Principle 3b: P/M ratio

When choosing a new type, the Monsters P/M ratio will be taken into account, if possible

Leveling Principle 5: Health and Magic Leveling

fifty percent of the leveling for health and magic will be based on the monster types' position in the tree

Multipliers
Stage 2 3 4
HP Magic .8 .7 .6
HP Balanced 1 1.1 1.2
HP Physical 1.2 1.4 1.6
MP Magic 1.2 1.4 1.8
MP Balanced 1 1 1
MP Physical .4 .5 .6

fifty percent of the leveling for health and magic will be based on P/M ratio Ratio is calculated by (numMagicalAttacks)/(numMagicalAttacks+numPhysicalAttacks) so a monster with a ratio of 1 does all magical attacks and a monster with a ratio of 0 does all physical attacks

Multipliers
Stage 1 2 3 4
HP r<.1 1.3 1.5 1.6 1.8
HP .1<=r<.4 1.2 1.3 1.4 1.5
HP .4<=r<.6 1 1.05 1.1 1.15
HP .6<=r<.9 .7 .75 .8 .85
HP r>=.9 .6 .65 .7 .75
MP r<.1 .4 .4 .4 .4
MP .1<=r<.4 .5 .6 .7 .8
MP .4<=r<.6 1 1 1.05 1.1
MP .6<=r<.9 1.2 1.35 1.5 1.65
MP r>=.9 1.3 1.5 1.7 1.9

Elemental Damage Principle 0:

Should a source trigger multiple elemental principles, the effects stack

Elemental Damage Principle 1:

Monsters receive +20% damage from sources dominating their primary element

Elemental Damage Principle 2:

Monsters receive +10% damage from sources dominating their secondary element

Elemental Damage Principle 3:

Monsters receive -20% damage from their primary element

Elemental Damage Principle 4:

Monsters receive -10% damage from their secondary element

Elemental Damage Principle 5:

Monsters receive -10% damage from the element dominated by their primary element

Elemental Damage Principle 6:

Monsters receive -5% damage from the element dominated by their secondary element

Elemental Damage Multiplier Table

From the above principles, we construct a table

Secondary Primary
Secondary ElementMatches ElementDominates ElementIsDominated NoRelationship
ElementMatches .7 .8 1.1 .9
ElementDominates .75 .85 1.15 .95
ElementIsDominated .9 1 1.3 1.1
None .8 .9 1.2 0

JavaVersion

The old Java Version Didn't do much and had a lot of extra stuff that wasn't used, but feel free to look at it if you are lost!