A warrior is a person habitually engaged in warfare. In tribal societies engaging in endemic warfare, warriors often form a caste or class of their own. In feudalism, the vassals essentially form a military or warrior class, even if in actual warfare, peasants may be called to fight as well. In some societies, warfare may be so central that the entire people (or, more often, the male population) may be considered warriors, for example, Montenegrins or Germanic tribes.
Warrior code
In many societies in which a specialized warrior class exists, specific codes of conduct (ethical codes) are instituted in order to ensure that the warrior class is not dangerous to the rest of society. Warrior codes often have common features and usually value loyalty, courage, and honour. Examples include the Kshatriya code of Dharma, Japanese samurai Bushido and medieval knights' code of chivalry.