#Recruiting behavior

#Input variables
#party_size (number of recruiters in group)
#other_size (size of other tribe)
#recruit_tool_level (level of the recruit tool)
#defense_tool_level (level of the defense tool)

#Output variables
#recruit_time - seconds to spend at the enemy hut
#targets_recruited - Returns the number of creatures recruited
#damage_share - Health loss for each recruiter
#total_damage - Health loss to be shared among all recruiters
#energy_cost - Energy loss to each recruiter

recruit_time = 45

recruit_chance = ( 1 + 0.05 * recruit_tool_level ) * ( 0.3 * party_size^0.5 ) / other_size^0.5

if (RAND < recruit_chance )
   targets_recruited = 1
else
   targets_recruited = 0
endif

# beat up but don't kill
damage_share = 25 + 25 * RAND
total_damage = 100 * RAND - (defense_tool_level * 25)
energy_cost = 45 + 20 * RAND
