//	ModifierCreator.h - Base class for the creators of modifiers.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef MODIFIERCREATOR_H_
#define MODIFIERCREATOR_H_

#include "c0xHeaders.h"

#include <string>

class GamePlayState;
class Tank;

///	Base class for the creators of modifiers.
class ModifierCreator
{
  public:
	///	Constructor.
	ModifierCreator(int uses):
	numUses(uses),
	numRemaining(uses)
	{
	
	};
	///	Destructor.
	virtual ~ModifierCreator() {};

	///	Applies the modifier.
	virtual void apply(GamePlayState& state) = 0;
	///	Used to reset any internal variables the modifier may have.
	virtual void reset() {};
	///	Decrements the modifier's numUses.
	void decrementNumUses() {--numRemaining;};
	///	Resets the modifier's numUses.
	void resetNumUses() {numRemaining = numUses;};

	///	Returns the name of this modifier.
	virtual const std::wstring getName() const = 0;
	///	Returns the number of times this modifier can still be used.
	virtual int getNumUses() const {return numRemaining;};
	///	If this modifier depends on another modifier being active, this returns that modifier's name.
	virtual std::wstring getDependency() const = 0;
	///	Returns this modifier's difficulty (in terms of being hard to handle).
	/*!
		Higher numbers mean more chaotic and harder to handle. Lower numbers
		mean it's a relatively benign modifier.

		For now, the values are:
		0: Does not make the game harder in any way.
		1: Makes the game slightly harder.
		2: Makes the game a fair bit harder.
		3: Makes the game chaotic and insane and survival is basically a
		  random dice roll.
	 */
	virtual int getGrade() const = 0;
  private:
	///	The number of times this modifier can be used.
	int numUses;
	///	The number of times this modifier can still be used.
	int numRemaining;
};

#endif
