Combat

From RPF - The "Script"

Jump to: navigation, search

Once combat is initiated it proceeds through the following several steps.

Contents

Gather Data

The first step in battle is to gather all of the inforamation from the database about the player and the person/creature being attacked.


Calculate AC

Calculate each character's Armor Class (AC).


Roll for Attack

Each character rolls Attack. If the attack roll is greater than the other character's AC then it is a hit, if not then it is a miss.

If a person rolls a 1 for attack then they automatically miss. If a 20 is rolled then it is an automatic hit and a second attack role is made. If the second attack role hits then the attack becomes a Critical Hit. If the second attack role misses then the attack is just a normal attack.

Both characters attack each other simultaneously, meaning even if you kill your oppononet in battle the opponent still hits you for that same turn.


Roll for Damage

If each character's attack is a hit then damage is rolled for that person. Damage is completely dependant on the character's Weapon.


Apply Damage

After damage is decided then it is deducted from each character's HP. If both character's are still alive then another round occurs. Battle continues until one character has died.


Roll for Reward

There is a chance for a Treasure after each battle. This could include Gold (gp) or Items.


Apply Experience

Each battle rewards the winner (except NPC of course) with Experience based on how difficult the battle was.


Level up Character

If a character has gained enough experience points to gain a new level then we run that method.


Display Info to User

The last step is to display all of the gathered information and the results to the player.


Forum Discussion on this topic
Personal tools