
-- army of Regent Dovbar. Created when player paid him tribute

createArmyRegent = function()

	--	set up

		armyRegent						= {}
	
		armyRegent.player 				= 2
		armyRegent.id					= 3
		armyRegent.strength				= 8
		armyRegent.position				= GetPosition("defSpawnPoint4_CD")
		armyRegent.rodeLength			= 1000
		armyRegent.refresh				= false
		armyRegent.control				= {}
		armyRegent.control.counter		= 1
		
		SetupArmy(armyRegent)

	--	job		
		
		StartJob("ControlArmyRegent")

	end




-----------------------------------------------------------------------------------------------------------------------	
--
--	JOB: "ControlArmyRegent"
--
-----------------------------------------------------------------------------------------------------------------------	
	-------------------------------------------------------------------------------------------------------------------
	Condition_ControlArmyRegent = function()
	-------------------------------------------------------------------------------------------------------------------
		
		return Counter.Tick2("ControlArmyRegent",10)	
		
		end
		
		
		
		
	-------------------------------------------------------------------------------------------------------------------
	Action_ControlArmyRegent = function()
	-------------------------------------------------------------------------------------------------------------------
		
		if armyRegent.control.counter > 0 and IsDead(armyRegent) then 

				local troopDescription = {
				
					maxNumberOfSoldiers	= 4,
					minNumberOfSoldiers	= 4,
					experiencePoints 	= MEDIUM_EXPERIENCE,
				}				
	
				troopDescription.leaderType = Entities.PU_LeaderSword1
				EnlargeArmy(armyRegent, troopDescription)
				EnlargeArmy(armyRegent, troopDescription)
				EnlargeArmy(armyRegent, troopDescription)
				troopDescription.leaderType = Entities.PU_LeaderPoleArm1
				EnlargeArmy(armyRegent, troopDescription)
				EnlargeArmy(armyRegent, troopDescription)
				EnlargeArmy(armyRegent, troopDescription)
				troopDescription.leaderType = Entities.PU_LeaderBow1
				EnlargeArmy(armyRegent, troopDescription)
				EnlargeArmy(armyRegent, troopDescription)
				armyRegent.control.counter = armyRegent.control.counter - 1
				
		else

			Advance(armyRegent)
			
			end

		return false
		
		end
	