private Ship Attack(Ship shooter, Ship target, boolean isAttacker) {

		for (ShipWeapon w : shooter.weapons) {
			if (target == null) {
				target = ChooseTarget(shooter, isAttacker);
				if (target == null) {
					return null;
				}
			}

			for (int i = 0; i < w.shots; i++) {
				if (r.nextInt(7) + 1 >= shooter.data.accuracy) {
					if (w.penetration <= target.data.armour
							|| r.nextInt(7) + 1 >= shooter.data.armour) {
						if (target.currentShields > 0) {
							--target.currentShields;
						} else {
							--target.currentHull;

							if (target.currentHull == 0) {
								System.out.println("A ship of type " + target.data.toString()
										+ " was destroyed! (Kill " + this.killOrder.toString()
										+ " on turn " + this.turn.toString() + ")");
								++killOrder;

								target.GetAssigned().Remove(target);
								target = null;

								break;
							}
						}
					}
				}
			}
		}

		return target;
	}