/// <summary> /// Creates a copy of the terrain power. /// </summary> /// <returns>Returns the copy.</returns> public TerrainPower Copy() { TerrainPower tp = new TerrainPower(); tp.ID = fID; tp.Name = fName; tp.Type = fType; tp.FlavourText = fFlavourText; tp.Action = fAction; tp.Requirement = fRequirement; tp.Check = fCheck; tp.Success = fSuccess; tp.Failure = fFailure; tp.Target = fTarget; tp.Attack = fAttack; tp.Hit = fHit; tp.Miss = fMiss; tp.Effect = fEffect; return(tp); }
public TerrainPower Copy() { TerrainPower terrainPower = new TerrainPower() { ID = this.fID, Name = this.fName, Type = this.fType, FlavourText = this.fFlavourText, Action = this.fAction, Requirement = this.fRequirement, Check = this.fCheck, Success = this.fSuccess, Failure = this.fFailure, Target = this.fTarget, Attack = this.fAttack, Hit = this.fHit, Miss = this.fMiss, Effect = this.fEffect }; return(terrainPower); }
public TerrainPower FindTerrainPower(string item_name) { TerrainPower terrainPower; List <TerrainPower> .Enumerator enumerator = this.fTerrainPowers.GetEnumerator(); try { while (enumerator.MoveNext()) { TerrainPower current = enumerator.Current; if (current == null || !(current.Name == item_name)) { continue; } terrainPower = current; return(terrainPower); } return(null); } finally { ((IDisposable)enumerator).Dispose(); } }