Ejemplo n.º 1
0
 public InflictStatus( byte value, IList<byte> bytes, InflictStatus defaults )
 {
     Default = defaults;
     Value = value;
     PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[0], ref AllOrNothing, ref Random, ref Separate, ref Cancel, ref Blank1, ref Blank2, ref Blank3, ref Blank4 );
     Statuses = new Statuses( bytes.Sub( 1, 5 ), defaults == null ? null : defaults.Statuses );
 }
Ejemplo n.º 2
0
        public StatusAttribute( string name, byte value, IList<byte> bytes, StatusAttribute defaults )
        {
            Default = defaults;
            Name = name;
            Value = value;

            Blank1 = bytes[0];
            Blank2 = bytes[1];
            Order = bytes[2];
            CT = bytes[3];

            PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[4], ref FreezeCT, ref Unknown1, ref Unknown2, ref Unknown3, ref Unknown4, ref Unknown5, ref Unknown6, ref KO );
            PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[5], ref CanReact, ref Blank, ref IgnoreAttack, ref Unknown7, ref Unknown8, ref Unknown9, ref Unknown10, ref Unknown11 );
            CanReact = !CanReact;
            Cancels = new Statuses( bytes.Sub( 6, 10 ), defaults == null ? null : defaults.Cancels );
            CantStackOn = new Statuses( bytes.Sub( 11, 15 ), defaults == null ? null : defaults.CantStackOn );
        }
Ejemplo n.º 3
0
        public ItemAttributes( byte value, IList<byte> bytes, ItemAttributes defaults )
        {
            Value = value;
            PA = bytes[0];
            MA = bytes[1];
            Speed = bytes[2];
            Move = bytes[3];
            Jump = bytes[4];

            PermanentStatuses = new Statuses( bytes.Sub( 5, 9 ), defaults == null ? null : defaults.PermanentStatuses );
            StatusImmunity = new Statuses( bytes.Sub( 10, 14 ), defaults == null ? null : defaults.StatusImmunity );
            StartingStatuses = new Statuses( bytes.Sub( 15, 19 ), defaults == null ? null : defaults.StartingStatuses );

            Absorb = new Elements( bytes[20] );
            Cancel = new Elements( bytes[21] );
            Half = new Elements( bytes[22] );
            Weak = new Elements( bytes[23] );
            Strong = new Elements( bytes[24] );

            if( defaults != null )
            {
                Default = defaults;
                Absorb.Default = Default.Absorb;
                Cancel.Default = Default.Cancel;
                Half.Default = Default.Half;
                Weak.Default = Default.Weak;
                Strong.Default = Default.Strong;
            }
        }
Ejemplo n.º 4
0
 public void CopyTo( Statuses destination )
 {
     Copy( this, destination );
 }
Ejemplo n.º 5
0
  public static void Copy( Statuses source, Statuses destination )
  {
      destination.NoEffect = source.NoEffect;
      destination.Crystal = source.Crystal;
      destination.Dead = source.Dead;
      destination.Undead = source.Undead;
      destination.Charging = source.Charging;
      destination.Jump = source.Jump;
      destination.Defending = source.Defending;
      destination.Performing = source.Performing;
      destination.Petrify = source.Petrify;
      destination.Invite = source.Invite;
      destination.Darkness = source.Darkness;
      destination.Confusion = source.Confusion;
      destination.Silence = source.Silence;
      destination.BloodSuck = source.BloodSuck;
      destination.DarkEvilLooking = source.DarkEvilLooking;
      destination.Treasure = source.Treasure;
      destination.Oil = source.Oil;
      destination.Float = source.Float;
      destination.Reraise = source.Reraise;
      destination.Transparent = source.Transparent;
      destination.Berserk = source.Berserk;
      destination.Chicken = source.Chicken;
      destination.Frog = source.Frog;
      destination.Critical = source.Critical;
      destination.Poison = source.Poison;
      destination.Regen = source.Regen;
      destination.Protect = source.Protect;
      destination.Shell = source.Shell;
      destination.Haste = source.Haste;
      destination.Slow = source.Slow;
      destination.Stop = source.Stop;
      destination.Wall = source.Wall;
      destination.Faith = source.Faith;
      destination.Innocent = source.Innocent;
      destination.Charm = source.Charm;
      destination.Sleep = source.Sleep;
      destination.DontMove = source.DontMove;
      destination.DontAct = source.DontAct;
      destination.Reflect = source.Reflect;
      destination.DeathSentence = source.DeathSentence;
 }
Ejemplo n.º 6
0
 public Statuses( IList<byte> bytes, Statuses defaults )
     : this( bytes )
 {
     Default = defaults;
 }
Ejemplo n.º 7
0
        public Job( Context context, byte value, string name, IList<byte> bytes, Job defaults )
        {
            Value = value;
            Name = name;
            int equipEnd = context == Context.US_PSP ? 13 : 12;

            SkillSet = context == Context.US_PSP ? SkillSet.PSPSkills[bytes[0]] : SkillSet.PSXSkills[bytes[0]];
            InnateA = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[1], bytes[2] )];
            InnateB = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[3], bytes[4] )];
            InnateC = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[5], bytes[6] )];
            InnateD = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[7], bytes[8] )];
            Equipment = new Equipment( bytes.Sub( 9, equipEnd ), defaults == null ? null : defaults.Equipment );
            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;
            }
        }