package net.phatcode.rel;

import net.phatcode.rel.math.Utils;

public class BulletPatternFactory
{
	
	public BulletPatternFactory()
	{
	}
	
	public static BulletPattern def( Animator animator )
	{
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.animator = animator; 	
		
		return bulletPattern;
		
	}
	
	public static BulletPattern fullSpread( Animator animator )
	{
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.0f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = 0;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = 0;					    	// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorLinear; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorLinear; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 2;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 8; 
		bulletPattern.waveInfo.xRadius = 40;
		bulletPattern.waveInfo.yRadius = 40;
		bulletPattern.waveInfo.speedDelta = 2.5f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI * 2.0f;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 1;
		bulletPattern.waveInfo.delayPerSpawn = 1; 
		bulletPattern.waveInfo.delayPerWave = 1; 
		bulletPattern.waveInfo.waveOffset = 0;
		
		return bulletPattern;
		
	}
	
	
	public static BulletPattern fullSpreadDecel( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 12; 
		bulletPattern.bulletInfo.acceleration = 0.0f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = -1;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = -1;					    	// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorDecelerated; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorLinear; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 2;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 8; 
		bulletPattern.waveInfo.xRadius = 40;
		bulletPattern.waveInfo.yRadius = 40;
		bulletPattern.waveInfo.speedDelta = 2.5f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI * 2.0f;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 1;
		bulletPattern.waveInfo.delayPerSpawn = 1; 
		bulletPattern.waveInfo.delayPerWave = 1; 
		bulletPattern.waveInfo.waveOffset = 2;
		
		return bulletPattern;
		
	}
	
	
	public static BulletPattern wasak( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.3f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = 60;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = 10;						// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = true;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorDecelerated; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 2;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 1; 
		bulletPattern.waveInfo.xRadius = 40;
		bulletPattern.waveInfo.yRadius = 40;
		bulletPattern.waveInfo.speedDelta = 2.5f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI * 1.4f;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 8;
		bulletPattern.waveInfo.delayPerSpawn = 4; 
		bulletPattern.waveInfo.delayPerWave = 20; 
		bulletPattern.waveInfo.waveOffset = 7;
		
		return bulletPattern;
		
	}
	
	public static BulletPattern shinto( Animator animator )
	{
		
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.08f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = -1;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = -1;						// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorLinear; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 4;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 4; 
		bulletPattern.waveInfo.xRadius = 30;
		bulletPattern.waveInfo.yRadius = 30;
		bulletPattern.waveInfo.speedDelta = -2.1f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI/4;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 6;
		bulletPattern.waveInfo.delayPerSpawn = 4; 
		bulletPattern.waveInfo.delayPerWave = 20; 
		bulletPattern.waveInfo.waveOffset = 7;
		
		return bulletPattern;
		
	}

	public static BulletPattern ring( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.08f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = 20;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = 10;						// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = true;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorLinear; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 4;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 15; 
		bulletPattern.waveInfo.xRadius = 30;
		bulletPattern.waveInfo.yRadius = 30;
		bulletPattern.waveInfo.speedDelta = 0.0f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI*2;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 3;
		bulletPattern.waveInfo.delayPerSpawn = 10; 
		bulletPattern.waveInfo.delayPerWave = 30; 
		bulletPattern.waveInfo.waveOffset = 0;
		
		return bulletPattern;
		
	}

	public static BulletPattern arrowRing( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.08f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = -1;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = -1;						// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorLinear; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 4;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 4; 
		bulletPattern.waveInfo.xRadius = 50;
		bulletPattern.waveInfo.yRadius = 50;
		bulletPattern.waveInfo.speedDelta = 2.1f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 4;
		bulletPattern.waveInfo.delayPerSpawn = 8; 
		bulletPattern.waveInfo.delayPerWave = 20; 
		bulletPattern.waveInfo.waveOffset = 7;
		
		return bulletPattern;
		
	}

	public static BulletPattern clawRing( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.08f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = -1;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = -1;						// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorLinear; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 4;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 4; 
		bulletPattern.waveInfo.xRadius = 50;
		bulletPattern.waveInfo.yRadius = 50;
		bulletPattern.waveInfo.speedDelta = -2.1f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 4;
		bulletPattern.waveInfo.delayPerSpawn = 8; 
		bulletPattern.waveInfo.delayPerWave = 20; 
		bulletPattern.waveInfo.waveOffset = 7;
		
		return bulletPattern;
		
	}

	public static BulletPattern arrowSpread( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.08f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = -1;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = -1;						// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorLinear; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 4;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 7; 
		bulletPattern.waveInfo.xRadius = 50;
		bulletPattern.waveInfo.yRadius = 50;
		bulletPattern.waveInfo.speedDelta = 2.1f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI/8;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 5;
		bulletPattern.waveInfo.delayPerSpawn = 8; 
		bulletPattern.waveInfo.delayPerWave = 20; 
		bulletPattern.waveInfo.waveOffset = 3;
		
		return bulletPattern;
		
	}

	public static BulletPattern clawSpread( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(0, 0);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.08f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = -1;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = -1;						// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = false;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorLinear; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 4;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 7; 
		bulletPattern.waveInfo.xRadius = 50;
		bulletPattern.waveInfo.yRadius = 50;
		bulletPattern.waveInfo.speedDelta = -2.1f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI/8;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 5;
		bulletPattern.waveInfo.delayPerSpawn = 8; 
		bulletPattern.waveInfo.delayPerWave = 20; 
		bulletPattern.waveInfo.waveOffset = 3;
		
		return bulletPattern;
		
	}

	public static BulletPattern fullRingCenterAim( Animator animator )
	{
		
		BulletPattern bulletPattern = new BulletPattern();
		
		bulletPattern.bulletInfo.setGravity(0, 0);		 				// This makes the bullets sway to a direction
		bulletPattern.bulletInfo.setTarget(Constants.SCREEN_WIDTH/2, Constants.SCREEN_HEIGHT/2);						// Default bullet target
		bulletPattern.bulletInfo.angle = Utils.deg2Rad(90); 							
		bulletPattern.bulletInfo.speed = 8; 
		bulletPattern.bulletInfo.acceleration = 0.15f; 					// for accelerated bullets
		bulletPattern.bulletInfo.stopCounter = 30;						// ticks when bullets should stop
		bulletPattern.bulletInfo.goCounter = 10;					    	// ticks(relative to stopCounter) when bullets move again after stopping 
		bulletPattern.bulletInfo.aim = true;							// changes direction to target after stopping
		bulletPattern.bulletInfo.seekPlayer = false;						// seeks the player after stopping
		bulletPattern.bulletInfo.animator = animator; 	
		bulletPattern.bulletInfo.behavior = Behaviors.behaviorDecelerated; 			// default behavior
		bulletPattern.bulletInfo.nextBehavior = Behaviors.behaviorAccelerated; 		// behavior after stopping
		bulletPattern.bulletInfo.aabbSize = 2;									// collision box size
	
		bulletPattern.waveInfo.numBullets = 8; 
		bulletPattern.waveInfo.xRadius = 40;
		bulletPattern.waveInfo.yRadius = 40;
		bulletPattern.waveInfo.speedDelta = 0.0f;
		bulletPattern.waveInfo.sectorLength = (float)Math.PI * 2.0f;
		bulletPattern.waveInfo.symmetrical = true;
		bulletPattern.waveInfo.shotsPerWave = 12;
		bulletPattern.waveInfo.delayPerSpawn = 2; 
		bulletPattern.waveInfo.delayPerWave = 30; 
		bulletPattern.waveInfo.waveOffset = 3;
		
		return bulletPattern;
		
	}
	
}
