Redo the whole plasma system.

- We now have both minPlasma* and maxPlasma* variables.
- *PlasmaRate now goes from 1 to 5 just like Damage and Output.
- Internally, plasma now goes into the primary weapon, there is no
  temporary weapon anymore.
- When upgrading the primary weapon, the new minimum amount of Damage,
  Output and Rate immediately goes into effect when starting the next
  msision.
- Super Charge now works exactly the same again as in the original.
- But shows blinkenlights in the bottom status bar when it is in use.
This commit is contained in:
Guus Sliepen 2011-09-11 21:57:57 +02:00
parent 2c64485272
commit 96996ce167
10 changed files with 121 additions and 116 deletions

View File

@ -218,8 +218,9 @@ void fireBullet(object *attacker, int weaponType)
player.ammo[0]--; player.ammo[0]--;
if (player.ammo[0] == 0) if (player.ammo[0] == 0)
{ {
player.weaponType[0] = W_PLAYER_WEAPON; weapon[0].ammo[0] = currentGame.minPlasmaOutput;
weapon[W_PLAYER_WEAPON2] = weapon[W_PLAYER_WEAPON]; // reset to weapon 1 defaults weapon[0].damage = currentGame.minPlasmaDamage;
weapon[0].reload[0] = rate2reload[currentGame.minPlasmaRate];
} }
} }
} }

View File

@ -284,65 +284,62 @@ void doCollectables()
break; break;
case P_PLASMA_RATE: case P_PLASMA_RATE:
limitCharAdd(&weapon[1].reload[0], -2, currentGame.maxPlasmaRate, 15);
player.weaponType[0] = 1;
if (player.ammo[0] < 50) if (player.ammo[0] < 50)
player.ammo[0] = 50; player.ammo[0] = 50;
limitChar(&(player.ammo[0]), 0, currentGame.maxPlasmaAmmo); if (weapon[0].reload[0] <= rate2reload[currentGame.maxPlasmaRate])
if (weapon[1].reload[0] == currentGame.maxPlasmaRate) sprintf(temp, "Firing Rate already at Maximum");
sprintf(temp, "Firing Rate at Maximum");
else else
{
weapon[0].reload[0] -= 2;
sprintf(temp, "Firing rate increased"); sprintf(temp, "Firing rate increased");
}
currentGame.powerups++; currentGame.powerups++;
break; break;
case P_PLASMA_SHOT: case P_PLASMA_SHOT:
limitCharAdd(&weapon[1].ammo[0], 1, 1, currentGame.maxPlasmaOutput);
if (player.ammo[0] < 50) if (player.ammo[0] < 50)
player.ammo[0] = 50; player.ammo[0] = 50;
limitChar(&(player.ammo[0]), 0, currentGame.maxPlasmaAmmo); if (weapon[0].ammo[0] >= currentGame.maxPlasmaOutput)
if (weapon[1].ammo[0] == currentGame.maxPlasmaOutput) sprintf(temp, "Plasma output already at Maximum");
sprintf(temp, "Plasma output at Maximum");
else else
{
weapon[0].ammo[0]++;
sprintf(temp, "Plasma output increased"); sprintf(temp, "Plasma output increased");
player.weaponType[0] = 1; }
currentGame.powerups++; currentGame.powerups++;
break; break;
case P_PLASMA_DAMAGE: case P_PLASMA_DAMAGE:
limitCharAdd(&weapon[1].damage, 1, 1, currentGame.maxPlasmaDamage);
if (player.ammo[0] < 50) if (player.ammo[0] < 50)
player.ammo[0] = 50; player.ammo[0] = 50;
limitChar(&(player.ammo[0]), 0, currentGame.maxPlasmaAmmo); if (weapon[0].damage >= currentGame.maxPlasmaDamage)
if (weapon[1].damage == currentGame.maxPlasmaDamage) sprintf(temp, "Plasma damage already at Maximum");
sprintf(temp, "Plasma damage at Maximum"); else {
else weapon[0].damage++;
sprintf(temp, "Plasma damage increased"); sprintf(temp, "Plasma damage increased");
player.weaponType[0] = 1; }
currentGame.powerups++; currentGame.powerups++;
break; break;
case P_SUPER: case P_SUPER:
weapon[1].ammo[0] = 5; weapon[0].ammo[0] = 5;
weapon[1].damage = 5; weapon[0].damage = 5;
weapon[1].reload[0] = 7; weapon[0].reload[0] = rate2reload[5];
weapon[0].flags |= WF_SPREAD;
weapon[1].flags |= WF_SPREAD;
sprintf(temp, "Picked up a Super Charge!!"); sprintf(temp, "Picked up a Super Charge!!");
if (player.ammo[0] < 50) if (player.ammo[0] < 50)
player.ammo[0] = 50; player.ammo[0] = 50;
player.weaponType[0] = 1;
currentGame.powerups++; currentGame.powerups++;
break; break;
case P_PLASMA_AMMO: case P_PLASMA_AMMO:
limitCharAdd(&player.ammo[0], collectable->value, 0, currentGame.maxPlasmaAmmo); if (player.ammo[0] >= currentGame.maxPlasmaAmmo)
if (player.ammo[0] == currentGame.maxPlasmaAmmo) sprintf(temp, "Plasma cells already at Maximum");
sprintf(temp, "Plasma cells at Maximum");
else else
{ {
limitCharAdd(&player.ammo[0], collectable->value, 0, currentGame.maxPlasmaAmmo);
if (collectable->value > 1) if (collectable->value > 1)
{ {
sprintf(temp, "Got %d plasma cells", collectable->value); sprintf(temp, "Got %d plasma cells", collectable->value);
@ -354,7 +351,6 @@ void doCollectables()
sprintf(temp, "Got one whole plasma cell (wahoo!)"); sprintf(temp, "Got one whole plasma cell (wahoo!)");
} }
} }
player.weaponType[0] = 1;
currentGame.cellPickups += collectable->value; currentGame.cellPickups += collectable->value;
break; break;
@ -393,8 +389,9 @@ void doCollectables()
// stop people from exploiting a weapon check condition // stop people from exploiting a weapon check condition
if (player.ammo[0] == 0) if (player.ammo[0] == 0)
{ {
player.weaponType[0] = 0; weapon[0].ammo[0] = currentGame.minPlasmaOutput;
weapon[1] = weapon[0]; // reset to weapon 1 defaults weapon[0].damage = currentGame.minPlasmaDamage;
weapon[0].reload[0] = rate2reload[currentGame.minPlasmaRate];
} }
} }

View File

@ -300,13 +300,15 @@ enum {
PAK_S3M PAK_S3M
}; };
const char systemNames[][15] = {"Spirit", "Eyananth", "Mordor", "Sol"}; static const char systemNames[][15] = {"Spirit", "Eyananth", "Mordor", "Sol"};
const char faces[][12] = { static const char faces[][12] = {
"FACE_CHRIS", "FACE_SID", "FACE_KRASS", "FACE_CHRIS", "FACE_SID", "FACE_KRASS",
"FACE_KLINE", "FACE_PHOEBE", "FACE_URSULA", "FACE_KLINE", "FACE_PHOEBE", "FACE_URSULA",
"FACE_CREW"}; "FACE_CREW"};
const char systemBackground[][20] = { static const char systemBackground[][20] = {
"gfx/spirit.jpg", "gfx/eyananth.jpg", "gfx/spirit.jpg", "gfx/eyananth.jpg",
"gfx/mordor.jpg", "gfx/sol.jpg"}; "gfx/mordor.jpg", "gfx/sol.jpg"};
static const signed char rate2reload[6] = {15, 15, 13, 11, 9, 7};

View File

@ -61,7 +61,10 @@ void newGame()
currentGame.missionCompleted[i] = 0; currentGame.missionCompleted[i] = 0;
currentGame.distanceCovered = 0; currentGame.distanceCovered = 0;
currentGame.maxPlasmaRate = 13; currentGame.minPlasmaRate = 1;
currentGame.minPlasmaOutput = 1;
currentGame.minPlasmaDamage = 1;
currentGame.maxPlasmaRate = 2;
currentGame.maxPlasmaOutput = 2; currentGame.maxPlasmaOutput = 2;
currentGame.maxPlasmaDamage = 2; currentGame.maxPlasmaDamage = 2;
currentGame.maxPlasmaAmmo = 100; currentGame.maxPlasmaAmmo = 100;

View File

@ -102,7 +102,6 @@ bool loadGame(int slot)
fclose(fp); fclose(fp);
weapon[0] = currentGame.playerWeapon; weapon[0] = currentGame.playerWeapon;
weapon[1] = currentGame.playerWeapon2;
player = currentGame.thePlayer; player = currentGame.thePlayer;
// Re-init all the planets in this system... // Re-init all the planets in this system...
@ -129,7 +128,6 @@ void saveGame(int slot)
fp = fopen(fileName, "wb"); fp = fopen(fileName, "wb");
currentGame.playerWeapon = weapon[0]; currentGame.playerWeapon = weapon[0];
currentGame.playerWeapon2 = weapon[1];
currentGame.thePlayer = player; currentGame.thePlayer = player;
for (int i = 0 ; i < 10 ; i++) for (int i = 0 ; i < 10 ; i++)
currentGame.missionCompleted[i] = systemPlanet[i].missionCompleted; currentGame.missionCompleted[i] = systemPlanet[i].missionCompleted;

View File

@ -149,7 +149,7 @@ void doInfo()
char text[25]; char text[25];
addBuffer(0, 20, 800, 25); addBuffer(0, 20, 800, 25);
addBuffer(0, 545, 800, 25); addBuffer(0, 550, 800, 34);
if (engine.minutes > -1) if (engine.minutes > -1)
{ {
@ -332,15 +332,17 @@ void doInfo()
bar.h = 12; bar.h = 12;
bar.x = 80; bar.x = 80;
bar.y = 571; bar.y = 571;
SDL_FillRect(screen, &bar, green);
for (int i = 1 ; i < currentGame.maxPlasmaDamage ; i++) for (int i = 1 ; i <= 5 ; i++)
{
if (weapon[0].damage >= i) {
if(i <= currentGame.maxPlasmaDamage || (SDL_GetTicks() % 1000 > (unsigned)i * 100))
{ {
bar.x += 30;
if (weapon[1].damage >= (i + 1))
SDL_FillRect(screen, &bar, green); SDL_FillRect(screen, &bar, green);
else }
} else if (i <= currentGame.maxPlasmaDamage)
SDL_FillRect(screen, &bar, darkGreen); SDL_FillRect(screen, &bar, darkGreen);
bar.x += 30;
} }
blitText(12); blitText(12);
@ -351,13 +353,17 @@ void doInfo()
bar.y = 571; bar.y = 571;
SDL_FillRect(screen, &bar, yellow); SDL_FillRect(screen, &bar, yellow);
for (int i = 1 ; i < currentGame.maxPlasmaDamage ; i++) for (int i = 1 ; i <= 5 ; i++)
{
if (weapon[0].ammo[0] >= i) {
if(i <= currentGame.maxPlasmaOutput || (SDL_GetTicks() % 1000 > (unsigned)i * 100))
{ {
bar.x += 30;
if (weapon[1].ammo[0] >= (i + 1))
SDL_FillRect(screen, &bar, yellow); SDL_FillRect(screen, &bar, yellow);
else }
}
else if (i <= currentGame.maxPlasmaDamage)
SDL_FillRect(screen, &bar, darkYellow); SDL_FillRect(screen, &bar, darkYellow);
bar.x += 30;
} }
blitText(13); blitText(13);
@ -367,11 +373,15 @@ void doInfo()
bar.x = 550; bar.x = 550;
bar.y = 571; bar.y = 571;
for (int i = 15 ; i > (currentGame.maxPlasmaRate - 1) ; i -= 2) for (int i = 1 ; i <= 5 ; i++)
{
if (weapon[0].reload[0] <= rate2reload[i]) {
if(i <= currentGame.maxPlasmaRate || (SDL_GetTicks() % 1000 > (unsigned)i * 100))
{ {
if (weapon[1].reload[0] <= i)
SDL_FillRect(screen, &bar, blue); SDL_FillRect(screen, &bar, blue);
else }
}
else if (i <= currentGame.maxPlasmaRate)
SDL_FillRect(screen, &bar, darkerBlue); SDL_FillRect(screen, &bar, darkerBlue);
bar.x += 30; bar.x += 30;
} }

View File

@ -46,15 +46,12 @@ void initPlayer()
player.weaponType[0] = W_PLAYER_WEAPON; player.weaponType[0] = W_PLAYER_WEAPON;
if (player.ammo[0] > 0) if(weapon[0].ammo[0] < currentGame.minPlasmaOutput)
{ weapon[0].ammo[0] = currentGame.minPlasmaOutput;
player.weaponType[0] = W_PLAYER_WEAPON2; if(weapon[0].damage < currentGame.minPlasmaDamage)
} weapon[0].damage = currentGame.minPlasmaDamage;
else if(weapon[0].reload[0] > rate2reload[currentGame.minPlasmaRate])
{ weapon[0].reload[0] = rate2reload[currentGame.minPlasmaRate];
player.weaponType[0] = W_PLAYER_WEAPON;
weapon[1] = weapon[0]; // reset to weapon 1 defaults
}
player.hit = 0; player.hit = 0;
@ -130,13 +127,11 @@ void doPlayer()
if ((engine.keyState[SDLK_LSHIFT]) || (engine.keyState[SDLK_RSHIFT])) if ((engine.keyState[SDLK_LSHIFT]) || (engine.keyState[SDLK_RSHIFT]))
{ {
int w = player.ammo[0] > 0; if(weapon[0].ammo[0] >= 3 && weapon[0].ammo[0] <= currentGame.maxPlasmaOutput)
if(weapon[w].ammo[0] >= 3)
{ {
weapon[w].flags ^= WF_SPREAD; weapon[0].flags ^= WF_SPREAD;
if(weapon[w].flags & WF_SPREAD) if(weapon[0].flags & WF_SPREAD)
{ {
setInfoLine("Weapon set to Spread", FONT_WHITE); setInfoLine("Weapon set to Spread", FONT_WHITE);
} }

View File

@ -73,31 +73,31 @@ static void adjustShopPrices()
{ {
shopItems[0].price = (500 * currentGame.maxPlasmaOutput); shopItems[0].price = (500 * currentGame.maxPlasmaOutput);
shopItems[1].price = (500 * currentGame.maxPlasmaDamage); shopItems[1].price = (500 * currentGame.maxPlasmaDamage);
shopItems[2].price = (500 * (16 - currentGame.maxPlasmaRate)); shopItems[2].price = (500 * (currentGame.maxPlasmaRate * 2 - 1));
shopItems[5].price = (2000 * weapon[0].ammo[0]); shopItems[5].price = (2000 * currentGame.minPlasmaOutput);
shopItems[6].price = (2000 * weapon[0].damage); shopItems[6].price = (2000 * currentGame.minPlasmaDamage);
shopItems[7].price = (2000 * (16 - weapon[0].reload[0])); shopItems[7].price = (2000 * (currentGame.minPlasmaRate * 2 - 1));
shopItems[8].price = (5 * currentGame.maxPlasmaAmmo); shopItems[8].price = (5 * currentGame.maxPlasmaAmmo);
shopItems[9].price = (25 * currentGame.maxRocketAmmo); shopItems[9].price = (25 * currentGame.maxRocketAmmo);
if (currentGame.maxPlasmaOutput == 5) if (currentGame.maxPlasmaOutput >= 5)
shopItems[0].price = 0; shopItems[0].price = 0;
if (currentGame.maxPlasmaDamage == 5) if (currentGame.maxPlasmaDamage >= 5)
shopItems[1].price = 0; shopItems[1].price = 0;
if (currentGame.maxPlasmaRate == 7) if (currentGame.maxPlasmaRate >= 5)
shopItems[2].price = 0; shopItems[2].price = 0;
if (weapon[0].ammo[0] == 3) if (currentGame.minPlasmaOutput >= 3)
shopItems[5].price = 0; shopItems[5].price = 0;
if (weapon[0].damage == 3) if (currentGame.minPlasmaDamage >= 3)
shopItems[6].price = 0; shopItems[6].price = 0;
if (weapon[0].reload[0] == 11) if (currentGame.minPlasmaRate >= 3)
shopItems[7].price = 0; shopItems[7].price = 0;
} }
@ -161,11 +161,11 @@ static void drawShop()
strcpy(description, ""); strcpy(description, "");
drawString("Primary Weapon", 10, 3, FONT_WHITE, shopSurface[0]); drawString("Primary Weapon", 10, 3, FONT_WHITE, shopSurface[0]);
sprintf(description, "Plasma Cannons : %d", weapon[0].ammo[0]); sprintf(description, "Plasma Cannons : %d", currentGame.minPlasmaOutput);
drawString(description, 10, 22, FONT_WHITE, shopSurface[0]); drawString(description, 10, 22, FONT_WHITE, shopSurface[0]);
sprintf(description, "Plasma Power : Stage %d", weapon[0].damage); sprintf(description, "Plasma Power : Stage %d", currentGame.minPlasmaDamage);
drawString(description, 10, 37, FONT_WHITE, shopSurface[0]); drawString(description, 10, 37, FONT_WHITE, shopSurface[0]);
sprintf(description, "Cooler : Stage %d", ((15 - weapon[0].reload[0]) / 2) + 1); sprintf(description, "Cooler : Stage %d", currentGame.minPlasmaRate);
drawString(description, 10, 52, FONT_WHITE, shopSurface[0]); drawString(description, 10, 52, FONT_WHITE, shopSurface[0]);
drawString("Powerup Weapon", 10, 3, FONT_WHITE, shopSurface[1]); drawString("Powerup Weapon", 10, 3, FONT_WHITE, shopSurface[1]);
@ -173,7 +173,7 @@ static void drawShop()
drawString(description, 10, 22, FONT_WHITE, shopSurface[1]); drawString(description, 10, 22, FONT_WHITE, shopSurface[1]);
sprintf(description, "Plasma Condensor : Stage %d", currentGame.maxPlasmaDamage); sprintf(description, "Plasma Condensor : Stage %d", currentGame.maxPlasmaDamage);
drawString(description, 10, 37, FONT_WHITE, shopSurface[1]); drawString(description, 10, 37, FONT_WHITE, shopSurface[1]);
sprintf(description, "Liquid Nitrogen : Stage %d", ((15 - currentGame.maxPlasmaRate) / 2) + 1); sprintf(description, "Liquid Nitrogen : Stage %d", currentGame.maxPlasmaRate);
drawString(description, 10, 52, FONT_WHITE, shopSurface[1]); drawString(description, 10, 52, FONT_WHITE, shopSurface[1]);
sprintf(description, "Plasma Capacity : %d", currentGame.maxPlasmaAmmo); sprintf(description, "Plasma Capacity : %d", currentGame.maxPlasmaAmmo);
drawString(description, 10, 67, FONT_WHITE, shopSurface[1]); drawString(description, 10, 67, FONT_WHITE, shopSurface[1]);
@ -490,22 +490,22 @@ static void buy(int i)
switch(i) switch(i)
{ {
case 0: case 0:
if (currentGame.maxPlasmaOutput == 5) if (currentGame.maxPlasmaOutput >= 5)
{shopSelectedItem = -3; return;} {shopSelectedItem = -3; return;}
currentGame.maxPlasmaOutput++; currentGame.maxPlasmaOutput++;
break; break;
case 1: case 1:
if (currentGame.maxPlasmaDamage == 5) if (currentGame.maxPlasmaDamage >= 5)
{shopSelectedItem = -3; return;} {shopSelectedItem = -3; return;}
currentGame.maxPlasmaDamage++; currentGame.maxPlasmaDamage++;
break; break;
case 2: case 2:
if (currentGame.maxPlasmaRate == 7) if (currentGame.maxPlasmaRate >= 5)
{shopSelectedItem = -3; return;} {shopSelectedItem = -3; return;}
currentGame.maxPlasmaRate -= 2; currentGame.maxPlasmaRate++;
break; break;
case 3: case 3:
if (player.ammo[0] == currentGame.maxPlasmaAmmo) if (player.ammo[0] >= currentGame.maxPlasmaAmmo)
{shopSelectedItem = -4; return;} {shopSelectedItem = -4; return;}
limitCharAdd(&player.ammo[0], 10, 0, currentGame.maxPlasmaAmmo); limitCharAdd(&player.ammo[0], 10, 0, currentGame.maxPlasmaAmmo);
break; break;
@ -523,28 +523,28 @@ static void buy(int i)
player.ammo[1]++; player.ammo[1]++;
break; break;
case 5: case 5:
if (weapon[0].ammo[0] == 3) if (currentGame.minPlasmaOutput >= 3)
{shopSelectedItem = -3; return;} {shopSelectedItem = -3; return;}
weapon[0].ammo[0]++; currentGame.minPlasmaOutput++;
if (currentGame.maxPlasmaOutput < weapon[0].ammo[0]) if (currentGame.maxPlasmaOutput < currentGame.minPlasmaOutput)
currentGame.maxPlasmaOutput = weapon[0].ammo[0]; currentGame.maxPlasmaOutput = currentGame.minPlasmaOutput;
break; break;
case 6: case 6:
if (weapon[0].damage == 3) if (currentGame.minPlasmaDamage >= 3)
{shopSelectedItem = -3; return;} {shopSelectedItem = -3; return;}
weapon[0].damage++; currentGame.minPlasmaDamage++;
if (currentGame.maxPlasmaDamage < weapon[0].damage) if (currentGame.maxPlasmaDamage < currentGame.minPlasmaDamage)
currentGame.maxPlasmaDamage = weapon[0].damage; currentGame.maxPlasmaDamage = currentGame.minPlasmaDamage;
break; break;
case 7: case 7:
if (weapon[0].reload[0] == 11) if (currentGame.minPlasmaRate >= 3)
{shopSelectedItem = -3; return;} {shopSelectedItem = -3; return;}
weapon[0].reload[0] -= 2; currentGame.minPlasmaRate++;
if (currentGame.maxPlasmaRate > weapon[0].reload[0]) if (currentGame.maxPlasmaRate < currentGame.minPlasmaRate)
currentGame.maxPlasmaRate = weapon[0].reload[0]; currentGame.maxPlasmaRate = currentGame.minPlasmaRate;
break; break;
case 8: case 8:
if (currentGame.maxPlasmaAmmo == 250) if (currentGame.maxPlasmaAmmo >= 250)
{shopSelectedItem = -3; return;} {shopSelectedItem = -3; return;}
limitCharAdd(&currentGame.maxPlasmaAmmo, 10, 0, 250); limitCharAdd(&currentGame.maxPlasmaAmmo, 10, 0, 250);
break; break;
@ -626,22 +626,22 @@ static void sell(int i)
switch (i) switch (i)
{ {
case 0: case 0:
if (currentGame.maxPlasmaOutput == 2) if (currentGame.maxPlasmaOutput <= 2)
{shopSelectedItem = -5; return;} {shopSelectedItem = -5; return;}
currentGame.maxPlasmaOutput--; currentGame.maxPlasmaOutput--;
break; break;
case 1: case 1:
if (currentGame.maxPlasmaDamage == 2) if (currentGame.maxPlasmaDamage <= 2)
{shopSelectedItem = -5; return;} {shopSelectedItem = -5; return;}
currentGame.maxPlasmaDamage--; currentGame.maxPlasmaDamage--;
break; break;
case 2: case 2:
if (currentGame.maxPlasmaRate == 13) if (currentGame.maxPlasmaRate <= 2)
{shopSelectedItem = -5; return;} {shopSelectedItem = -5; return;}
currentGame.maxPlasmaRate += 2; currentGame.maxPlasmaRate--;
break; break;
case 3: case 3:
if (player.ammo[0] == 0) if (player.ammo[0] <= 0)
{shopSelectedItem = -6; return;} {shopSelectedItem = -6; return;}
if (player.ammo[0] > 9) if (player.ammo[0] > 9)
limitCharAdd(&player.ammo[0], -10, 0, currentGame.maxPlasmaAmmo); limitCharAdd(&player.ammo[0], -10, 0, currentGame.maxPlasmaAmmo);
@ -649,33 +649,33 @@ static void sell(int i)
player.ammo[0] = 0; player.ammo[0] = 0;
break; break;
case 4: case 4:
if (player.ammo[1] == 0) if (player.ammo[1] <= 0)
{shopSelectedItem = -6; return;} {shopSelectedItem = -6; return;}
player.ammo[1]--; player.ammo[1]--;
break; break;
case 5: case 5:
if (weapon[0].ammo[0] == 1) if (currentGame.minPlasmaOutput <= 1)
{shopSelectedItem = -5; return;} {shopSelectedItem = -5; return;}
weapon[0].ammo[0]--; currentGame.minPlasmaOutput--;
break; break;
case 6: case 6:
if (weapon[0].damage == 1) if (currentGame.minPlasmaDamage <= 1)
{shopSelectedItem = -5; return;} {shopSelectedItem = -5; return;}
weapon[0].damage--; currentGame.minPlasmaDamage--;
break; break;
case 7: case 7:
if (weapon[0].reload[0] == 15) if (currentGame.minPlasmaRate <= 1)
{shopSelectedItem = -5; return;} {shopSelectedItem = -5; return;}
weapon[0].reload[0] += 2; currentGame.minPlasmaRate--;
break; break;
case 8: case 8:
if (currentGame.maxPlasmaAmmo == 100) if (currentGame.maxPlasmaAmmo <= 100)
{shopSelectedItem = -1; return;} {shopSelectedItem = -1; return;}
currentGame.maxPlasmaAmmo -= 10; currentGame.maxPlasmaAmmo -= 10;
limitChar(&player.ammo[0], 0, currentGame.maxPlasmaAmmo); limitChar(&player.ammo[0], 0, currentGame.maxPlasmaAmmo);
break; break;
case 9: case 9:
if (currentGame.maxRocketAmmo == 0) if (currentGame.maxRocketAmmo <= 0)
{shopSelectedItem = -1; return;} {shopSelectedItem = -1; return;}
currentGame.maxRocketAmmo -= 5; currentGame.maxRocketAmmo -= 5;
limitChar(&player.ammo[1], 0, currentGame.maxRocketAmmo); limitChar(&player.ammo[1], 0, currentGame.maxRocketAmmo);

View File

@ -123,7 +123,6 @@ struct Game {
object thePlayer; object thePlayer;
object playerWeapon; object playerWeapon;
object playerWeapon2;
unsigned char system; unsigned char system;
unsigned char area; unsigned char area;
@ -166,6 +165,9 @@ struct Game {
char destinationName[20]; char destinationName[20];
int distanceCovered; int distanceCovered;
unsigned char minPlasmaRate;
unsigned char minPlasmaDamage;
unsigned char minPlasmaOutput;
unsigned char maxPlasmaRate; unsigned char maxPlasmaRate;
unsigned char maxPlasmaDamage; unsigned char maxPlasmaDamage;
unsigned char maxPlasmaOutput; unsigned char maxPlasmaOutput;

View File

@ -116,9 +116,6 @@ void initWeapons()
weapon[W_PLAYER_WEAPON].imageIndex[1] = 0; weapon[W_PLAYER_WEAPON].imageIndex[1] = 0;
weapon[W_PLAYER_WEAPON].flags = 0; weapon[W_PLAYER_WEAPON].flags = 0;
// Nor is this one!
weapon[W_PLAYER_WEAPON2] = weapon[W_PLAYER_WEAPON];
// Single Shot // Single Shot
weapon[W_SINGLE_SHOT].id = WT_PLASMA; weapon[W_SINGLE_SHOT].id = WT_PLASMA;
weapon[W_SINGLE_SHOT].ammo[0] = 1; weapon[W_SINGLE_SHOT].ammo[0] = 1;