Combat System

This page contains notes about the MMR csys. As the csys is currently a work in progress (WIP), this page will be subject to change as modifications and improvements are made.
===Mechanics===
====Health====
Health in this combat system is simple and taken directly from the video game "health bar". A normal character will have 32 health (one bar), while subbosses often have 64 health (two bars), and major bosses have 96 health or three bars. A character is knocked unconscious when their health reaches 0 and is unable to fight. At RP discretion, health 0 can also mean dangerously injured or potentially killed depending on the nature of attacks that have been used. Codedly however, "dead" is not enforced but a character who is knocked unconscious in the company of another character who wants them dead and without any allies nearby to save them should not expect a consistant reprieve by plot fiat; while a worst-case reality is not enforced and consideration is given to OOC investments/attachments to a character, luck can only stretch so far.
====Damage====
The foundation of any csys is of course, aside from health, damage. Damage represents a general weakening of a character due to attacks they have received. If an attack misses, its damage is obviously zero, but should an attack hit its damage is calculated by the following formula:
 Damage = 1/2 * AttackDamage * PowerDefenseModifier
To make clean numbers, the final result of this calculation is rounded to the nearest integer. With a power and defense modifier of 1x, and an attack damage of 8, an average attack will do -4HP to its target, or one-fourth of their health. See below for the individual calculations for modifiers.
====Weapons and Armor====
Combat in MMR revolves around equippable parts, particularly weapons and armor. These represent (appropriately) the weapons and armor of the user and in some cases can be removed, swapped, or traded between individuals (such as if the weapon can be carried, like a rifle). Every weapon has a list of attacks associated with it and a character can have multiple weapons equipped at one time.
====Attacks====
Attacks appropriately represent the actual attack that a character does with a given weapon. Every attack belongs to a given weapon although multiple weapons are permitted to have identical attacks.  Attack blocks have a DAMAGE which represents - you guessed it - how much damage it does.  With no net modifier from power or defense (see Power and Defense), an attack block with damage 1 will deal 2 points of HP loss to a target.
As an average, a weapon's "normal" attack should have a total damage of 8.  A damage 8 attack will be the baseline against which a weapon's power is chosen. An unusually damaging attack from a weapon (e.g. a charged shot) would have more damage, up to a maximum of 12, causing damage-and-a-half. Weaker attacks are also possible with 4 damage representing a "half-hearted" attack and 1 damage being as close as a weapon can come to a "tap" without doing no damage at all. Zero damage attacks are possible and will accordingly do no actual damage, regardless of other factors.
====Stats====
Stats are divided into four categories: accuracy, evasion, power, and defense. Of these, accuracy and evasion are intrinsic character attributes and don't vary by what weapons or armor are equipped. These are generally "trained" attributes and represent a character's ability to dodge or target accurately. Power and Defense are part attributes and belong to weapons and armors respectively. These represent a weapon's normal/average damage output and an armor's ability to absorb or stop incoming attacks.
====Accuracy and Evasion====
Accuracy and Evasion are on a scale of 1-10 with 5 being average. They are used exclusively in hit calculations (determining whether or not an attack strikes its target) by the following formula:
 If d96 > round(10*1.19^(9 + accuracy - evasion)), attack misses
What this means is that for equal accuracy and evasions, any attack will have a 50/50 chance to hit (1.19^5 rounds to 48). For an evasion of 9 and accuracy of 5, an attack will hit 1/4th of the time and for an accuracy of 9 and evasion of 5, an attack will hit every time. One point of evasion or accuracy in either direction will make a hit 19% more or less likely because of the 1.19.
A tentative scale of evasion and accuracy is as follows:
Evasion	Meaning
1 	Does not dodge. Average Joe, lumbering robots, the side of a barn.
2 	You can dodge a wrench. People who play dodgeball, most domestic robots.
3 	You can dodge a sword. Trained martial artists and most commercial reploids.
4 	You can dodge swords and the occasional arrow. Early military robots, modern grunt robots, armored reploids, cyborgs.
5 	You can dodge taxes and arrows. Most combat reploids, old high-speed robots, cyborgs specializing in speed/reaction time.
6 	You can dodge your boss. Agile robots, most scouts, heavily-augmented cyborgs (near cymek).
7 	You can dodge bullets. Front line evasive combat model.
8 	You can dodge Bullet. Light-weight, low-armor, dodge specialists.
9 	You can dodge a cold. Elite evasive units with little to no armor.
10 	Bullets dodge you. Elite units with time stopper augmentations.
Accuracy	Meaning
1 	Rocks fear your lethal aim. Human with mediocre coordination, really clumsy robots.
2 	Can hit a trash can. Most humans/atheletes and domestic robots.
3 	Consistently hit moving targets. Police, dextrous commercial robots.
4 	Trained marksman. Military rifleman, early military robots.
5 	Expert marksman. Human snipers, modern military robots.
6 	Hits fast-moving targets. Accurate combat robots, human experts with cybernetics.
7 	Fast targets at long range. Robot marksman.
8 	Robot snipers.
9 	Elite sniper models with custom systems.
10 	Elite snipers with time stopper augmentations.
====Power and Defense====
Power and Defense are also scaled 1-10 with a 5 average, but unlike accuracy and evasion are "capped" at a 4 point difference where any further separation between the two stats has no effect. Power and Defense determine the damage done by an attack as a modifier according to the following formula:
 Modifier = 10*1.19^(9 + power - defense)/48
This equation is effectively identical to the hit-miss equation above except instead of checking against a random number, it divides by the average (48) to create a modifier. What this means in practice is that a power of 9 and defense of 5 will do double damage while a power of 5 and defense of 9 will do half damage. One point of defense or power in either direction will increase or decrease the modifier by 19%.
A table of sample power and defense values follows:
Power	Meaning
1 	Cracks glass. Average Joe, robots made to work with children.
2 	Breaks glass, dents thin metal. Atheletes, most domestic robots.
3 	Breaks boards. Human martial artists, commercial robots, sidearms.
4 	Breaks bricks, dents steel. Industrial robots, strong cyborgs, old rifles.
5 	Armor-piercing. Modern military weapons, old cannons, 50-cal
6 	Penetrates modern infantry armor. modern assault weapons, basic beam swords, old anti-armor ordinance
7 	Modern anti-infantry. modern heavy weapons, quality beam swords, old anti-tank/HEAT
8 	Penetrates Ride Armors. Large high energy weapons, old anti-ship weapons
9 	Destroys buildings. Vehicle-mounted artillery.
10 	Cracks the 4th wall. Modern heavy artillery, MOAB
Defense	Meaning
1 	Bare humans, windows, delicate electronics.
2 	Thin metal, kevlar, domestic drones.
3 	Solid wood, domestic robots, old body armor.
4 	Bricks, solid steel, commercial robots and lifetime guarentee cybernetics.
5 	Modern military robots, old armor plating.
6 	Front line military robots, modern light armor plating.
7 	Modern vehicles, heavy military reploids.
8 	Ride armors, large combat mechaniloids.
9 	Modern buildings, building-sized mechaniloids, assault RAs
10 	Mobile bases, modern bunkers.
===How to:===
====Set your stats:====
At present, characters only have two intrinsic stats: accuracy and evasion. Tables for both can be found above.
 +setacc <accuracy value>
 
 +seteva <evasion value>
====Make Armor:====
First, make the armor object. Then set its defense.
 +mkarmor <armor name>
 
 +setarmordef <armor name>=<defense value>
Example:
 +mkarmor Kevlar vest
 
 +setarmordef Kevlar vest=2
====Make a Weapon:====
First, make the weapon object. Then set its power.
 +mkweapon <weapon name>
 
 +setweaponpow <weapon name>=<weapon power>
Example:
 +mkweapon M-16
 
 +setweaponpow M-16=4
====Make an Attack:====
First, make the attack object. Then add any attack blocks you want it to have.
 +mkattack <weapon name>=<attack name>
 
 +addatkblock <weapon name>/<attack name>=<type> <damage>
Example:
 +mkattack M-16=Three-shot burst
 
 +addatkblock M-16/Three-shot burst=Normal 4
 
 +mkattack M-16=Full automatic
 
 +addatkblock M-16/Full automatic=Normal 5
 
 +mkattack M-16=Single shot
 
 +addatkblock M-16/Single shot=2
===Syntax:===
====+csys====
 Displays a list of all currently supported commands and their syntax.
====+attack *=*====
 +attack target=attack_name
 
 
 Attacks target with attack_name
====+seteva *====
 +seteva value
 
 Sets your base evasion to value. See above chart for ranges.
====+setacc *====
 +setacc value
 
 Sets your base accuracy to value. See above chart for ranges.
====+mkarmor *====
 +mkarmor armor_name
 
 Creates a blank armor with the name armor_name.
====+mkarmor *=*====
 +mkarmor armor_name=defense_value
 
 Creates an armor with the name armor_name and sets its defense to defense_value.
 Equivalent to calling +mkarmor * followed by +setarmordef *=*.
====+setarmordef *=*====
 +setarmordef armor_name=value
 
 Sets the defense of armor armor_name to value.
+equiparmor *
 +equiparmor armor_name
 
 Equips the armor armor_name. This will unequip any armor you're already wearing first, so calling +unequiparmor is unnecessary.
====+mkweapon *====
 +mkweapon weapon_name
 
 Makes a blank weapon with the name weapon_name.
====+setweaponpow *=*====
 +setweaponpow weapon_name=value
 
 Sets the power of weapon_name to value.
====+equipweapon *====
 +equipweapon weapon_name
 
 Equips the weapon weapon_name. Multiple weapons can be equipped at one time so this will not affect weapons which are already equipped; it does not replace existing weapons.
====+rmarmor *====
 +rmarmor armor_name
 
 Removes armor_name from the combat system. Use +cleanarmors to unequip an armor if it has been removed from the system.
====+rmweapon *====
 +rmweapon weapon_name
 
 Deletes weapon_name from the combat system. Use +cleanweapons to unequip any weapons which have been removed from the system.
====+mkattack *=*====
 +mkattack weapon_name=attack_name
 
 Creates a blank attack named attack_name for the weapon weapon_name.
====+rmattack *=*====
 +rmattack weapon_name=attack_name
 
 Removes the attack named attack_name from weapon_name.
====+listarmors====
 +listarmors
 
 Lists all available armors which exist in the combat system along with their defense.
====+listweapons====
 +listweapons
 
 Lists all available weapons which exist in the combat system along with their power.
====+listattacks====
 +listattacks
 
 Lists all of the attacks for all of the weapons you have equipped (e.g. all the attacks you can use).
====+mktype *====
 +mktype type_name
 
 Makes a type called type_name. By default, type_name does normal (x1) damage to all other types.
====+rmtype *====
 +rmtype type_name
 
 Removes the type type_name from the combat system. If an attack block or armor exists which uses this type, it will need to have the type manually replaced.
====+settypemod */*=*====
 +settypemod type1/type2=effectiveness
 
 Sets the type modifier used when an attack of type1 strikes armor of type2. Acceptable values are a range from .25 (in extreme cases, 0) to 2 (in extreme cases 4). Modifiers below .5 or above 2 are extremely rare.
====+setarmortype *=*====
 +setarmortype armor_name=type
 
 Sets the type of armor_name to type. By default, armors have no type and so will receive normal damage (x1) from every attack. While usable, it is better for armors to have their type explicitly set.
====+sethp *====
 +sethp maxHP
 
 Sets your maximum HP to maxHP. Acceptable values are 32, 64, and 96. Almost all players will have 32 HP. Exceptions are for some "boss" characters who have multiple stages (e.g. Almost every final boss since MMX1.)
====+fullheal====
 +fullheal
 
 Fully recovers your health to maxHP.
====+weaponget *====
 +weaponget player_name
 
 An all-purpose randomized weapon grabber. This will pick one of player_name's equipped weapons at random and display it. It has no coded effect.
====+unequipweapon *====
 +unequipweapon weapon_name
 
 Unequips the weapon weapon_name if you have it equipped.
====+setatkhoming *=*====
 +setatkhoming weapon_name=attack_name
 
 Sets the attack named attack_name of weapon weapon_name HOMING. This currently has no coded effect, but will eventually boost the attack's accuracy.
====+clearatkhoming *=*====
 +clearatkhoming weapon_name=attack_name
 
 Removes HOMING from the attack attack_name of weapon weapon_name.
====+addatkblock */*=* *====
 +addatkblock weapon_name/attack_name=type damage
 
 Adds an attack block to the attack attack_name of the weapon weapon_name. The attack block's type is type and its damage is damage.
====+unequiparmor *====
 +unequiparmor armor_name
 
 Unequips the armor armor_name if you're wearing it.
====+listtypes====
 +listtypes
 
 Lists all types which currently exist in the combat system.
====+mkdrink====
 +mkdrink