Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Battle Algorythm
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int damageCalculator = 16; //Hero's attack int ATK = 20; //monster's defense int DEF = 15; //Agility and Luck double heroAgility = 100; double heroLuck = 100; double baseAgility = (heroAgility / 10); double baseLuck = (heroLuck / 10); Random randomLuck = new Random(); Console.WriteLine(randomLuck); Console.WriteLine(baseAgility); Console.WriteLine(baseLuck); // int armour = 20; float armourReduction = armour/ 3; armourReduction = 1 - armourReduction / 100; double baseATK = ((Math.Pow(ATK, 3))); // Console.WriteLine(statsPow); //baseDMG = (((Math.Pow(127, double 3) / 32) + 32) x DmCon / 16); //Damage Calculations double baseDMG = ((baseATK / 32 + 32) + damageCalculator / 16); double calculatorDEF = ((Math.Pow((DEF - 280.4), 2) / 110) + 16); double finalDMG = ((baseDMG * calculatorDEF / 730) * armourReduction); //Console Output Console.WriteLine("Base Damage: " + baseDMG); Console.WriteLine("Defense Contant: " + calculatorDEF); Console.WriteLine("Armour reduction: " + armourReduction); Console.WriteLine("Final Damage: " + finalDMG); //Base Damage = 64043 //I need to add armour element % e.g. 3 armour points = 1 % reduction } } }
run
|
edit
|
history
|
help
0
Task List
Nullable type - Value Exception - Solution
Create id
first
Katakana Quiz
custom Generic Que Implementation
Array Alternate elements
first test
Code1
decimal to binary conversion