More added to "original" difficulty.

In particular:
* The charge cannon in that difficulty now behaves as originally.
* Cash is now rare, not nonexistent, on interceptions in that difficulty.
This commit is contained in:
onpon4 2015-03-28 13:59:33 -04:00
parent 5155a8ac68
commit 6dd3ac1919
2 changed files with 46 additions and 24 deletions

View File

@ -109,13 +109,24 @@ void addCollectable(float x, float y, int type, int value, int life)
} }
} }
/* if (currentGame.difficulty == DIFFICULTY_ORIGINAL)
No cash or ammo on interceptions. Stops point leeching(!)
*/
if ((currentGame.area == MAX_MISSIONS - 1) &&
((type == P_CASH) || (type == P_PLASMA_AMMO) || (type == P_ROCKET)))
{ {
return; // Cash is just rare in the original game. You can still grind,
// just not as much.
if ((currentGame.area == MAX_MISSIONS - 1) && (type == P_CASH))
{
if (rand() % 10 > 0)
return;
}
}
else
{
// No cash or ammo on interceptions. Completely stops grinding.
if ((currentGame.area == MAX_MISSIONS - 1) &&
((type == P_CASH) || (type == P_PLASMA_AMMO) || (type == P_ROCKET)))
{
return;
}
} }
collectables *collectable = new collectables; collectables *collectable = new collectables;
@ -324,9 +335,11 @@ void doCollectables()
case P_PLASMA_RATE: case P_PLASMA_RATE:
currentGame.powerups++; currentGame.powerups++;
if ((currentGame.area != MAX_MISSIONS - 1) || if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL) ||
(player.ammo[0] > 0)) (player.ammo[0] > 0))
{ {
if (currentGame.area != MAX_MISSIONS - 1) if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL))
LIMIT_ADD(player.ammo[0], collectable->value, LIMIT_ADD(player.ammo[0], collectable->value,
0, currentGame.maxPlasmaAmmo); 0, currentGame.maxPlasmaAmmo);
@ -347,9 +360,11 @@ void doCollectables()
case P_PLASMA_SHOT: case P_PLASMA_SHOT:
currentGame.powerups++; currentGame.powerups++;
if ((currentGame.area != MAX_MISSIONS - 1) || if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL) ||
(player.ammo[0] > 0)) (player.ammo[0] > 0))
{ {
if (currentGame.area != MAX_MISSIONS - 1) if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL))
LIMIT_ADD(player.ammo[0], collectable->value, LIMIT_ADD(player.ammo[0], collectable->value,
0, currentGame.maxPlasmaAmmo); 0, currentGame.maxPlasmaAmmo);
@ -370,9 +385,11 @@ void doCollectables()
case P_PLASMA_DAMAGE: case P_PLASMA_DAMAGE:
currentGame.powerups++; currentGame.powerups++;
if ((currentGame.area != MAX_MISSIONS - 1) || if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL) ||
(player.ammo[0] > 0)) (player.ammo[0] > 0))
{ {
if (currentGame.area != MAX_MISSIONS - 1) if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL))
LIMIT_ADD(player.ammo[0], collectable->value, LIMIT_ADD(player.ammo[0], collectable->value,
0, currentGame.maxPlasmaAmmo); 0, currentGame.maxPlasmaAmmo);
@ -392,9 +409,11 @@ void doCollectables()
case P_SUPER: case P_SUPER:
currentGame.powerups++; currentGame.powerups++;
if ((currentGame.area != MAX_MISSIONS - 1) || if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL) ||
(player.ammo[0] > 0)) (player.ammo[0] > 0))
{ {
if (currentGame.area != MAX_MISSIONS - 1) if ((currentGame.area != MAX_MISSIONS - 1) ||
(currentGame.difficulty == DIFFICULTY_ORIGINAL))
LIMIT_ADD(player.ammo[0], collectable->value, LIMIT_ADD(player.ammo[0], collectable->value,
0, currentGame.maxPlasmaAmmo); 0, currentGame.maxPlasmaAmmo);

View File

@ -57,10 +57,7 @@ void initPlayer()
engine.lowShield = (player.maxShield >= 3) ? (player.maxShield / 3) : 1; engine.lowShield = (player.maxShield >= 3) ? (player.maxShield / 3) : 1;
engine.averageShield = engine.lowShield + engine.lowShield; engine.averageShield = engine.lowShield + engine.lowShield;
if (player.weaponType[1] == W_CHARGER) if ((player.weaponType[1] == W_CHARGER) || (player.weaponType[1] == W_LASER))
player.ammo[1] = 0;
if (player.weaponType[1] == W_LASER)
player.ammo[1] = 0; player.ammo[1] = 0;
} }
@ -75,10 +72,7 @@ void exitPlayer()
{ {
charger_fired = false; charger_fired = false;
if (player.weaponType[1] == W_CHARGER) if ((player.weaponType[1] == W_CHARGER) || (player.weaponType[1] == W_LASER))
player.ammo[1] = 0;
if (player.weaponType[1] == W_LASER)
player.ammo[1] = 0; player.ammo[1] = 0;
} }
@ -129,16 +123,25 @@ void doPlayer()
if (player.weaponType[1] == W_CHARGER) if (player.weaponType[1] == W_CHARGER)
{ {
if (engine.keyState[KEY_ALTFIRE] && !(engine.keyState[KEY_FIRE])) if (engine.keyState[KEY_ALTFIRE] &&
((currentGame.difficulty == DIFFICULTY_ORIGINAL) ||
!(engine.keyState[KEY_FIRE])))
{ {
if (!charger_fired) if (!charger_fired)
{ {
LIMIT_ADD(player.ammo[1], 1, 0, 150); if (currentGame.difficulty == DIFFICULTY_ORIGINAL)
if (player.ammo[1] >= 150)
{ {
ship_fireBullet(&player, 1); LIMIT_ADD(player.ammo[1], 1, 0, 200);
player.ammo[1] = 0; }
charger_fired = true; else
{
LIMIT_ADD(player.ammo[1], 1, 0, 150);
if (player.ammo[1] >= 150)
{
ship_fireBullet(&player, 1);
player.ammo[1] = 0;
charger_fired = true;
}
} }
} }
} }