The Azure Heights Forum


Post New Topic  New Poll  Post A Reply
my profile | search | faq | forum home
  next oldest topic   next newest topic
» The Azure Heights Forum   » Main Campus   » Research Lab   » A C++ Program I wrote just today.

UBBFriend: Email this page to someone!    
Author Topic: A C++ Program I wrote just today.
MK
is somewhat large.
Member # 1445

Member Rated:
posted 07-09-2001 04:33 PM      Profile for MK     Send New Private Message      Edit/Delete Post  Reply With Quote 
Hi, anyway, I wanted to write a program to do some neat stuff with the score you get at the Bug Catching Contest, but, before I can expand upon my program, I need to make sure that the heart (main part) of it works properly. It's written in C++ and I need testers, if any of you could run this and test it against your own findings, please do so, thank you. Check out

http://www.geocities.com/meowth346/gs/formulas/bugcontest.htm


for more info on how this is done... now for the source code, thank you for your time -MK
P.S. This is "not" my final program, it is in it's early stages, I just need to know "this" part of it works.

======================
void bugA()
{
int temp;
int at; //add this.;
at = 0;

cout << "Which bug do you want to use?";
cout << endl;
cout << "Please choose a number." << endl;
cout << endl;
cout << "1 - Caterpie" << endl;
cout << "2 - Metapod" << endl;
cout << "3 - Butterfree" << endl;
cout << "4 - Weedle" << endl;
cout << "5 - Kakuna" << endl;
cout << "6 - Beedrill" << endl;
cout << "7 - Paras" << endl;
cout << "8 - Venonat" << endl;
cout << "9 - Scyther" << endl;
cout << "10 - Pinsir" << endl << endl;
cin >> temp;
cout << endl << endl;
int atk, def, speed, special, level;

cout << "Enter the Attack DV (0 - 15) --> ";
cin >> atk;
//cout << endl;
cout << "Enter the Defense DV (0 - 15) --> ";
cin >> def;
//cout << endl;
cout << "Enter the Speed DV (0 - 15) --> ";
cin >> speed;
//cout << endl;
cout << "Enter the Special DV (0 - 15) --> ";
cin >> special;
//cout << endl << endl;
cout << endl;
cout << "Enter the level --> ";
cin >> level;
cout << endl;
cout << "Enter remaining HP --> ";
int remainHP;
cin >> remainHP;

cout << endl << endl << endl;

at = 0;
if (atk % 2 == 1)
{
at = at + 8;
}
if (def % 2 == 1)
{
at = at + 4;
}
if (speed % 2 == 1)
{
at = at + 2;
}
if (special % 2 == 1)
{
at = at + 1;
}

int A;
A = 0;
if(atk % 2 == 1)
{
A = A + 16;
}
if(def % 2 == 1)
{
A = A + 8;
}
if(speed % 2 == 1)
{
A = A + 4;
}
if(special % 2 == 1)
{
A = A + 1;
}
//-----------

int catk;
int cdef;
int cspeed;
int cspecialA;
int cspecialD;
int cHP;

if (temp == 1)
{
cHP = 45;
catk = 30;
cdef = 35;
cspeed = 45;
cspecialA = 20;
cspecialD = 20;
}

if (temp == 2)
{
cHP = 50;
catk = 20;
cdef = 55;
cspeed = 30;
cspecialA = 25;
cspecialD = 25;
}

if (temp == 3)
{
cHP = 60;
catk = 45;
cdef = 50;
cspeed = 70;
cspecialA = 80;
cspecialD = 80;
}

if (temp == 4)
{
cHP = 40;
catk = 35;
cdef = 30;
cspeed = 50;
cspecialA = 20;
cspecialD = 20;
}

if (temp == 5)
{
cHP = 45;
catk = 25;
cdef = 50;
cspeed = 35;
cspecialA = 25;
cspecialD = 25;
}

if (temp == 6)
{
cHP = 65;
catk = 80;
cdef = 40;
cspeed = 75;
cspecialA = 45;
cspecialD = 80;
}

if (temp == 7)
{
cHP = 35;
catk = 70;
cdef = 55;
cspeed = 25;
cspecialA = 45;
cspecialD = 55;
}
//Paras |46|35|70|55|25|45|55|1|bug/gra

if (temp == 8)
{
cHP = 60;
catk = 55;
cdef = 50;
cspeed = 45;
cspecialA = 40;
cspecialD = 55;
}
//Venonat |48|60|55|50|45|40|55|1|poi/bug
//Scyther |123|70|110|80|105|55|80|1|bug/fly
//Pinsir |127|65|125|100|85|55|70|1|bug

if (temp == 9)
{
cHP = 70;
catk = 110;
cdef = 80;
cspeed = 105;
cspecialA = 55;
cspecialD = 80;
}
//Scyther |123|70|110|80|105|55|80|1|bug/fly
//Pinsir |127|65|125|100|85|55|70|1|bug

if (temp == 10)
{
cHP = (65 + 0);
catk = 125;
cdef = 100;
cspeed = 85;
cspecialA = 55;
cspecialD = 70;
}
//Pinsir |127|65|125|100|85|55|70|1|bug

//-==========
//Stat = int(((A+B)*2+C)*D/100)+E
catk = (((catk+atk)*2+0)*level/100)+5;
cdef = (((cdef+def)*2+0)*level/100)+5;
cspeed = (((cspeed+speed)*2+0)*level/100)+5;
cspecialA = (((cspecialA+special)*2+0)*level/100)+5;
cspecialD = (((cspecialD+special)*2+0)*level/100)+5;

//calc hp dv

//temp is now equal to HP dv;
cHP = (((cHP+at)*2+0)*level/100)+(level+10);

int fs;
fs = 0;

fs = (cHP * 4) + catk + cdef;
fs = fs + cspeed + cspecialA;
fs = fs + cspecialD;
temp = remainHP / 8;
fs = fs + A + (temp + 0) + 1;

//------
cout << "Final Score for this bug: ";
cout << fs << endl << endl;


cout << endl << endl;
}//end of program lies here


Registered: Jan 2001  |  IP: Logged


All times are ET (US)  
Post New Topic  New Poll  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Printer-friendly view of this topic
Hop To:


Contact Us | Azure Heights Pokémon Laboratory

© 2000-2016, Maximum Penetration Industries.

Karpe Diem


The views and opinions expressed on this page are strictly those of the author(s). The contents and links have not been reviewed or approved by the University of Miami.