public static function registerSelf()
 {
     parent::registerSelf();
     static::registerCodeAsSubType(MeleeWeaponCode::getIt(MeleeWeaponCode::HAND));
     static::registerCodeAsSubType(RangedWeaponCode::getIt(RangedWeaponCode::HEAVY_CROSSBOW));
     static::registerCodeAsSubType(ShieldCode::getIt(ShieldCode::BUCKLER));
 }
 public static function registerSelf()
 {
     parent::registerSelf();
     // ARMAMENTS
     static::registerCodeAsSubType(ArrowCode::getIt(ArrowCode::BASIC_ARROW));
     static::registerCodeAsSubType(BodyArmorCode::getIt(BodyArmorCode::CHAINMAIL_ARMOR));
     static::registerCodeAsSubType(DartCode::getIt(DartCode::BASIC_DART));
     static::registerCodeAsSubType(HelmCode::getIt(HelmCode::BARREL_HELM));
     static::registerCodeAsSubType(MeleeWeaponCode::getIt(MeleeWeaponCode::HAND));
     static::registerCodeAsSubType(RangedWeaponCode::getIt(RangedWeaponCode::HEAVY_CROSSBOW));
     static::registerCodeAsSubType(ShieldCode::getIt(ShieldCode::BUCKLER));
     static::registerCodeAsSubType(SlingStoneCode::getIt(SlingStoneCode::SLING_STONE_HEAVIER));
     static::registerCodeAsSubType(WeaponCategoryCode::getIt(WeaponCategoryCode::ARROW));
     // BODY
     static::registerCodeAsSubType(ActivityAffectingHealingCode::getIt(ActivityAffectingHealingCode::LIGHT_ACTIVITY));
     static::registerCodeAsSubType(AfflictionByWoundDomainCode::getIt(AfflictionByWoundDomainCode::PHYSICAL));
     static::registerCodeAsSubType(ConditionsAffectingHealingCode::getIt(ConditionsAffectingHealingCode::BAD_CONDITIONS));
     static::registerCodeAsSubType(RestConditionsCode::getIt(RestConditionsCode::FOUL_CONDITIONS));
     static::registerCodeAsSubType(WoundsOriginCode::getIt(WoundsOriginCode::ELEMENTAL));
     static::registerCodeAsSubType(WoundTypeCode::getIt(WoundTypeCode::CRUSH));
     // COMBAT ACTIONS
     static::registerCodeAsSubType(CombatActionCode::getIt(CombatActionCode::ATTACKED_FROM_BEHIND));
     static::registerCodeAsSubType(MeleeCombatActionCode::getIt(MeleeCombatActionCode::COVER_OF_ALLY));
     static::registerCodeAsSubType(RangedCombatActionCode::getIt(RangedCombatActionCode::AIMED_SHOT));
     // ENVIRONMENT
     static::registerCodeAsSubType(LightConditionsCode::getIt(LightConditionsCode::STRONG_DAYLIGHT));
     static::registerCodeAsSubType(LightSourceCode::getIt(LightSourceCode::BALEFIRE));
     static::registerCodeAsSubType(LightSourceEnvironmentCode::getIt(LightSourceEnvironmentCode::MIRROR_BEHIND_LIGHT_SOURCE));
     static::registerCodeAsSubType(TerrainCode::getIt(TerrainCode::DESERT));
     // SKILLS
     static::registerCodeAsSubType(CombinedSkillCode::getIt(CombinedSkillCode::BIG_HANDWORK));
     static::registerCodeAsSubType(PhysicalSkillCode::getIt(PhysicalSkillCode::ATHLETICS));
     static::registerCodeAsSubType(PsychicalSkillCode::getIt(PsychicalSkillCode::ASTRONOMY));
     static::registerCodeAsSubType(SkillTypeCode::getIt(SkillTypeCode::COMBINED));
     // OTHERS
     static::registerCodeAsSubType(ElementCode::getIt(ElementCode::AIR));
     static::registerCodeAsSubType(GenderCode::getIt(GenderCode::FEMALE));
     static::registerCodeAsSubType(ItemHoldingCode::getIt(ItemHoldingCode::MAIN_HAND));
     static::registerCodeAsSubType(MovementTypeCode::getIt(MovementTypeCode::RUN));
     static::registerCodeAsSubType(ProfessionCode::getIt(ProfessionCode::COMMONER));
     static::registerCodeAsSubType(PropertyCode::getIt(PropertyCode::AGE));
     static::registerCodeAsSubType(RaceCode::getIt(RaceCode::DWARF));
     static::registerCodeAsSubType(RidingAnimalCode::getIt(RidingAnimalCode::BULL));
     static::registerCodeAsSubType(RidingAnimalMovementCode::getIt(RidingAnimalMovementCode::CANTER));
     static::registerCodeAsSubType(RidingAnimalPropertyCode::getIt(RidingAnimalPropertyCode::DEFIANCE));
     static::registerCodeAsSubType(SubRaceCode::getIt(SubRaceCode::COMMON));
     static::registerCodeAsSubType(TimeCode::getIt(TimeCode::DAY));
 }
 public function provideArmamentCodeAndExpectedSanctionsTable()
 {
     return [[BodyArmorCode::getIt(BodyArmorCode::HOBNAILED_ARMOR), ArmorStrengthSanctionsTable::class], [HelmCode::getIt(HelmCode::GREAT_HELM), ArmorStrengthSanctionsTable::class], [RangedWeaponCode::getIt(RangedWeaponCode::HEAVY_CROSSBOW), RangedWeaponStrengthSanctionsTable::class], [MeleeWeaponCode::getIt(MeleeWeaponCode::CLUB), MeleeWeaponStrengthSanctionsTable::class], [ShieldCode::getIt(ShieldCode::BUCKLER), ShieldStrengthSanctionsTable::class]];
 }
 /**
  * @test
  */
 public function I_can_easily_find_out_if_is_ranged()
 {
     self::assertFalse(MeleeWeaponCode::getIt(MeleeWeaponCode::CUDGEL)->isRanged());
 }
 /**
  * @test
  */
 public function I_can_convert_spear_to_melee_weapon_code()
 {
     $rangeSpear = RangedWeaponCode::getIt(RangedWeaponCode::SPEAR);
     self::assertInstanceOf(RangedWeaponCode::class, $rangeSpear);
     self::assertSame($rangeSpear, $rangeSpear->convertToRangedWeaponCodeEquivalent());
     $meleeSpear = $rangeSpear->convertToMeleeWeaponCodeEquivalent();
     self::assertNotSame($rangeSpear, $meleeSpear);
     self::assertInstanceOf(MeleeWeaponCode::class, $meleeSpear);
     self::assertSame(MeleeWeaponCode::getIt(MeleeWeaponCode::SPEAR), $meleeSpear);
 }
 /**
  * @test
  */
 public function I_can_find_out_if_can_hold_one_handed_weapon_by_two_hands()
 {
     $armourer = new Armourer(new Tables());
     // one handed melee weapons longer than 1
     self::assertTrue($armourer->canHoldItByOneHandAsWellAsTwoHands(MeleeWeaponCode::getIt(MeleeWeaponCode::SHORT_SWORD)));
     self::assertTrue($armourer->canHoldItByOneHandAsWellAsTwoHands(MeleeWeaponCode::getIt(MeleeWeaponCode::AXE)));
     // shorter than 1
     self::assertFalse($armourer->canHoldItByOneHandAsWellAsTwoHands(MeleeWeaponCode::getIt(MeleeWeaponCode::HOBNAILED_BOOT)));
     self::assertFalse($armourer->canHoldItByOneHandAsWellAsTwoHands(ShieldCode::getIt(ShieldCode::HEAVY_SHIELD)));
     // not melee
     self::assertFalse($armourer->canHoldItByOneHandAsWellAsTwoHands(RangedWeaponCode::getIt(RangedWeaponCode::MILITARY_CROSSBOW)));
     // only both handed
     self::assertFalse($armourer->canHoldItByOneHandAsWellAsTwoHands(RangedWeaponCode::getIt(RangedWeaponCode::LONG_COMPOSITE_BOW)));
     self::assertFalse($armourer->canHoldItByOneHandAsWellAsTwoHands(MeleeWeaponCode::getIt(MeleeWeaponCode::HALBERD)));
 }