Implement stat boosting
This commit is contained in:
		@@ -55,6 +55,29 @@ namespace CreatureLib::Core{
 | 
			
		||||
            }
 | 
			
		||||
            throw std::exception();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        inline void IncreaseStatBy(Statistic stat, T amount){
 | 
			
		||||
            switch (stat){
 | 
			
		||||
                case Health: _health += amount;
 | 
			
		||||
                case PhysicalAttack: _physicalAttack += amount;
 | 
			
		||||
                case PhysicalDefense: _physicalDefense += amount;
 | 
			
		||||
                case MagicalAttack: _magicalAttack += amount;
 | 
			
		||||
                case MagicalDefense: _magicalDefense += amount;
 | 
			
		||||
                case Speed: _speed += amount;
 | 
			
		||||
            }
 | 
			
		||||
            throw std::exception();
 | 
			
		||||
        }
 | 
			
		||||
        inline void DecreaseStatBy(Statistic stat, T amount){
 | 
			
		||||
            switch (stat){
 | 
			
		||||
                case Health: _health -= amount;
 | 
			
		||||
                case PhysicalAttack: _physicalAttack -= amount;
 | 
			
		||||
                case PhysicalDefense: _physicalDefense -= amount;
 | 
			
		||||
                case MagicalAttack: _magicalAttack -= amount;
 | 
			
		||||
                case MagicalDefense: _magicalDefense -= amount;
 | 
			
		||||
                case Speed: _speed -= amount;
 | 
			
		||||
            }
 | 
			
		||||
            throw std::exception();
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user