Reduced charger's max charge, make it fire when it reaches max.
The original charge cannon is so overpowered it's ridiculous. The strongest weapon in the game, unlimited ammo, and the only setback it has is that you need to charge it a bit. The lack of balance obsoletes the laser weapon, which is fine, but it also obsoletes homing missile weapons, *including* ones that are newer and more expensive than the charge cannon! Now, it's much more balanced. You actually need to shoot the thing before it hits max (or have your target in sight when it does), rather than being able to just hold the button at max forever and release when optimal like you previously could. Basically, the charge cannon is still the weapon which does the most damage, but it's now much harder to use. Incidentally, not only should homing missiles be a sensible option now, even the laser cannon has a place after the charge cannon becomes available.
This commit is contained in:
parent
26a82a6385
commit
91fa93b448
|
@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "Starfighter.h"
|
#include "Starfighter.h"
|
||||||
|
|
||||||
object player;
|
object player;
|
||||||
|
bool charger_fired = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Initialises the player for a new game.
|
Initialises the player for a new game.
|
||||||
|
@ -118,13 +119,23 @@ void doPlayer()
|
||||||
{
|
{
|
||||||
if (engine.keyState[KEY_ALTFIRE] && !(engine.keyState[KEY_FIRE]))
|
if (engine.keyState[KEY_ALTFIRE] && !(engine.keyState[KEY_FIRE]))
|
||||||
{
|
{
|
||||||
limitCharAdd(&player.ammo[1], 1, 0, 200);
|
if (!charger_fired)
|
||||||
|
{
|
||||||
|
player.ammo[1] += 1;
|
||||||
|
if (player.ammo[1] >= 125)
|
||||||
|
{
|
||||||
|
fireBullet(&player, 1);
|
||||||
|
player.ammo[1] = 0;
|
||||||
|
charger_fired = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (player.ammo[1] > 0)
|
if (player.ammo[1] > 0)
|
||||||
fireBullet(&player, 1);
|
fireBullet(&player, 1);
|
||||||
player.ammo[1] = 0;
|
player.ammo[1] = 0;
|
||||||
|
charger_fired = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue