PP Combat

From The Coursebooks Wiki
Revision as of 20:25, 12 March 2012 by CourseDirector (talk | contribs)
Jump to navigation Jump to search

Combat: true-turn-based, on stages, using a HUD-style system similar in appearance to Earthbound.

Attacks and Stats

Attacks: melee, ranged, and magic. Melee does the most damage, ranged gets to attack 3 times per round, and magic has a spell list and limited spell points to draw from.

Stats: Strength, Accuracy, and Magic. Obviously the relevant stat is used when making such an attack.

Weapons and Items

Each item has the potential to add bonuses to all stats. Each item has 8 properties associated with it, a + to each stat, and then AC, then Damage depending on whether or not it is a weapon, and a property for weapon-type. The last property is item-type, determining where it gets equipped(weapon slot, shield slot, etc).

  • Name
  • +STR
  • +ACC
  • +MGC
  • +AC
  • DMG
  • Attack-type
  • Item-Type

Examples:

  • Longsword
  • +0
  • +0
  • +0
  • +0
  • 1d8
  • Melee
  • Weapon

Stats are always expressed in the order Strength, Accuracy,

  • Chainmail of Strength
  • +4
  • +0
  • +0
  • +6
  • 0
  • NA
  • Armor

An item will not necessarily bestow stat bonuses but still has that property, thus making the +0. The reason for giving each item each value is to make it easier from a coding standpoint.

Only weapons have damage. The base damage is determined by a random function and there can also be a + attached. For example a +1 Longsword does 2-8+1 damage. Other items will use that slot for the To-Hit bonus.

Thoughts: it might be interesting if we could add a random loot-generator to produce items for us based on a simple formulae. We’ll determine this in coding.

Equip Slots

Each character has 5 equip slots: Main Hand, Shield, Armor, Helm, and Jewelry.

Melee and Ranged Attacks

To-Hit

For calculating melee and ranged attacks, we will use a simplified d20 system. A random function will pick a number between 1 and 20, then add the character's To-Hit bonus. If the resulting number is greater than 10 the attack is a success and damage is calculated.

Base To-Hit

  • Raymond - 3
  • Jaime - 1

Damage Calculation

Base Damage: Damage weights are calculated by character and appropriate stat.

  • Raymond - 0.75 STR
  • Jaime - 0.45 ACC

(All numbers rounded to the nearest whole)

Variable Damage: A weapon has a variable number(such as 2-8) for damage, this is calculated on each attack.

Final Damage: Final damage is Base Damage + Variable Damage - 90% of the target enemy’s Armor Class.

Magic

Magic does not use To-Hit(all spells automatically hit) nor does it use AC. Magic damage is a variable specific to the chosen spell and always does that much damage.

Magic Stat

Aria gets 3.5x her stat in Magic as Maximum SP(spell-points), thus magic-boosting items give her additional spell points.

If an item with a bonus to magic were to be un-equipped while Aria has full SP, she looses the difference in spell-points. If it is then re-equipped, she does not gain those spell points back.

Player Damage

The player characters take damage differently in one key way: for the players, 100% of AC is subtracted from Final Damage, allowing the players to become potentially invulnerable.

Enemies and AI

Mobs will only have 3 actual values associated with them: Type, AC, and Damage. Mobs do not have stats nor full character sheets.

Example: Trusty Troubadour Type: Melee AC: 7 Damage 1-10

According to the extant combat system, a player character with an AC of 10 or more would be completely immune to the Trusty Trubador.

In the case of magic-using enemies, they do not have Mana Points and only use a single spell.

The AI needs to be smart enough to choose who to attack based on AC. In the example above, the AI needs to know to go after the Ranger instead of the Knight if the Knight has more than 9 AC.

Thoughts: Potential balance issues: If we make the AI base it’s decisions entirely on AC, then after a point it will be attacking only the weaker, lesser Aced characters like the mage. But if we use something like damage, the mage will also always be targeted because the spells have much higher damage levels. This is something we’ll have to work on.

See Also