public Spell Clone(Creature player, int spellSlotLevel) { Spell result = new Spell(); RecalculateDiceAndAmmo(spellSlotLevel, player.Level, player.SpellcastingAbilityModifier); result.BonusPerLevel = BonusPerLevel; result.BonusThreshold = BonusThreshold; result.BonusMax = BonusMax; result.CastingTime = CastingTime; result.Components = Components; result.Description = Description; result.DieStr = DieStr; result.Duration = Duration; result.Level = Level; result.Material = Material; result.Name = Name; result.Index = Index; result.OnCast = OnCast; result.OnValidate = OnValidate; result.OnReceived = OnReceived; result.OnPreparing = OnPreparing; result.OnPreparationComplete = OnPreparationComplete; result.OnTargetFailsSave = OnTargetFailsSave; result.OnGetAttackAbility = OnGetAttackAbility; result.OnDispel = OnDispel; result.OnPlayerPreparesAttack = OnPlayerPreparesAttack; result.OnDieRollStopped = OnDieRollStopped; result.OnPlayerAttacks = OnPlayerAttacks; result.OnPlayerHitsTarget = OnPlayerHitsTarget; result.OriginalDieStr = OriginalDieStr; result.OriginalAmmoCount = OriginalAmmoCount; result.AmmoCount = AmmoCount; result.PerLevelBonus = PerLevelBonus; result.Range = Range; result.RangeType = RangeType; result.RequiresConcentration = RequiresConcentration; result.SavingThrowAbility = SavingThrowAbility; result.AvailableWhen = AvailableWhen; result.SpellCasterLevel = SpellCasterLevel; result.SpellType = SpellType; result.SchoolOfMagic = SchoolOfMagic; result.CastingTimeStr = CastingTimeStr; result.DurationStr = DurationStr; result.RangeStr = RangeStr; result.ComponentsStr = ComponentsStr; result.Bright1 = Bright1; result.Bright2 = Bright2; result.Hue1 = Hue1; result.Hue2 = Hue2; // Override... result.OwnerId = player != null ? player.IntId : -1; result.SpellSlotLevel = spellSlotLevel; result.RecalculateDiceAndAmmo(spellSlotLevel, player.Level, player.GetSpellcastingAbilityModifier()); return(result); }