public EventWork7b(SAV7b sav) : base(sav)
        {
            Offset = sav.GetBlockOffset(BelugaBlockIndex.EventWork);
            // Zone @ 0x21A0 - 0x21AF (128 flags)
            // System @ 0x21B0 - 0x21EF (512 flags) -- is this really 256 instead, with another 256 region after for the small vanish?
            // Vanish @ 0x21F0 - 0x22AF (1536 flags)
            // Event @ 0x22B0 - 0x23A7 (rest of the flags) (512) -- I think trainer flags are afterwards.... For now, this is a catch-all

            // time flags (39 used flags of 42) = 6 bytes 0x22F0-0x22F5
            // trainer flags (???) = 0x22F6 - end?
        }
Exemplo n.º 2
0
 public SaveBlockAccessor7b(SAV7b sav)
 {
     Zukan       = new Zukan7b(sav, GetBlockOffset(BelugaBlockIndex.Zukan), 0x550);
     Config      = new ConfigSave7b(sav, GetBlockOffset(BelugaBlockIndex.ConfigSave));
     Items       = new MyItem7b(sav, GetBlockOffset(BelugaBlockIndex.MyItem));
     Storage     = new PokeListHeader(sav, GetBlockOffset(BelugaBlockIndex.PokeListHeader));
     Status      = new MyStatus7b(sav, GetBlockOffset(BelugaBlockIndex.MyStatus));
     Played      = new PlayTime7b(sav, GetBlockOffset(BelugaBlockIndex.PlayTime));
     Misc        = new Misc7b(sav, GetBlockOffset(BelugaBlockIndex.Misc));
     EventWork   = new EventWork7b(sav, GetBlockOffset(BelugaBlockIndex.EventWork));
     GiftRecords = new WB7Records(sav, GetBlockOffset(BelugaBlockIndex.WB7Record));
 }
Exemplo n.º 3
0
 public PokeListHeader(SAV7b sav, int offset) : base(sav)
 {
     Offset       = offset;
     PokeListInfo = LoadPointerData();
     if (!sav.Exportable)
     {
         for (int i = 0; i < COUNT; i++)
         {
             PokeListInfo[i] = SLOT_EMPTY;
         }
     }
     PartyCount = PokeListInfo.Take(6).Count(z => z < MAX_SLOTS);
 }
Exemplo n.º 4
0
        public EventWork7b(SAV7b sav, int offset) : base(sav)
        {
            Offset = offset;
            // Zone @ 0x21A0 - 0x21AF (128 flags)
            // System @ 0x21B0 - 0x21EF (512 flags) -- is this really 256 instead, with another 256 region after for the small vanish?
            // Vanish @ 0x21F0 - 0x22AF (1536 flags)
            // Event @ 0x22B0 - 0x23A7 (rest of the flags) (512) -- I think trainer flags are afterwards.... For now, this is a catch-all

            // time flags (39 used flags of 42) = 6 bytes 0x22F0-0x22F5
            // trainer flags (???) = 0x22F6 - end?

            // Title flags @ 0x2498 - 0x24AB (160 flags): unlocked Master Trainer Titles (last 4 unused)
        }
        private static IEnumerable <ComboItem> GetFilteredSpecies(IGameValueLimit sav, GameDataSource source, bool HaX = false)
        {
            if (HaX)
            {
                return(source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID));
            }

            // Some games cannot acquire every Species that exists. Some can only acquire a subset.
            return(sav switch
            {
                SAV7b _ => source.SpeciesDataSource // LGPE: Kanto 151, Meltan/Melmetal
                .Where(s => s.Value <= (int)Core.Species.Mew || s.Value == (int)Core.Species.Meltan || s.Value == (int)Core.Species.Melmetal),
                _ => source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID)
            });
Exemplo n.º 6
0
        public PokeListHeader(SAV7b sav, int offset) : base(sav)
        {
            Offset = offset;
            var info = PokeListInfo = LoadPointerData();

            if (!sav.State.Exportable)
            {
                for (int i = 0; i < COUNT; i++)
                {
                    info[i] = SLOT_EMPTY;
                }
            }
            else
            {
                for (int i = 0; i < 6; i++)
                {
                    if (info[i] < MAX_SLOTS)
                    {
                        ++_partyCount;
                    }
                }
            }
        }
Exemplo n.º 7
0
 public Misc7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
Exemplo n.º 8
0
 public PlayTime7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
Exemplo n.º 9
0
        protected override int DexLangIDCount => 9;         // CHT, skipping langID 6 (unused)

        public Zukan7b(SAV7b sav, int dex, int langflag) : base(sav, dex, langflag)
        {
        }
Exemplo n.º 10
0
 public WB7Records(SAV7b sav, int offset) : base(sav) => Offset = offset;
Exemplo n.º 11
0
 public MyStatus7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
Exemplo n.º 12
0
 protected Zukan7(SAV7b sav, int dex, int langflag) : this(sav, dex, langflag, DexFormUtil.GetDexFormIndexGG)
 {
 }
Exemplo n.º 13
0
 public CaptureRecords(SAV7b sav, int offset) : base(sav) => Offset = offset;
Exemplo n.º 14
0
 public ConfigSave7b(SAV7b sav) : base(sav)
 {
     Offset = sav.GetBlockOffset(BelugaBlockIndex.ConfigSave);
 }
Exemplo n.º 15
0
        /* ===First 8 bits===
         * talkSpeed:2
         * battleAnim:1
         * battleStyle:1
         * language:4
         *
         * everything else: unknown
         */

        public ConfigSave7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
Exemplo n.º 16
0
        private const int Key      = 0x0B38; // 6

        public MyItem7b(SAV7b sav, int offset) : base(sav) => Offset = offset;