Пример #1
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var item = (Data_Item)other;

            copy_traits(item);

            Heal_Val       = item.Heal_Val;
            Heal_Percent   = item.Heal_Percent;
            Door_Key       = item.Door_Key;
            Chest_Key      = item.Chest_Key;
            Dancer_Ring    = item.Dancer_Ring;
            Torch_Radius   = item.Torch_Radius;
            Placeable      = item.Placeable;
            Repair_Val     = item.Repair_Val;
            Repair_Percent = item.Repair_Percent;
            Boost_Text     = item.Boost_Text;
            Stat_Boost     = new int[item.Stat_Boost.Length];
            Array.Copy(item.Stat_Boost, Stat_Boost, Stat_Boost.Length);
            Growth_Boost = new int[item.Growth_Boost.Length];
            Array.Copy(item.Growth_Boost, Growth_Boost, Growth_Boost.Length);
            Stat_Buff = new int[item.Stat_Buff.Length];
            Array.Copy(item.Stat_Buff, Stat_Buff, Stat_Buff.Length);
            Promotes = new List <int>(item.Promotes);
        }
Пример #2
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var source = (WeaponType)other;

            Key            = source.Key;
            Name           = source.Name;
            StatusHelpName = source.StatusHelpName;
            EventName      = source.EventName;

            IconIndex          = source.IconIndex;
            ClassReelIconIndex = source.ClassReelIconIndex;
            StatusIndex        = source.StatusIndex;
            AnimName           = source.AnimName;
            ThrownAnimName     = source.ThrownAnimName;
            StatusDescription  = source.StatusDescription;
            UnitDescription    = source.UnitDescription;
            IsMagic            = source.IsMagic;
            IsStaff            = source.IsStaff;
            DisplayedInStatus  = source.DisplayedInStatus;

            WtaTypes       = new List <int>(source.WtaTypes);
            WtaReaverTypes = new List <int>(source.WtaReaverTypes);
            WtaRanges      = new List <int>(source.WtaRanges);
            WtdRanges      = new List <int>(source.WtdRanges);

            ParentKey = source.ParentKey;
        }
Пример #3
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var weapon = (Data_Weapon)other;

            copy_traits(weapon);

            Mgt         = weapon.Mgt;
            Hit         = weapon.Hit;
            Crt         = weapon.Crt;
            Wgt         = weapon.Wgt;
            Min_Range   = weapon.Min_Range;
            Max_Range   = weapon.Max_Range;
            Mag_Range   = weapon.Mag_Range;
            No_Counter  = weapon.No_Counter;
            Long_Range  = weapon.Long_Range;
            Main_Type   = weapon.Main_Type;
            Scnd_Type   = weapon.Scnd_Type;
            Rank        = weapon.Rank;
            Attack_Type = weapon.Attack_Type;
            WExp        = weapon.WExp;
            Staff_Exp   = weapon.Staff_Exp;
            Traits      = new bool[weapon.Traits.Length];
            Array.Copy(weapon.Traits, Traits, Traits.Length);
            Staff_Traits = new bool[weapon.Staff_Traits.Length];
            Array.Copy(weapon.Staff_Traits, Staff_Traits, Staff_Traits.Length);
            Effectiveness = new int[weapon.Effectiveness.Length];
            Array.Copy(weapon.Effectiveness, Effectiveness, Effectiveness.Length);
        }
Пример #4
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var source = (Data_Terrain)other;

            Id   = source.Id;
            Name = source.Name;

            Avoid         = source.Avoid;
            Def           = source.Def;
            Res           = source.Res;
            Stats_Visible = source.Stats_Visible;

            Step_Sound_Group  = source.Step_Sound_Group;
            Platform_Rename   = source.Platform_Rename;
            Background_Rename = source.Background_Rename;
            Dust_Type         = source.Dust_Type;
            Fire_Through      = source.Fire_Through;

            Move_Costs = new int[source.Move_Costs.Length][];
            for (int i = 0; i < Move_Costs.Length; i++)
            {
                Move_Costs[i] = source.Move_Costs[i].ToArray();
            }
            Heal = source.Heal != null?source.Heal.ToArray() : null;

            Minimap       = source.Minimap;
            Minimap_Group = new List <int>(source.Minimap_Group);
        }
Пример #5
0
        /// <summary>
        /// Checks if this object and the given <see cref="TactileDataContent"/> are
        /// the same class, for use before copying data between them.
        /// </summary>
        /// <param name="other">The other <see cref="TactileDataContent"/> object.</param>
        protected bool CheckSameClass(TactileDataContent other)
        {
            if (other.GetType() != this.GetType())
            {
                throw new ArgumentException(
                          "Tried to copy different types of content.");

                return(false);
            }

            return(true);
        }
Пример #6
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var source = (Data_Generic_Actor)other;

            Name         = source.Name;
            MiniFaceName = source.MiniFaceName;
            Description  = source.Description;
            BaseStats    = new List <int>(source.BaseStats);
            Growths      = new List <int>(source.Growths);
            Skills       = new List <int>(source.Skills);
        }
Пример #7
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var source = (Data_Tileset)other;

            Id                   = source.Id;
            Name                 = source.Name;
            Graphic_Name         = source.Graphic_Name;
            BattlebackSuffix     = source.BattlebackSuffix;
            Animated_Tile_Names  = new List <string>(source.Animated_Tile_Names);
            Animated_Tile_Data   = new List <Rectangle>(source.Animated_Tile_Data);
            Pillage_Tile_Changes = new Dictionary <Vector2, Vector2>(source.Pillage_Tile_Changes);
            Terrain_Tags         = new List <int>(source.Terrain_Tags);
        }
Пример #8
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var source = (Data_Skill)other;

            Id           = source.Id;
            Name         = source.Name;
            Description  = source.Description;
            Abstract     = source.Abstract;
            Image_Name   = source.Image_Name;
            Image_Index  = source.Image_Index;
            Animation_Id = source.Animation_Id;
            Map_Anim_Id  = source.Map_Anim_Id;
        }
Пример #9
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var source = (Face_Data)other;

            Name            = source.Name;
            Emotions        = source.Emotions;
            Pitch           = source.Pitch;
            EyesOffset      = source.EyesOffset;
            MouthOffset     = source.MouthOffset;
            StatusOffset    = source.StatusOffset;
            StatusFrame     = source.StatusFrame;
            PlacementOffset = source.PlacementOffset;
            ForceEyesClosed = source.ForceEyesClosed;
            Asymmetrical    = source.Asymmetrical;
            ClassCard       = source.ClassCard;
        }
Пример #10
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var chapter = (Data_Chapter)other;

            Id = chapter.Id;
            Progression_Ids        = new List <string>(chapter.Progression_Ids);
            Prior_Chapters         = new List <string>(chapter.Prior_Chapters);
            Prior_Ranking_Chapters = new List <string>(chapter.Prior_Ranking_Chapters);
            Completed_Chapters     = new List <string>(chapter.Completed_Chapters);
            Standalone             = chapter.Standalone;

            Label        = chapter.Label;
            LabelString  = chapter.LabelString;
            Chapter_Name = chapter.Chapter_Name;

            WorldMapNameFormatString   = chapter.WorldMapNameFormatString;
            DisplayNameFormatString    = chapter.DisplayNameFormatString;
            FileSelectNameFormatString = chapter.FileSelectNameFormatString;
            ShortNameFormatString      = chapter.ShortNameFormatString;
            ListNameFormatString       = chapter.ListNameFormatString;
            AlternateTitle             = chapter.AlternateTitle;

            Arc               = chapter.Arc;
            World_Map_Loc     = chapter.World_Map_Loc;
            World_Map_Lord_Id = chapter.World_Map_Lord_Id;

            Turn_Themes   = new List <string>(chapter.Turn_Themes);
            Battle_Themes = new List <string>(chapter.Battle_Themes);

            Battalion     = chapter.Battalion;
            Text_Key      = chapter.Text_Key;
            Event_Data_Id = chapter.Event_Data_Id;

            Unranked           = chapter.Unranked;
            Ranking_Turns      = chapter.Ranking_Turns;
            Ranking_Combat     = chapter.Ranking_Combat;
            Ranking_Exp        = chapter.Ranking_Exp;
            Ranking_Completion = chapter.Ranking_Completion;

            Preset_Data = new Preset_Chapter_Data(chapter.Preset_Data);
        }
Пример #11
0
        public override void CopyFrom(TactileDataContent other)
        {
            CheckSameClass(other);

            var source = (Data_Status)other;

            Id          = source.Id;
            Name        = source.Name;
            Description = source.Description;

            Turns           = source.Turns;
            Negative        = source.Negative;
            Damage_Per_Turn = source.Damage_Per_Turn;
            Unselectable    = source.Unselectable;
            Ai_Controlled   = source.Ai_Controlled;
            Attacks_Allies  = source.Attacks_Allies;
            No_Magic        = source.No_Magic;
            Skills          = new List <int>(source.Skills);

            Image_Index  = source.Image_Index;
            Map_Anim_Id  = source.Map_Anim_Id;
            Battle_Color = source.Battle_Color;
        }
Пример #12
0
 public abstract void CopyFrom(TactileDataContent other);