This class is used simulate the combat between the player and hostile NPC's. The player should attack with one weapon, then the NPC's retaliate in the same turn. At the end of the round a string is returned indicating what happened during combat for that round.
This method calculates the amount of damage a player's attack dealt to an enemy.
Note: This method is not called for area of effect attacks.
Note: Damage resistance modifiers work by being a flat subtractive effect from the damage inflicted by an attack.
weapon - The weapon the player attacked with. (Only conventional weapons)
enemy - The enemy the player targeted with their attack.
This method is used to simulate an attack by the player using a standard weapon (not area of effect) during combat.
Note: Conventional attacks issue one attack for each point in the weapon's rate of fire(RoF).
(E.G. If a weapon has an RoF of 3, then it rolls to see if it hit 3 times, and inflicts damage 3 times in one round of combat.
weapon - The weapon position the player is attacking with. (Their primary or secondary weapon.)
enemy - The name of the enemy the player is attacking. (For generic enemies this typically will just look like "Raider-3" or something similar.)
A string indicating the results of the player attack on the designated enemy.
This method is used to simulate a player attack using an area of effect weapon such as a grenade or a spell. It differs from a conventional attack in that it damages every enemy in the room and has no chance of missing.
weapon - the name of the area of effect weapon the player is attacking with.
A string indicating how much total damage the player dealt upon his attack, and also any enemies who died.
public java.lang.String conductCombat(java.lang.String attackCommand)
This method is used to conduct one round of combat between the player and enemies in the room. It is called when the player issues an attack command.
attackCommand - String that the user originally enetered to execute an attack. This should follow the format of "attack area [area of effect weapon name]" or attack [primary|secondary] [targetNPCName]
A string indicating how the round of combat went. This includes the attack message for the weapon, how much damage you dealt, and a sentence indicating how much damage you took.