public GameForm() { InitializeComponent(); Random r = new Random(); Rectangle vld = gbSpeelveld.Bounds; int margin = 50; karakterA = new Karakter("Jij", r.Next(margin, vld.Width - margin), r.Next(margin, vld.Height - margin)); karakterB = new Karakter("Tegenstander", r.Next(margin, vld.Width - margin), r.Next(margin, vld.Height - margin)); karakterB.ModXp(+600); UpdateUI(); }
public void CastSpell(Karakter target) { if (IsAlive && target.IsAlive) { int targetLevensBefore = target.Levens; Logger.Log(Naam + " schiet: Pew!"); target.ModXp(-500); if (target.IsAlive == false) { ModXp(600); } else if (target.Levens < targetLevensBefore) { ModXp(300); } } }