1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
//Food FUNTION<---------------------------------
int Food(int iLevel, int iLevelCost, int iCharF, int iTime, int iFood, int iDayTime, int iDays)
{
int iFoodChance = 0;
int iChance = 0;
int iCost = 0;
iCost = 15 + iCharF + iLevelCost;
iChance = iLevel - (iDays *5) + iCharF;
iFoodChance= rand() % 100 + 1;
if(iFoodChance <= iChance)
{
iFood = iFoodChance/5;
iTime -= iCost;
}
else
{
cout<<"You failed, no food is found. Nubs.....\n";
}
return;// (int iLevel, int iLevelCost, int iCharF, int iTime, int iFood, int iDayTime, int iDays); <---- doesnt return the variabels
}
int _tmain(int argc, _TCHAR* argv[])
{
//Remember to put in title <!@#!@%!@$@#!$@!%^!%^&*&%^(W#IUHAW^@&*$(#&@$~%^!@%!$~ERF
white();
cout << "WELCOME TO ";
bred();
cout << "LORD OF THE FLEAS\n";
white();
cout << "This is a Texted based RPG, that the developers were forced to make. \n We basically spent 2 weeks on the title screen, and a 48 hour session of coding on the weekend.";
cout << " We also were to lazy to make a story, so we are taking the plot of 'Lord of the Flies' by William Golding. So basically your flying away from Britian to get away";
cout << "from World War II, and your shot down and land on an island. Now you and other kids have to survive till you are rescued. ";
cout << " In order to have the most success you must use knowledge from the book to win. This Game helps your mathmatics and critical thinking.\n\n";
cout << "How skillful are you in the art of time wasting?\n";
cout << "Type 1 - Noob, Type 2 - Normal, Type 3 - Leet.\n";
cout << "Level : ";
bgreen();
cin >> iLevel;
white();
if (iLevel == 1)
{
iLevel = 50;
iLevelCost = 20;
}
else if (iLevel == 2)
{
iLevel = 40;
iLevelCost = 25;
}
else if (iLevel == 3)
{
iLevel = 30;
iLevelCost = 30;
}
else
{
cout << "Noob";
}
Sleep(2000);
Cls();
cout << "Who would you like to be to tackle this stuff?\n";
cout << "The stuff beisde each person is how it effects the cost for each action.\n";
cout << "So lets say I was Ralph and I wanted to make a fire, and the base cost is 30, so the cost would be 15 for me to make a fire.\n\n";
cout << "Type 1 - Ralph: Fire = -15, Wood = +15, Hunting = +20, Leaves = N/C, Shelter = -20\n";
cout << "Type 2 - Jack: Fire = +25, Wood = -10, Hunting = -25, Leaves = +5, Shelter = +5\n";
cout << "Type 3 - Piggy: Fire = -25, Wood = +20, Hunting = +35, Leaves = -10, Shelter = +20\n";
cout << "Character : ";
bblue();
cin >> iChar;
white();
if (iChar == 1) //Ralph
{
iCharF -= 20;
iCharW += 10;
iCharH += 10;
iCharL = 0;
iCharS -= 20;
}
else if (iChar == 2) //Jack
{
iCharF += 25;
iCharW -= 10;
iCharH -= 15;
iCharL += 5;
iCharS += 5;
}
else if (iChar == 3) //Piggy
{
iCharF -= 40;
iCharW += 20;
iCharH += 20;
iCharL -= 10;
iCharS += 20;
}
else
{
cout << "Noob";
}
Sleep(2000);
Cls();
cout << "My guess is you know what health points are, so your health points are called time. You will have an action menu to choose what to do.";
cout << " In order to survive you must keep warm, be fed and have water. It cost time to do actions. Good luck.";
Sleep(2000);
Cls();
while (iRescue == 1)
{
cout << "What do you want to do? You have ";
bpurple();
cout << iTime;
white();
cout << " Time.\n";
cout << "Type 1 to make a fire. (Lasts 1 day) (It will cost you 25 + Character + Level Cost)\n";
cout << "Type 2 to look for wood. (It will cost you 15 + Character + Level Cost)\n";
cout << "Type 3 to look for leaves. (It will cost you 5 + Character + Level Cost)\n";
cout << "Type 4 to hunt for food. (It will cost you 5 + Character + Level Cost)\n";
cout << "Type 5 to make a shelter. (It will cost you 40 + Character + Level Cost)\n";
cout << "Type 6 to display information.\n";
cin >> iMenu;
if (iMenu == 1)
{
Fire(iWood, iLevel, iLevelCost, iCharF, iDays, iTime, iFire, iDayTime);
}
else if (iMenu == 2)
{
Wood(iLevel, iLevelCost, iCharW, iTime, iWood, iDays, iDayTime);
}
else if (iMenu == 3)
{
Leaf(iLevel, iLevelCost, iCharL, iTime, iLeaf, iDayTime, iDays);
}
else if (iMenu == 4)
{
Food(iLevel, iLevelCost, iCharF, iTime, iFood, iDayTime, iDays);
}
else if (iMenu == 5)
{
if(iDays == iDaysShelter)
{
iShelterMade = 0;
}
Shelter(iWood, iLeaf, iLevel, iLevelCost, iCharS, iTime, iShelter, iDayTime, iDays);
}
else if(iMenu == 6)
{
Display(iTime, iLevel, iLevelCost, iChar, iCharF, iCharW, iCharL, iCharH, iCharS, iDays, iDayTime, iFire, iShelter, iShelterMade, iDaysShelter, iLeaf, iWood, iFood);
}
else
{
cout << "idk";
}
}
return 0;
}
|