Correct rules for equipments
This commit is contained in:
		
					parent
					
						
							
								8429e7ff8f
							
						
					
				
			
			
				commit
				
					
						05782bae69
					
				
			
		
					 2 changed files with 12 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -30,7 +30,7 @@ namespace character {
 | 
			
		|||
 | 
			
		||||
    std::uint32_t Weapons::add_damage() const noexcept { return type == weapons::Morgenstern ? 1 : 0; }
 | 
			
		||||
 | 
			
		||||
    std::uint32_t Weapons::add_materiel(const characteristic::characType inType) const noexcept {
 | 
			
		||||
    std::int32_t Weapons::add_materiel(const characteristic::characType inType) const noexcept {
 | 
			
		||||
        switch (type) {
 | 
			
		||||
            case weapons::Sword:
 | 
			
		||||
                if (inType == characType::Habilete) {
 | 
			
		||||
| 
						 | 
				
			
			@ -93,12 +93,14 @@ namespace character {
 | 
			
		|||
 | 
			
		||||
    std::uint32_t Equipments::add_damage() const noexcept { return 0; }
 | 
			
		||||
 | 
			
		||||
    std::uint32_t Equipments::add_materiel(const characteristic::characType inType) const noexcept {
 | 
			
		||||
    std::int32_t Equipments::add_materiel(const characteristic::characType inType) const noexcept {
 | 
			
		||||
        switch (type) {
 | 
			
		||||
            case equipments::Chainmail:
 | 
			
		||||
                return inType == characType::Habilete ||
 | 
			
		||||
                       inType == characType::Adresse ||
 | 
			
		||||
                       inType == characType::Endurance ? 1 : 0;
 | 
			
		||||
                if (inType == characType::Habilete ||
 | 
			
		||||
                    inType == characType::Adresse) {
 | 
			
		||||
                    return -1;
 | 
			
		||||
                }
 | 
			
		||||
                return inType == characType::Endurance ? 1 : 0;
 | 
			
		||||
            case equipments::CookingPot:
 | 
			
		||||
                return inType == characType::Endurance ? 2 : 0;
 | 
			
		||||
            case equipments::PamphletTourist:
 | 
			
		||||
| 
						 | 
				
			
			@ -127,7 +129,7 @@ namespace character {
 | 
			
		|||
 | 
			
		||||
    std::uint32_t Tools::add_damage() const noexcept { return 0; }
 | 
			
		||||
 | 
			
		||||
    std::uint32_t Tools::add_materiel(const characteristic::characType inType) const noexcept {
 | 
			
		||||
    std::int32_t Tools::add_materiel(const characteristic::characType inType) const noexcept {
 | 
			
		||||
        switch (type) {
 | 
			
		||||
            case tools::Fourche:
 | 
			
		||||
                switch (inType) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue