Ejemplo n.º 1
0
        /// <summary>
        /// Creates a copy of the creature.
        /// </summary>
        /// <returns>Returns the copy.</returns>
        public CustomCreature Copy()
        {
            CustomCreature cc = new CustomCreature();

            cc.ID        = fID;
            cc.Name      = fName;
            cc.Details   = fDetails;
            cc.Size      = fSize;
            cc.Origin    = fOrigin;
            cc.Type      = fType;
            cc.Keywords  = fKeywords;
            cc.Level     = fLevel;
            cc.Role      = fRole.Copy();
            cc.Senses    = fSenses;
            cc.Movement  = fMovement;
            cc.Alignment = fAlignment;
            cc.Languages = fLanguages;
            cc.Skills    = fSkills;
            cc.Equipment = fEquipment;

            cc.Strength     = fStrength.Copy();
            cc.Constitution = fConstitution.Copy();
            cc.Dexterity    = fDexterity.Copy();
            cc.Intelligence = fIntelligence.Copy();
            cc.Wisdom       = fWisdom.Copy();
            cc.Charisma     = fCharisma.Copy();

            cc.InitiativeModifier = fInitiativeModifier;
            cc.HPModifier         = fHPModifier;
            cc.ACModifier         = fACModifier;
            cc.FortitudeModifier  = fFortitudeModifier;
            cc.ReflexModifier     = fReflexModifier;
            cc.WillModifier       = fWillModifier;

            cc.Regeneration = (fRegeneration != null) ? fRegeneration.Copy() : null;

            foreach (Aura aura in fAuras)
            {
                cc.Auras.Add(aura.Copy());
            }

            foreach (CreaturePower cp in fCreaturePowers)
            {
                cc.CreaturePowers.Add(cp.Copy());
            }

            foreach (DamageModifier dm in fDamageModifiers)
            {
                cc.DamageModifiers.Add(dm.Copy());
            }

            cc.Resist     = fResist;
            cc.Vulnerable = fVulnerable;
            cc.Immune     = fImmune;
            cc.Tactics    = fTactics;

            cc.Image = fImage;

            return(cc);
        }
Ejemplo n.º 2
0
        public CustomCreature Copy()
        {
            Masterplan.Data.Regeneration regeneration;
            CustomCreature customCreature = new CustomCreature()
            {
                ID                 = this.fID,
                Name               = this.fName,
                Details            = this.fDetails,
                Size               = this.fSize,
                Origin             = this.fOrigin,
                Type               = this.fType,
                Keywords           = this.fKeywords,
                Level              = this.fLevel,
                Role               = this.fRole.Copy(),
                Senses             = this.fSenses,
                Movement           = this.fMovement,
                Alignment          = this.fAlignment,
                Languages          = this.fLanguages,
                Skills             = this.fSkills,
                Equipment          = this.fEquipment,
                Strength           = this.fStrength.Copy(),
                Constitution       = this.fConstitution.Copy(),
                Dexterity          = this.fDexterity.Copy(),
                Intelligence       = this.fIntelligence.Copy(),
                Wisdom             = this.fWisdom.Copy(),
                Charisma           = this.fCharisma.Copy(),
                InitiativeModifier = this.fInitiativeModifier,
                HPModifier         = this.fHPModifier,
                ACModifier         = this.fACModifier,
                FortitudeModifier  = this.fFortitudeModifier,
                ReflexModifier     = this.fReflexModifier,
                WillModifier       = this.fWillModifier
            };
            CustomCreature customCreature1 = customCreature;

            if (this.fRegeneration != null)
            {
                regeneration = this.fRegeneration.Copy();
            }
            else
            {
                regeneration = null;
            }
            customCreature1.Regeneration = regeneration;
            foreach (Aura fAura in this.fAuras)
            {
                customCreature.Auras.Add(fAura.Copy());
            }
            foreach (CreaturePower fCreaturePower in this.fCreaturePowers)
            {
                customCreature.CreaturePowers.Add(fCreaturePower.Copy());
            }
            foreach (DamageModifier fDamageModifier in this.fDamageModifiers)
            {
                customCreature.DamageModifiers.Add(fDamageModifier.Copy());
            }
            customCreature.Resist     = this.fResist;
            customCreature.Vulnerable = this.fVulnerable;
            customCreature.Immune     = this.fImmune;
            customCreature.Tactics    = this.fTactics;
            customCreature.Image      = this.fImage;
            return(customCreature);
        }