public override string Attack(PlayerCharacter pl) { var damage = pl.Damaged(AttackPower); return this.Name + " ninja chopped " + pl.Name + " and dealt " + damage + " HP of damage!"; }
public FrmBattle() { InitializeComponent(); _monsters = new List<Monster>(); _monsters.Add(new Knight("Sir Cliffy")); _monsters.Add(new Ninja("Ninja 1")); _monsters.Add(new Ogre("Ogre 1")); _pc = new PlayerCharacter("Adventurer Bob", 400, 45); txtPlayerName.Text = _pc.Name; txtPlayerHP.Text = _pc.HitPoints.ToString(); txtPlayerAtk.Text = _pc.AttackPower.ToString(); txtMonsterNameA.Text = _monsters.First().Name; txtMonsterHpA.Text = _monsters.First().HitPoints.ToString(); txtMonsterAtkA.Text = _monsters.First().AttackPower.ToString(); }
public override string Attack(PlayerCharacter pl) { return this.Name + " slashed you with their sword for " + pl.Damaged(this.AttackPower) + " points of damage!"; //return base.Attack(pl); }
public virtual string Attack(PlayerCharacter pl) { var damage = pl.Damaged(AttackPower); return "The monster attacked you for " + damage + " points of damage!"; }
public override string Attack(PlayerCharacter pl) { return(this.Name + " slashed you with their sword for " + pl.Damaged(this.AttackPower) + " points of damage!"); //return base.Attack(pl); }