var generatorOf = require('../../generator-of');

module.exports = generatorOf(function generator$descriptions$rifles() {
	var nm1 = ["a classic", "a beauty", "excellent", "fear inducing", "intimidating", "near perfect", "amazing", "terrifying", "a new release", "a prototype", "an odd one", "a new model", "a one of a kind", "a new design", "different from most", "unique"];
	var nm1b = ", but ";
	var nm2 = ["admired by many", "commissioned for many around the world", "desired across the globe", "famous around the world", "in high demand", "infamous around the world", "made a name for itself", "noted by many across the world", "praised by many", "prominent across the globe", "purchased and sold by many", "sold to people across the globe", "well-known across the world", "world renowned"];
	var nm3 = ["celebrated for its consistent aim and accuracy", "celebrated for its precision and reliability", "known as a low cost, high value weapon", "known for its deadly accuracy", "known for its versatility and adaptability", "praised as bang for your buck, due to its low manufacturing cost", "praised for its deadly precision", "praised for its reliability in almost any situation", "praised for its stability, reliability and versatility", "prominent due to its cheap cost and good reliability"];
	var nm4 = ["overall length", "standard length", "length", "typical length"];
	var nm5 = Math.floor((this.random() * 500) + 600);
	var nm6 = Math.floor((this.random() * 255) + 295);
	var nm7 = ["roughly around", "about", "roughly", "around", "approximately"];
	var nm8 = (Math.floor((this.random() * 27) + 27)) / 10;
	var nm9 = ["5.45x39", "5.56x45", "5.8x42", "6.5x39", "6.8x43", "7.62x33", "7.62x35", "7.62x39", "7.62x45", "7.62x51", "7.92x33"];
	var nm10 = ["a few other calibers have been produced as well", "all other standard calibers are available as well", "it can come in a wide variety of different calibers", "many other calibers are produced as well", "most other calibers are available", "one other caliber is available", "other calibers are available", "other calibers are available, although harder to come by", "other calibers are currently in production", "other calibers have yet to be produced"];
	var nm11 = ["an upper and lower receiver for easier maintenance", "an upper and lower receiver to allow for easier customization", "an upper and lower receiver to make potential repairs easier and low cost", "its receiver located in front of the pistol grip to increase customizability", "its receiver located in front of the pistol grip which helped increase the barrel length", "its receiver located in front of the pistol grip, allowing for a more ergonomic design", "its receiver located behind the pistol grip for a more compact design", "its receiver located behind the pistol grip to improve maneuverability", "its receiver located behind the pistol grip to save on weight"];
	var nm12 = ["wood", "plastic", "metal"];
	var nm13 = ["wood", "plastic", "metal", "premium wood", "ivory", "pearl", "engraved wood", "exotic wood", "horn"];
	var nm14 = ["your wishes", "your desires", "your purpose", "your goals", "your needs"];
	var nm15 = ["walnut", "maple", "myrtle wood", "birch", "plastic", "metal", "laminated wood"];
	var nm16 = ["other materials are available", "other stocks will soon go in production", "a few other stock materials are available", "other stock materials are unfortunately not available yet", "stocks made from a different material have to be custom made", "most other stock materials are widely available", "some other stock materials can be acquired with some effort", "other materials, including luxury materials, are available as well", "other materials have yet to be made available", "other materials aren't available yet and may never be"];
	var nm17 = ["folding stock", "extendable stock", "detachable stock", "shoulder stock", "wooden stock", "plastic stock", "straight grip stock", "full grip stock", "semi-grip stock"];
	var nm19 = ["very common as well", "the next most common stock available", "high up on the list of demand", "often preferred instead", "used more often", "just as common and popular", "second in line, although not as common", "very popular as well, despite being less common", "slowly becoming the new standard", "a close second in terms of popularity"];
	var nm20 = ["drum", "detachable box", "horizontal box", "casket", "rotary", "spool", "STANAG", "hopper", "helical", "saddle-drum", "semi-curved"];
	var nm21 = ["10", "20", "30", "40", "50", "60", "70", "80", "90", "100"];
	var nm22 = ["other magazine are available", "plenty of other magazine are available", "a few other magazines are available as well", "this is generally the only available magazine", "other sizes are available", "the magazine comes in various sizes", "while this is the only magazine type, it does come in other sizes", "other magazines types and magazine sizes are available", "two more sizes and one other magazine type is available", "customization for other magazine types and sizes is possible"];
	var nm23 = ["a push button", "a paddle", "a lever", "both a button and lever"];
	var nm24 = ["automatic", "semi-auto", "2-round burst", "3-round burst"];
	var nm25 = ["secret forces", "military police", "military", "freedom fighters", "rebels", "revolutionists", "separatists", "army", "special forces", "marines", "armed forces", "secret service"];
	var nm26 = ["winning a war", "winning a civil war", "preventing more crime", "preventing war through a show of power", "keeping the peace", "increasing security", "fighting crime on a bigger scale", "upgrading the existing inventory", "updating the existing inventory", "preparing for a likely war", "gaining the upper hand in a guerrilla war", "providing more versatility in terms of weapon choice", "increasing the amount of weapons available", "fighting new threats", "fighting terrorism more efficiently"];
	var nm27 = ["Japanese man named H. Yoshimitsu", "German man named G. Klauss", "British man named E. Fawkes", "American man named G. Jones", "Canadian man names L. Coats", "South-African man named A. Botha", "Chinese man named B. Chan", "Israeli man named D. Mizrahi", "Russian man named T. Yakovich", "Korean man named Sung S. W", "Indian man named C. Mahal", "Iranian man named B. Javan", "Turkish man named T. Almaz", "Italian man named W. Brocato", "French man named C. Bouvard", "Spanish man named D. Cruz"];
	var nm28 = ["There are a few other variants of this weapon", "Many other variants of this weapon are available", "There are three other variants of this weapon", "This weapon has quite a few other variants", "Several other variants of this weapon are in production as well", "Two other variants of this weapon are currently in production", "Quite a few other variants of this weapon are available, with more nearing production", "A few variants of this weapon will soon be in production"];
	var nm29 = ["including a civilian version", "including a semi-auto civilian version", "including two less powerful civilian versions", "but there's no civilian version yet", "but there are no plans for a civilian version", "but a civilian version is most likely out of the question", "but a civilian version is currently on hold", "but the plans for a less powerful civilian version have been delayed"];
	var nm30 = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
	var nm31 = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""];
	var nm32 = ["Desert Viper", "Black Mamba", "Peacekeeper", "The Ambassador", "Oathkeeper", "Due Diligence", "Boomer", "Bulldog", "Valkyrie", "Vengeance", "Rattlesnake", "Thunder", "Big Daddy", "The Punisher", "The Judge"];

	var rnd1 = Math.floor(this.random() * nm1.length);
	if (rnd1 < 8) {
		var rnd1b = " and ";
	}
	var rnd2 = Math.floor(this.random() * nm2.length);
	var rnd3 = Math.floor(this.random() * nm3.length);
	var rnd4 = Math.floor(this.random() * nm4.length);
	var rnd7 = Math.floor(this.random() * nm7.length);
	var rnd9 = Math.floor(this.random() * nm9.length);
	var rnd10 = Math.floor(this.random() * nm10.length);
	var rnd11 = Math.floor(this.random() * nm11.length);
	var rnd12 = Math.floor(this.random() * nm12.length);
	var rnd13a = Math.floor(this.random() * nm13.length);
	while (rnd13a === rnd12) {
		rnd13a = Math.floor(this.random() * nm13.length);
	}
	var rnd13b = Math.floor(this.random() * nm13.length);
	while (rnd13b === rnd12 || rnd13b === rnd13a) {
		rnd13b = Math.floor(this.random() * nm13.length);
	}
	var rnd14 = Math.floor(this.random() * nm14.length);
	var rnd15 = Math.floor(this.random() * nm15.length);
	var rnd16 = Math.floor(this.random() * nm16.length);
	var rnd17 = Math.floor(this.random() * nm17.length);
	var rnd18 = Math.floor(this.random() * nm17.length);
	while (rnd18 === rnd17) {
		rnd18 = Math.floor(this.random() * nm17.length);
	}
	var rnd19 = Math.floor(this.random() * nm19.length);
	var rnd20 = Math.floor(this.random() * nm20.length);
	var rnd21 = Math.floor(this.random() * nm21.length);
	if (rnd20 === 0) {
		while (rnd21 < 5) {
			rnd21 = Math.floor(this.random() * nm21.length);
		}
	} else {
		while (rnd21 > 4) {
			rnd21 = Math.floor(this.random() * nm21.length);
		}
	}
	var rnd22 = Math.floor(this.random() * nm22.length);
	var rnd23 = Math.floor(this.random() * nm23.length);
	var rnd24a = Math.floor(this.random() * nm24.length);
	var rnd24b = Math.floor(this.random() * nm24.length);
	while (rnd24a === rnd24b) {
		rnd24b = Math.floor(this.random() * nm24.length);
	}
	if (rnd24b === 2 || rnd24b === 3) {
		while (rnd24a > 1) {
			rnd24a = Math.floor(this.random() * nm24.length);
		}
	}
	var rnd25 = Math.floor(this.random() * nm25.length);
	var rnd26 = Math.floor(this.random() * nm26.length);
	var rnd27 = Math.floor(this.random() * nm27.length);
	var rnd28 = Math.floor(this.random() * nm28.length);
	var rnd29 = Math.floor(this.random() * nm29.length);
	var rnd30a = Math.floor(this.random() * nm30.length);
	var rnd30b = Math.floor(this.random() * nm30.length);
	var rnd31a = Math.floor(this.random() * nm31.length);
	var rnd31b = Math.floor(this.random() * nm31.length);
	var rnd31c = Math.floor(this.random() * nm31.length);
	var rnd31d = Math.floor(this.random() * nm31.length);
	var rnd32 = Math.floor(this.random() * nm32.length);

	var name = "This weapon is " + nm1[rnd1] + nm1b + nm2[rnd2] + " and " + nm3[rnd3] + ".";
	var name2 = "The " + nm4[rnd4] + " of the weapon is " + nm5 + "mm, with a " + nm6 + "mm barrel and the weapon weighs " + nm7[rnd7] + " " + nm8 + "kg.";
	var name3 = "It uses " + nm9[rnd9] + "mm rounds, but " + nm10[rnd10] + ".";

	var name4 = "The weapon has " + nm11[rnd11] + ". The pistol grip is made out of " + nm12[rnd12] + ", but can also be made out of " + nm13[rnd13a] + " and " + nm13[rnd13b] + " depending on " + nm14[rnd14] + ".";
	var name5 = "The stock is made out of " + nm15[rnd15] + ", but " + nm16[rnd16] + ". The standard stock is a " + nm17[rnd17] + ", but the " + nm17[rnd18] + " is " + nm19[rnd19] + ".";

	var name6 = "The standard issue magazine is a " + nm20[rnd20] + " which carries " + nm21[rnd21] + " rounds, but " + nm22[rnd22] + ". It has " + nm23[rnd23] + " mechanism to release the magazine.";
	var name7 = "The selective fire modes are safe mode, " + nm24[rnd24a] + " and " + nm24[rnd24b] + ".";

	var name8 = "This weapon was designed for the " + nm25[rnd25] + " with the purpose of " + nm26[rnd26] + ". It was designed by a " + nm27[rnd27] + ".";
	var name9 = nm28[rnd28] + ", " + nm29[rnd29] + ".";
	var name10 = "The weapon is called the " + nm30[rnd30a] + nm31[rnd31a] + nm31[rnd31b] + "-" + nm30[rnd30b] + nm31[rnd31c] + nm31[rnd31d] + ", but it usally goes by its nickname '" + nm32[rnd32] + "'.";

	var result = "";
	result += name;
	result += "\n";
	result += name2;
	result += "\n";
	result += name3;
	result += "\n";
	result += "\n";
	result += name4;
	result += "\n";
	result += name5;
	result += "\n";
	result += "\n";
	result += name6;
	result += "\n";
	result += name7;
	result += "\n";
	result += "\n";
	result += name8;
	result += "\n";
	result += name9;
	result += "\n";
	result += name10;
	return result;
})