diff --git a/DepthsBelow/DepthsBelow/Component/Shooting.cs b/DepthsBelow/DepthsBelow/Component/Shooting.cs
new file mode 100644
index 0000000..6ff6431
--- /dev/null
+++ b/DepthsBelow/DepthsBelow/Component/Shooting.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace DepthsBelow.Component
+{
+ class Shooting : Component
+ {
+ protected int stepsTaken = 0;
+ protected int distanceToTarget = 0;
+ protected int panic = 0;
+ protected int soldierAim = 0;
+ protected int weaponAccuracy = 0;
+ protected int enemyDodge = 0;
+
+ protected int penaltyRange = 5;
+
+ public Shooting(Entity parent) : base (parent)
+ {
+
+ }
+
+ public int CalculateChance()
+ {
+ int baseHitChance = soldierAim + weaponAccuracy;
+ int baseDodgeChance = panic + enemyDodge;
+ int basePenalty = ReturnPenalty(stepsTaken) + (int)(ReturnPenalty(distanceToTarget) / 2);
+ int chanceToHit = baseHitChance - baseDodgeChance - basePenalty;
+ return chanceToHit;
+ }
+
+ public int ReturnPenalty(int distance)
+ {
+ int penalty = 0;
+ if (distance >= penaltyRange * 3)
+ {
+ penalty = 100;
+ }
+ else if (distance >= penaltyRange * 2)
+ {
+ distance -= penaltyRange * 2;
+ penalty = penaltyRange + penaltyRange * 3 + distance * 5;
+ }
+ else if (distance >= penaltyRange)
+ {
+ distance -= penaltyRange;
+ penalty = penaltyRange + distance * 3;
+ }
+ else
+ {
+ penalty = distance;
+ }
+ return penalty;
+ }
+ }
+}
diff --git a/DepthsBelow/DepthsBelow/Core.cs b/DepthsBelow/DepthsBelow/Core.cs
index 60d9975..43b2f17 100755
--- a/DepthsBelow/DepthsBelow/Core.cs
+++ b/DepthsBelow/DepthsBelow/Core.cs
@@ -1,202 +1,211 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using DepthsBelow.GUI;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Audio;
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.GamerServices;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-using Microsoft.Xna.Framework.Media;
-
-namespace DepthsBelow
-{
- ///
- /// This is the main type for your game
- ///
- public class Core : Microsoft.Xna.Framework.Game
- {
- public static GraphicsDeviceManager GraphicsDeviceManager;
- SpriteBatch spriteBatch;
-
- public Camera Camera;
-
- public bool PlayerTurn = true;
- public static MouseInput MouseInput;
- public static KeyboardInput KeyboardInput;
- public List Squad;
- public List Swarm;
- public static Map Map;
-
- public SmallEnemy TestMonster;
-
- public Core()
- {
- GraphicsDeviceManager = new GraphicsDeviceManager(this);
- Content.RootDirectory = "Content";
-
- GraphicsDeviceManager.PreferredBackBufferWidth = 1280;
- GraphicsDeviceManager.PreferredBackBufferHeight = 720;
- GraphicsDeviceManager.IsFullScreen = false;
-
- //graphics.SynchronizeWithVerticalRetrace = false;
- this.IsFixedTimeStep = false;
- GraphicsDeviceManager.ApplyChanges();
-
- this.IsMouseVisible = true;
- }
-
- ///
- /// Allows the game to perform any initialization it needs to before starting to run.
- /// This is where it can query for any required services and load any non-graphic
- /// related content. Calling base.Initialize will enumerate through any components
- /// and initialize them as well.
- ///
- protected override void Initialize()
- {
- // TODO: Add your initialization logic here
- Camera = new Camera(this);
- Squad = new List();
- Swarm = new List();
-
- TestMonster = new SmallEnemy(this, ref Swarm);
-
- base.Initialize();
- }
-
- ///
- /// LoadContent will be called once per game and is the place to load
- /// all of your content.
- ///
- protected override void LoadContent()
- {
- // Create a new SpriteBatch, which can be used to draw textures.
- spriteBatch = new SpriteBatch(GraphicsDevice);
-
- Map = Content.Load