I'll try to isolate what I had for combat code from the rest of the stuff and send it to you. It was not completed, but was supposed to be close to the following (these are my own private dev notes, and note the tables below will not format correctly in this copy-paste):
Combat
1 ) Compare NPC 1's Attack (IE, 5) to NPC 2's Parry (IE, 2).
2 ) 5-2 = 3.
3 ) Subtract the difference from NPC 2's Guard (IE, 35).
4 ) 35-3 = 32.
5 ) Because NPC 1 gained some ground award + 2 to his Attack (IE, now 5-12).
6 ) Compare Attack vs. Parry again: 10 vs. 5. (NOTE: Action choice possible here.)
7 ) Subtract the difference from NPC 2's Guard (32 - 5 = 27).
8 ) Award + 2 to NPC 1's Attack (now 7-14).
9 ) Not much chance of NPC 2 recovering from a hit here.
10 ) Once the Guard reaches 0 or less, the defender is hit.
11 ) Whomever hits first usually wins, barring armor.
1 ) NPC 1 Attacks 2, NPC 2 Parry's at 8.
2 ) 8 - 2 = 6.
3 ) Add the difference to the Guard (35+6 = 41)
4 ) Award NPC 2 + 2 to Parry (now 5-12).
5 ) And repeat. Action choice possible here.
6 ) Once the Guard reaches itself plus NPC 1's Lead, an offensive shift occurs.
7 ) NPC 1's State becomes Defense / NPC 2's State becomes Offense
8 ) Both choose new Actions
Guard
The Guard is a defensive combatant's effective rating at avoiding an incoming attack. It represents the momentum in a battle. If it falls to 0 or less, the defensive combatant is hit. If it rises to itself + the offensive combatant's Lead, then an offensive shift occurs: the offensive combatant goes on the defensive, and vice versa. The value of a Guard is determined by the skill of the defensive combatant, and his Combat Stance.
Combat Stance Guard
Cautious +30%
Defensive +15%
Normal +0%
Offensive -15%
Violent -30%
Lead
The Lead is an offensive combatant's effective rating at maintaining the offensive. It represents his willingness to give up the attack. The value of a Lead is determined by the skill of the offensive combatant, and his Combat Stance.
Combat Stance Lead Damage
Cautious -30% -10%
Defensive -15% -5%
Normal +0% +0%
Offensive +15% +5%
Violent +30% +10%
A more aggressive Combat Stance will benefit with a stronger hit, should a hit land. A less aggressive Combat Stance has the opposite effect.
Poise
Poise represents the balance of the combatant. The better the Poise, the better the Guard and Lead.
Poise Guard Lead
Perfect +20% +10%
Balanced +0% +0%
Unbalanced -20% -20%
Horrible -40% -40%
Poise drops when:
1) The force of a blow or deflection is stronger than the deflection or blow matched against it (Bad parry/block)
2) A bad dodge (on defence only)
3) A bad miss (on offence only)
Poise rises when a combatant Breaks. Breaking can only be done while on the offensive. By giving up the offensive, the combatant gains the time to reset their Poise one level up. Poise always begins at Balanced.
Combat Stance
Combat Stance, as described above, can only be changed while on the offensive, and only when the offensive is first gained. After the first attack has been made while on the offensive, the Combat Stance can no longer be changed until the offensive is lost and regained again.
Breaking
An offensive combatant may Break at any time to relinquish the offensive. As already mentioned, this would be done to either increase one's Poise or to work towards changing one's Combat Stance. Breaking, however, can be employed for a third reason: to avoid the penalty to your next Guard from losing the offensive in an offensive shift.
Whenever an offensive shift occurs, the offensive combatant who is becoming defensive faces a penalty to their Guard. The penalty is calculated as a measure of the amount OVER the Lead the defensive combatant pushed the aggressor. If the Lead was 20, the Guard 30, and the defensive combatant raised the Guard to 59 (9 over Guard + Lead), the offensive combatant becomes defensive, and faces a -9% to their Guard.
Offense
The more Force an attack has behind it, the more damage it will do. Force is a rating of Speed X Mass.
Speed is: Speed + (Might - Weapon Mass) + Random
Mass is: Weapon Mass
Force is augmented by the type of Combat Stance one employs. An Offensive Stance grants + 15% to Force, and a Violent Stance grants a +30% to Force.
The more accurate an attack is, the more likely it is to break the defensive Guard.
Attack Accuracy is: Prowess + Skill + Random
Defense
Dodging attacks has the highest chance of unbalancing the attacker.
Parrying with a dual weapon allows for Counters, attacks that don't automatically give the offensive.
Blocking with a shield also allows for Counters, but to a lesser degree. Larger shields give greater bonuses to Guard and larger penalties to dodge.
The more Force a block or parry has behind it, the more it will overcome the attacker's Guard, or knock him off balance. It is calculated the same as above, for the attacker.
The More Accurate a block, parry, or dodge is, the more it will overcome the attacker's Guard. This also is calculated the same as above, for the attacker.
Exchange Resolution
An exchange between two combatants has one attacking and one defending. The attacker generates an Attack Accuracy which is compared to the defender's Defense Accuracy.
Attacker Wins: If the Attack Accuracy is higher, the defender's Guard is reduced by the difference between the Attack Accuracy and the Defense Accuracy. If the Guard is reduced to 0 or less, a hit is recorded. (See below.) If the Guard remains above 0, the defender still managed to defend, but the attacker is building up momentum. If the defender is blocking or parrying, the Attack Force is compared to the Defense Force. A sizeable difference, especially for blocking, will cause either side to lose Poise. The difference must be greater for parrying, since a parry redirects force, while a block absorbs it. If the defender is dodging, a narrow miss by the attacker will drop the Poise of the defender, while an excellent dodge by the defender will do the same to the attacker.
Defender Wins: If the Defense Accuracy is higher, the defender's Guard is raised by the difference between the Attack Accuracy and the Defense Accuracy. If the Guard is raised above or to the initial value of the Guard + the attacker's Lead, and Offensive Shift occurs. An Offensive Shift means that the combatants exchange directives: the attacker becomes the defender, and the defender becomes the attacker. The new defender receives a penalty to their Guard equal to the difference between the value of the Guard during the Offensive Shift, and the value of the initial Guard + Lead. If the Lead was 20, the initial Guard 30, and the defensive combatant raised the Guard to 59 (9 over Guard + Lead), the offensive combatant becoming defensive faces a -9% to their Guard.
If the Guard is not raised above or to the initial value of the Guard + the attacker's Lead, then a check for Poise loss identical to that taken when the Attacker Wins the exchange occurs.
Hitting
Damage is inflicted as a wound level to a specific area of the body. The wound level, and area of the body, will determine:
1) Blood Loss
2) Mobility Loss
3) Pain
All three of these effects greatly degrade a combatants performance. Usually whomever is struck first will lose.
Wound Level Blood Loss Mobility Loss Pain # to Upgrade
Scratch NONE NONE 5 3
Minor 2% 5% 10 2
Moderate 6% 15% 20 2
Major 15% 35% 30 2
Deadly 35% 75% 40 2
MORTAL 75% 100% N/A N/A
Once the accumulated Blood Loss reaches 40%, unconsciousness occurs
Mobility affects the Accuracy of Attacks and Defends, but not the Force, and is applied as a percentage penalty.
Pain is compared to the combatants Will attribute. Any positive difference is applied as a penalty to Poise. This penalty is applied once. It may be regained as normal by Breaking. Higher pain may drop Poise more than one level, so it may take more than one Break to shake off the pain. If Pain > 0 but < Will, then any Pain is applied as a bonus to Force if the combatant chooses the Violent Combat Stance.
Each wound stacks its penalties with any other wound.
A wound upgrades its level if the combatant is hit in the same area more than once. In this case the wound's penalties all increase to whatever level it upgraded to. It takes 3 Scratch wounds to upgrade to a Minor, and 2 of any other kinds to upgrade to the next level. A Mortal Wound can never be dealt, however, and must by a cumulation of 2 Deadly wounds.
Armor
Armor affords great protection from blows, but decreases mobility.
Each piece of armor has a Hardness rating, a Condition, and a Condition Max. The Hardness rating determines how much damage the armor takes from an attack, as Attack Force vs. Hardness. The damage dealt to the armor is subtracted from the Condition. Condition / Condition Max determines the physical integrity of the armor. A 1/1 ratio, known as the Armor Ratio, means the armor is at 100% effectiveness. Anything below that and an attack may get through. The likelihood of the attack penetrating is 100% - Armor Ratio%. If the Armor Ratio is at 80%, then an attack that strikes the area the armor is covering has a 20% to penetrate. If it does penetrate, the Force of the blow is reduced by the same percentage. For instance, if a blow with 40 Force penetrates at a 20% chance, its Force is reduced to 20% as well (20% of 40 = 8 ).
Storage, Wielding, Wearing
Every character has body slots that represent the areas of the body that may either hold or wear something. When a character wields a sword, the character's SLOT_LEFTHAND or SLOT_RIGHTHAND is set to equal the item, and the item is moved to a universal WIELDED room. The items OWNER property is set to the character's name. So the same for items that may be worn. When a character wears a shirt, the character's SLOT_TORSO is set to equal the item, and the item is moved to a universal WORN room. The shirt's OWNER property is set to the character's name. Items that are put in a backpack or other inventory object (chest, pockets, etc.), are moved to a universal CONTAINED room, and have their OWNER property set to the name of the inventory object they are contained within.
Wounds
Wounds are stored on a character in much the same way. Each body part has a slot called WOUND_*, where * is the relevant body part. When a character is wounded on the left arm, the WOUND_LEFTARM property is set to the level of the wound inflicted. They are stored as x-x-x-x-x, where each x is a number representing how many of that wound level the body part has on it. x-x-x-x-x = Scratch Wounds-Minor Wounds-Moderate Wounds-Major Wounds-Deadly Wounds.
Counters
Whenever a defensive character builds their Guard to a sufficient level, they have the option of performing a counter attack. This sucks an amount of their Guard away regardless of the outcome, but allows them to make a free attack on the attacker.
A Counter costs 50% of the character's Guard, which is subtracted before the counter is attempted. A Defend Accuracy is still generated (with the reduced Guard's Ratio Modifier affecting it). If the attacker does NOT HIT at this exchange, the defender attempts their counter. The % chance that the counter will connect is equal to the amount of Guard that the defender had remaining AFTER the attacker's attack. So a Guard that was at 50 when a counter was attempted is reduced to 25. Then the combat exchange occurs. The defender's Guard may go up or down depending on the outcome of the exchange. The counter, should it actualize, will have a % chance of connecting equal to the Guard after this exchange.
When a counter connects an offensive shift occurs, and the defender becomes the attacker, while the attacker becomes the defender.