/// <summary> /// Creates a copy of the power. /// </summary> /// <returns></returns> public CreaturePower Copy() { CreaturePower cp = new CreaturePower(); cp.ID = fID; cp.Name = fName; cp.Action = (fAction != null) ? fAction.Copy() : null; cp.Keywords = fKeywords; cp.Condition = fCondition; cp.Range = fRange; cp.Attack = (fAttack != null) ? fAttack.Copy() : null; cp.Description = fDescription; cp.Details = fDetails; return(cp); }
/// <summary> /// Creates a copy of the TrapAttack object. /// </summary> /// <returns>Returns the copy.</returns> public TrapAttack Copy() { TrapAttack ta = new TrapAttack(); ta.ID = fID; ta.Name = fName; ta.Trigger = fTrigger; ta.Action = fAction; ta.Keywords = fKeywords; ta.Range = fRange; ta.Target = fTarget; ta.HasInitiative = fHasInitiative; ta.Initiative = fInitiative; ta.Attack = fAttack.Copy(); ta.OnHit = fOnHit; ta.OnMiss = fOnMiss; ta.Effect = fEffect; ta.Notes = fNotes; return(ta); }