Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Demonic_Vampire_Stats_v2._0
- {
- public partial class Demonic_Vampire_Stats : Form
- {
- public double Species { get; set; }
- public string Race { get; set; }
- public double Age { get; set; }
- public double State { get; set; }
- public double Blood { get; set; }
- public double BloodHealing { get; set; }
- public double MinStrength { get; set; }
- public double MinHealing { get; set; }
- public double MinSight { get; set; }
- public double MinHearing { get; set; }
- public double MinSmell { get; set; }
- public double MaxStrength { get; set; }
- public double MaxHealing { get; set; }
- public double MaxSight { get; set; }
- public double MaxHearing { get; set; }
- public double MaxSmell { get; set; }
- public double CurrentStrength { get; set; }
- public double CurrentHealing { get; set; }
- public double CurrentSight { get; set; }
- public double CurrentHearing { get; set; }
- public double CurrentSmell { get; set; }
- public string Changed { get; set; }
- public int StrengthDivider { get; set; }
- public int HealingDivider { get; set; }
- public double SensesDivider { get; set; }
- public double CompMultDiv { get; set; }
- public double EquationComp { get; set; }
- public double Squared { get; set; }
- public double MultDiv { get; set; }
- public double Level { get; set; }
- public double StageMultStrength { get; set; }
- public double StageMultHealing { get; set; }
- public double MultStrength { get; set; }
- public double MultHealing { get; set; }
- public double FirstState { get; set; }
- public double BloodMin { get; set; }
- public double BloodMax { get; set; }
- public double NormalBlood { get; set; }
- public double BloodValue { get; set; }
- public double BloodStage { get; set; }
- public double BloodCrazed { get; set; }
- public int Decimals { get; set; }
- public double Procent { get; set; }
- public bool Change { get; set; }
- public double HalfTime { get; set; }
- public Demonic_Vampire_Stats()
- {
- InitializeComponent();
- StrengthDivider = 5;
- HealingDivider = 10;
- SensesDivider = 13.333333;
- Decimals = 2;
- }
- // Note: Blood min must be replaced by values based on logic(firt iteration already integrated).
- private void Timer_Tick(object sender, EventArgs e)
- {
- if (Changed != txtAge.Text + txtBlood.Text + Tbspecies.Value + TbState.Value + RbDaysBloodless.Checked + Change)
- {
- try
- {
- Age = double.Parse(txtAge.Text);
- if (Age >= 0 && !String.IsNullOrEmpty(txtAge.Text) && double.Parse(txtBlood.Text) >= 0)
- {
- switch (Tbspecies.Value)
- {
- case 9:
- MinStrength = 1500;
- MinHealing = 1000;
- MinHearing = 1000;
- MinSight = 1000;
- MinSmell = 1000;
- MaxStrength = 1500;
- MaxHealing = 1000;
- MaxHearing = 1000;
- MaxSight = 1000;
- MaxSmell = 5000;
- EquationComp = 1;
- Squared = 1;
- CompMultDiv = 1;
- FirstState = 10;
- BloodMax = 1;
- Race = "Vezerak The Demon God of Vampires";
- break;
- case 8:
- MinStrength = 60;
- MinHealing = 75;
- MinHearing = 15;
- MinSight = 80;
- MinSmell = 90;
- MaxStrength = 1200;
- MaxHealing = 375;
- MaxHearing = 60;
- MaxSight = 400;
- MaxSmell = 1200;
- EquationComp = 750;
- Squared = 3;
- CompMultDiv = 150;
- FirstState = 6;
- NormalBlood = 8;
- BloodMin = 0.005;
- BloodMax = 10;
- Race = "Vampire God";
- break;
- case 7:
- MinStrength = 30;
- MinHealing = 50;
- MinHearing = 12;
- MinSight = 70;
- MinSmell = 60;
- MaxStrength = 450;
- MaxHealing = 250;
- MaxHearing = 48;
- MaxSight = 280;
- MaxSmell = 600;
- EquationComp = 700;
- Squared = 2.75;
- CompMultDiv = 125;
- FirstState = 4;
- NormalBlood = 5;
- BloodMin = 0.001;
- BloodMax = 8;
- Race = "Trueborn";
- break;
- case 6:
- MinStrength = 20;
- MinHealing = 40;
- MinHearing = 10;
- MinSight = 60;
- MinSmell = 50;
- MaxStrength = 300;
- MaxHealing = 200;
- MaxHearing = 40;
- MaxSight = 240;
- MaxSmell = 300;
- EquationComp = 650;
- Squared = 2.5;
- CompMultDiv = 100;
- FirstState = 3;
- NormalBlood = 4;
- BloodMin = 0.0002;
- BloodMax = 6.5;
- Race = "Pureblood";
- break;
- case 5:
- MinStrength = 15;
- MinHealing = 25;
- MinHearing = 8;
- MinSight = 50;
- MinSmell = 40;
- MaxStrength = 180;
- MaxHealing = 125;
- MaxHearing = 32;
- MaxSight = 200;
- MaxSmell = 240;
- EquationComp = 600;
- Squared = 2.25;
- CompMultDiv = 75;
- FirstState = 2.5;
- NormalBlood = 3;
- BloodMin = 0.0001;
- BloodMax = 5;
- Race = "Strong Firstborn";
- break;
- case 4:
- MinStrength = 10;
- MinHealing = 20;
- MinHearing = 7;
- MinSight = 45;
- MinSmell = 30;
- MaxStrength = 120;
- MaxHealing = 100;
- MaxHearing = 28;
- MaxSight = 180;
- MaxSmell = 180;
- EquationComp = 600;
- Squared = 2.25;
- CompMultDiv = 75;
- FirstState = 2.5;
- NormalBlood = 3;
- BloodMin = 0.0001;
- BloodMax = 5;
- Race = "Firstborn";
- break;
- case 3:
- MinStrength = 7.5;
- MinHealing = 15;
- MinHearing = 6;
- MinSight = 40;
- MinSmell = 20;
- MaxStrength = 75;
- MaxHealing = 75;
- MaxHearing = 24;
- MaxSight = 120;
- MaxSmell = 120;
- EquationComp = 550;
- Squared = 2;
- CompMultDiv = 66.666666666;
- FirstState = 2;
- NormalBlood = 2;
- BloodMin = 0.00002;
- BloodMax = 4;
- Race = "Strong Secondborn";
- break;
- case 2:
- MinStrength = 5;
- MinHealing = 10;
- MinHearing = 5;
- MinSight = 35;
- MinSmell = 15;
- MaxStrength = 50;
- MaxHealing = 50;
- MaxHearing = 20;
- MaxSight = 105;
- MaxSmell = 90;
- EquationComp = 550;
- Squared = 2;
- CompMultDiv = 66.666666666;
- FirstState = 2;
- NormalBlood = 2;
- BloodMin = 0.00002;
- BloodMax = 4;
- Race = "Secondborn";
- break;
- case 1:
- MinStrength = 3.75;
- MinHealing = 7.5;
- MinHearing = 4;
- MinSight = 33.333333;
- MinSmell = 10;
- MaxStrength = 30;
- MaxHealing = 37.5;
- MaxHearing = 16;
- MaxSight = 100;
- MaxSmell = 60;
- EquationComp = 250;
- Squared = 1.75;
- CompMultDiv = 50;
- FirstState = 1.666666666;
- NormalBlood = 1.5;
- BloodMin = 0.0000025;
- BloodMax = 3.5;
- Race = "Strong WeakBlood";
- break;
- case 0:
- MinStrength = 2.5;
- MinHealing = 5;
- MinHearing = 3;
- MinSight = 30;
- MinSmell = 7.5;
- MaxStrength = 20;
- MaxHealing = 25;
- MaxHearing = 12;
- MaxSight = 90;
- MaxSmell = 45;
- EquationComp = 250;
- Squared = 1.75;
- CompMultDiv = 50;
- FirstState = 1.666666666;
- NormalBlood = 1.5;
- BloodMin = 0.0000025;
- BloodMax = 3.5;
- Race = "WeakBlood";
- break;
- }
- if (Change == true)
- {
- if (RbBloodAmount.Checked == true)
- {
- lblBlood.Text = "L/Day";
- if (double.Parse(txtBlood.Text) == NormalBlood || double.Parse(txtBlood.Text) == 0)
- txtBlood.Text = "" + NormalBlood;
- Decimals = 2;
- }
- else
- {
- lblBlood.Text = "Days";
- txtBlood.Text = "" + 0;
- Decimals = 5;
- }
- }
- Change = false;
- CurrentStrength = MinStrength;
- CurrentHealing = MinHealing;
- CurrentSight = MinSight;
- CurrentSmell = MinSmell;
- CurrentHearing = MinHearing;
- if (Age >= 100000000000)
- {
- CurrentStrength = MaxStrength;
- CurrentHealing = MaxHealing;
- MultDiv = 1;
- CurrentSight = MaxSight;
- CurrentSmell = MaxSmell;
- CurrentHearing = MaxHearing;
- }
- else
- {
- Level = Age / EquationComp;
- Level = (System.Math.Pow(Level, (1.0 / Squared)));
- if (Level >= CompMultDiv)
- {
- MultDiv = 1;
- }
- else
- {
- MultDiv = (CompMultDiv / (Level));
- }
- for (Level = Level; Level >= 1; Level--)
- {
- CurrentStrength = CurrentStrength + ((MaxStrength - CurrentStrength) / StrengthDivider);
- CurrentHealing = CurrentHealing + ((MaxHealing - CurrentHealing) / HealingDivider);
- CurrentSight = CurrentSight + ((MaxSight - CurrentSight) / SensesDivider);
- CurrentSmell = CurrentSmell + ((MaxSmell - CurrentSmell) / SensesDivider);
- CurrentHearing = CurrentHearing + ((MaxHearing - CurrentHearing) / SensesDivider);
- }
- for (Level = Level; Level > 0 && Level < 1; Level = 0)
- {
- CurrentStrength = CurrentStrength + (((MaxStrength - CurrentStrength) / StrengthDivider) * Level);
- CurrentHealing = CurrentHealing + (((MaxHealing - CurrentHealing) / HealingDivider) * Level);
- CurrentSight = CurrentSight + (((MaxSight - CurrentSight) / SensesDivider) * Level);
- CurrentSmell = CurrentSmell + (((MaxSmell - CurrentSmell) / SensesDivider) * Level);
- CurrentHearing = CurrentHearing + (((MaxHearing - CurrentHearing) / SensesDivider) * Level);
- }
- }
- MultStrength = (1 + ((CurrentStrength - MinStrength) / (MaxStrength - MinStrength)) / MultDiv); // Multiplier multiplier strength
- MultHealing = (1 + ((CurrentHealing - MinHealing) / (MaxHealing - MinHealing)) / MultDiv); // Multiplier multiplier healing
- StageMultStrength = 1;
- if (Tbspecies.Value != 9)
- {
- switch (TbState.Value)
- {
- case 1:
- StageMultStrength = 1;
- StageMultHealing = 1;
- break;
- case 2:
- StageMultStrength = FirstState;
- StageMultHealing = 1 + ((MultStrength - 1) / 3);
- break;
- case 3:
- StageMultStrength = FirstState * 1.5;
- StageMultHealing = 1 + ((MultStrength - 1) / 3);
- break;
- case 4:
- StageMultStrength = FirstState * 2.25;
- StageMultHealing = 1 + ((MultStrength - 1) / 3);
- break;
- case 5:
- StageMultStrength = FirstState * 4.5;
- StageMultHealing = 1 + ((StageMultStrength - 1) / 3);
- break;
- }
- }
- else
- {
- MultStrength = 1;
- for (State = TbState.Value; State >= 2; State--)
- {
- MultStrength = MultStrength * 10;
- }
- MultHealing = MultStrength;
- }
- BloodValue = 1;
- Blood = double.Parse(txtBlood.Text);
- if (Blood < (NormalBlood * 10000))
- {
- if (RbBloodAmount.Checked == true)
- {
- BloodStage = double.Parse(txtBlood.Text) / NormalBlood;
- if (Blood >= NormalBlood)
- {
- for (BloodStage = BloodStage; BloodStage >= 2; BloodStage--)
- {
- BloodValue = BloodValue + ((BloodMax - BloodValue) / 5);
- }
- if (BloodStage > 1 && BloodStage < 2)
- {
- BloodValue = BloodValue + (((BloodMax - BloodValue) / 5) * BloodStage);
- }
- BloodHealing = 1 + (BloodValue - 1) / 3;
- }
- else
- {
- BloodHealing = BloodValue = BloodMin + (Blood / NormalBlood);
- }
- lblBlood.Text = "L/Day";
- }
- else
- {
- HalfTime = NormalBlood * 2;
- Procent = 10;
- for (BloodStage = Blood / HalfTime; BloodStage >= 1; BloodStage--)
- {
- BloodValue = BloodMin + BloodValue / 1.2;
- BloodValue = Math.Round(BloodValue, Decimals);
- }
- if (BloodStage < 1 && BloodStage > 0)
- {
- BloodValue = BloodMin + BloodValue / (1 + (0.2 * BloodStage));
- BloodValue = Math.Round(BloodValue, Decimals);
- }
- BloodHealing = BloodValue;
- lblBlood.Text = "Days";
- }
- }
- else
- {
- if (RbBloodAmount.Checked == true)
- {
- BloodValue = BloodMax;
- }
- else
- {
- BloodValue = BloodMin;
- }
- }
- CurrentStrength = CurrentStrength * MultStrength * BloodValue * StageMultStrength; // Strength
- CurrentHealing = CurrentHealing * MultHealing * BloodHealing * StageMultHealing; // Healing
- CurrentStrength = Math.Round(CurrentStrength, Decimals);
- CurrentHealing = Math.Round(CurrentHealing, Decimals);
- CurrentSight = Math.Round(CurrentSight, 2);
- CurrentSmell = Math.Round(CurrentSmell, 2);
- CurrentHearing = Math.Round(CurrentHearing, 2);
- }
- lblInfo.Text = "Info:\nRace: " + Race;
- lblInfo.Text += "\nStrength: " + CurrentStrength;
- lblInfo.Text += "\nHealing: " + CurrentHealing;
- lblInfo.Text += "\nSight: " + CurrentSight;
- lblInfo.Text += "\nSmell: " + CurrentSmell;
- lblInfo.Text += "\nHearing: " + CurrentHearing;
- //lblInfo.Text += "\nBlood: " + Procent;
- //lblInfo.Text += "\nBloodValue: " + BloodValue;
- }
- catch (FormatException)
- { }
- Changed = txtAge.Text + txtBlood.Text + Tbspecies.Value + TbState.Value + RbDaysBloodless.Checked + Change;
- }
- }
- private void RbDaysBloodless_CheckedChanged(object sender, EventArgs e)
- {
- Change = true;
- }
- private void Tbspecies_Scroll(object sender, EventArgs e)
- {
- Change = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement