Ejemplo n.º 1
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellShot skill = melee as CellShot;

            if (skill == null)
            {
                return;
            }

            skill.projectileForce     = temp;
            skill.rangeCheckFrequency = temp2;
        }
Ejemplo n.º 2
0
        public override bool Trigger(Character target, float distSqr)
        {
            ActiveSkill spawnSkill = null;

            foreach (Skill s in spawnSkills)
            {
                if (s.CanUse())
                {
                    spawnSkill = s as ActiveSkill;
                    break;
                }
            }

            int count = 0;

            for (int i = spawned.Count - 1; i >= 0; i--)
            {
                Monster m = spawned[i];

                if (m.Status.IsDead)
                {
                    spawned.RemoveAt(i);
                    continue;
                }

                count++;
            }

            if (spawnSkill == null)
            {
                return(false);
            }

            if (spawnSkill is ISummonNotifyCallback)
            {
                if (((ISummonNotifyCallback)spawnSkill).GetCallback() == null)
                {
                    ((ISummonNotifyCallback)spawnSkill).SetCallback(NotifySummonSpawned);
                }
            }

            if (count < maxMinions && ai.GetTimer("spawn", nextSpawnInterval))
            {
                if (ai.StartAction(ai.CastSkill(null, spawnSkill, 0, true, false, 0f, 0f), 0.5f))
                {
                    ai.SetTimer("spawn");
                    InitNextSpawn();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 3
0
        public override void InitSkillsOnMonster(SkillSet set, ActiveSkill meleeSkill, int level)
        {
            JumpShort skill = set.GetSkill(SkillId.JumpShort) as JumpShort;

            if (skill != null)
            {
                skill.jumpSpeed = 75;
                skill.range     = jumpRange;
                skill.reuse     = 4f;
                skill.castTime  = 1f;
            }
        }
Ejemplo n.º 4
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellFury skill = set.GetSkill(SkillId.CellFury) as CellFury;

            if (skill == null)
            {
                return;
            }

            temp = skill.nullReuseChance;
            skill.nullReuseChance = (int)AddValueByLevel(CHANCE, LEVEL_ADD);
        }
Ejemplo n.º 5
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            RhinoBeam skill = set.GetSkill(SkillId.RhinoBeam) as RhinoBeam;

            if (skill == null)
            {
                return;
            }

            temp             = skill.baseDamage;
            skill.baseDamage = (int)(skill.baseDamage * 4f);
        }
Ejemplo n.º 6
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            RhinoBeam skill = set.GetSkill(SkillId.RhinoBeam) as RhinoBeam;

            if (skill == null)
            {
                return;
            }

            temp = skill.rotateSpeed;
            skill.rotateSpeed = 100f;
        }
Ejemplo n.º 7
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            Charge skill = set.GetSkill(SkillId.Charge) as Charge;

            if (skill == null)
            {
                return;
            }

            skill.spreadshotOnLand = false;
            skill.spreadshotDamage = 0;
        }
Ejemplo n.º 8
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellFury skill = set.GetSkill(SkillId.CellFury) as CellFury;

            if (skill == null)
            {
                return;
            }

            temp              = skill.rangeBoost;
            skill.rangeBoost += (AddValueByLevel(RANGE, LEVEL_ADD) / 100f + 1f);
        }
Ejemplo n.º 9
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            Charge skill = set.GetSkill(SkillId.Charge) as Charge;

            if (skill == null)
            {
                return;
            }

            skill.maxConsecutiveCharges -= 1;
            skill.consecutiveTimelimit  -= AddValueByLevel(3, 1f);
        }
Ejemplo n.º 10
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            Charge skill = set.GetSkill(SkillId.Charge) as Charge;

            if (skill == null)
            {
                return;
            }

            skill.spreadshotOnLand = true;
            skill.spreadshotDamage = (int)AddValueByLevel(DAMAGE, LEVEL_ADD);
        }
Ejemplo n.º 11
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            Charge skill = set.GetSkill(SkillId.Charge) as Charge;

            if (skill == null)
            {
                return;
            }

            skill.penetrateThroughTargets = false;
            skill.hitEnemyDamage         -= (int)AddValueByLevel(DAMAGE, LEVEL_ADD);
        }
Ejemplo n.º 12
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            Charge skill = set.GetSkill(SkillId.Charge) as Charge;

            if (skill == null)
            {
                return;
            }

            skill.maxConsecutiveCharges += 1;
            skill.consecutiveTimelimit   = 3f;
        }
Ejemplo n.º 13
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            Charge skill = set.GetSkill(SkillId.Charge) as Charge;

            if (skill == null)
            {
                return;
            }

            temp         = skill.reuse * 0.3f;
            skill.reuse -= temp;
        }
Ejemplo n.º 14
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            Charge skill = set.GetSkill(SkillId.Charge) as Charge;

            if (skill == null)
            {
                return;
            }

            temp         = (int)(skill.range * 0.75f);
            skill.range += temp;
        }
Ejemplo n.º 15
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellShot skill = melee as CellShot;

            if (skill == null)
            {
                return;
            }

            skill.reuse         += val;
            skill.deviationAngle = 0;
        }
Ejemplo n.º 16
0
    public void AddTrainingResult(TrainingData training, int gainedXP)
    {
        ActiveSkill activeSkill = GetActiveSkill(training.TargetSkill);

        activeSkill.XP += gainedXP;
        activeSkill.XP  = Mathf.Min(activeSkill.XP, activeSkill.GetXPCap());
        SkillTrainingResult newTrainingResult = new SkillTrainingResult();

        newTrainingResult.Training = training;
        newTrainingResult.XPGain   = gainedXP;
        activeSkill.TrainingResults.Add(newTrainingResult);
    }
Ejemplo n.º 17
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellShot skill = melee as CellShot;

            if (skill == null)
            {
                return;
            }

            skill.doubleAttackChance          -= (int)AddValueByLevel(CHANCE, LEVEL_ADD);
            skill.doubleAttackProjectileCount -= 1;
        }
Ejemplo n.º 18
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            RhinoBeam skill = set.GetSkill(SkillId.RhinoBeam) as RhinoBeam;

            if (skill == null)
            {
                return;
            }

            skill.coolDown   = temp;
            skill.baseDamage = temp2;
        }
Ejemplo n.º 19
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellShot skill = melee as CellShot;

            if (skill == null)
            {
                return;
            }

            skill.shotgunChance           -= 100;
            skill.shotgunProjectilesCount -= PROJECTILE_COUNT;
        }
Ejemplo n.º 20
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            RhinoBeam skill = set.GetSkill(SkillId.RhinoBeam) as RhinoBeam;

            if (skill == null)
            {
                return;
            }

            temp           = skill.coolDown;
            skill.coolDown = (int)(skill.coolDown * (AddValueByLevel(POWER, LEVEL_ADD) / 100f + 1));
        }
Ejemplo n.º 21
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellShot skill = melee as CellShot;

            if (skill == null)
            {
                return;
            }

            skill.consecutiveShotgunCounter -= CONSECUTIVE_COUNTER;
            skill.shotgunProjectilesCount   -= PROJECTILE_COUNT;
        }
Ejemplo n.º 22
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            RhinoBeam skill = set.GetSkill(SkillId.RhinoBeam) as RhinoBeam;

            if (skill == null)
            {
                return;
            }

            temp        = skill.width;
            skill.width = AddValueByLevel(WIDTH, LEVEL_ADD);
        }
Ejemplo n.º 23
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellShot skill = melee as CellShot;

            if (skill == null)
            {
                return;
            }

            skill.range      += (int)temp1;
            skill.baseDamage -= (int)temp2;
        }
Ejemplo n.º 24
0
        public override void ApplySkillChanges(SkillSet set, ActiveSkill melee)
        {
            CellFury skill = set.GetSkill(SkillId.CellFury) as CellFury;

            if (skill == null)
            {
                return;
            }

            temp        = skill.reuse;
            skill.reuse = skill.reuse * (1 - AddValueByLevel(REUSE, LEVEL_ADD) / 100f);
        }
Ejemplo n.º 25
0
 public bool TryActivateSkill(ActiveSkill skill)
 {
     if (!IsSkillActive(skill))
     {
         ActivateSkill(skill);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 26
0
        public virtual IEnumerator CastSkill(Vector3 target, ActiveSkill sk, float distSqrToTarget, bool noRangeCheck, bool moveTowardsIfRequired, float skillRangeAdd = 0, float randomSkilLRangeAdd = 0)
        {
            int range = sk.GetRange();

            if (!noRangeCheck && range != 0)
            {
                while (Mathf.Pow((range + Random.Range(-randomSkilLRangeAdd, randomSkilLRangeAdd)), 2) < distSqrToTarget)
                {
                    //distSqrToTarget = Vector3.Distance(target, Owner.GetData().transform.position);
                    distSqrToTarget = Utils.DistanceSqr(target, Owner.GetData().transform.position);

                    if (moveTowardsIfRequired)
                    {
                        MoveTo(target);                         //TODO not working with pathnodes - replace with setmovementtarget
                        yield return(null);
                    }
                    else                     // too far, cant move closer - break the action
                    {
                        currentAction = null;
                        yield break;
                    }
                }
            }

            if (GetTemplate().TargetRotationSpeed > 0)
            {
                // not rotated towards target
                if (!Owner.GetData().IsRotatedTowards(target, 3))
                {
                    Owner.GetData().Rotate(target, GetTemplate().TargetRotationSpeed);
                    while (Owner.GetData().IsRotating())
                    {
                        // wait till rotation is finished
                        yield return(null);
                    }
                }
            }

            Owner.GetData().BreakMovement(true);

            if (GetTemplate().TargetRotationSpeed < 0)
            {
                RotateToTarget(target);
            }
            else
            {
                UpdateDirection(target);
            }

            Owner.CastSkill(sk, null, true);
            currentAction = null;
        }
Ejemplo n.º 27
0
    public virtual void OnUnitTick(Unit unit, float dt)
    {
        if (unit.Suspended || unit.IsDoingOr(Unit.kDoingObstinate))
        {
            // 如果正在固执做事或正在施法
            return;
        }

        if (unit.IsDoingOr(Unit.kDoingCasting) && !unit.IsDoingOr(Unit.kDoingMoving))
        {
            // 原地施法
            return;
        }

        UnitNode d = unit.Node;

        ActiveSkill atk = unit.AttackSkill;

        if (atk == null)
        {
            return;
        }

        // 追击目标仍在仇恨区内就继续追击
        if (unit.CastActiveSkill == atk && unit.CastTarget.TargetType == CommandTarget.Type.kUnitTarget)
        {
            Unit tt = unit.CastTarget.TargetUnit;
            if (tt != null)
            {
                UnitNode ttd = tt.Node;
                if (ttd != null && unit.IsDoingAnd(Unit.kDoingCasting | Unit.kDoingMoving) && Vector2.Distance(d.position, ttd.position) < unit.HostilityRange)
                {
                    // 正在追击施法,距离在仇恨范围内
                    return;
                }
            }
        }

        Unit t = UnitGroup.getNearestUnitInRange(unit.World, d.position, unit.HostilityRange, UnitGroup.MatchFunctionLivingEnemy, unit.force);

        if (t == null || t.isDead)
        {
            // 搜不到仇恨区内的目标,有没有必要设置为doNothing?
            return;
        }

        if (unit.CastActiveSkill != atk || unit.CastTarget.TargetUnit != t)
        {
            //Debug.LogFormat("{0} want to attack {1}.", unit.Name, t.Name);
            unit.CommandCastSpell(new CommandTarget(t), atk, false);
        }
    }
Ejemplo n.º 28
0
        public override void RestoreSkillChanges(SkillSet set, ActiveSkill melee)
        {
            SneezeShot skill = set.GetSkill(SkillId.SneezeShot) as SneezeShot;

            if (skill == null)
            {
                return;
            }

            skill.projectilesCount = temp;
            skill.explodeEffect    = false;
            skill.EnableOriginalEffects();
        }
Ejemplo n.º 29
0
    new protected void CopyDataFrom(Skill from)
    {
        base.CopyDataFrom(from);
        ActiveSkill a = from as ActiveSkill;

        m_castTargetType     = a.m_castTargetType;
        m_effectiveTypeFlags = a.m_effectiveTypeFlags;
        m_castMinRange       = a.m_castMinRange;
        m_castRange          = a.m_castRange;
        m_castTargetRadius   = a.m_castTargetRadius;
        m_projectileTemplate = a.m_projectileTemplate;
        m_castHorizontal     = a.m_castHorizontal;
    }
Ejemplo n.º 30
0
    public override TaskStatus OnUpdate()
    {
        ActiveSkill activeSkill = characterMono.prepareSkill;

        Debug.Log(activeSkill.SpellDistance != 0 ? "是指向性技能":"不是指向性技能");

        // 如果释放范围!=0,说明此技能是指向性技能
        if (activeSkill.SpellDistance != 0)
        {
            return(TaskStatus.Success);
        }
        return(TaskStatus.Failure);
    }
Ejemplo n.º 31
0
        /// <summary>
        /// Creates Entities from aggregates (collections of components)
        /// </summary>
        /// <param name="aggregate">The specific aggreage to create</param>
        /// <param name="playerIndex">The player index for this player</param>
        /// <param name="aggregate">The game save that we are creating</param>
        public uint CreateFromAggregate(Aggregate aggregate, PlayerIndex playerIndex, string fileName, out DungeonCrawlerGame.CharacterSaveFile gameSave)
        {
            gameSave = new DungeonCrawlerGame.CharacterSaveFile();

            uint entityID = 0xFFFFFF;
            Texture2D spriteSheet;
            Position position;
            Movement movement;
            Equipment equipment;
            WeaponType weaponType;

            PlayerSkillInfo skillInfo;
            ActiveSkill active_Skill;
            Sprite sprite;
            SpriteAnimation spriteAnimation;

            //MovementSprite movementSprite;
            Collideable collideable;
            Local local;
            Player player;
            PlayerInfo info;
            Stats stats = new Stats();

            HUDAggregateFactory hudagg = new HUDAggregateFactory(game);
            InvAggregateFactory invagg = new InvAggregateFactory(game);

            int defaultHealthPotQty = 1;
            int defaultPsiPotQty = 1;

            //Miscelaneous modifyers for the potential ability modifiers
            //Placeholders for racial/class bonuses and item bonuses.
            int miscMeleeAttack = 0;
            int miscRangedAttack = 0;
            int miscMeleeSpeed = 0;
            int miscAccuracy = 0;
            int miscMeleeDef = 0;
            int miscRangedDef = 0;
            int miscSpell = 0;
            int miscHealth = 0;

            switch (aggregate)
            {
                #region Fairy
                /****************************************
                 * Fairy
                 * *************************************/
                case Aggregate.FairyPlayer:
                    entityID = Entity.NextEntity();
                    spriteSheet = game.Content.Load<Texture2D>("Spritesheets/Aggregate/wind_fae");
                    spriteSheet.Name = "Spritesheets/Aggregate/wind_fae";

                    /*Author: Josh Zavala, Assignment 9
                     *This has been transferred from ContinueNewGameScreen.goToNetworking
                     *Allows default weapons assignment per class
                     */
                    /*Update:Joseph Shaw, Assignment 9
                     *Set the weapon type here and use it in the create weapon so that it
                     *can be saved into the gameSave after the switch statement.
                     *We could abstract this method entirely but leaving it here gives more flexibility.
                     */
                    weaponType = WeaponType.StandardSword;
                    equipment = new Equipment()
                    {
                        EntityID = entityID,
                        WeaponID = game.WeaponFactory.CreateWeapon(weaponType),
                        HealthPotsQty = defaultHealthPotQty,
                        PsiPotsQty = defaultPsiPotQty,
                        PogsQty = 0,
                    };
                    game.EquipmentComponent.Add(equipment.EntityID, equipment);

                    position = new Position()
                    {
                        EntityID = entityID,
                        Center = new Vector2(400, 150),
                        Radius = 32f,
                    };
                    game.PositionComponent[entityID] = position;

                    collideable = new Collideable()
                    {
                        EntityID = entityID,
                        RoomID = position.RoomID,
                        Bounds = new CircleBounds(position.Center, position.Radius)
                    };
                    game.CollisionComponent[entityID] = collideable;

                    movement = new Movement()
                    {
                        EntityID = entityID,
                        Direction = new Vector2(0, 1),
                        Speed = 200f,
                    };
                    game.MovementComponent[entityID] = movement;

                    spriteAnimation = new SpriteAnimation()
                    {
                        EntityID = entityID,
                        FramesPerSecond = 10,
                        IsLooping = true,
                        IsPlaying = true,
                        TimePassed = 0f,
                        CurrentFrame = 0,
                        CurrentAnimationRow = 0

                    };

                    game.SpriteAnimationComponent[entityID] = spriteAnimation;

                    sprite = new Sprite()
                    {
                        EntityID = entityID,
                        SpriteBounds = new Rectangle(0, 0, 64, 64),
                        SpriteSheet = spriteSheet
                    };
                    game.SpriteComponent[entityID] = sprite;

                    local = new Local()
                    {
                        EntityID = entityID,
                    };
                    game.LocalComponent[entityID] = local;

                    //This will add a stats section for the player in the stats component
                    stats = new Stats()
                    {
                        EntityID = entityID,

                        //So here we just define our base values. Total sum is 50
                        //The base stats are 10 across the board
                        Strength = 4,
                        Stamina = 10,
                        Agility = 10,
                        Intelligence = 16,
                        Defense = 10,
                        HealthBase = 100,
                        PsiBase = 100,
                    };
                    game.StatsComponent[entityID] = stats;

                    player = new Player()
                    {
                        EntityID = entityID,
                        PlayerIndex = playerIndex,
                        PlayerRace = aggregate,
                        abilityModifiers = new AbilityModifiers()
                        {
                            meleeDamageReduction = miscMeleeDef + (int)((stats.Defense - 10) / 2),
                            rangedDamageReduction = miscRangedDef + (int)((stats.Defense - 10) / 2),
                            meleeAttackBonus = miscMeleeAttack + (int)((stats.Strength - 10) / 2),
                            RangedAttackBonus = miscRangedAttack + (int)((stats.Agility - 10) / 2),
                            MeleeAttackSpeed = miscMeleeSpeed + (int)((stats.Strength - 10) / 2),
                            Accuracy = miscAccuracy + (int)((stats.Agility - 10) / 2),
                            SpellBonus = miscSpell + (int)((stats.Intelligence - 10) / 2),
                            HealthBonus = miscHealth + (int)((stats.Stamina - 10) / 2),
                        }
                    };
                    game.PlayerComponent[entityID] = player;

                    info = new PlayerInfo()
                    {
                        Health = 100,
                        Psi = 100,
                        Level = 1,
                        Experience = 0,
                        State = PlayerState.Default,
                    };
                    game.PlayerInfoComponent[entityID] = info;

                    break;
                #endregion

                #region Cultist
                /****************************************
                * Cultist
                * *************************************/
                case Aggregate.CultistPlayer:
                    entityID = Entity.NextEntity();
                    spriteSheet = game.Content.Load<Texture2D>("Spritesheets/Aggregate/Cultist");
                    spriteSheet.Name = "Spritesheets/Aggregate/Cultist";

                    /*Author: Josh Zavala, Assignment 9
                     *This has been transferred from ContinueNewGameScreen.goToNetworking
                     *Allows default weapons assignment per class
                     */
                    /*Update:Joseph Shaw, Assignment 9
                     *Set the weapon type here and use it in the create weapon so that it
                     *can be saved into the gameSave after the switch statement.
                     *We could abstract this method entirely but leaving it here gives more flexibility.
                     */
                    weaponType = WeaponType.StandardSword;
                    equipment = new Equipment()
                    {
                        EntityID = entityID,
                        WeaponID = game.WeaponFactory.CreateWeapon(weaponType),
                        HealthPotsQty = defaultHealthPotQty,
                        PsiPotsQty = defaultPsiPotQty,
                        PogsQty = 0,
                    };
                    game.EquipmentComponent.Add(equipment.EntityID, equipment);

                    position = new Position()
                    {
                        EntityID = entityID,
                        Center = new Vector2(400, 150),
                        Radius = 32f,
                    };
                    game.PositionComponent[entityID] = position;

                    collideable = new Collideable()
                    {
                        EntityID = entityID,
                        RoomID = position.RoomID,
                        Bounds = new CircleBounds(position.Center, position.Radius)
                    };
                    game.CollisionComponent[entityID] = collideable;

                    movement = new Movement()
                    {
                        EntityID = entityID,
                        Direction = new Vector2(0, 1),
                        Speed = 200f,
                    };
                    game.MovementComponent[entityID] = movement;

                    spriteAnimation = new SpriteAnimation()
                    {
                        EntityID = entityID,
                        FramesPerSecond = 10,
                        IsLooping = true,
                        IsPlaying = true,
                        TimePassed = 0f,
                        CurrentFrame = 0,
                        CurrentAnimationRow = 0

                    };

                    game.SpriteAnimationComponent[entityID] = spriteAnimation;

                    sprite = new Sprite()
                    {
                        EntityID = entityID,
                        SpriteBounds = new Rectangle(0, 0, 64, 64),
                        SpriteSheet = spriteSheet
                    };
                    game.SpriteComponent[entityID] = sprite;

                    local = new Local()
                    {
                        EntityID = entityID,
                    };
                    game.LocalComponent[entityID] = local;

                    //This will add a stats section for the player in the stats component
                    stats = new Stats()
                    {
                        EntityID = entityID,

                        //So here we just define our base values. Total sum is 50
                        //The base stats are 10 across the board
                        Strength = 4,
                        Stamina = 10,
                        Agility = 10,
                        Intelligence = 16,
                        Defense = 10,
                        HealthBase = 100,
                        PsiBase = 100,
                    };
                    game.StatsComponent[entityID] = stats;

                    player = new Player()
                    {
                        EntityID = entityID,
                        PlayerIndex = playerIndex,
                        PlayerRace = aggregate,
                        abilityModifiers = new AbilityModifiers()
                        {
                            meleeDamageReduction = miscMeleeDef + (int)((stats.Defense - 10) / 2),
                            rangedDamageReduction = miscRangedDef + (int)((stats.Defense - 10) / 2),
                            meleeAttackBonus = miscMeleeAttack + (int)((stats.Strength - 10) / 2),
                            RangedAttackBonus = miscRangedAttack + (int)((stats.Agility - 10) / 2),
                            MeleeAttackSpeed = miscMeleeSpeed + (int)((stats.Strength - 10) / 2),
                            Accuracy = miscAccuracy + (int)((stats.Agility - 10) / 2),
                            SpellBonus = miscSpell + (int)((stats.Intelligence - 10) / 2),
                            HealthBonus = miscHealth + (int)((stats.Stamina - 10) / 2),
                        }
                    };

                    info = new PlayerInfo()
                    {
                        Health = 100,
                        Psi = 100,
                        Level = 1,
                        Experience = 0,
                        State = PlayerState.Default,
                        skill1 = Systems.SkillType.Enslave,
                        skill2 = Systems.SkillType.Fear,
                        skill3 = Systems.SkillType.Sacrifice,
                        skill4 = Systems.SkillType.PsionicSpear,
                        skill5 = Systems.SkillType.Taint,
                        skill6 = Systems.SkillType.Rot,
                        skill7 = Systems.SkillType.Push,
                        skill8 = Systems.SkillType.Lightning,
                        skill9 = Systems.SkillType.Malice,
                    };
                    game.PlayerInfoComponent[entityID] = info;

                    skillInfo = new PlayerSkillInfo()
                    {
                        Skill1Rank = 1,
                        Skill2Rank = 1,
                        Skill3Rank = 1,
                        Skill4Rank = 1,
                        Skill5Rank = 1,
                        Skill6Rank = 1,
                        Skill7Rank = 1,
                        Skill8Rank = 1,
                        Skill9Rank = 1,
                    };
                    game.PlayerSkillInfoComponent[entityID] = skillInfo;

                    active_Skill = new ActiveSkill()
                    {
                        activeSkill = info.skill8,
                    };
                    game.ActiveSkillComponent[entityID] = active_Skill;
                    game.PlayerComponent[entityID] = player;
                    //Create HUD
                    game.HUDSystem.LoadPlayerHUD(player);
                    //create Inv
                    invagg.CreateInv(player);

                    break;
                #endregion

                #region Cyborg
                /****************************************
                * Cyborg - Added by adam Clark
                * *************************************/
                case Aggregate.CyborgPlayer:
                    entityID = Entity.NextEntity();
                    spriteSheet = game.Content.Load<Texture2D>("Spritesheets/Aggregate/cyborg");
                    spriteSheet.Name = "Spritesheets/Aggregate/cyborg";

                    /*Author: Josh Zavala, Assignment 9
                     *This has been transferred from ContinueNewGameScreen.goToNetworking
                     *Allows default weapons assignment per class
                     */
                    /*Update:Joseph Shaw, Assignment 9
                     *Set the weapon type here and use it in the create weapon so that it
                     *can be saved into the gameSave after the switch statement.
                     *We could abstract this method entirely but leaving it here gives more flexibility.
                     */
                    weaponType = WeaponType.ShockRod;
                    equipment = new Equipment()
                    {
                        EntityID = entityID,
                        WeaponID = game.WeaponFactory.CreateWeapon(weaponType),
                        HealthPotsQty = defaultHealthPotQty,
                        PsiPotsQty = defaultPsiPotQty,
                        PogsQty = 0,
                    };
                    game.EquipmentComponent.Add(equipment.EntityID, equipment);

                    position = new Position()
                    {
                        EntityID = entityID,
                        Center = new Vector2(400, 150),
                        Radius = 32f,
                    };
                    game.PositionComponent[entityID] = position;

                    collideable = new Collideable()
                    {
                        EntityID = entityID,
                        RoomID = position.RoomID,
                        Bounds = new CircleBounds(position.Center, position.Radius)
                    };
                    game.CollisionComponent[entityID] = collideable;

                    movement = new Movement()
                    {
                        EntityID = entityID,
                        Direction = new Vector2(0, 1),
                        Speed = 200f,
                    };
                    game.MovementComponent[entityID] = movement;

                    spriteAnimation = new SpriteAnimation()
                    {
                        EntityID = entityID,
                        FramesPerSecond = 10,
                        IsLooping = true,
                        IsPlaying = true,
                        TimePassed = 0f,
                        CurrentFrame = 0,
                        CurrentAnimationRow = 0

                    };

                    game.SpriteAnimationComponent[entityID] = spriteAnimation;

                    sprite = new Sprite()
                    {
                        EntityID = entityID,
                        SpriteBounds = new Rectangle(0, 0, 64, 64),
                        SpriteSheet = spriteSheet
                    };
                    game.SpriteComponent[entityID] = sprite;

                    local = new Local()
                    {
                        EntityID = entityID,
                    };
                    game.LocalComponent[entityID] = local;

                    //This will add a stats section for the player in the stats component
                    stats = new Stats()
                    {
                        EntityID = entityID,

                        //So here we just define our base values. Total sum is 50
                        //The base stats are 10 across the board
                        Strength = 13,
                        Stamina = 12,
                        Agility = 13,
                        Intelligence = 0,
                        Defense = 12,
                        HealthBase = 100,
                        PsiBase = 100,
                    };
                    game.StatsComponent[entityID] = stats;

                    player = new Player()
                    {
                        EntityID = entityID,
                        PlayerIndex = playerIndex,
                        PlayerRace = aggregate,

                    };

                    info = new PlayerInfo()
                    {
                        Health = 100,
                        Psi = 100,
                        Level = 1,
                        Experience = 0,
                        State = PlayerState.Default,
                        skill1= Systems.SkillType.EnergyShield,
                        skill2 = Systems.SkillType.Defibrillate,
                        skill3 = Systems.SkillType.Nanobots,
                        skill4 = Systems.SkillType.TargettingUpgrade,
                        skill5 = Systems.SkillType.RepulsorArm,
                        skill6 = Systems.SkillType.EnergyShield,
                        skill7= Systems.SkillType.AlloyBody,
                        skill8 = Systems.SkillType.CyberneticSlam,
                        skill9= Systems.SkillType.ThrusterRush,
                    };
                    game.PlayerInfoComponent[entityID] = info;

                    skillInfo = new PlayerSkillInfo()
                    {
                        Skill1Rank = 1,
                        Skill2Rank = 1,
                        Skill3Rank = 1,
                        Skill4Rank = 1,
                        Skill5Rank = 1,
                        Skill6Rank = 1,
                        Skill7Rank = 1,
                        Skill8Rank = 1,
                        Skill9Rank = 1,
                    };
                    game.PlayerSkillInfoComponent[entityID] = skillInfo;

                    active_Skill = new ActiveSkill()
                    {
                        activeSkill = info.skill1,
                    };
                    game.ActiveSkillComponent[entityID] = active_Skill;

                    game.PlayerComponent[entityID] = player;
                    //create HUD
                    game.HUDSystem.LoadPlayerHUD(player);
                    //create Inv
                    invagg.CreateInv(player);
                    break;
                #endregion

                #region Earthian
                /*******************************************************************************
                * Earthian
                * Done by Andrew Bellinder. I added the character's sprite and his skill sprites
                * ******************************************************************************/
                case Aggregate.EarthianPlayer:
                    entityID = Entity.NextEntity();
                    spriteSheet = game.Content.Load<Texture2D>("Spritesheets/Aggregate/Earthian2x");
                    spriteSheet.Name = "Spritesheets/Aggregate/Earthian2x";

                    /*Author: Josh Zavala, Assignment 9
                     *This has been transferred from ContinueNewGameScreen.goToNetworking
                     *Allows default weapons assignment per class
                     */
                    /*Update:Joseph Shaw, Assignment 9
                     *Set the weapon type here and use it in the create weapon so that it
                     *can be saved into the gameSave after the switch statement.
                     *We could abstract this method entirely but leaving it here gives more flexibility.
                     */
                    weaponType = WeaponType.TreeBranch;
                    equipment = new Equipment()
                    {
                        EntityID = entityID,
                        WeaponID = game.WeaponFactory.CreateWeapon(weaponType),
                        HealthPotsQty = defaultHealthPotQty,
                        PsiPotsQty = defaultPsiPotQty,
                        PogsQty = 0,
                    };
                    game.EquipmentComponent.Add(equipment.EntityID, equipment);

                    position = new Position()
                    {
                        EntityID = entityID,
                        Center = new Vector2(400, 150),
                        Radius = 32f,
                    };
                    game.PositionComponent[entityID] = position;

                    collideable = new Collideable()
                    {
                        EntityID = entityID,
                        RoomID = position.RoomID,
                        Bounds = new CircleBounds(position.Center, position.Radius)
                    };
                    game.CollisionComponent[entityID] = collideable;

                    movement = new Movement()
                    {
                        EntityID = entityID,
                        Direction = new Vector2(0, 1),
                        Speed = 200f,
                    };
                    game.MovementComponent[entityID] = movement;

                    spriteAnimation = new SpriteAnimation()
                    {
                        EntityID = entityID,
                        FramesPerSecond = 10,
                        IsLooping = true,
                        IsPlaying = true,
                        TimePassed = 0f,
                        CurrentFrame = 0,
                        CurrentAnimationRow = 0

                    };

                    game.SpriteAnimationComponent[entityID] = spriteAnimation;

                    sprite = new Sprite()
                    {
                        EntityID = entityID,
                        SpriteBounds = new Rectangle(0, 0, 64, 64),
                        SpriteSheet = spriteSheet
                    };
                    game.SpriteComponent[entityID] = sprite;
                    local = new Local()
                    {
                        EntityID = entityID,
                    };
                    game.LocalComponent[entityID] = local;

                    //This will add a stats section for the player in the stats component
                    stats = new Stats()
                    {
                        EntityID = entityID,

                        //So here we just define our base values. Total sum is 50
                        //The base stats are 10 across the board
                        Strength = 10,
                        Stamina = 10,
                        Agility = 10,
                        Intelligence = 10,
                        Defense = 10,
                        HealthBase = 100,
                        PsiBase = 100,
                    };
                    game.StatsComponent[entityID] = stats;

                    player = new Player()
                    {
                        EntityID = entityID,
                        PlayerIndex = playerIndex,
                        PlayerRace = aggregate,
                        abilityModifiers = new AbilityModifiers()
                        {
                            meleeDamageReduction = miscMeleeDef + (int)((stats.Defense - 10) / 2),
                            rangedDamageReduction = miscRangedDef + (int)((stats.Defense - 10) / 2),
                            meleeAttackBonus = miscMeleeAttack + (int)((stats.Strength - 10) / 2),
                            RangedAttackBonus = miscRangedAttack + (int)((stats.Agility - 10) / 2),
                            MeleeAttackSpeed = miscMeleeSpeed + (int)((stats.Strength - 10) / 2),
                            Accuracy = miscAccuracy + (int)((stats.Agility - 10) / 2),
                            SpellBonus = miscSpell + (int)((stats.Intelligence - 10) / 2),
                            HealthBonus = miscHealth + (int)((stats.Stamina - 10) / 2),
                        }

                    };
                    game.PlayerComponent[entityID] = player;

                    info = new PlayerInfo()
                    {
                        Health = 100,
                        Psi = 100,
                        Level = 1,
                        Experience = 0,
                        State = PlayerState.Default,
                        skill1 = Systems.SkillType.Trap,
                        skill2 = Systems.SkillType.ExplodingDroids,
                        skill3 = Systems.SkillType.Turret,
                        skill4 = Systems.SkillType.HealingStation,
                        skill5 = Systems.SkillType.PortableShop,
                        skill6 = Systems.SkillType.PortableShield,
                        skill7 = Systems.SkillType.Charge,
                        skill8 = Systems.SkillType.FallBack,
                        skill9 = Systems.SkillType.Motivate,

                    };
                    game.PlayerInfoComponent[entityID] = info;

                    skillInfo = new PlayerSkillInfo()
                    {
                        Skill1Rank = 1,
                        Skill2Rank = 1,
                        Skill3Rank = 1,
                        Skill4Rank = 1,
                        Skill5Rank = 1,
                        Skill6Rank = 1,
                        Skill7Rank = 1,
                        Skill8Rank = 1,
                        Skill9Rank = 1,
                    };
                    game.PlayerSkillInfoComponent[entityID] = skillInfo;

                    active_Skill = new ActiveSkill()
                    {
                        activeSkill = info.skill1,
                    };
                    game.ActiveSkillComponent[entityID] = active_Skill;

                    //Create HUD
                    game.HUDSystem.LoadPlayerHUD(player);
                    //create Inv
                    invagg.CreateInv(player);
                    break;
                #endregion

                #region Gargranian
                /****************************************
                * Gargranian by Michael Fountain
                * *************************************/
                case Aggregate.GargranianPlayer:
                    entityID = Entity.NextEntity();
                    spriteSheet = game.Content.Load<Texture2D>("Spritesheets/Aggregate/gargranian");
                    spriteSheet.Name = "Spritesheets/Aggregate/gargranian";

                    /*Author: Josh Zavala, Assignment 9
                     *This has been transferred from ContinueNewGameScreen.goToNetworking
                     *Allows default weapons assignment per class
                     */
                    /*Update:Joseph Shaw, Assignment 9
                     *Set the weapon type here and use it in the create weapon so that it
                     *can be saved into the gameSave after the switch statement.
                     *We could abstract this method entirely but leaving it here gives more flexibility.
                     */
                    weaponType = WeaponType.PsychicStun;
                    equipment = new Equipment()
                    {
                        EntityID = entityID,
                        WeaponID = game.WeaponFactory.CreateWeapon(weaponType),
                        HealthPotsQty = defaultHealthPotQty,
                        PsiPotsQty = defaultPsiPotQty,
                        PogsQty = 0,
                    };
                    game.EquipmentComponent.Add(equipment.EntityID, equipment);

                    position = new Position()
                    {
                        EntityID = entityID,
                        Center = new Vector2(400, 150),
                        Radius = 32f,
                    };
                    game.PositionComponent[entityID] = position;

                    collideable = new Collideable()
                    {
                        EntityID = entityID,
                        RoomID = position.RoomID,
                        Bounds = new CircleBounds(position.Center, position.Radius)
                    };
                    game.CollisionComponent[entityID] = collideable;

                    movement = new Movement()
                    {
                        EntityID = entityID,
                        Direction = new Vector2(0, 1),
                        Speed = 200f,
                    };
                    game.MovementComponent[entityID] = movement;

                    spriteAnimation = new SpriteAnimation()
                    {
                        EntityID = entityID,
                        FramesPerSecond = 10,
                        IsLooping = true,
                        IsPlaying = true,
                        TimePassed = 0f,
                        CurrentFrame = 0,
                        CurrentAnimationRow = 0

                    };

                    game.SpriteAnimationComponent[entityID] = spriteAnimation;

                    sprite = new Sprite()
                    {
                        EntityID = entityID,
                        SpriteBounds = new Rectangle(0, 0, 64, 64),
                        SpriteSheet = spriteSheet,
                        //SpriteColor = new Color(45, 45, 45, 0),
                        //UseDifferentColor = true
                    };
                    game.SpriteComponent[entityID] = sprite;
                    local = new Local()
                    {
                        EntityID = entityID,
                    };
                    game.LocalComponent[entityID] = local;

                    //This will add a stats section for the player in the stats component
                    stats = new Stats()
                    {
                        EntityID = entityID,

                        //So here we just define our base values. Total sum is 50
                        //The base stats are 10 across the board
                        Strength = 4,
                        Stamina = 10,
                        Agility = 10,
                        Intelligence = 14,
                        Defense = 12,
                        HealthBase = 100,
                        PsiBase = 100,
                    };
                    game.StatsComponent[entityID] = stats;

                    player = new Player()
                    {
                        EntityID = entityID,
                        PlayerIndex = playerIndex,
                        PlayerRace = aggregate,
                    };

                    game.PlayerComponent[entityID] = player;

                    info = new PlayerInfo()
                    {
                        Health = 100,
                        Psi = 100,
                        Level = 1,
                        Experience = 0,
                        State = PlayerState.Default,
                        skill1 = Systems.SkillType.MindLock,
                        skill2 = Systems.SkillType.Invisibility,
                        skill3 = Systems.SkillType.Possess,
                        skill4 = Systems.SkillType.PsionicSpear,
                        skill5 = Systems.SkillType.Push,
                        skill6 = Systems.SkillType.Detinate,
                        skill7 = Systems.SkillType.MentalBarrier,
                        skill8 = Systems.SkillType.WormOfGargran,
                        skill9 = Systems.SkillType.Soothe,
                    };
                    game.PlayerInfoComponent[entityID] = info;
                    skillInfo = new PlayerSkillInfo()
                    {
                        Skill1Rank = 1,
                        Skill2Rank = 1,
                        Skill3Rank = 1,
                        Skill4Rank = 1,
                        Skill5Rank = 1,
                        Skill6Rank = 1,
                        Skill7Rank = 1,
                        Skill8Rank = 1,
                        Skill9Rank = 1,
                    };
                    game.PlayerSkillInfoComponent[entityID] = skillInfo;

                    active_Skill = new ActiveSkill()
                    {
                        activeSkill = info.skill1,
                    };
                    game.ActiveSkillComponent[entityID] = active_Skill;

                    //Create HUD
                    game.HUDSystem.LoadPlayerHUD(player);
                    //create Inv
                    invagg.CreateInv(player);
                    break;
                #endregion

                #region Space Pirate
                /****************************************
                * Space Pirate
                * Done by Austin Murphy and I also have posted the 9 sprites for my skills that are listed in the design document.
                * *************************************/
                case Aggregate.SpacePiratePlayer:
                    entityID = Entity.NextEntity();
                    spriteSheet = game.Content.Load<Texture2D>("Spritesheets/Aggregate/SpacePBig");
                    spriteSheet.Name = "Spritesheets/Aggregate/SpacePBig";

                    /*Author: Josh Zavala, Assignment 9
                     *This has been transferred from ContinueNewGameScreen.goToNetworking
                     *Allows default weapons assignment per class
                     */
                    /*Update:Joseph Shaw, Assignment 9
                     *Set the weapon type here and use it in the create weapon so that it
                     *can be saved into the gameSave after the switch statement.
                     *We could abstract this method entirely but leaving it here gives more flexibility.
                     */
                    weaponType = WeaponType.StolenCutlass;
                    equipment = new Equipment()
                    {
                        EntityID = entityID,
                        WeaponID = game.WeaponFactory.CreateWeapon(weaponType),
                        HealthPotsQty = defaultHealthPotQty,
                        PsiPotsQty = defaultPsiPotQty,
                        PogsQty = 0,
                    };
                    game.EquipmentComponent.Add(equipment.EntityID, equipment);

                    position = new Position()
                    {
                        EntityID = entityID,
                        Center = new Vector2(400, 150),
                        Radius = 32f,
                    };
                    game.PositionComponent[entityID] = position;

                    collideable = new Collideable()
                    {
                        EntityID = entityID,
                        RoomID = position.RoomID,
                        Bounds = new CircleBounds(position.Center, position.Radius)
                    };
                    game.CollisionComponent[entityID] = collideable;

                    movement = new Movement()
                    {
                        EntityID = entityID,
                        Direction = new Vector2(0, 1),
                        Speed = 200f,
                    };
                    game.MovementComponent[entityID] = movement;

                    spriteAnimation = new SpriteAnimation()
                    {
                        EntityID = entityID,
                        FramesPerSecond = 10,
                        IsLooping = true,
                        IsPlaying = true,
                        TimePassed = 0f,
                        CurrentFrame = 0,
                        CurrentAnimationRow = 0

                    };

                    game.SpriteAnimationComponent[entityID] = spriteAnimation;

                    sprite = new Sprite()
                    {
                        EntityID = entityID,
                        SpriteBounds = new Rectangle(0, 0, 64, 64),
                        SpriteSheet = spriteSheet
                    };
                    game.SpriteComponent[entityID] = sprite;
                    local = new Local()
                    {
                        EntityID = entityID,
                    };
                    game.LocalComponent[entityID] = local;

                    //This will add a stats section for the player in the stats component
                    stats = new Stats()
                    {
                        EntityID = entityID,

                        //So here we just define our base values. Total sum is 50
                        //The base stats are 10 across the board
                        Strength = 5,
                        Stamina = 5,
                        Agility = 25,
                        Intelligence = 5,
                        Defense = 5,
                        HealthBase = 100,
                        PsiBase = 100,
                    };
                    game.StatsComponent[entityID] = stats;

                    player = new Player()
                    {
                        EntityID = entityID,
                        PlayerIndex = playerIndex,
                        PlayerRace = aggregate,
                    };
                    game.PlayerComponent[entityID] = player;

                    info = new PlayerInfo()
                    {
                        Health = 100,
                        Psi = 100,
                        Level = 1,
                        Experience = 0,
                        State = PlayerState.Default,
                        skill1 = Systems.SkillType.AgilityBerserker,
                        skill2 = Systems.SkillType.DualWielding,
                        skill3 = Systems.SkillType.HeavyDrinker,
                        skill4 = Systems.SkillType.PowerShot,
                        skill5 = Systems.SkillType.EagleShot,
                        skill6 = Systems.SkillType.TrickShot,
                        skill7 = Systems.SkillType.Mug,
                        skill8 = Systems.SkillType.LockPicking,
                        skill9 = Systems.SkillType.Theft,
                    };
                    game.PlayerInfoComponent[entityID] = info;

                    skillInfo = new PlayerSkillInfo()
                    {
                        Skill1Rank = 1,
                        Skill2Rank = 1,
                        Skill3Rank = 1,
                        Skill4Rank = 1,
                        Skill5Rank = 1,
                        Skill6Rank = 1,
                        Skill7Rank = 1,
                        Skill8Rank = 1,
                        Skill9Rank = 1,
                    };
                    game.PlayerSkillInfoComponent[entityID] = skillInfo;

                    active_Skill = new ActiveSkill()
                    {
                        activeSkill = info.skill1,
                    };
                    game.ActiveSkillComponent[entityID] = active_Skill;

                    //Create HUD
                    game.HUDSystem.LoadPlayerHUD(player);
                    //create Inv
                    invagg.CreateInv(player);
                    break;
                #endregion

                #region Zombie
                /****************************************
                * Zombie
                 * written by Matthew Hart
                * *************************************/
                case Aggregate.ZombiePlayer:
                    entityID = Entity.NextEntity();
                    spriteSheet = game.Content.Load<Texture2D>("Spritesheets/Aggregate/MzombieBx2");
                    spriteSheet.Name = "Spritesheets/Aggregate/MzombieBx2";

                    /*Author: Josh Zavala, Assignment 9
                     *This has been transferred from ContinueNewGameScreen.goToNetworking
                     *Allows default weapons assignment per class
                     */
                    /*Update:Joseph Shaw, Assignment 9
                     *Set the weapon type here and use it in the create weapon so that it
                     *can be saved into the gameSave after the switch statement.
                     *We could abstract this method entirely but leaving it here gives more flexibility.
                     */
                    weaponType = WeaponType.DeadHand;
                    equipment = new Equipment()
                    {
                        EntityID = entityID,
                        WeaponID = game.WeaponFactory.CreateWeapon(weaponType),
                        HealthPotsQty = defaultHealthPotQty,
                        PsiPotsQty = defaultPsiPotQty,
                        PogsQty = 0,
                    };
                    game.EquipmentComponent.Add(equipment.EntityID, equipment);

                    //Placeholder values
                    miscMeleeAttack = 5;
                    miscMeleeDef = 5;
                    miscRangedDef = -5;

                    position = new Position()
                    {
                        EntityID = entityID,
                        Center = new Vector2(400, 150),
                        Radius = 32f,
                    };

                    game.PositionComponent[entityID] = position;

                    collideable = new Collideable()
                    {
                        EntityID = entityID,
                        RoomID = position.RoomID,
                        Bounds = new CircleBounds(position.Center, position.Radius)
                    };
                    game.CollisionComponent[entityID] = collideable;

                    movement = new Movement()
                    {
                        EntityID = entityID,
                        Direction = new Vector2(0, 1),
                        Speed = 200f,
                    };
                    game.MovementComponent[entityID] = movement;

                    spriteAnimation = new SpriteAnimation()
                    {
                        EntityID = entityID,
                        FramesPerSecond = 10,
                        IsLooping = true,
                        IsPlaying = true,
                        TimePassed = 0f,
                        CurrentFrame = 0,
                        CurrentAnimationRow = 0

                    };

                    game.SpriteAnimationComponent[entityID] = spriteAnimation;

                    sprite = new Sprite()
                    {
                        EntityID = entityID,
                        SpriteBounds = new Rectangle(0, 0, 64, 64),
                        SpriteSheet = spriteSheet
                    };
                    game.SpriteComponent[entityID] = sprite;
                    local = new Local()
                    {
                        EntityID = entityID,
                    };
                    game.LocalComponent[entityID] = local;

                    //This will add a stats section for the player in the stats component
                    stats = new Stats()
                    {
                        EntityID = entityID,

                        //So here we just define our base values. Total sum is 50
                        //The base stats are 10 across the board
                        Strength = 16,
                        Stamina = 5,
                        Agility = 5,
                        Intelligence = 10,
                        Defense = 14,
                        HealthBase = 100,
                        PsiBase = 100,
                    };
                    game.StatsComponent[entityID] = stats;

                    player = new Player()
                    {
                        EntityID = entityID,
                        PlayerIndex = playerIndex,
                        PlayerRace = aggregate,
                        abilityModifiers = new AbilityModifiers()
                        {
                            meleeDamageReduction = miscMeleeDef + (int)((stats.Defense - 10) / 2),
                            rangedDamageReduction = miscRangedDef + (int)((stats.Defense - 10) / 2),
                            meleeAttackBonus = miscMeleeAttack + (int)((stats.Strength - 10) / 2),
                            RangedAttackBonus = miscRangedAttack + (int)((stats.Agility - 10) / 2),
                            MeleeAttackSpeed = miscMeleeSpeed + (int)((stats.Strength - 10) / 2),
                            Accuracy = miscAccuracy + (int)((stats.Agility - 10) / 2),
                            SpellBonus = miscSpell + (int)((stats.Intelligence - 10) / 2),
                            HealthBonus = miscHealth + (int)((stats.Stamina - 10) / 2),
                        }
                    };

                    game.PlayerComponent[entityID] = player;
                    info = new PlayerInfo()
                    {
                        Health = 100,
                        Psi = 100,
                        State = PlayerState.Default,
                        skill1 = Systems.SkillType.ThrownBlades,
                        skill2 = Systems.SkillType.FrenziedAttack,
                        skill3 = Systems.SkillType.CausticWeapons,
                        skill4 = Systems.SkillType.MeatShield,
                        skill5 = Systems.SkillType.HardenedBody,
                        skill6 = Systems.SkillType.Regeneration,
                        skill7 = Systems.SkillType.BenignParasite,
                        skill8 = Systems.SkillType.MaliciousParasite,
                        skill9 = Systems.SkillType.MindlessParasites,
                    };
                    game.PlayerInfoComponent[entityID] = info;

                    skillInfo = new PlayerSkillInfo()
                    {
                        Skill1Rank = 1,
                        Skill2Rank = 1,
                        Skill3Rank = 1,
                        Skill4Rank = 1,
                        Skill5Rank = 1,
                        Skill6Rank = 1,
                        Skill7Rank = 1,
                        Skill8Rank = 1,
                        Skill9Rank = 1,
                    };
                    game.PlayerSkillInfoComponent[entityID] = skillInfo;

                    active_Skill = new ActiveSkill()
                    {
                        activeSkill = info.skill1,
                    };
                    game.ActiveSkillComponent[entityID] = active_Skill;

                    //Create HUD
                    game.HUDSystem.LoadPlayerHUD(player);
                    //create Inv
                    invagg.CreateInv(player);
                    break;
                #endregion

                default:
                    throw new Exception("Unknown type.");
            }

            // Store all of the data into the game save
            gameSave.aggregate = (int)aggregate;
            gameSave.health = 100;
            gameSave.psi = 100;
            gameSave.stats = stats;
            gameSave.level = 1;
            gameSave.experience = 0;
            gameSave.charAnimation = spriteSheet.Name;
            gameSave.fileName = fileName;
            info.FileName = fileName;
            gameSave.weaponType = (int)weaponType;
            gameSave.healthPotions = defaultHealthPotQty;
            gameSave.manaPotions = defaultPsiPotQty;
            gameSave.pogs = 0;

            game.QuestLogSystem.ActivateQuest(entityID, 0);
            game.QuestLogSystem.ActivateQuest(entityID, 1);

            return entityID;
        }