Exemplo n.º 1
0
        private static void LoadDataFromBytes(
            IList <byte> abilities, IList <byte> abilityEffects, IList <byte> itemAbilityEffects, IList <byte> reactionEffects, IList <byte> abilityAnimations,
            IList <byte> oldItems, IList <byte> oldItemAttributes,
            IList <byte> newItems, IList <byte> newItemAttributes,
            IList <byte> jobs, IList <byte> jobLevels,
            IList <byte> skillSets, IList <byte> monsterSkills,
            IList <byte> actionMenus,
            IList <byte> statusAttributes, IList <byte> inflictStatuses,
            IList <byte> poach,
            IList <byte> entd1, IList <byte> entd2, IList <byte> entd3, IList <byte> entd4, IList <byte> entd5,
            IList <byte> moveFind,
            IList <byte> inventories,
            IList <byte> propositions, bool brokenLevelBonuses)
        {
            try
            {
                bool psp               = Context == Context.US_PSP;
                var  Abilities         = new AllAbilities(abilities, abilityEffects, itemAbilityEffects, reactionEffects);
                var  AbilityAnimations = new AllAnimations(Context, abilityAnimations, psp ? PSPResources.Binaries.AbilityAnimations : PSXResources.Binaries.AbilityAnimations);
                var  Items             = new AllItems(oldItems, newItems != null ? newItems : null);
                var  ItemAttributes    = new AllItemAttributes(oldItemAttributes, newItemAttributes != null ? newItemAttributes : null);
                var  Jobs              = new AllJobs(Context, jobs);
                var  JobLevels         = new JobLevels(Context, jobLevels,
                                                       new JobLevels(Context, Context == Context.US_PSP ? PSPResources.Binaries.JobLevels : PSXResources.Binaries.JobLevels));
                var SkillSets = new AllSkillSets(Context, skillSets,
                                                 Context == Context.US_PSP ? PSPResources.Binaries.SkillSets : PSXResources.Binaries.SkillSets);
                var MonsterSkills      = new AllMonsterSkills(monsterSkills);
                var ActionMenus        = new AllActionMenus(actionMenus, Context);
                var StatusAttributes   = new AllStatusAttributes(statusAttributes);
                var InflictStatuses    = new AllInflictStatuses(inflictStatuses);
                var PoachProbabilities = new AllPoachProbabilities(poach);
                var ENTDs            = psp ? new AllENTDs(entd1, entd2, entd3, entd4, entd5) : new AllENTDs(entd1, entd2, entd3, entd4);
                var MoveFind         = new AllMoveFindItems(Context, moveFind, new AllMoveFindItems(Context, psp ? PSPResources.Binaries.MoveFind : PSXResources.Binaries.MoveFind));
                var StoreInventories = new AllStoreInventories(Context, inventories, psp ? PSPResources.Binaries.StoreInventories : PSXResources.Binaries.StoreInventories);
                var Propositions     = new AllPropositions(propositions, psp ? PSPResources.Binaries.Propositions : PSXResources.Binaries.Propositions, brokenLevelBonuses);
                FFTPatch.Propositions = Propositions;

                FFTPatch.Abilities         = Abilities;
                FFTPatch.AbilityAnimations = AbilityAnimations;
                FFTPatch.Items             = Items;
                FFTPatch.ItemAttributes    = ItemAttributes;
                FFTPatch.Jobs               = Jobs;
                FFTPatch.JobLevels          = JobLevels;
                FFTPatch.SkillSets          = SkillSets;
                FFTPatch.MonsterSkills      = MonsterSkills;
                FFTPatch.ActionMenus        = ActionMenus;
                FFTPatch.StatusAttributes   = StatusAttributes;
                FFTPatch.InflictStatuses    = InflictStatuses;
                FFTPatch.PoachProbabilities = PoachProbabilities;
                FFTPatch.ENTDs              = ENTDs;
                FFTPatch.MoveFind           = MoveFind;
                FFTPatch.StoreInventories   = StoreInventories;
            }
            catch (Exception)
            {
                throw new LoadPatchException();
            }
        }
Exemplo n.º 2
0
        public EventUnit(IList <byte> bytes, EventUnit defaults, PatcherLib.Datatypes.Context context)
        {
            List <Item> eventItems = Item.GetEventItems(context);

            Ability[] eventAbilities = AllAbilities.GetEventAbilities(context);

            SpriteSet = SpriteSet.GetSpriteSets(context)[bytes[0]];
            Default   = defaults;
            PatcherLib.Utilities.Utilities.CopyByteToBooleans(bytes[1], ref Male, ref Female, ref Monster, ref JoinAfterEvent, ref LoadFormation, ref ZodiacMonster, ref Blank2, ref SaveFormation);
            SpecialName          = SpecialName.GetSpecialNames(context)[bytes[2]];
            Level                = bytes[3];
            Month                = (Month)bytes[4];
            Day                  = bytes[5];
            Bravery              = bytes[6];
            Faith                = bytes[7];
            PrerequisiteJob      = (PreRequisiteJob)bytes[8];
            PrerequisiteJobLevel = bytes[9];
            Job                  = AllJobs.GetDummyJobs(context)[bytes[10]];
            SecondaryAction      = SkillSet.GetEventSkillSets(context)[bytes[11]];
            Reaction             = eventAbilities[PatcherLib.Utilities.Utilities.BytesToUShort(bytes[12], bytes[13])];
            Support              = eventAbilities[PatcherLib.Utilities.Utilities.BytesToUShort(bytes[14], bytes[15])];
            Movement             = eventAbilities[PatcherLib.Utilities.Utilities.BytesToUShort(bytes[16], bytes[17])];
            Head                 = eventItems[bytes[18]];
            Body                 = eventItems[bytes[19]];
            Accessory            = eventItems[bytes[20]];
            RightHand            = eventItems[bytes[21]];
            LeftHand             = eventItems[bytes[22]];
            Palette              = bytes[23];
            bool dummy = false;

            PatcherLib.Utilities.Utilities.CopyByteToBooleans(bytes[24], ref AlwaysPresent, ref RandomlyPresent, ref dummy, ref dummy, ref Control, ref Immortal, ref Blank6, ref Blank7);
            TeamColor       = (TeamColor)((bytes[24] & 0x30) >> 4);
            X               = bytes[25];
            Y               = bytes[26];
            FacingDirection = (Facing)(bytes[27] & 0x7F);
            UpperLevel      = (bytes[27] & 0x80) == 0x80;
            Experience      = bytes[28];
            SkillSet        = SkillSet.GetEventSkillSets(context)[bytes[29]];
            WarTrophy       = eventItems[bytes[30]];
            BonusMoney      = bytes[31];
            UnitID          = bytes[32];
            TargetX         = bytes[33];
            TargetY         = bytes[34];

            //Unknown8 = bytes[35];
            PatcherLib.Utilities.Utilities.CopyByteToBooleans(bytes[35], ref Blank8, ref FocusUnit, ref StayNearXY, ref Aggressive, ref Defensive, ref Blank9, ref Blank10, ref Blank11);

            Target    = bytes[36];
            Unknown10 = bytes[37];

            //Unknown11 = bytes[38];
            PatcherLib.Utilities.Utilities.CopyByteToBooleans(bytes[38], ref Blank12, ref Blank13, ref Blank14, ref Blank15, ref Blank16, ref SaveCT, ref Blank17, ref Blank18);

            Unknown12 = bytes[39];
        }
Exemplo n.º 3
0
        private static void BuildFromContext()
        {
            switch (Context)
            {
            case Context.US_PSP:
                Abilities         = new AllAbilities(PSPResources.Binaries.Abilities, PSPResources.Binaries.AbilityEffects, PSPResources.Binaries.ItemAbilityEffects, PSPResources.Binaries.ReactionAbilityEffects);
                AbilityAnimations = new AllAnimations(Context, PSPResources.Binaries.AbilityAnimations, PSPResources.Binaries.AbilityAnimations);
                Items             = new AllItems(
                    PSPResources.Binaries.OldItems,
                    PSPResources.Binaries.NewItems);
                ItemAttributes = new AllItemAttributes(
                    PSPResources.Binaries.OldItemAttributes,
                    PSPResources.Binaries.NewItemAttributes);
                Jobs      = new AllJobs(Context, PSPResources.Binaries.Jobs);
                JobLevels = new JobLevels(Context, PSPResources.Binaries.JobLevels,
                                          new JobLevels(Context, PSPResources.Binaries.JobLevels));
                SkillSets = new AllSkillSets(Context, PSPResources.Binaries.SkillSets,
                                             PSPResources.Binaries.SkillSets);
                MonsterSkills      = new AllMonsterSkills(PSPResources.Binaries.MonsterSkills);
                ActionMenus        = new AllActionMenus(PSPResources.Binaries.ActionEvents, Context);
                StatusAttributes   = new AllStatusAttributes(PSPResources.Binaries.StatusAttributes);
                InflictStatuses    = new AllInflictStatuses(PSPResources.Binaries.InflictStatuses);
                PoachProbabilities = new AllPoachProbabilities(PSPResources.Binaries.PoachProbabilities);
                ENTDs            = new AllENTDs(PSPResources.Binaries.ENTD1, PSPResources.Binaries.ENTD2, PSPResources.Binaries.ENTD3, PSPResources.Binaries.ENTD4, PSPResources.Binaries.ENTD5);
                MoveFind         = new AllMoveFindItems(Context, PSPResources.Binaries.MoveFind, new AllMoveFindItems(Context, PSPResources.Binaries.MoveFind));
                StoreInventories = new AllStoreInventories(Context, PSPResources.Binaries.StoreInventories, PSPResources.Binaries.StoreInventories);
                Propositions     = new AllPropositions(PSPResources.Binaries.Propositions, PSPResources.Binaries.Propositions, false);
                break;

            case Context.US_PSX:
                Abilities         = new AllAbilities(PSXResources.Binaries.Abilities, PSXResources.Binaries.AbilityEffects, PSXResources.Binaries.ItemAbilityEffects, PSXResources.Binaries.ReactionAbilityEffects);
                AbilityAnimations = new AllAnimations(Context, PSXResources.Binaries.AbilityAnimations, PSXResources.Binaries.AbilityAnimations);
                Items             = new AllItems(PSXResources.Binaries.OldItems, null);
                ItemAttributes    = new AllItemAttributes(PSXResources.Binaries.OldItemAttributes, null);
                Jobs      = new AllJobs(Context, PSXResources.Binaries.Jobs);
                JobLevels = new JobLevels(Context, PSXResources.Binaries.JobLevels,
                                          new JobLevels(Context, PSXResources.Binaries.JobLevels));
                SkillSets = new AllSkillSets(Context, PSXResources.Binaries.SkillSets,
                                             PSXResources.Binaries.SkillSets);
                MonsterSkills      = new AllMonsterSkills(PSXResources.Binaries.MonsterSkills);
                ActionMenus        = new AllActionMenus(PSXResources.Binaries.ActionEvents, Context);
                StatusAttributes   = new AllStatusAttributes(PSXResources.Binaries.StatusAttributes);
                InflictStatuses    = new AllInflictStatuses(PSXResources.Binaries.InflictStatuses);
                PoachProbabilities = new AllPoachProbabilities(PSXResources.Binaries.PoachProbabilities);
                ENTDs            = new AllENTDs(PSXResources.Binaries.ENTD1, PSXResources.Binaries.ENTD2, PSXResources.Binaries.ENTD3, PSXResources.Binaries.ENTD4);
                MoveFind         = new AllMoveFindItems(Context, PSXResources.Binaries.MoveFind, new AllMoveFindItems(Context, PSXResources.Binaries.MoveFind));
                StoreInventories = new AllStoreInventories(Context, PSXResources.Binaries.StoreInventories, PSXResources.Binaries.StoreInventories);
                Propositions     = new AllPropositions(PSXResources.Binaries.Propositions, PSXResources.Binaries.Propositions, false);
                break;

            default:
                throw new ArgumentException();
            }
        }
Exemplo n.º 4
0
 public void UpdateView( AllAbilities allAbilities )
 {
     if( ourContext != FFTPatch.Context )
     {
         ourContext = FFTPatch.Context;
         cbAbility = null;
     }
     abilitiesListBox.SelectedIndexChanged -= abilitiesListBox_SelectedIndexChanged;
     abilitiesListBox.DataSource = allAbilities.Abilities;
     abilitiesListBox.SelectedIndexChanged += abilitiesListBox_SelectedIndexChanged;
     abilitiesListBox.SelectedIndex = 0;
     abilityEditor.Ability = abilitiesListBox.SelectedItem as Ability;
 }
Exemplo n.º 5
0
        public MonsterSkill(byte value, string name, IList <byte> bytes, MonsterSkill defaults, Context context)
        {
            Ability[] dummyAbilities = AllAbilities.GetDummyAbilities(context);

            Default = defaults;
            Name    = name;
            Value   = value;
            bool[] flags = PatcherLib.Utilities.Utilities.BooleansFromByteMSB(bytes[0]);
            Ability1    = dummyAbilities[flags[0] ? (bytes[1] + 0x100) : bytes[1]];
            Ability2    = dummyAbilities[flags[1] ? (bytes[2] + 0x100) : bytes[2]];
            Ability3    = dummyAbilities[flags[2] ? (bytes[3] + 0x100) : bytes[3]];
            Beastmaster = dummyAbilities[flags[3] ? (bytes[4] + 0x100) : bytes[4]];
        }
Exemplo n.º 6
0
        public Job(Context context, byte value, string name, IList <byte> bytes, Job defaults)
        {
            Value      = value;
            Name       = name;
            ourContext = context;

            int equipEnd = context == Context.US_PSP ? 13 : 12;

            Ability[] dummyAbilities = AllAbilities.GetDummyAbilities(context);

            SkillSet        = context == Context.US_PSP ? SkillSet.PSPSkills[bytes[0]] : SkillSet.PSXSkills[bytes[0]];
            InnateA         = dummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort(bytes[1], bytes[2])];
            InnateB         = dummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort(bytes[3], bytes[4])];
            InnateC         = dummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort(bytes[5], bytes[6])];
            InnateD         = dummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort(bytes[7], bytes[8])];
            Equipment       = new Equipment(bytes.Sub(9, equipEnd), defaults == null ? null : defaults.Equipment, context);
            HPConstant      = bytes[equipEnd + 1];
            HPMultiplier    = bytes[equipEnd + 2];
            MPConstant      = bytes[equipEnd + 3];
            MPMultiplier    = bytes[equipEnd + 4];
            SpeedConstant   = bytes[equipEnd + 5];
            SpeedMultiplier = bytes[equipEnd + 6];
            PAConstant      = bytes[equipEnd + 7];
            PAMultiplier    = bytes[equipEnd + 8];
            MAConstant      = bytes[equipEnd + 9];
            MAMultiplier    = bytes[equipEnd + 10];
            Move            = bytes[equipEnd + 11];
            Jump            = bytes[equipEnd + 12];
            CEvade          = bytes[equipEnd + 13];
            PermanentStatus = new Statuses(bytes.Sub(equipEnd + 14, equipEnd + 18), defaults == null ? null : defaults.PermanentStatus);
            StatusImmunity  = new Statuses(bytes.Sub(equipEnd + 19, equipEnd + 23), defaults == null ? null : defaults.StatusImmunity);
            StartingStatus  = new Statuses(bytes.Sub(equipEnd + 24, equipEnd + 28), defaults == null ? null : defaults.StartingStatus);
            AbsorbElement   = new Elements(bytes[equipEnd + 29]);
            CancelElement   = new Elements(bytes[equipEnd + 30]);
            HalfElement     = new Elements(bytes[equipEnd + 31]);
            WeakElement     = new Elements(bytes[equipEnd + 32]);

            MPortrait = bytes[equipEnd + 33];
            MPalette  = bytes[equipEnd + 34];
            MGraphic  = bytes[equipEnd + 35];

            if (defaults != null)
            {
                Default = defaults;
                AbsorbElement.Default = defaults.AbsorbElement;
                CancelElement.Default = defaults.CancelElement;
                HalfElement.Default   = defaults.HalfElement;
                WeakElement.Default   = defaults.WeakElement;
            }
        }
Exemplo n.º 7
0
        public SkillSet(byte value, IList <byte> bytes, Context context)
            : this(GetDummySkillSets(context)[value].Name, value)
        {
            List <bool> actions = new List <bool>(16);

            actions.AddRange(PatcherLib.Utilities.Utilities.BooleansFromByteMSB(bytes[0]));
            actions.AddRange(PatcherLib.Utilities.Utilities.BooleansFromByteMSB(bytes[1]));
            List <bool> theRest = new List <bool>(PatcherLib.Utilities.Utilities.BooleansFromByteMSB(bytes[2]));

            Actions = new Ability[16];
            TheRest = new Ability[6];

            for (int i = 0; i < 16; i++)
            {
                Actions[i] = AllAbilities.GetDummyAbilities(context)[(actions[i] ? (bytes[3 + i] + 0x100) : (bytes[3 + i]))];
            }
            for (int i = 0; i < 6; i++)
            {
                TheRest[i] = AllAbilities.GetDummyAbilities(context)[(theRest[i] ? (bytes[19 + i] + 0x100) : (bytes[19 + i]))];
            }
        }
Exemplo n.º 8
0
        public void WriteXmlDigest(System.Xml.XmlWriter writer, FFTPatch FFTPatch)
        {
            if (HasChanged)
            {
                writer.WriteStartElement(GetType().Name);
                writer.WriteAttributeString("changed", HasChanged.ToString());
                foreach (Item i in Items)
                {
                    if (i.HasChanged)
                    {
                        writer.WriteStartElement(i.GetType().Name);
                        writer.WriteAttributeString("name", i.Name);
                        DigestGenerator.WriteXmlDigest(i, writer, false, false);
                        if (i is Weapon)
                        {
                            Weapon w = i as Weapon;
                            if (w.Formula.Value == 0x02 &&
                                (w.Formula.Value != w.WeaponDefault.Formula.Value || w.InflictStatus != w.WeaponDefault.InflictStatus))
                            {
                                writer.WriteStartElement("CastSpell");
                                writer.WriteAttributeString("default", AllAbilities.GetNames(FFTPatch.Context)[w.WeaponDefault.InflictStatus]);
                                writer.WriteAttributeString("value", AllAbilities.GetNames(FFTPatch.Context)[w.InflictStatus]);
                                writer.WriteEndElement();
                            }
                            else if (w.InflictStatus != w.WeaponDefault.InflictStatus)
                            {
                                writer.WriteStartElement("InflictStatusDescription");
                                writer.WriteAttributeString("default", FFTPatch.InflictStatuses.InflictStatuses[w.WeaponDefault.InflictStatus].Statuses.ToString());
                                writer.WriteAttributeString("value", FFTPatch.InflictStatuses.InflictStatuses[w.InflictStatus].Statuses.ToString());
                                writer.WriteEndElement();
                            }
                        }

                        writer.WriteEndElement();
                    }
                }
                writer.WriteEndElement();
            }
        }
Exemplo n.º 9
0
 public AllAbilityEffects(AllAbilities owner)
 {
     this.owner = owner;
 }
Exemplo n.º 10
0
 private static void LoadDataFromBytes(
     IList<byte> abilities, IList<byte> abilityEffects,
     IList<byte> oldItems, IList<byte> oldItemAttributes,
     IList<byte> newItems, IList<byte> newItemAttributes,
     IList<byte> jobs, IList<byte> jobLevels,
     IList<byte> skillSets, IList<byte> monsterSkills,
     IList<byte> actionMenus,
     IList<byte> statusAttributes, IList<byte> inflictStatuses,
     IList<byte> poach,
     IList<byte> entd1, IList<byte> entd2, IList<byte> entd3, IList<byte> entd4, IList<byte> entd5,
     IList<byte> moveFind,
     IList<byte> inventories )
 {
     try
     {
         bool psp = Context == Context.US_PSP;
         var Abilities = new AllAbilities( abilities, abilityEffects );
         var Items = new AllItems( oldItems, newItems != null ? newItems : null );
         var ItemAttributes = new AllItemAttributes( oldItemAttributes, newItemAttributes != null ? newItemAttributes : null );
         var Jobs = new AllJobs( Context, jobs );
         var JobLevels = new JobLevels( Context, jobLevels,
             new JobLevels( Context, Context == Context.US_PSP ? PSPResources.JobLevelsBin : PSXResources.JobLevelsBin ) );
         var SkillSets = new AllSkillSets( Context, skillSets,
             Context == Context.US_PSP ? PSPResources.SkillSetsBin : PSXResources.SkillSetsBin );
         var MonsterSkills = new AllMonsterSkills( monsterSkills );
         var ActionMenus = new AllActionMenus( actionMenus, Context );
         var StatusAttributes = new AllStatusAttributes( statusAttributes );
         var InflictStatuses = new AllInflictStatuses( inflictStatuses );
         var PoachProbabilities = new AllPoachProbabilities( poach );
         var ENTDs = psp ? new AllENTDs( entd1, entd2, entd3, entd4, entd5 ) : new AllENTDs( entd1, entd2, entd3, entd4 );
         var MoveFind = new AllMoveFindItems( Context, moveFind, new AllMoveFindItems( Context, psp ? PSPResources.MoveFind : PSXResources.MoveFind ) );
         var StoreInventories = new AllStoreInventories( Context, inventories, psp ? PSPResources.StoreInventoriesBin : PSXResources.StoreInventoriesBin );
         FFTPatch.Abilities = Abilities;
         FFTPatch.Items = Items;
         FFTPatch.ItemAttributes = ItemAttributes;
         FFTPatch.Jobs = Jobs;
         FFTPatch.JobLevels = JobLevels;
         FFTPatch.SkillSets = SkillSets;
         FFTPatch.MonsterSkills = MonsterSkills;
         FFTPatch.ActionMenus = ActionMenus;
         FFTPatch.StatusAttributes = StatusAttributes;
         FFTPatch.InflictStatuses = InflictStatuses;
         FFTPatch.PoachProbabilities = PoachProbabilities;
         FFTPatch.ENTDs = ENTDs;
         FFTPatch.MoveFind = MoveFind;
         FFTPatch.StoreInventories = StoreInventories;
     }
     catch( Exception )
     {
         throw new LoadPatchException();
     }
 }
Exemplo n.º 11
0
 private static void BuildFromContext()
 {
     switch( Context )
     {
         case Context.US_PSP:
             Abilities = new AllAbilities( PSPResources.AbilitiesBin, PSPResources.AbilityEffectsBin );
             Items = new AllItems(
                 PSPResources.OldItemsBin,
                 PSPResources.NewItemsBin );
             ItemAttributes = new AllItemAttributes(
                 PSPResources.OldItemAttributesBin,
                 PSPResources.NewItemAttributesBin );
             Jobs = new AllJobs( Context, PSPResources.JobsBin );
             JobLevels = new JobLevels( Context, PSPResources.JobLevelsBin,
                 new JobLevels( Context, PSPResources.JobLevelsBin ) );
             SkillSets = new AllSkillSets( Context, PSPResources.SkillSetsBin,
                 PSPResources.SkillSetsBin );
             MonsterSkills = new AllMonsterSkills( PSPResources.MonsterSkillsBin );
             ActionMenus = new AllActionMenus( PSPResources.ActionEventsBin, Context );
             StatusAttributes = new AllStatusAttributes( PSPResources.StatusAttributesBin );
             InflictStatuses = new AllInflictStatuses( PSPResources.InflictStatusesBin );
             PoachProbabilities = new AllPoachProbabilities( PSPResources.PoachProbabilitiesBin );
             ENTDs = new AllENTDs( PSPResources.ENTD1, PSPResources.ENTD2, PSPResources.ENTD3, PSPResources.ENTD4, PSPResources.ENTD5 );
             MoveFind = new AllMoveFindItems( Context, PSPResources.MoveFind, new AllMoveFindItems( Context, PSPResources.MoveFind ) );
             StoreInventories = new AllStoreInventories( Context, PSPResources.StoreInventoriesBin, PSPResources.StoreInventoriesBin );
             break;
         case Context.US_PSX:
             Abilities = new AllAbilities( PSXResources.AbilitiesBin, PSXResources.AbilityEffectsBin );
             Items = new AllItems( PSXResources.OldItemsBin, null );
             ItemAttributes = new AllItemAttributes( PSXResources.OldItemAttributesBin, null );
             Jobs = new AllJobs( Context, PSXResources.JobsBin );
             JobLevels = new JobLevels( Context, PSXResources.JobLevelsBin,
                 new JobLevels( Context, PSXResources.JobLevelsBin ) );
             SkillSets = new AllSkillSets( Context, PSXResources.SkillSetsBin,
                 PSXResources.SkillSetsBin );
             MonsterSkills = new AllMonsterSkills( PSXResources.MonsterSkillsBin );
             ActionMenus = new AllActionMenus( PSXResources.ActionEventsBin, Context );
             StatusAttributes = new AllStatusAttributes( PSXResources.StatusAttributesBin );
             InflictStatuses = new AllInflictStatuses( PSXResources.InflictStatusesBin );
             PoachProbabilities = new AllPoachProbabilities( PSXResources.PoachProbabilitiesBin );
             ENTDs = new AllENTDs( PSXResources.ENTD1, PSXResources.ENTD2, PSXResources.ENTD3, PSXResources.ENTD4 );
             MoveFind = new AllMoveFindItems( Context, PSXResources.MoveFind, new AllMoveFindItems( Context, PSXResources.MoveFind ) );
             StoreInventories = new AllStoreInventories( Context, PSXResources.StoreInventoriesBin, PSXResources.StoreInventoriesBin );
             break;
         default:
             throw new ArgumentException();
     }
 }
Exemplo n.º 12
0
 public AllAbilityEffects( AllAbilities owner )
 {
     this.owner = owner;
 }
Exemplo n.º 13
0
        public void WriteXmlDigest(XmlWriter writer, FFTPatch FFTPatch)
        {
            if (HasChanged)
            {
                writer.WriteStartElement(GetType().Name);

                writer.WriteAttributeString("value", Offset.ToString("X4"));
                writer.WriteAttributeString("name", Name);
                DigestGenerator.WriteXmlDigest(this, writer, false, false);
                DigestGenerator.WriteXmlDigest(AIFlags, writer, true, true);

                if (Effect != null && Default.Effect != null)
                {
                    DigestGenerator.WriteDigestEntry(writer, "Effect", Default.Effect, Effect);
                }

                if (IsNormal)
                {
                    DigestGenerator.WriteXmlDigest(Attributes, writer, true, true);
                    if (Attributes.Formula.Value == 0x02 &&
                        (Attributes.Formula.Value != Attributes.Default.Formula.Value || Attributes.InflictStatus != Attributes.Default.InflictStatus))
                    {
                        writer.WriteStartElement("CastSpell");
                        writer.WriteAttributeString("default", AllAbilities.GetNames(FFTPatch.Context)[Attributes.Default.InflictStatus]);
                        writer.WriteAttributeString("value", AllAbilities.GetNames(FFTPatch.Context)[Attributes.InflictStatus]);
                        writer.WriteEndElement();
                    }
                    else if (Attributes.InflictStatus != Attributes.Default.InflictStatus)
                    {
                        writer.WriteStartElement("InflictStatusDescription");
                        writer.WriteAttributeString("default", FFTPatch.InflictStatuses.InflictStatuses[Attributes.Default.InflictStatus].Statuses.ToString());
                        writer.WriteAttributeString("value", FFTPatch.InflictStatuses.InflictStatuses[Attributes.InflictStatus].Statuses.ToString());
                        writer.WriteEndElement();
                    }
                }
                else if (IsItem)
                {
                    DigestGenerator.WriteDigestEntry(writer, "ItemOffset", Default.ItemOffset, ItemOffset, "0x{0:X2}");
                }
                else if (IsThrowing)
                {
                    DigestGenerator.WriteDigestEntry(writer, "Throwing", Default.Throwing, Throwing);
                }
                else if (IsJumping)
                {
                    DigestGenerator.WriteDigestEntry(writer, "JumpHorizontal", Default.JumpHorizontal, JumpHorizontal);
                    DigestGenerator.WriteDigestEntry(writer, "JumpVertical", Default.JumpVertical, JumpVertical);
                }
                else if (IsCharging)
                {
                    DigestGenerator.WriteDigestEntry(writer, "ChargeCT", Default.ChargeCT, ChargeCT);
                    DigestGenerator.WriteDigestEntry(writer, "ChargeBonus", Default.ChargeBonus, ChargeBonus);
                }
                else if (IsArithmetick)
                {
                    DigestGenerator.WriteDigestEntry(writer, "ArithmetickSkill", Default.ArithmetickSkill, ArithmetickSkill, "0x{0:X2}");
                }
                else if (IsOther)
                {
                    DigestGenerator.WriteDigestEntry(writer, "OtherID", Default.OtherID, OtherID, "0x{0:X2}");
                }

                writer.WriteEndElement();
            }
        }