static void Main(string[] args) { Pandaren pand = new Pandaren("Po", 10, 10, 15, 23, 5); pand.Rest(); pand.Atack(); pand.Heal(); pand.Heal(); Console.WriteLine("\n\n"); Console.WriteLine(pand); PandaMemento memento = pand.SaveState(); pand.DrunkenHaze(); Console.WriteLine(pand); pand.DrunkenHaze(); Console.WriteLine(pand); pand.Rest(); Console.WriteLine(pand); pand.RestoreState(memento); Console.WriteLine(pand); Console.WriteLine("\n\n"); Ghoul ghoul = new Ghoul(); ghoul.atack = new Cannibalize(); ghoul.Attack(20); ghoul.atack = new GhoulFrenzy(); ghoul.Attack(30); ghoul.atack = new UnholyStrength(); ghoul.Attack(14); }
public override Hero Clone() { Pandaren cloned = (Pandaren)this.MemberwiseClone(); cloned.weapon = new Weapon(this.weapon.damage); cloned.name = String.Copy(this.name); return(cloned); }
static void Main(string[] args) { Client.emulation(); var k = LichKing.GetInstance(); Director dc = new Director(); OrcBuilder buli = new OrcBuilder(); dc.CreatePlayerBase(buli); Base bs = buli.GetBase(); Console.WriteLine(bs.ToString()); Pandaren BrewMaster = new Pandaren("Brewmaster", 22, 14, 15, 29, 40); Hero EarthMaster = BrewMaster.Clone(); }