Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <cmath>
- namespace dpscalc {
- using namespace System;
- using namespace System::ComponentModel;
- using namespace System::Collections;
- using namespace System::Windows::Forms;
- using namespace System::Data;
- using namespace System::Drawing;
- /// <summary>
- /// Summary for Form1
- ///
- /// WARNING: If you change the name of this class, you will need to change the
- /// 'Resource File Name' property for the managed resource compiler tool
- /// associated with all .resx files this class depends on. Otherwise,
- /// the designers will not be able to interact properly with localized
- /// resources associated with this form.
- /// </summary>
- public ref class Form1 : public System::Windows::Forms::Form
- {
- public:
- Form1(void)
- {
- InitializeComponent();
- //
- //TODO: Add the constructor code here
- //
- }
- protected:
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- ~Form1()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::TextBox^ pershot;
- protected:
- protected:
- private: System::Windows::Forms::Label^ label1;
- private: System::Windows::Forms::Label^ label2;
- private: System::Windows::Forms::TextBox^ rof;
- private: System::Windows::Forms::Label^ label3;
- private: System::Windows::Forms::TextBox^ mag;
- private: System::Windows::Forms::ComboBox^ comboBox1;
- private: System::Windows::Forms::Label^ label4;
- private: System::Windows::Forms::Label^ label7;
- private: System::Windows::Forms::TextBox^ reload;
- private: System::Windows::Forms::TextBox^ rofendo;
- private: System::Windows::Forms::TextBox^ magendo;
- private: System::Windows::Forms::Label^ label8;
- private: System::Windows::Forms::TextBox^ reloadendo;
- private: System::Windows::Forms::Label^ label9;
- private: System::Windows::Forms::Label^ label5;
- private: System::Windows::Forms::TextBox^ dps;
- private: System::Windows::Forms::Label^ label6;
- private: System::Windows::Forms::Label^ label10;
- private: System::Windows::Forms::TextBox^ endodps;
- private: System::Windows::Forms::Label^ label11;
- private: System::Windows::Forms::TextBox^ dpsgain;
- private: System::Windows::Forms::Label^ label12;
- private: System::Windows::Forms::TextBox^ noreload;
- private: System::Windows::Forms::Label^ label13;
- private: System::Windows::Forms::NumericUpDown^ level;
- private: System::Windows::Forms::Label^ label14;
- private: System::Windows::Forms::NumericUpDown^ offence;
- private: System::Windows::Forms::RadioButton^ bots;
- private: System::Windows::Forms::RadioButton^ turrets;
- private: System::Windows::Forms::RadioButton^ players;
- private: System::Windows::Forms::ToolTip^ toolTip1;
- private: System::ComponentModel::IContainer^ components;
- protected:
- private:
- /// <summary>
- /// Required designer variable.
- /// </summary>
- #pragma region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- void InitializeComponent(void)
- {
- this->components = (gcnew System::ComponentModel::Container());
- System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
- this->pershot = (gcnew System::Windows::Forms::TextBox());
- this->label1 = (gcnew System::Windows::Forms::Label());
- this->label2 = (gcnew System::Windows::Forms::Label());
- this->rof = (gcnew System::Windows::Forms::TextBox());
- this->label3 = (gcnew System::Windows::Forms::Label());
- this->mag = (gcnew System::Windows::Forms::TextBox());
- this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
- this->label4 = (gcnew System::Windows::Forms::Label());
- this->label7 = (gcnew System::Windows::Forms::Label());
- this->reload = (gcnew System::Windows::Forms::TextBox());
- this->rofendo = (gcnew System::Windows::Forms::TextBox());
- this->magendo = (gcnew System::Windows::Forms::TextBox());
- this->label8 = (gcnew System::Windows::Forms::Label());
- this->reloadendo = (gcnew System::Windows::Forms::TextBox());
- this->label9 = (gcnew System::Windows::Forms::Label());
- this->label5 = (gcnew System::Windows::Forms::Label());
- this->dps = (gcnew System::Windows::Forms::TextBox());
- this->label6 = (gcnew System::Windows::Forms::Label());
- this->label10 = (gcnew System::Windows::Forms::Label());
- this->endodps = (gcnew System::Windows::Forms::TextBox());
- this->label11 = (gcnew System::Windows::Forms::Label());
- this->dpsgain = (gcnew System::Windows::Forms::TextBox());
- this->label12 = (gcnew System::Windows::Forms::Label());
- this->noreload = (gcnew System::Windows::Forms::TextBox());
- this->label13 = (gcnew System::Windows::Forms::Label());
- this->level = (gcnew System::Windows::Forms::NumericUpDown());
- this->label14 = (gcnew System::Windows::Forms::Label());
- this->offence = (gcnew System::Windows::Forms::NumericUpDown());
- this->bots = (gcnew System::Windows::Forms::RadioButton());
- this->turrets = (gcnew System::Windows::Forms::RadioButton());
- this->players = (gcnew System::Windows::Forms::RadioButton());
- this->toolTip1 = (gcnew System::Windows::Forms::ToolTip(this->components));
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->level))->BeginInit();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->offence))->BeginInit();
- this->SuspendLayout();
- //
- // pershot
- //
- this->pershot->BackColor = System::Drawing::SystemColors::Window;
- this->pershot->Location = System::Drawing::Point(106, 12);
- this->pershot->Name = L"pershot";
- this->pershot->Size = System::Drawing::Size(56, 20);
- this->pershot->TabIndex = 0;
- this->pershot->Text = L"0";
- this->pershot->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->pershot->Leave += gcnew System::EventHandler(this, &Form1::pershot_Leave);
- //
- // label1
- //
- this->label1->AutoSize = true;
- this->label1->Location = System::Drawing::Point(12, 19);
- this->label1->Name = L"label1";
- this->label1->Size = System::Drawing::Size(88, 13);
- this->label1->TabIndex = 1;
- this->label1->Text = L"Damage per shot";
- //
- // label2
- //
- this->label2->AutoSize = true;
- this->label2->Location = System::Drawing::Point(12, 45);
- this->label2->Name = L"label2";
- this->label2->Size = System::Drawing::Size(59, 13);
- this->label2->TabIndex = 3;
- this->label2->Text = L"Rate of fire";
- //
- // rof
- //
- this->rof->Location = System::Drawing::Point(106, 38);
- this->rof->Name = L"rof";
- this->rof->Size = System::Drawing::Size(56, 20);
- this->rof->TabIndex = 2;
- this->rof->Text = L"0";
- this->rof->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->rof->Leave += gcnew System::EventHandler(this, &Form1::rof_Leave);
- //
- // label3
- //
- this->label3->AutoSize = true;
- this->label3->Location = System::Drawing::Point(12, 71);
- this->label3->Name = L"label3";
- this->label3->Size = System::Drawing::Size(49, 13);
- this->label3->TabIndex = 5;
- this->label3->Text = L"Mag size";
- //
- // mag
- //
- this->mag->Location = System::Drawing::Point(106, 64);
- this->mag->Name = L"mag";
- this->mag->Size = System::Drawing::Size(56, 20);
- this->mag->TabIndex = 4;
- this->mag->Text = L"0";
- this->mag->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->mag->Leave += gcnew System::EventHandler(this, &Form1::mag_Leave);
- //
- // comboBox1
- //
- this->comboBox1->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
- this->comboBox1->FormattingEnabled = true;
- this->comboBox1->Items->AddRange(gcnew cli::array< System::Object^ >(29) {L"Assassin Blade", L"Assassin Shuriken", L"Spark Voltage Spike",
- L"Spark Ray Gun", L"Wascot Heartbreaker", L"Wascot Coin Launcher", L"Assault Rifle", L"Assault Grenade Launcher", L"Karl Handler",
- L"Karl Bouncing Buddies", L"Megabeth Rocket Ma\'am", L"Megabeth Bearing Hates", L"Cheston Tommy Gun", L"Cheston Family Jewel",
- L"Gunner Minigun", L"Gunner Dual Minigun", L"Gunner Mortar", L"Tank Jetgun", L"Tank Railgun", L"Veteran Falcon", L"Veteran Hot Seat",
- L"Combat Girl Combat Healer", L"Combat Girl Nailgun", L"Support Heal/Hurt Gun", L"Support Shotgun", L"Gunslinger Lucinda", L"Gunslinger Love Pistol",
- L"Sniper Rifle", L"Sniper SMG"});
- this->comboBox1->Location = System::Drawing::Point(15, 116);
- this->comboBox1->Name = L"comboBox1";
- this->comboBox1->Size = System::Drawing::Size(147, 21);
- this->comboBox1->TabIndex = 6;
- this->comboBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox1_SelectedIndexChanged);
- //
- // label4
- //
- this->label4->AutoSize = true;
- this->label4->Location = System::Drawing::Point(12, 206);
- this->label4->Name = L"label4";
- this->label4->Size = System::Drawing::Size(61, 13);
- this->label4->TabIndex = 9;
- this->label4->Text = L"ROF bonus";
- //
- // label7
- //
- this->label7->AutoSize = true;
- this->label7->Location = System::Drawing::Point(12, 97);
- this->label7->Name = L"label7";
- this->label7->Size = System::Drawing::Size(73, 13);
- this->label7->TabIndex = 13;
- this->label7->Text = L"Reload speed";
- //
- // reload
- //
- this->reload->Location = System::Drawing::Point(106, 90);
- this->reload->Name = L"reload";
- this->reload->Size = System::Drawing::Size(56, 20);
- this->reload->TabIndex = 12;
- this->reload->Text = L"0";
- this->reload->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->reload->Leave += gcnew System::EventHandler(this, &Form1::reload_Leave);
- //
- // rofendo
- //
- this->rofendo->Location = System::Drawing::Point(106, 199);
- this->rofendo->Name = L"rofendo";
- this->rofendo->Size = System::Drawing::Size(56, 20);
- this->rofendo->TabIndex = 14;
- this->rofendo->Text = L"0";
- this->rofendo->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->rofendo->Leave += gcnew System::EventHandler(this, &Form1::rofendo_Leave);
- //
- // magendo
- //
- this->magendo->Location = System::Drawing::Point(106, 225);
- this->magendo->Name = L"magendo";
- this->magendo->Size = System::Drawing::Size(56, 20);
- this->magendo->TabIndex = 16;
- this->magendo->Text = L"0";
- this->magendo->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->magendo->Leave += gcnew System::EventHandler(this, &Form1::magendo_Leave);
- //
- // label8
- //
- this->label8->AutoSize = true;
- this->label8->Location = System::Drawing::Point(12, 232);
- this->label8->Name = L"label8";
- this->label8->Size = System::Drawing::Size(60, 13);
- this->label8->TabIndex = 15;
- this->label8->Text = L"Mag bonus";
- //
- // reloadendo
- //
- this->reloadendo->Location = System::Drawing::Point(106, 251);
- this->reloadendo->Name = L"reloadendo";
- this->reloadendo->Size = System::Drawing::Size(56, 20);
- this->reloadendo->TabIndex = 18;
- this->reloadendo->Text = L"0";
- this->reloadendo->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->reloadendo->Leave += gcnew System::EventHandler(this, &Form1::reloadendo_Leave);
- //
- // label9
- //
- this->label9->AutoSize = true;
- this->label9->Location = System::Drawing::Point(12, 258);
- this->label9->Name = L"label9";
- this->label9->Size = System::Drawing::Size(73, 13);
- this->label9->TabIndex = 17;
- this->label9->Text = L"Reload bonus";
- //
- // label5
- //
- this->label5->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
- this->label5->Location = System::Drawing::Point(12, 308);
- this->label5->Name = L"label5";
- this->label5->Size = System::Drawing::Size(148, 2);
- this->label5->TabIndex = 19;
- this->label5->Text = L" ";
- //
- // dps
- //
- this->dps->BackColor = System::Drawing::SystemColors::Control;
- this->dps->Location = System::Drawing::Point(106, 348);
- this->dps->Name = L"dps";
- this->dps->ReadOnly = true;
- this->dps->Size = System::Drawing::Size(56, 20);
- this->dps->TabIndex = 20;
- this->dps->Text = L"0";
- this->dps->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- //
- // label6
- //
- this->label6->AutoSize = true;
- this->label6->Location = System::Drawing::Point(12, 355);
- this->label6->Name = L"label6";
- this->label6->Size = System::Drawing::Size(54, 13);
- this->label6->TabIndex = 21;
- this->label6->Text = L"Real DPS";
- //
- // label10
- //
- this->label10->AutoSize = true;
- this->label10->Location = System::Drawing::Point(12, 381);
- this->label10->Name = L"label10";
- this->label10->Size = System::Drawing::Size(77, 13);
- this->label10->TabIndex = 23;
- this->label10->Text = L"Endorsed DPS";
- //
- // endodps
- //
- this->endodps->Location = System::Drawing::Point(106, 374);
- this->endodps->Name = L"endodps";
- this->endodps->ReadOnly = true;
- this->endodps->Size = System::Drawing::Size(56, 20);
- this->endodps->TabIndex = 22;
- this->endodps->Text = L"0";
- this->endodps->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- //
- // label11
- //
- this->label11->AutoSize = true;
- this->label11->Location = System::Drawing::Point(12, 407);
- this->label11->Name = L"label11";
- this->label11->Size = System::Drawing::Size(52, 13);
- this->label11->TabIndex = 25;
- this->label11->Text = L"DPS gain";
- //
- // dpsgain
- //
- this->dpsgain->Location = System::Drawing::Point(106, 400);
- this->dpsgain->Name = L"dpsgain";
- this->dpsgain->ReadOnly = true;
- this->dpsgain->Size = System::Drawing::Size(56, 20);
- this->dpsgain->TabIndex = 24;
- this->dpsgain->Text = L"0%";
- this->dpsgain->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- //
- // label12
- //
- this->label12->AutoSize = true;
- this->label12->Location = System::Drawing::Point(12, 329);
- this->label12->Name = L"label12";
- this->label12->Size = System::Drawing::Size(78, 13);
- this->label12->TabIndex = 27;
- this->label12->Text = L"No-reload DPS";
- //
- // noreload
- //
- this->noreload->BackColor = System::Drawing::SystemColors::Control;
- this->noreload->Location = System::Drawing::Point(106, 322);
- this->noreload->Name = L"noreload";
- this->noreload->ReadOnly = true;
- this->noreload->Size = System::Drawing::Size(56, 20);
- this->noreload->TabIndex = 26;
- this->noreload->Text = L"0";
- this->noreload->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- //
- // label13
- //
- this->label13->AutoSize = true;
- this->label13->Location = System::Drawing::Point(12, 154);
- this->label13->Name = L"label13";
- this->label13->Size = System::Drawing::Size(70, 13);
- this->label13->TabIndex = 29;
- this->label13->Text = L"Offence level";
- //
- // level
- //
- this->level->Location = System::Drawing::Point(106, 173);
- this->level->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {15, 0, 0, 0});
- this->level->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
- this->level->Name = L"level";
- this->level->Size = System::Drawing::Size(54, 20);
- this->level->TabIndex = 30;
- this->level->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->level->UpDownAlign = System::Windows::Forms::LeftRightAlignment::Left;
- this->level->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
- this->level->ValueChanged += gcnew System::EventHandler(this, &Form1::level_ValueChanged);
- this->level->Leave += gcnew System::EventHandler(this, &Form1::level_Leave);
- //
- // label14
- //
- this->label14->AutoSize = true;
- this->label14->Location = System::Drawing::Point(12, 180);
- this->label14->Name = L"label14";
- this->label14->Size = System::Drawing::Size(48, 13);
- this->label14->TabIndex = 31;
- this->label14->Text = L"Pro level";
- //
- // offence
- //
- this->offence->Location = System::Drawing::Point(106, 147);
- this->offence->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {4, 0, 0, 0});
- this->offence->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
- this->offence->Name = L"offence";
- this->offence->Size = System::Drawing::Size(54, 20);
- this->offence->TabIndex = 32;
- this->offence->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
- this->offence->UpDownAlign = System::Windows::Forms::LeftRightAlignment::Left;
- this->offence->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
- this->offence->ValueChanged += gcnew System::EventHandler(this, &Form1::offence_ValueChanged);
- this->offence->Leave += gcnew System::EventHandler(this, &Form1::offence_Leave);
- //
- // bots
- //
- this->bots->AutoSize = true;
- this->bots->CheckAlign = System::Drawing::ContentAlignment::TopCenter;
- this->bots->Location = System::Drawing::Point(13, 276);
- this->bots->Name = L"bots";
- this->bots->Size = System::Drawing::Size(32, 30);
- this->bots->TabIndex = 33;
- this->bots->Text = L"Bots";
- this->bots->UseVisualStyleBackColor = true;
- this->bots->Click += gcnew System::EventHandler(this, &Form1::bots_Click);
- //
- // turrets
- //
- this->turrets->AutoSize = true;
- this->turrets->CheckAlign = System::Drawing::ContentAlignment::TopCenter;
- this->turrets->Location = System::Drawing::Point(61, 276);
- this->turrets->Name = L"turrets";
- this->turrets->Size = System::Drawing::Size(44, 30);
- this->turrets->TabIndex = 34;
- this->turrets->Text = L"Turrets";
- this->turrets->UseVisualStyleBackColor = true;
- this->turrets->Click += gcnew System::EventHandler(this, &Form1::turrets_Click);
- //
- // players
- //
- this->players->AutoSize = true;
- this->players->CheckAlign = System::Drawing::ContentAlignment::TopCenter;
- this->players->Checked = true;
- this->players->Location = System::Drawing::Point(115, 276);
- this->players->Name = L"players";
- this->players->Size = System::Drawing::Size(45, 30);
- this->players->TabIndex = 35;
- this->players->TabStop = true;
- this->players->Text = L"Players";
- this->players->UseVisualStyleBackColor = true;
- this->players->Click += gcnew System::EventHandler(this, &Form1::players_Click);
- //
- // toolTip1
- //
- this->toolTip1->IsBalloon = true;
- //
- // Form1
- //
- this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->ClientSize = System::Drawing::Size(174, 432);
- this->Controls->Add(this->players);
- this->Controls->Add(this->turrets);
- this->Controls->Add(this->bots);
- this->Controls->Add(this->offence);
- this->Controls->Add(this->label14);
- this->Controls->Add(this->level);
- this->Controls->Add(this->label13);
- this->Controls->Add(this->label12);
- this->Controls->Add(this->noreload);
- this->Controls->Add(this->label11);
- this->Controls->Add(this->dpsgain);
- this->Controls->Add(this->label10);
- this->Controls->Add(this->endodps);
- this->Controls->Add(this->label6);
- this->Controls->Add(this->dps);
- this->Controls->Add(this->label5);
- this->Controls->Add(this->reloadendo);
- this->Controls->Add(this->label9);
- this->Controls->Add(this->magendo);
- this->Controls->Add(this->label8);
- this->Controls->Add(this->rofendo);
- this->Controls->Add(this->label7);
- this->Controls->Add(this->reload);
- this->Controls->Add(this->label4);
- this->Controls->Add(this->comboBox1);
- this->Controls->Add(this->label3);
- this->Controls->Add(this->mag);
- this->Controls->Add(this->label2);
- this->Controls->Add(this->rof);
- this->Controls->Add(this->label1);
- this->Controls->Add(this->pershot);
- this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedToolWindow;
- this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
- this->MaximizeBox = false;
- this->MinimizeBox = false;
- this->Name = L"Form1";
- this->ShowIcon = false;
- this->ShowInTaskbar = false;
- this->Text = L"DPS calc";
- this->TopMost = true;
- this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->level))->EndInit();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->offence))->EndInit();
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- private: System::Void comboBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
- if (this->comboBox1->Text == L"Assassin Blade") {
- this->pershot->Text = L"65";
- this->rof->Text = L"0.5";
- this->mag->Text = L"1";
- this->reload->Text = L"0";
- }
- else if (this->comboBox1->Text == L"Assassin Shuriken") {
- this->pershot->Text = L"30";
- this->rof->Text = L"0.1";
- this->mag->Text = L"5";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Spark Voltage Spike") {
- this->pershot->Text = L"50";
- this->rof->Text = L"0.325";
- this->mag->Text = L"1";
- this->reload->Text = L"0";
- }
- else if (this->comboBox1->Text == L"Spark Ray Gun") {
- this->pershot->Text = L"64";
- this->rof->Text = L"0.5";
- this->mag->Text = L"10";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Wascot Heartbreaker") {
- this->pershot->Text = L"50";
- this->rof->Text = L"0.325";
- this->mag->Text = L"1";
- this->reload->Text = L"0";
- }
- else if (this->comboBox1->Text == L"Wascot Coin Launcher") {
- this->pershot->Text = L"100";
- this->rof->Text = L"1";
- this->mag->Text = L"4";
- this->reload->Text = L"1.5";
- }
- else if (this->comboBox1->Text == L"Assault Rifle") {
- this->pershot->Text = L"18";
- this->rof->Text = L"0.1";
- this->mag->Text = L"25";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Assault Grenade Launcher") {
- this->pershot->Text = L"99";
- this->rof->Text = L"0.75";
- this->mag->Text = L"6";
- this->reload->Text = L"1.8";
- }
- else if (this->comboBox1->Text == L"Karl Handler") {
- this->pershot->Text = L"36";
- this->rof->Text = L"0.2";
- this->mag->Text = L"15";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Karl Bouncing Buddies") {
- this->pershot->Text = L"70";
- this->rof->Text = L"0.25";
- this->mag->Text = L"4";
- this->reload->Text = L"1.75";
- }
- else if (this->comboBox1->Text == L"Megabeth Rocket Ma'am") {
- this->pershot->Text = L"120";
- this->rof->Text = L"0.7";
- this->mag->Text = L"4";
- this->reload->Text = L"1.35";
- }
- else if (this->comboBox1->Text == L"Megabeth Bearing Hates") {
- this->pershot->Text = L"27";
- this->rof->Text = L"0.2";
- this->mag->Text = L"20";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Cheston Tommy Gun") {
- this->pershot->Text = L"21";
- this->rof->Text = L"0.1";
- this->mag->Text = L"100";
- this->reload->Text = L"2";
- }
- else if (this->comboBox1->Text == L"Cheston Family Jewel") {
- this->pershot->Text = L"88";
- this->rof->Text = L"0.5";
- this->mag->Text = L"1";
- this->reload->Text = L"0";
- }
- else if (this->comboBox1->Text == L"Gunner Minigun") {
- this->pershot->Text = L"25";
- this->rof->Text = L"0.1";
- this->mag->Text = L"200";
- this->reload->Text = L"5";
- }
- else if (this->comboBox1->Text == L"Gunner Dual Minigun") {
- this->pershot->Text = L"20";
- this->rof->Text = L"0.075";
- this->mag->Text = L"300";
- this->reload->Text = L"5";
- }
- else if (this->comboBox1->Text == L"Gunner Mortar") {
- this->pershot->Text = L"50";
- this->rof->Text = L"1";
- this->mag->Text = L"10";
- this->reload->Text = L"2";
- }
- else if (this->comboBox1->Text == L"Tank Jetgun") {
- this->pershot->Text = L"23";
- this->rof->Text = L"0.1";
- this->mag->Text = L"100";
- this->reload->Text = L"2";
- }
- else if (this->comboBox1->Text == L"Tank Railgun") {
- this->pershot->Text = L"75";
- this->rof->Text = L"1";
- this->mag->Text = L"6";
- this->reload->Text = L"2";
- }
- else if (this->comboBox1->Text == L"Veteran Falcon") {
- this->pershot->Text = L"46";
- this->rof->Text = L"0.75";
- this->mag->Text = L"3";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Veteran Hot Seat") {
- this->pershot->Text = L"79";
- this->rof->Text = L"0.5";
- this->mag->Text = L"1";
- this->reload->Text = L"0";
- }
- else if (this->comboBox1->Text == L"Combat Girl Combat Healer") {
- this->pershot->Text = L"5";
- this->rof->Text = L"0.25";
- this->mag->Text = L"1";
- this->reload->Text = L"0";
- }
- else if (this->comboBox1->Text == L"Combat Girl Nailgun") {
- this->pershot->Text = L"27";
- this->rof->Text = L"0.15";
- this->mag->Text = L"15";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Support Heal/Hurt Gun") {
- this->pershot->Text = L"10";
- this->rof->Text = L"0.25";
- this->mag->Text = L"20";
- this->reload->Text = L"1.2";
- }
- else if (this->comboBox1->Text == L"Support Shotgun") {
- this->pershot->Text = L"120";
- this->rof->Text = L"0.8";
- this->mag->Text = L"8";
- this->reload->Text = L"1.75";
- }
- else if (this->comboBox1->Text == L"Gunslinger Lucinda") {
- this->pershot->Text = L"54";
- this->rof->Text = L"0.75";
- this->mag->Text = L"10";
- this->reload->Text = L"1.5";
- }
- else if (this->comboBox1->Text == L"Gunslinger Love Pistol") {
- this->pershot->Text = L"37";
- this->rof->Text = L"0.3";
- this->mag->Text = L"6";
- this->reload->Text = L"1";
- }
- else if (this->comboBox1->Text == L"Sniper Rifle") {
- this->pershot->Text = L"67";
- this->rof->Text = L"1";
- this->mag->Text = L"5";
- this->reload->Text = L"2";
- }
- else if (this->comboBox1->Text == L"Sniper SMG") {
- this->pershot->Text = L"16";
- this->rof->Text = L"0.1";
- this->mag->Text = L"15";
- this->reload->Text = L"1";
- }
- Parse(this->pershot->Text,pershotv);
- Parse(this->rof->Text,rofv);
- Parse(this->mag->Text,magv);
- Parse(this->reload->Text,reloadv);
- Parse(this->rofendo->Text,rofendov);
- Parse(this->magendo->Text,magendov);
- Parse(this->reloadendo->Text,reloadendov);
- maxmag = ceil((round(magv*0.25)/magv-0.5/magv)*10000)/100;
- toolTip1->SetToolTip(this->label8, L"Max useful mag bonus is "+maxmag.ToString()+"%");
- rofendov=1-rofendov/100;
- magendov/=100;
- reloadendov=1-reloadendov/100;
- calculate();
- }
- double round(double x) {
- double t;
- t = x-floor(x);
- if (t>=0.5) {
- t=ceil(x);
- }
- else {
- t=floor(x);
- }
- return(t);
- }
- bool Parse(System::String ^s, double %result) {
- if (s->Contains(L".")) {
- s=s->Replace(L'.',L',');
- }
- if (Double::TryParse(s,result)) {
- return false;
- }
- else {
- return true;
- }
- }
- double pershotv,rofv,magv,reloadv,magbonus,rofendov,magendov,reloadendov,maxmag;
- static int target=1,offencev=1,levelv=1;
- void calculate(void) {
- magbonus = round(magendov*magv);
- double pershotmod;
- pershotmod = pershotv * ((levelv-1)*0.142857143+1);
- switch (offencev) {
- case 2: pershotmod*=1.16; break;
- case 3: pershotmod*=1.33; break;
- case 4: pershotmod*=1.5; break;
- }
- switch (target) {
- case 2: pershotmod*=((levelv-1)*0.0714285714+1); break;
- case 3: pershotmod*=((levelv-1)*0.142857143+1); break;
- }
- double noreload = round(100*pershotmod/rofv)/100;
- double dps = round(100*pershotmod*magv/(rofv*magv+reloadv))/100;
- double dpsendo = round(100*pershotmod*(magv+magbonus)/(rofv*rofendov*(magv+magbonus)+reloadv*reloadendov))/100;
- double dpsgain = round((1-dps/dpsendo)*100);
- if (rofv==0) {
- noreload=0;
- dps=0;
- dpsendo=0;
- dpsgain=0;
- }
- this->noreload->Text = noreload.ToString()->Replace(L',',L'.');
- this->dps->Text = dps.ToString()->Replace(L',',L'.');
- this->endodps->Text = dpsendo.ToString()->Replace(L',',L'.');
- this->dpsgain->Text = dpsgain.ToString()+L'%';
- }
- private: System::Void pershot_Leave(System::Object^ sender, System::EventArgs^ e) {
- if (Parse(this->pershot->Text,pershotv)) {this->pershot->Text=L"0";}
- calculate();
- }
- private: System::Void rof_Leave(System::Object^ sender, System::EventArgs^ e) {
- if (Parse(this->rof->Text,rofv)) {this->rof->Text=L"0";}
- calculate();
- }
- private: System::Void mag_Leave(System::Object^ sender, System::EventArgs^ e) {
- if (Parse(this->mag->Text,magv)) {this->mag->Text=L"0";}
- maxmag = ceil((round(magv*0.25)/magv-0.5/magv)*10000)/100;
- toolTip1->SetToolTip(this->label8, L"Max useful mag bonus is "+maxmag.ToString()+"%");
- calculate();
- }
- private: System::Void reload_Leave(System::Object^ sender, System::EventArgs^ e) {
- if (Parse(this->reload->Text,reloadv)) {this->reload->Text=L"0";}
- calculate();
- }
- private: System::Void rofendo_Leave(System::Object^ sender, System::EventArgs^ e) {
- if (Parse(this->rofendo->Text,rofendov)) {this->rofendo->Text=L"0";}
- rofendov = 1-rofendov/100;
- calculate();
- }
- private: System::Void magendo_Leave(System::Object^ sender, System::EventArgs^ e) {
- if (Parse(this->magendo->Text,magendov)) {this->magendo->Text=L"0";}
- magendov/=100;
- calculate();
- }
- private: System::Void reloadendo_Leave(System::Object^ sender, System::EventArgs^ e) {
- if (Parse(this->reloadendo->Text,reloadendov)) {this->reloadendo->Text=L"0";}
- reloadendov=1-reloadendov/100;
- calculate();
- }
- private: System::Void players_Click(System::Object^ sender, System::EventArgs^ e) {
- target=1;
- calculate();
- }
- private: System::Void turrets_Click(System::Object^ sender, System::EventArgs^ e) {
- target=2;
- calculate();
- }bb
- private: System::Void bots_Click(System::Object^ sender, System::EventArgs^ e) {
- target=3;
- calculate();
- }
- private: System::Void offence_ValueChanged(System::Object^ sender, System::EventArgs^ e) {
- if (levelv<4 && this->offence->Value>2) {
- this->offence->Value=2;
- } else if (levelv<8 && this->offence->Value==4) {
- this->offence->Value=3;
- }
- offencev=int(this->offence->Value);
- calculate();
- }
- private: System::Void level_ValueChanged(System::Object^ sender, System::EventArgs^ e) {
- levelv=int(this->level->Value);
- if (levelv<4 && this->offence->Value>2) {
- this->offence->Value=2;
- } else if (levelv<8 && this->offence->Value==4) {
- this->offence->Value=3;
- }
- calculate();
- }
- private: System::Void offence_Leave(System::Object^ sender, System::EventArgs^ e) {
- this->offence->Text=this->offence->Value.ToString();
- }
- private: System::Void level_Leave(System::Object^ sender, System::EventArgs^ e) {
- this->level->Text=this->level->Value.ToString()->Replace(L',',L'.');
- }
- private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
- toolTip1->SetToolTip(this->bots, L"Jackbots have 30000 hp\nFujibots have 10800 hp\nBouncers have 7750 hp\nShadybots and Blackjacks have 2700 hp\nScramblers have 1800 hp\nGremlins have 450 hp\nSlims have 90 hp");
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement