using ActionGame.GameArtifacts.Intelligence.EnemyAttack;
using ActionGame.GameArtifacts.Models.Characters;
using ActionGame.GameArtifacts.Models.Game;
using ActionGame.GameResources.Models;
using ActionGame.RawResources.Manager;
using System;


namespace ActionGame.GameArtifacts.Factories
{
    public class EnemyAttackFactory
    {
        private IRawContentManager rawContentManager;
        private GameData gameData;


        public EnemyAttackFactory(IRawContentManager rawContentManager, GameData gameData)
        {
            this.rawContentManager = rawContentManager;
            this.gameData = gameData;
        }


        public IEnemyAttack GetAttack(Int32 attackKey, IBattleObject user, Double attackSpeed)
        {
            IEnemyAttack enemyAttack = null;

            if (attackKey == (Int32)AttackTypes.Bash) enemyAttack = new BashAttack(user, attackSpeed, rawContentManager, gameData);
            else if (attackKey == (Int32)AttackTypes.Claw) enemyAttack = new ClawAttack(user, attackSpeed, rawContentManager, gameData);
            else if (attackKey == (Int32)AttackTypes.Slash) enemyAttack = new SlashAttack(user, attackSpeed, rawContentManager, gameData);
            else if (attackKey == (Int32)AttackTypes.FlameThrow) enemyAttack = new FireThrowerAttack(user, attackSpeed, rawContentManager, gameData);
            else if (attackKey == (Int32)AttackTypes.Gun) enemyAttack = new GunAttack(user, attackSpeed, rawContentManager, gameData);
            else if (attackKey == (Int32)AttackTypes.EnergyGun) enemyAttack = new EnergyGunAttack(user, attackSpeed, rawContentManager, gameData);
            else if (attackKey == (Int32)AttackTypes.Axe) enemyAttack = new AxeAttack(user, attackSpeed, rawContentManager, gameData);
            else if (attackKey == (Int32)AttackTypes.Dynamite) enemyAttack = new DynamiteAttack(user, attackSpeed, rawContentManager, gameData);

            return enemyAttack;
        }


    }
}
