Пример #1
0
 public UnitConsumablePart(string SkillPath, Dictionary <string, BaseSkillRequirement> DicRequirement, Dictionary <string, BaseEffect> DicEffect,
                           Dictionary <string, AutomaticSkillTargetType> DicAutomaticSkillTarget, Dictionary <string, ManualSkillTarget> DicManualSkillTarget)
     : base()
 {
     PartType = PartTypes.Consumable;
     Spirit   = new ManualSkill(SkillPath, DicRequirement, DicEffect, DicAutomaticSkillTarget, DicManualSkillTarget);
 }
        /// <summary>
        /// Load a Skill at selected path.
        /// </summary>
        /// <param name="SkillPath">Path from which to open the Skill.</param>
        private void LoadSkill(string SkillPath)
        {
            ManualSkill ActiveSkill = new ManualSkill(SkillPath, DicRequirement, DicEffect);

            txtRange.Text       = ActiveSkill.Range.ToString();
            txtDescription.Text = ActiveSkill.Description;

            if (ActiveSkill.Target.TargetType == rbAffectSelf.Text)
            {
                rbAffectSelf.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectSelfSquad.Text)
            {
                rbAffectSelfSquad.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectAlly.Text)
            {
                rbAffectAlly.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectAllySquad.Text)
            {
                rbAffectAllySquad.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectEnemy.Text)
            {
                rbAffectEnemy.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectEnemySquad.Text)
            {
                rbAffectEnemySquad.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectAllAllies.Text)
            {
                rbAffectAllAllies.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectAllEnemies.Text)
            {
                rbAffectAllEnemies.Checked = true;
            }
            else if (ActiveSkill.Target.TargetType == rbAffectEveryone.Text)
            {
                rbAffectEveryone.Checked = true;
            }

            for (int i = 0; i < ActiveSkill.ListEffect.Count; i++)
            {
                ListViewItem NewListViewItem = new ListViewItem(ActiveSkill.ListEffect[i].EffectTypeName);
                NewListViewItem.Tag = ActiveSkill.ListEffect[i];
                lvEffects.Items.Add(NewListViewItem);
            }
        }
Пример #3
0
        public override void Update(GameTime gameTime)
        {
            if (InputHelper.InputConfirmPressed() && ListUnitPart.Count > 0)
            {
                ManualSkill ActiveSpirit = ListUnitPart[CursorIndex].Spirit;

                if (ActiveSpirit.Range > 0)
                {
                    Map.ComputeRange(ActiveSquad.Position, 0, ActiveSpirit.Range);
                }

                for (int U = 0; U < ActiveSquad.UnitsAliveInSquad; U++)
                {
                    for (int C = 0; C < ActiveSquad[U].ArrayCharacterActive.Length; C++)
                    {
                        Map.GlobalDeathmatchContext.SetContext(ActiveSquad, ActiveSquad[U], ActiveSquad[U].ArrayCharacterActive[C], null, null, null, Map.ActiveParser);

                        ManualSkill SpiritToActivate = ActiveSpirit;

                        //Consume SP and activate skills.
                        SpiritToActivate.ActiveSkillFromMenu(ActiveSquad[U].ArrayCharacterActive[C], ActiveSquad);
                        //Update skills activation to disable those who can't be used anymore.
                        SpiritToActivate.UpdateSkillActivation();
                    }
                }

                for (int P = 0; P < Map.ListPlayer.Count; ++P)
                {
                    for (int S = 0; S < Map.ListPlayer[P].ListSquad.Count; ++S)
                    {
                        for (int U = 0; U < Map.ListPlayer[P].ListSquad[S].UnitsAliveInSquad; ++U)
                        {
                            Map.ActivateAutomaticSkills(Map.ListPlayer[P].ListSquad[S], Map.ListPlayer[P].ListSquad[S][U], string.Empty, Map.ListPlayer[P].ListSquad[S], Map.ListPlayer[P].ListSquad[S][U]);
                        }
                    }
                }

                Map.GlobalDeathmatchContext.SetContext(null, null, null, null, null, null, Map.ActiveParser);

                Map.sndConfirm.Play();
            }
            else if (InputHelper.InputCancelPressed())
            {
                Map.CursorPosition        = ActiveSquad.Position;
                Map.CursorPositionVisible = Map.CursorPosition;

                Map.sndCancel.Play();

                RemoveScreen(this);
            }

            #region Move the Spirit Menu cursor

            else if (InputHelper.InputUpPressed())
            {//Move Spirit cursor down.
                if (CursorIndex - 1 >= 0)
                {
                    CursorIndex--;

                    Map.sndSelection.Play();
                }
            }
            else if (InputHelper.InputDownPressed())
            {//Move Spirit cursor up.
                if (CursorIndex + 1 < ListUnitPart.Count)
                {
                    CursorIndex++;

                    Map.sndSelection.Play();
                }
            }

            #endregion
        }
Пример #4
0
        public void DrawPilot(CustomSpriteBatch g)
        {
            Unit ActiveUnit = ActiveSquad.CurrentLeader;

            g.Draw(sprPixel, new Rectangle(20, 56, 84, 84), Color.Gray);
            g.Draw(sprPixel, new Rectangle(22, 58, 80, 80), Color.White);
            g.Draw(ActiveSquad.CurrentLeader.Pilot.sprPortrait, new Vector2(22, 58), Color.White);

            g.DrawString(fntFinlanderFont, ActiveUnit.PilotName, new Vector2(110, 50), Color.White);
            g.Draw(sprPixel, new Rectangle(110, 75, (int)fntFinlanderFont.MeasureString(ActiveUnit.PilotName).X, 1), Color.FromNonPremultiplied(173, 216, 230, 190));

            g.DrawString(fntFinlanderFont, "Lvl", new Vector2(110, 80), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotLevel.ToString(), new Vector2(240, 80), Color.White);

            g.DrawString(fntFinlanderFont, "SP", new Vector2(110, 110), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotSP.ToString(), new Vector2(240, 110), Color.White);

            g.DrawString(fntFinlanderFont, "NEXT", new Vector2(260, 80), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotNextEXP.ToString(), new Vector2(390, 80), Color.White);

            g.DrawString(fntFinlanderFont, "Will", new Vector2(260, 110), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotMorale.ToString(), new Vector2(390, 110), Color.White);

            g.DrawString(fntFinlanderFont, "Kills", new Vector2(410, 80), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotKills.ToString(), new Vector2(540, 80), Color.White);

            g.DrawString(fntFinlanderFont, "PP", new Vector2(410, 110), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotPilotPoints.ToString(), new Vector2(540, 110), Color.White);

            g.Draw(sprPixel, new Rectangle(110, 105, 440, 1), Color.FromNonPremultiplied(173, 216, 230, 190));
            g.Draw(sprPixel, new Rectangle(110, 135, 440, 1), Color.FromNonPremultiplied(173, 216, 230, 190));

            DrawBox(g, new Vector2(20, 160), 180, 40, Color.Gray);
            DrawBox(g, new Vector2(20, 200), 180, 180, Color.White);
            g.DrawString(fntFinlanderFont, "Skills", new Vector2(70, 165), Color.Yellow);
            for (int S = 0; S < 6; S++)
            {
                if (S < ActiveSquad.CurrentLeader.Pilot.ArrayPilotSkill.Length)
                {
                    g.DrawString(fntFinlanderFont, ActiveSquad.CurrentLeader.Pilot.ArrayPilotSkill[S].Name, new Vector2(30, 200 + S * 30), Color.White);
                }
                else
                {
                    g.DrawString(fntFinlanderFont, "---", new Vector2(30, 200 + S * 30), Color.White);
                }
            }

            DrawBox(g, new Vector2(200, 160), 180, 40, Color.Gray);
            DrawBox(g, new Vector2(200, 200), 180, 180, Color.White);
            g.DrawString(fntFinlanderFont, "Spirits", new Vector2(245, 165), Color.Yellow);
            for (int S = 0; S < 6; S++)
            {
                if (S < ActiveSquad.CurrentLeader.Pilot.ArrayPilotSpirit.Length)
                {
                    g.DrawString(fntFinlanderFont, ActiveSquad.CurrentLeader.Pilot.ArrayPilotSpirit[S].Name, new Vector2(210, 200 + S * 30), Color.White);
                    g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.Pilot.ArrayPilotSpirit[S].SPCost.ToString(), new Vector2(370, 200 + S * 30), Color.White);
                }
                else
                {
                    g.DrawString(fntFinlanderFont, "---", new Vector2(210, 200 + S * 30), Color.White);
                }
            }
            DrawBox(g, new Vector2(380, 160), 240, 40, Color.Gray);
            DrawBox(g, new Vector2(380, 200), 240, 120, Color.White);
            g.DrawString(fntFinlanderFont, "Stats", new Vector2(475, 165), Color.Yellow);
            g.DrawString(fntFinlanderFont, "MEL", new Vector2(390, 200), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotMEL.ToString(), new Vector2(490, 200), Color.White);
            g.DrawString(fntFinlanderFont, "SKL", new Vector2(390, 240), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotSKL.ToString(), new Vector2(490, 240), Color.White);
            g.DrawString(fntFinlanderFont, "EVA", new Vector2(390, 280), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotEVA.ToString(), new Vector2(490, 280), Color.White);
            g.DrawString(fntFinlanderFont, "RNG", new Vector2(500, 200), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotRNG.ToString(), new Vector2(605, 200), Color.White);
            g.DrawString(fntFinlanderFont, "DEF", new Vector2(500, 240), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotDEF.ToString(), new Vector2(605, 240), Color.White);
            g.DrawString(fntFinlanderFont, "HIT", new Vector2(500, 280), Color.Yellow);
            g.DrawStringRightAligned(fntFinlanderFont, ActiveSquad.CurrentLeader.PilotHIT.ToString(), new Vector2(605, 280), Color.White);

            DrawBox(g, new Vector2(380, 320), 240, 40, Color.Gray);
            DrawBox(g, new Vector2(380, 360), 240, 60, Color.White);
            g.DrawString(fntFinlanderFont, "Terrain", new Vector2(460, 325), Color.Yellow);
            g.Draw(sprSky, new Vector2(390, 380), Color.White);
            g.DrawString(fntFinlanderFont, ActiveUnit.Pilot.TerrainGrade.TerrainGradeAir.ToString(), new Vector2(420, 378), Color.White);
            g.Draw(sprLand, new Vector2(446, 380), Color.White);
            g.DrawString(fntFinlanderFont, ActiveUnit.Pilot.TerrainGrade.TerrainGradeLand.ToString(), new Vector2(476, 378), Color.White);
            g.Draw(sprSea, new Vector2(502, 380), Color.White);
            g.DrawString(fntFinlanderFont, ActiveUnit.Pilot.TerrainGrade.TerrainGradeSea.ToString(), new Vector2(532, 378), Color.White);
            g.Draw(sprSpace, new Vector2(558, 380), Color.White);
            g.DrawString(fntFinlanderFont, ActiveUnit.Pilot.TerrainGrade.TerrainGradeSpace.ToString(), new Vector2(588, 378), Color.White);

            DrawBox(g, new Vector2(20, 380), 360, 40, Color.Gray);
            DrawBox(g, new Vector2(20, 420), 360, 40, Color.White);
            g.DrawString(fntFinlanderFont, "Ace Bonus", new Vector2(30, 385), Color.Yellow);
            g.DrawString(fntFinlanderFont, "------------------", new Vector2(30, 425), Color.White);

            if (SecondaryMenuIndex == 1)
            {
                string Description = "";

                if (SelectedPilotSkillIndex >= 0)
                {
                    BaseAutomaticSkill ActivePilotSkill = ActiveSquad.CurrentLeader.Pilot.ArrayPilotSkill[SelectedPilotSkillIndex];
                    Description = ActivePilotSkill.Description;

                    g.Draw(sprPixel, new Rectangle(30, 200 + SelectedPilotSkillIndex * 30, 100, 30), Color.FromNonPremultiplied(255, 255, 255, 127));
                }
                else
                {
                    ManualSkill ActivePilotSpirit = ActiveSquad.CurrentLeader.Pilot.ArrayPilotSpirit[SelectedPilotSpiritIndex];
                    Description = ActivePilotSpirit.Description;
                    g.Draw(sprPixel, new Rectangle(210, 200 + SelectedPilotSpiritIndex * 30, 100, 30), Color.FromNonPremultiplied(255, 255, 255, 127));
                }

                if (string.IsNullOrEmpty(Description))
                {
                    Description = "No description available for this skill";
                }

                float MaxBoxWidth = Constants.Width * 0.75f;

                string Output = FitTextToWidth(fntFinlanderFont, Description, MaxBoxWidth);

                Vector2 BoxPosition = new Vector2((Constants.Width - MaxBoxWidth) / 2, (Constants.Height - (int)fntFinlanderFont.MeasureString(Output).Y - 20) / 2);
                DrawBox(g, new Vector2(BoxPosition.X - 10, BoxPosition.Y - 10), (int)MaxBoxWidth + 20, (int)fntFinlanderFont.MeasureString(Output).Y + 20, Color.White);
                g.DrawString(fntFinlanderFont, Output, BoxPosition, Color.White);
            }
        }
Пример #5
0
        public override void Update(GameTime gameTime)
        {
            #region Toggle Spirit

            //Add or remove the EN needed to the pilot.
            if (InputHelper.InputCommand1Pressed())
            {
                if (ActiveSpirit == null)
                {
                    return;
                }

                if (ActiveSpirit.CanActivate)
                {
                    if (PilotSpiritActivation[ActiveUnitIndex][PilotIndex].Contains(ActiveSpirit))//Deactivate Skill
                    {
                        ListSelectedSpirit.Remove(ActiveSpirit);
                        PilotSpiritActivation[ActiveUnitIndex][PilotIndex].Remove(ActiveSpirit);

                        Map.sndSelection.Play();
                    }
                    else if (GetPilotRemainingSP() - ActiveSpirit.SPCost >= 0)//Activate Skill
                    {
                        if (ListSelectedSpirit.Count == 0 || (!ActiveSpirit.Target.MustBeUsedAlone && !ListSelectedSpirit.Last().Target.MustBeUsedAlone))
                        {
                            ListSelectedSpirit.Add(ActiveSpirit);
                            PilotSpiritActivation[ActiveUnitIndex][PilotIndex].Add(ActiveSpirit);

                            Map.sndSelection.Play();
                        }
                    }
                    else
                    {
                        Map.sndDeny.Play();
                    }
                }
                else
                {
                    Map.sndDeny.Play();
                }
            }

            #endregion

            else if (InputHelper.InputConfirmPressed())
            {
                if (ActiveSpirit == null)
                {
                    return;
                }

                if (ListSelectedSpirit.Count == 0)
                {
                    if (ActiveSpirit.CanActivate && GetPilotRemainingSP() - ActiveSpirit.SPCost >= 0)
                    {
                        ListSelectedSpirit.Add(ActiveSpirit);
                        PilotSpiritActivation[ActiveUnitIndex][PilotIndex].Add(ActiveSpirit);
                    }
                    else
                    {
                        return;
                    }
                }

                if (ListSelectedSpirit[0].Range > 0)
                {
                    List <Vector3> ListMVChoice = Map.ComputeRange(ActiveSquad.Position, 0, ListSelectedSpirit[0].Range);
                    Map.ListLayer[Map.ActiveLayerIndex].LayerGrid.AddDrawablePoints(ListMVChoice, Color.FromNonPremultiplied(0, 128, 0, 190));
                }

                for (int U = 0; U < ActiveSquad.UnitsAliveInSquad; U++)
                {
                    for (int C = 0; C < ActiveSquad[U].ArrayCharacterActive.Length; C++)
                    {
                        for (int S = 0; S < PilotSpiritActivation[ActiveUnitIndex][PilotIndex].Count; ++S)
                        {
                            Map.GlobalDeathmatchContext.SetContext(ActiveSquad, ActiveSquad[U], ActiveSquad[U].ArrayCharacterActive[C], null, null, null);

                            ManualSkill SpiritToActivate = PilotSpiritActivation[ActiveUnitIndex][PilotIndex][S];

                            //Consume SP and activate skills.
                            SpiritToActivate.ActiveSkillFromMenu(ActiveSquad[U].ArrayCharacterActive[C], ActiveSquad);
                            //Update skills activation to disable those who can't be used anymore.
                            SpiritToActivate.UpdateSkillActivation();

                            ListSelectedSpirit.Remove(SpiritToActivate);
                            PilotSpiritActivation[ActiveUnitIndex][PilotIndex].Remove(SpiritToActivate);
                        }
                    }
                }

                for (int P = 0; P < Map.ListPlayer.Count; ++P)
                {
                    for (int S = 0; S < Map.ListPlayer[P].ListSquad.Count; ++S)
                    {
                        for (int U = 0; U < Map.ListPlayer[P].ListSquad[S].UnitsAliveInSquad; ++U)
                        {
                            Map.ActivateAutomaticSkills(Map.ListPlayer[P].ListSquad[S], Map.ListPlayer[P].ListSquad[S][U], string.Empty, Map.ListPlayer[P].ListSquad[S], Map.ListPlayer[P].ListSquad[S][U]);
                        }
                    }
                }

                Map.GlobalDeathmatchContext.SetContext(null, null, null, null, null, null);

                Map.sndConfirm.Play();
            }
            else if (InputHelper.InputCancelPressed())
            {
                Map.CursorPosition        = ActiveSquad.Position;
                Map.CursorPositionVisible = Map.CursorPosition;

                Map.sndCancel.Play();

                RemoveScreen(this);
            }

            #region Move the Spirit Menu cursor

            else if (InputHelper.InputUpPressed())
            {//Move Spirit cursor down.
                if (CursorIndex - 1 >= 0)
                {
                    CursorIndex--;

                    Map.sndSelection.Play();
                }
                //End of Spirit list, move to last pilot.
                else if (PilotIndex - 1 > 0)
                {
                    PilotIndex--;
                    Map.sndSelection.Play();
                }
            }
            else if (InputHelper.InputDownPressed())
            {//Move Spirit cursor up.
                if (CursorIndex + 1 < ActiveSquad[ActiveUnitIndex].ArrayCharacterActive[PilotIndex].ArrayPilotSpirit.Length)
                {
                    CursorIndex++;

                    Map.sndSelection.Play();
                }
                //End of Spirit list, move to next pilot.
                else if (PilotIndex + 1 < ActiveSquad[ActiveUnitIndex].ArrayCharacterActive.Length)
                {
                    PilotIndex++;
                    Map.sndSelection.Play();
                }
            }
            else if (InputHelper.InputRightPressed())
            {
                if (ActiveUnitIndex < ActiveSquad.UnitsAliveInSquad - 1)
                {
                    ActiveUnitIndex++;
                    PilotIndex  = 0;
                    CursorIndex = 0;
                }
            }
            else if (InputHelper.InputLeftPressed())
            {
                if (ActiveUnitIndex > 0)
                {
                    ActiveUnitIndex--;
                    PilotIndex  = 0;
                    CursorIndex = 0;
                }
            }

            #endregion
        }
Пример #6
0
        public Character(string CharacterPath, ContentManager Content, Dictionary <string, BaseSkillRequirement> DicRequirement, Dictionary <string, BaseEffect> DicEffect,
                         Dictionary <string, AutomaticSkillTargetType> DicAutomaticSkillTarget, Dictionary <string, ManualSkillTarget> DicManualSkillTarget)
            : this()
        {
            FileStream   FS = new FileStream("Content/Characters/" + CharacterPath + ".pec", FileMode.Open, FileAccess.Read);
            BinaryReader BR = new BinaryReader(FS, Encoding.UTF8);

            BR.BaseStream.Seek(0, SeekOrigin.Begin);

            //Init variables.
            Name         = BR.ReadString();
            PortraitPath = BR.ReadString();

            ArrayPortraitBustPath = new string[BR.ReadInt32()];
            for (int B = 0; B < ArrayPortraitBustPath.Length; ++B)
            {
                ArrayPortraitBustPath[B] = BR.ReadString();
            }

            ArrayPortraitBoxPath = new string[BR.ReadInt32()];
            for (int B = 0; B < ArrayPortraitBoxPath.Length; ++B)
            {
                ArrayPortraitBoxPath[B] = BR.ReadString();
            }

            Tags            = BR.ReadString();
            FullName        = CharacterPath;
            EXPValue        = BR.ReadInt32();
            CanPilot        = BR.ReadBoolean();
            BattleThemeName = BR.ReadString();
            string AceBonus        = BR.ReadString();
            string PersonalityName = BR.ReadString();
            string SlaveName       = BR.ReadString();

            Personality = new CharacterPersonality(PersonalityName);

            if (!string.IsNullOrWhiteSpace(SlaveName) && SlaveName != "None")
            {
                Slave = new Character(SlaveName, Content, DicRequirement, DicEffect, DicAutomaticSkillTarget, DicManualSkillTarget);
            }

            Int32 SpiritListCount = BR.ReadInt32();

            ArrayPilotSpirit = new ManualSkill[SpiritListCount];

            for (int S = 0; S < SpiritListCount; ++S)
            {
                ArrayPilotSpirit[S]                  = new ManualSkill("Content/Characters/Spirits/" + BR.ReadString() + ".pecs", DicRequirement, DicEffect, DicAutomaticSkillTarget, DicManualSkillTarget);
                ArrayPilotSpirit[S].SPCost           = BR.ReadInt32();
                ArrayPilotSpirit[S].LevelRequirement = BR.ReadInt32();
            }

            Int32 SkillListCount = BR.ReadInt32();

            ArrayPilotSkill       = new BaseAutomaticSkill[SkillListCount];
            ArrayPilotSkillLocked = new bool[SkillListCount];
            ArrayPilotSkillLevels = new SkillLevels[SkillListCount];

            for (int S = 0; S < SkillListCount; ++S)
            {
                string RelativePath = BR.ReadString();
                ArrayPilotSkill[S]       = new BaseAutomaticSkill("Content/Characters/Skills/" + RelativePath + ".pecs", RelativePath, DicRequirement, DicEffect, DicAutomaticSkillTarget);
                ArrayPilotSkillLocked[S] = BR.ReadBoolean();
                Int32 SkillLevelsCount = BR.ReadInt32();
                ArrayPilotSkillLevels[S] = new SkillLevels(BR, SkillLevelsCount);
            }

            Int32 RelationshipBonusCount = BR.ReadInt32();

            ArrayRelationshipBonus = new BaseAutomaticSkill[RelationshipBonusCount];

            for (int S = 0; S < RelationshipBonusCount; ++S)
            {
                string RelationshipBonusName = BR.ReadString();
                int    RelationshipLevel     = BR.ReadInt32();
                ArrayRelationshipBonus[S] = new BaseAutomaticSkill("Content/Characters/Relationships/" + RelationshipBonusName + ".pecr", RelationshipBonusName, DicRequirement, DicEffect, DicAutomaticSkillTarget);

                ArrayRelationshipBonus[S].CurrentLevel = RelationshipLevel;

                for (int L = 0; L < ArrayRelationshipBonus[S].ListSkillLevel.Count; ++L)
                {
                    BaseSkillRequirement NewSkillRequirement = BaseSkillRequirement.LoadCopy(BR, DicRequirement);
                    ArrayRelationshipBonus[S].ListSkillLevel[L].ListActivation[0].ListRequirement.Add(NewSkillRequirement);
                }
            }

            //If it's a pilot, read its stats.
            if (CanPilot)
            {
                MaxLevel        = BR.ReadInt32();
                ArrayLevelMEL   = new int[MaxLevel];
                ArrayLevelRNG   = new int[MaxLevel];
                ArrayLevelDEF   = new int[MaxLevel];
                ArrayLevelSKL   = new int[MaxLevel];
                ArrayLevelEVA   = new int[MaxLevel];
                ArrayLevelHIT   = new int[MaxLevel];
                ArrayLevelMaxSP = new int[MaxLevel];

                for (int L = 0; L < MaxLevel; ++L)
                {
                    ArrayLevelMEL[L]   = BR.ReadInt32();
                    ArrayLevelRNG[L]   = BR.ReadInt32();
                    ArrayLevelDEF[L]   = BR.ReadInt32();
                    ArrayLevelSKL[L]   = BR.ReadInt32();
                    ArrayLevelEVA[L]   = BR.ReadInt32();
                    ArrayLevelHIT[L]   = BR.ReadInt32();
                    ArrayLevelMaxSP[L] = BR.ReadInt32();
                }

                int TerrainGradeAir   = BR.ReadInt32();
                int TerrainGradeLand  = BR.ReadInt32();
                int TerrainGradeSea   = BR.ReadInt32();
                int TerrainGradeSpace = BR.ReadInt32();

                TerrainGrade = new TerrainGrades(TerrainGradeAir, TerrainGradeLand, TerrainGradeSea, TerrainGradeSpace);
            }

            int ListQuoteSetVersusNameCount = BR.ReadInt32();

            for (int Q = 0; Q < ListQuoteSetVersusNameCount; Q++)
            {
                ListQuoteSetVersusName.Add(BR.ReadString());
            }

            //Base quotes
            for (int I = 0; I < 6; I++)
            {
                ArrayBaseQuoteSet[I] = new QuoteSet();

                int ListQuoteCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteCount; Q++)
                {
                    ArrayBaseQuoteSet[I].ListQuote.Add(BR.ReadString());
                }

                //Versus quotes.
                int ListQuoteVersusCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteVersusCount; Q++)
                {
                    ArrayBaseQuoteSet[I].ListQuoteVersus.Add(BR.ReadString());
                }

                ArrayBaseQuoteSet[I].PortraitPath = BR.ReadString();
            }

            int DicAttackQuoteSetCount = BR.ReadInt32();

            for (int i = 0; i < DicAttackQuoteSetCount; i++)
            {
                QuoteSet NewQuoteSet = new QuoteSet();

                string QuoteSetName = BR.ReadString();

                int ListQuoteCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteCount; Q++)
                {
                    NewQuoteSet.ListQuote.Add(BR.ReadString());
                }

                int ListQuoteVersusCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteVersusCount; Q++)
                {
                    NewQuoteSet.ListQuoteVersus.Add(BR.ReadString());
                }

                NewQuoteSet.PortraitPath = BR.ReadString();

                DicAttackQuoteSet.Add(QuoteSetName, NewQuoteSet);
            }

            FS.Close();
            BR.Close();

            if (Content != null)
            {
                string SpritePath = Path.GetFileNameWithoutExtension(CharacterPath);
                if (!string.IsNullOrEmpty(PortraitPath))
                {
                    SpritePath = PortraitPath;
                }

                if (File.Exists("Content\\Visual Novels\\Portraits\\" + SpritePath + ".xnb"))
                {
                    this.sprPortrait = Content.Load <Texture2D>("Visual Novels\\Portraits\\" + SpritePath);
                }
                else
                {
                    this.sprPortrait = Content.Load <Texture2D>("Characters\\Portraits\\Default");
                }
            }
        }