Calculation TEst
an anonymous user
·
using System; namespace com.DreamTree { class Program { public static float AttDmg = 100; public static float MgcDmg = 50; public static float Armor = 30; public static float CritRate = 90; public static float CritFac = 1.5f; public static float HpAmount = 500; public static float MpAmount = 300; public static void Main(string[] args) { for (int i=0;i<20;i++){ Console.WriteLine(DmgDeal(1)); } } //Damage Reduction For Physic Dmg public static float DmgReduction(float DmgReceive){ float a = DmgReceive / (1+Armor/100); return a; } //Damage Deal public static float DmgDeal(float DmgOut){ Random rnd = new Random(); int Iscrt = rnd.Next(0,101); float crthit = 1f; if(Iscrt < CritRate){ crthit = CritFac; } float a = DmgOut*crthit; return a; } } }
Output
(Run the program to view its output)
Comments