예제 #1
0
 private void UpdateCharacter()
 {
     if (IGM_Junction != null)
     {
         GFs g = Contents[CURSOR_SELECT];
         var i = (IGMDataItem.Box)((IGMData_GF_Group)IGM_Junction.Data[SectionName.TopMenu_GF_Group]).ITEM[2, 0];
         i.Data = JunctionedGFs.Count > 0 && JunctionedGFs.ContainsKey(g) ? Memory.Strings.GetName(JunctionedGFs[g]) : null;
     }
 }
예제 #2
0
 private void addGF(ref int pos, GFs g, Font.ColorID color = Font.ColorID.White)
 {
     ITEM[pos, 0]  = new IGMDataItem.Text(Memory.Strings.GetName(g), SIZE[pos], color);
     ITEM[pos, 1]  = JunctionedGFs.ContainsKey(g) ? new IGMDataItem.Icon(Icons.ID.JunctionSYM, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 100, SIZE[pos].Y, 0, 0)) : null;
     ITEM[pos, 2]  = new IGMDataItem.Integer(Source.GFs[g].Level, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 50, SIZE[pos].Y, 0, 0), spaces: 3);
     BLANKS[pos]   = false;
     Contents[pos] = g;
     pos++;
 }
예제 #3
0
 public override void Refresh()
 {
     Source        = Memory.State;
     JunctionedGFs = Source.JunctionedGFs();
     UnlockedGFs   = Source.UnlockedGFs();
     if (Damageable != null && Damageable.GetCharacterData(out Saves.CharacterData c))
     {
         int pos  = 0;
         int skip = Page * Rows;
         foreach (GFs g in UnlockedGFs.Where(g => !JunctionedGFs.ContainsKey(g)))
         {
             if (pos >= Rows)
             {
                 break;
             }
             if (skip-- <= 0)
             {
                 addGF(ref pos, g);
             }
         }
         foreach (GFs g in UnlockedGFs.Where(g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] == c.ID))
         {
             if (pos >= Rows)
             {
                 break;
             }
             if (skip-- <= 0)
             {
                 addGF(ref pos, g, Font.ColorID.Grey);
             }
         }
         foreach (GFs g in UnlockedGFs.Where(g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] != c.ID))
         {
             if (pos >= Rows)
             {
                 break;
             }
             if (skip-- <= 0)
             {
                 addGF(ref pos, g, Font.ColorID.Dark_Gray);
             }
         }
         for (; pos < Rows; pos++)
         {
             ITEM[pos, 0] = null;
             ITEM[pos, 1] = null;
             ITEM[pos, 2] = null;
             BLANKS[pos]  = true;
         }
         base.Refresh();
         UpdateTitle();
         UpdateCharacter();
     }
 }
예제 #4
0
                public override void ReInit()
                {
                    Source        = Memory.State;
                    JunctionedGFs = Source.JunctionedGFs();
                    UnlockedGFs   = Source.UnlockedGFs();

                    int pos  = 0;
                    int skip = Page * rows;

                    foreach (GFs g in UnlockedGFs.Where(g => !JunctionedGFs.ContainsKey(g)))
                    {
                        if (pos >= rows)
                        {
                            break;
                        }
                        if (skip-- <= 0)
                        {
                            addGF(ref pos, g);
                        }
                    }
                    foreach (GFs g in UnlockedGFs.Where(g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] == Character))
                    {
                        if (pos >= rows)
                        {
                            break;
                        }
                        if (skip-- <= 0)
                        {
                            addGF(ref pos, g, Font.ColorID.Grey);
                        }
                    }
                    foreach (GFs g in UnlockedGFs.Where(g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] != Character))
                    {
                        if (pos >= rows)
                        {
                            break;
                        }
                        if (skip-- <= 0)
                        {
                            addGF(ref pos, g, Font.ColorID.Dark_Gray);
                        }
                    }
                    for (; pos < rows; pos++)
                    {
                        ITEM[pos, 0] = null;
                        ITEM[pos, 1] = null;
                        ITEM[pos, 2] = null;
                        BLANKS[pos]  = true;
                    }
                    base.ReInit();
                    UpdateTitle();
                    UpdateCharacter();
                }
예제 #5
0
파일: GF.cs 프로젝트: stantoxt/OpenVIII
 private void ShowChild(int pos, GFs g = GFs.Blank)
 {
     BLANKS[pos] = false;
     ITEM[pos, 0].Show();
     if (JunctionedGFs?.ContainsKey(g) ?? false)
     {
         ITEM[pos, 1].Show();
     }
     else
     {
         ITEM[pos, 1].Hide();
     }
     ITEM[pos, 2].Show();
 }
예제 #6
0
파일: GF.cs 프로젝트: stantoxt/OpenVIII
 public override void Refresh()
 {
     if (Memory.State == null)
     {
         return;
     }
     Source        = Memory.State;
     JunctionedGFs = Source.JunctionedGFs();
     UnlockedGFs   = Source.UnlockedGFs;
     ((IGMDataItem.Icon)ITEM[Rows, 2]).Data = Battle ? Icons.ID.HP : Icons.ID.Size_16x08_Lv_;
     if (Damageable != null)
     {
         var pos  = 0;
         var skip = Page * Rows;
         if (Damageable.GetCharacterData(out var c))
         {
             if (Battle)
             {
                 AddGFs(ref pos, ref skip, g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] == c.ID && !Source[g].IsDead);
                 AddGFs(ref pos, ref skip, g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] != c.ID && Source[g].IsDead, Font.ColorID.Red, true);
             }
             else
             {
                 AddGFs(ref pos, ref skip, g => !JunctionedGFs.ContainsKey(g));
                 AddGFs(ref pos, ref skip, g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] == c.ID, Font.ColorID.Grey);
                 AddGFs(ref pos, ref skip, g => JunctionedGFs.ContainsKey(g) && JunctionedGFs[g] != c.ID, Font.ColorID.Dark_Grey);
                 UpdateCharacter();
             }
         }
         else if (Damageable.GetEnemy(out var e))
         {
             var gfs = e.JunctionedGFs;
             foreach (var g in gfs)
             {
                 if (!AddGF(ref pos, ref skip, g, Source[g].IsDead ? Font.ColorID.Red : Font.ColorID.White, Source[g].IsDead))
                 {
                     break;
                 }
             }
         }
         for (; pos < Rows; pos++)
         {
             HideChild(pos);
         }
     }
     base.Refresh();
     UpdateTitle();
 }
예제 #7
0
파일: GF.cs 프로젝트: stantoxt/OpenVIII
        public override bool Inputs_OKAY()
        {
            if (Battle)
            {
                base.Inputs_OKAY();
                Damageable.SetSummon(Contents[CURSOR_SELECT]);
                Hide();
                return(true);
            }
            else
            {
                skipsnd = true;
                AV.Sound.Play(31);
                base.Inputs_OKAY();
                var select      = Contents[CURSOR_SELECT];
                var characterID = Damageable.GetCharacterData(out var characterData) && JunctionedGFs.ContainsKey(select) ?
                                  JunctionedGFs[select] : characterData?.ID ?? Characters.Blank;

                if (characterID == Characters.Blank)
                {
                    return(false);
                }
                if (characterData != null && characterID == characterData.ID)
                {
                    //Purge everything that you can't have anymore. Because the GF provided for you.
                    var a = (characterData).UnlockedGFAbilities;
                    characterData.RemoveJunctionedGF(select);
                    var b = (characterData).UnlockedGFAbilities;
                    foreach (var r in a.Except(b).Where(v => !Memory.KernelBin.JunctionAbilities.ContainsKey(v)))
                    {
                        if (Memory.KernelBin.CommandAbilities.ContainsKey(r))
                        {
                            characterData.Commands.Remove(r);
                            characterData.Commands.Add(Abilities.None);
                        }
                        else if (Memory.KernelBin.EquippableAbilities.ContainsKey(r))
                        {
                            characterData.Abilities.Remove(r);
                            characterData.Abilities.Add(Abilities.None);
                        }
                    }

                    foreach (var r in a.Except(b).Where(v => Memory.KernelBin.JunctionAbilities.ContainsKey(v)))
                    {
                        if (Kernel.KernelBin.Stat2Ability.Any(item => item.Value == r))
                        {
                            switch (r)
                            {
                            case Abilities.StAtkJ:
                                characterData.StatJ[Stat.StAtk] = 0;
                                break;

                            case Abilities.ElAtkJ:
                                characterData.StatJ[Stat.ElAtk] = 0;
                                break;

                            case Abilities.ElDefJ:
                            case Abilities.ElDefJ2:
                            case Abilities.ElDefJ4:
                                byte count = 0;
                                if (b.Contains(Abilities.ElDefJ4))
                                {
                                    count = 4;
                                }
                                else if (b.Contains(Abilities.ElDefJ2))
                                {
                                    count = 2;
                                }
                                else if (b.Contains(Abilities.ElDefJ))
                                {
                                    count = 1;
                                }
                                for (; count < 4; count++)
                                {
                                    characterData.StatJ[Stat.ElDef1 + count] = 0;
                                }
                                break;

                            case Abilities.StDefJ:
                            case Abilities.StDefJ2:
                            case Abilities.StDefJ4:
                                count = 0;
                                if (b.Contains(Abilities.StDefJ4))
                                {
                                    count = 4;
                                }
                                else if (b.Contains(Abilities.StDefJ2))
                                {
                                    count = 2;
                                }
                                else if (b.Contains(Abilities.StDefJ))
                                {
                                    count = 1;
                                }
                                for (; count < 4; count++)
                                {
                                    characterData.StatJ[Stat.StDef1 + count] = 0;
                                }
                                break;

                            case Abilities.Ability3:
                            case Abilities.Ability4:
                                count = 2;
                                if (b.Contains(Abilities.Ability4))
                                {
                                    count = 4;
                                }
                                else if (b.Contains(Abilities.Ability3))
                                {
                                    count = 3;
                                }
                                for (; count < characterData.Abilities.Count; count++)
                                {
                                    characterData.Abilities[count] = Abilities.None;
                                }
                                break;

                            case Abilities.None:
                                break;

                            case Abilities.HPJ:
                                break;

                            case Abilities.StrJ:
                                break;

                            case Abilities.VitJ:
                                break;

                            case Abilities.MagJ:
                                break;

                            case Abilities.SprJ:
                                break;

                            case Abilities.SpdJ:
                                break;

                            case Abilities.EvaJ:
                                break;

                            case Abilities.HitJ:
                                break;

                            case Abilities.LuckJ:
                                break;

                            case Abilities.Magic:
                                break;

                            case Abilities.GF:
                                break;

                            case Abilities.Draw:
                                break;

                            case Abilities.Item:
                                break;

                            case Abilities.Empty:
                                break;

                            case Abilities.Card:
                                break;

                            case Abilities.Doom:
                                break;

                            case Abilities.MadRush:
                                break;

                            case Abilities.Treatment:
                                break;

                            case Abilities.Defend:
                                break;

                            case Abilities.Darkside:
                                break;

                            case Abilities.Recover:
                                break;

                            case Abilities.Absorb:
                                break;

                            case Abilities.Revive:
                                break;

                            case Abilities.LvDown:
                                break;

                            case Abilities.LvUp:
                                break;

                            case Abilities.Kamikaze:
                                break;

                            case Abilities.Devour:
                                break;

                            case Abilities.MiniMog:
                                break;

                            case Abilities.HP20:
                                break;

                            case Abilities.HP40:
                                break;

                            case Abilities.HP80:
                                break;

                            case Abilities.Str20:
                                break;

                            case Abilities.Str40:
                                break;

                            case Abilities.Str60:
                                break;

                            case Abilities.Vit20:
                                break;

                            case Abilities.Vit40:
                                break;

                            case Abilities.Vit60:
                                break;

                            case Abilities.Mag20:
                                break;

                            case Abilities.Mag40:
                                break;

                            case Abilities.Mag60:
                                break;

                            case Abilities.Spr20:
                                break;

                            case Abilities.Spr40:
                                break;

                            case Abilities.Spr60:
                                break;

                            case Abilities.Spd20:
                                break;

                            case Abilities.Spd40:
                                break;

                            case Abilities.Eva30:
                                break;

                            case Abilities.Luck50:
                                break;

                            case Abilities.Mug:
                                break;

                            case Abilities.MedData:
                                break;

                            case Abilities.Counter:
                                break;

                            case Abilities.ReturnDamage:
                                break;

                            case Abilities.Cover:
                                break;

                            case Abilities.Initiative:
                                break;

                            case Abilities.MoveHPUp:
                                break;

                            case Abilities.HPBonus:
                                break;

                            case Abilities.StrBonus:
                                break;

                            case Abilities.VitBonus:
                                break;

                            case Abilities.MagBonus:
                                break;

                            case Abilities.SprBonus:
                                break;

                            case Abilities.AutoProtect:
                                break;

                            case Abilities.AutoShell:
                                break;

                            case Abilities.AutoReflect:
                                break;

                            case Abilities.AutoHaste:
                                break;

                            case Abilities.AutoPotion:
                                break;

                            case Abilities.Expend2:
                                break;

                            case Abilities.Expend3:
                                break;

                            case Abilities.Ribbon:
                                break;

                            case Abilities.Alert:
                                break;

                            case Abilities.MoveFind:
                                break;

                            case Abilities.EncHalf:
                                break;

                            case Abilities.EncNone:
                                break;

                            case Abilities.RareItem:
                                break;

                            case Abilities.SumMag10:
                                break;

                            case Abilities.SumMag20:
                                break;

                            case Abilities.SumMag30:
                                break;

                            case Abilities.SumMag40:
                                break;

                            case Abilities.GFHP10:
                                break;

                            case Abilities.GFHP20:
                                break;

                            case Abilities.GFHP30:
                                break;

                            case Abilities.GFHP40:
                                break;

                            case Abilities.Boost:
                                break;

                            case Abilities.Haggle:
                                break;

                            case Abilities.SellHigh:
                                break;

                            case Abilities.Familiar:
                                break;

                            case Abilities.CallShop:
                                break;

                            case Abilities.JunkShop:
                                break;

                            case Abilities.ThunderMagRF:
                                break;

                            case Abilities.IceMagRF:
                                break;

                            case Abilities.FireMagRF:
                                break;

                            case Abilities.LifeMagRF:
                                break;

                            case Abilities.TimeMagRF:
                                break;

                            case Abilities.StatusMagRF:
                                break;

                            case Abilities.SuptMagRF:
                                break;

                            case Abilities.ForbidMagRF:
                                break;

                            case Abilities.RecoveryMedRF:
                                break;

                            case Abilities.StatusMedRF:
                                break;

                            case Abilities.AmmoRF:
                                break;

                            case Abilities.ToolRF:
                                break;

                            case Abilities.ForbidMedRF:
                                break;

                            case Abilities.GFRecoveryMedRF:
                                break;

                            case Abilities.GFAblMedRF:
                                break;

                            case Abilities.MidMagRF:
                                break;

                            case Abilities.HighMagRF:
                                break;

                            case Abilities.MedLvUp:
                                break;

                            case Abilities.CardMod:
                                break;

                            default:
                                characterData.StatJ[
                                    Kernel.KernelBin.Stat2Ability.FirstOrDefault(x => x.Value == r).Key] = 0;
                                break;
                            }
                        }
                    }

                    Menu.Junction.Refresh();
                    return(true);
                }
            }
            return(false);
        }
예제 #8
0
            public override bool Inputs_OKAY()
            {
                skipsnd = true;
                init_debugger_Audio.PlaySound(31);
                base.Inputs_OKAY();
                GFs        select = Contents[CURSOR_SELECT];
                Characters c      = Damageable.GetCharacterData(out Saves.CharacterData c1) && JunctionedGFs.ContainsKey(select) ? JunctionedGFs[select] : c1?.ID ?? Characters.Blank;

                if (c != Characters.Blank)
                {
                    if (c != c1.ID)
                    {
                        //show error msg
                    }
                    else
                    {
                        //Purge everything that you can't have anymore. Because the GF provided for you.
                        List <Kernel_bin.Abilities> a = (Source.Characters[c]).UnlockedGFAbilities;
                        Source.Characters[c].JunctionnedGFs ^= Saves.ConvertGFEnum.FirstOrDefault(x => x.Value == select).Key;
                        List <Kernel_bin.Abilities> b = (Source.Characters[c]).UnlockedGFAbilities;
                        foreach (Kernel_bin.Abilities r in a.Except(b).Where(v => !Kernel_bin.Junctionabilities.ContainsKey(v)))
                        {
                            if (Kernel_bin.Commandabilities.ContainsKey(r))
                            {
                                Source.Characters[c].Commands.Remove(r);
                                Source.Characters[c].Commands.Add(Kernel_bin.Abilities.None);
                            }
                            else if (Kernel_bin.EquipableAbilities.ContainsKey(r))
                            {
                                Source.Characters[c].Abilities.Remove(r);
                                Source.Characters[c].Abilities.Add(Kernel_bin.Abilities.None);
                            }
                        }
                        foreach (Kernel_bin.Abilities r in a.Except(b).Where(v => Kernel_bin.Junctionabilities.ContainsKey(v)))
                        {
                            if (Kernel_bin.Stat2Ability.Any(item => item.Value == r))
                            {
                                switch (r)
                                {
                                case Kernel_bin.Abilities.ST_Atk_J:
                                    Source.Characters[c].Stat_J[Kernel_bin.Stat.ST_Atk] = 0;
                                    break;

                                case Kernel_bin.Abilities.EL_Atk_J:
                                    Source.Characters[c].Stat_J[Kernel_bin.Stat.EL_Atk] = 0;
                                    break;

                                case Kernel_bin.Abilities.EL_Def_Jx1:
                                case Kernel_bin.Abilities.EL_Def_Jx2:
                                case Kernel_bin.Abilities.EL_Def_Jx4:
                                    byte count = 0;
                                    if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx4))
                                    {
                                        count = 4;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx2))
                                    {
                                        count = 2;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx1))
                                    {
                                        count = 1;
                                    }
                                    for (; count < 4; count++)
                                    {
                                        Source.Characters[c].Stat_J[Kernel_bin.Stat.EL_Def_1 + count] = 0;
                                    }
                                    break;

                                case Kernel_bin.Abilities.ST_Def_Jx1:
                                case Kernel_bin.Abilities.ST_Def_Jx2:
                                case Kernel_bin.Abilities.ST_Def_Jx4:
                                    count = 0;
                                    if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx4))
                                    {
                                        count = 4;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx2))
                                    {
                                        count = 2;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx1))
                                    {
                                        count = 1;
                                    }
                                    for (; count < 4; count++)
                                    {
                                        Source.Characters[c].Stat_J[Kernel_bin.Stat.ST_Def_1 + count] = 0;
                                    }
                                    break;

                                case Kernel_bin.Abilities.Abilityx3:
                                case Kernel_bin.Abilities.Abilityx4:
                                    count = 2;
                                    if (b.Contains(Kernel_bin.Abilities.Abilityx4))
                                    {
                                        count = 4;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.Abilityx3))
                                    {
                                        count = 3;
                                    }
                                    for (; count < Source.Characters[c].Abilities.Count; count++)
                                    {
                                        Source.Characters[c].Abilities[count] = Kernel_bin.Abilities.None;
                                    }
                                    break;

                                default:
                                    Source.Characters[c].Stat_J[Kernel_bin.Stat2Ability.FirstOrDefault(x => x.Value == r).Key] = 0;
                                    break;
                                }
                            }
                        }
                        IGM_Junction.Refresh();
                        return(true);
                    }
                }
                return(false);
            }
예제 #9
0
파일: GF.cs 프로젝트: hollow87/OpenVIII
        public override bool Inputs_OKAY()
        {
            if (Battle)
            {
                base.Inputs_OKAY();
                Damageable.SetSummon(Contents[CURSOR_SELECT]);
                Hide();
                return(true);
            }
            else
            {
                skipsnd = true;
                AV.Sound.Play(31);
                base.Inputs_OKAY();
                GFs        select      = Contents[CURSOR_SELECT];
                Characters characterid = Damageable.GetCharacterData(out Saves.CharacterData characterdata) && JunctionedGFs.ContainsKey(select) ?
                                         JunctionedGFs[select] : characterdata?.ID ?? Characters.Blank;

                if (characterid != Characters.Blank)
                {
                    if (characterid != characterdata.ID)
                    {
                        //show error msg
                    }
                    else
                    {
                        //Purge everything that you can't have anymore. Because the GF provided for you.
                        List <Kernel_bin.Abilities> a = (characterdata).UnlockedGFAbilities;
                        characterdata.RemoveJunctionedGF(select);
                        List <Kernel_bin.Abilities> b = (characterdata).UnlockedGFAbilities;
                        foreach (Kernel_bin.Abilities r in a.Except(b).Where(v => !Kernel_bin.Junctionabilities.ContainsKey(v)))
                        {
                            if (Kernel_bin.Commandabilities.ContainsKey(r))
                            {
                                characterdata.Commands.Remove(r);
                                characterdata.Commands.Add(Kernel_bin.Abilities.None);
                            }
                            else if (Kernel_bin.EquipableAbilities.ContainsKey(r))
                            {
                                characterdata.Abilities.Remove(r);
                                characterdata.Abilities.Add(Kernel_bin.Abilities.None);
                            }
                        }
                        foreach (Kernel_bin.Abilities r in a.Except(b).Where(v => Kernel_bin.Junctionabilities.ContainsKey(v)))
                        {
                            if (Kernel_bin.Stat2Ability.Any(item => item.Value == r))
                            {
                                switch (r)
                                {
                                case Kernel_bin.Abilities.ST_Atk_J:
                                    characterdata.Stat_J[Kernel_bin.Stat.ST_Atk] = 0;
                                    break;

                                case Kernel_bin.Abilities.EL_Atk_J:
                                    characterdata.Stat_J[Kernel_bin.Stat.EL_Atk] = 0;
                                    break;

                                case Kernel_bin.Abilities.EL_Def_Jx1:
                                case Kernel_bin.Abilities.EL_Def_Jx2:
                                case Kernel_bin.Abilities.EL_Def_Jx4:
                                    byte count = 0;
                                    if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx4))
                                    {
                                        count = 4;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx2))
                                    {
                                        count = 2;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx1))
                                    {
                                        count = 1;
                                    }
                                    for (; count < 4; count++)
                                    {
                                        characterdata.Stat_J[Kernel_bin.Stat.EL_Def_1 + count] = 0;
                                    }
                                    break;

                                case Kernel_bin.Abilities.ST_Def_Jx1:
                                case Kernel_bin.Abilities.ST_Def_Jx2:
                                case Kernel_bin.Abilities.ST_Def_Jx4:
                                    count = 0;
                                    if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx4))
                                    {
                                        count = 4;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx2))
                                    {
                                        count = 2;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx1))
                                    {
                                        count = 1;
                                    }
                                    for (; count < 4; count++)
                                    {
                                        characterdata.Stat_J[Kernel_bin.Stat.ST_Def_1 + count] = 0;
                                    }
                                    break;

                                case Kernel_bin.Abilities.Abilityx3:
                                case Kernel_bin.Abilities.Abilityx4:
                                    count = 2;
                                    if (b.Contains(Kernel_bin.Abilities.Abilityx4))
                                    {
                                        count = 4;
                                    }
                                    else if (b.Contains(Kernel_bin.Abilities.Abilityx3))
                                    {
                                        count = 3;
                                    }
                                    for (; count < characterdata.Abilities.Count; count++)
                                    {
                                        characterdata.Abilities[count] = Kernel_bin.Abilities.None;
                                    }
                                    break;

                                default:
                                    characterdata.Stat_J[Kernel_bin.Stat2Ability.FirstOrDefault(x => x.Value == r).Key] = 0;
                                    break;
                                }
                            }
                        }
                        Menu.IGM_Junction.Refresh();
                        return(true);
                    }
                }
            }
            return(false);
        }