private static Attack createAttack(Element type){
		Element attackElement = (Element)type.getElementsByTagName("attack").item(0);
		if(attackElement == null){
			return null;
		}
		SoundWrapper attackSound = ResourceLoader.createSound(attackElement.getAttribute("sound"),
				Float.parseFloat(attackElement.getAttribute("soundVolume")));
		String attackType = attackElement.getAttribute("type");
		Attack attack = null;
		int baseDamage = Integer.parseInt(attackElement.getAttribute("baseDamage"));
		int randomDamage = Integer.parseInt(attackElement.getAttribute("randomDamage"));
		int cooldown = Integer.parseInt(attackElement.getAttribute("cooldown"));
		if(attackType.equals("MELEE")){
			attack = new Attack(baseDamage, randomDamage, cooldown, attackSound);
		}else if(attackType.equals("RANGED") || attackType.equals("RANGED_ACTION")){
			double range = Double.parseDouble(attackElement.getAttribute("range"));
			int projectileSize = Integer.parseInt(attackElement.getAttribute("projectileSize"));
			Color projectileColor;
			if(attackElement.hasAttribute("projectileColor")){
				projectileColor = getColorFromString(attackElement.getAttribute("projectileColor"));
			}else{
				projectileColor = getColorFromStrings(
						attackElement.getAttribute("projectileColorR"),
						attackElement.getAttribute("projectileColorG"),
						attackElement.getAttribute("projectileColorB")
				);
			}
			double projectileSpeed = Double.parseDouble(attackElement.getAttribute("projectileSpeed"));
			SoundWrapper sound = ResourceLoader.createSound(
					attackElement.getAttribute("sound"), 
					Float.parseFloat(attackElement.getAttribute("soundVolume")));
			if(attackType.equals("RANGED")){
				attack = new RangedAttack(baseDamage, randomDamage, cooldown, range, 
					projectileSize, projectileColor, projectileSpeed, sound);
			}else{
				Element effectElement = (Element) attackElement.getElementsByTagName("effect").item(0);
				Effect effect = new EffectFactory().createEffect(effectElement);
				attack = new RangedActionAttack(baseDamage, randomDamage, cooldown, range, 
						projectileSize, projectileColor, projectileSpeed, effect, sound);
			}
		}else{
			new Exception("Unknown attackType-value in XML").printStackTrace();
		}
		return attack;
	}