Exemple #1
0
        /// <summary>
        /// Creates a copy of the CustomToken.
        /// </summary>
        /// <returns>Returns the copy.</returns>
        public CustomToken Copy()
        {
            CustomToken ct = new CustomToken();

            ct.ID               = fID;
            ct.Type             = fType;
            ct.Name             = fName;
            ct.Details          = fDetails;
            ct.TokenSize        = fTokenSize;
            ct.OverlaySize      = fOverlaySize;
            ct.OverlayStyle     = fOverlayStyle;
            ct.Colour           = fColour;
            ct.Image            = fImage;
            ct.DifficultTerrain = fDifficultTerrain;
            ct.Opaque           = fOpaque;
            ct.Data             = fData.Copy();
            ct.TerrainPower     = (fTerrainPower != null) ? fTerrainPower.Copy() : null;
            ct.CreatureID       = fCreatureID;

            return(ct);
        }
Exemple #2
0
        /// <summary>
        /// Creates a copy of the Hero.
        /// </summary>
        /// <returns>Returns the copy.</returns>
        public Hero Copy()
        {
            Hero h = new Hero();

            h.ID                = fID;
            h.Name              = fName;
            h.Player            = fPlayer;
            h.Size              = fSize;
            h.Race              = fRace;
            h.Level             = fLevel;
            h.Class             = fClass;
            h.ParagonPath       = fParagonPath;
            h.EpicDestiny       = fEpicDestiny;
            h.PowerSource       = fPowerSource;
            h.Role              = fRole;
            h.CombatData        = fCombatData.Copy();
            h.HP                = fHP;
            h.AC                = fAC;
            h.Fortitude         = fFortitude;
            h.Reflex            = fReflex;
            h.Will              = fWill;
            h.InitBonus         = fInitBonus;
            h.PassivePerception = fPassivePerception;
            h.PassiveInsight    = fPassiveInsight;
            h.Languages         = fLanguages;
            h.Portrait          = fPortrait;

            foreach (OngoingCondition oc in fEffects)
            {
                h.Effects.Add(oc.Copy());
            }

            foreach (CustomToken ct in fTokens)
            {
                h.Tokens.Add(ct.Copy());
            }

            return(h);
        }