Caused charge cannon damage to be reduced in a different way.
This commit is contained in:
parent
224b3ea8b1
commit
f620334510
|
@ -80,8 +80,8 @@ void addBullet(object *theWeapon, object *attacker, int y, int dy)
|
||||||
|
|
||||||
if (bullet->id == WT_CHARGER)
|
if (bullet->id == WT_CHARGER)
|
||||||
{
|
{
|
||||||
bullet->damage = attacker->ammo[1];
|
bullet->damage = attacker->ammo[1] / 2;
|
||||||
if (bullet->damage < 50)
|
if (bullet->damage < 15)
|
||||||
{
|
{
|
||||||
bullet->damage = 1;
|
bullet->damage = 1;
|
||||||
bullet->id = WT_PLASMA;
|
bullet->id = WT_PLASMA;
|
||||||
|
@ -525,8 +525,8 @@ void doBullets()
|
||||||
|
|
||||||
if (bullet->id == WT_CHARGER)
|
if (bullet->id == WT_CHARGER)
|
||||||
{
|
{
|
||||||
for (int i = 0 ; i < bullet->damage ; i++)
|
for (int i = 0 ; i < bullet->damage * 2 ; i++)
|
||||||
blit(bullet->image[0], (int)(bullet->x - rrand(-(bullet->damage / 3), 0)), (int)(bullet->y + rrand(-3, 3)));
|
blit(bullet->image[0], (int)(bullet->x - rrand(-(bullet->damage * 2 / 3), 0)), (int)(bullet->y + rrand(-3, 3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
blit(bullet->image[0], (int)bullet->x, (int)bullet->y);
|
blit(bullet->image[0], (int)bullet->x, (int)bullet->y);
|
||||||
|
|
|
@ -478,17 +478,6 @@ int galaxyMap()
|
||||||
// do not perform certain keyboard actions
|
// do not perform certain keyboard actions
|
||||||
engine.gameSection = SECTION_INTERMISSION;
|
engine.gameSection = SECTION_INTERMISSION;
|
||||||
|
|
||||||
// Remove the Supercharge, if it is there
|
|
||||||
if (currentGame.difficulty > DIFFICULTY_EASY)
|
|
||||||
{
|
|
||||||
weapon[W_PLAYER_WEAPON].reload[0] = max(weapon[W_PLAYER_WEAPON].reload[0],
|
|
||||||
rate2reload[currentGame.maxPlasmaRate]);
|
|
||||||
weapon[W_PLAYER_WEAPON].ammo[0] = min(weapon[W_PLAYER_WEAPON].ammo[0],
|
|
||||||
currentGame.maxPlasmaOutput);
|
|
||||||
weapon[W_PLAYER_WEAPON].damage = min(weapon[W_PLAYER_WEAPON].damage,
|
|
||||||
currentGame.maxPlasmaDamage);
|
|
||||||
}
|
|
||||||
|
|
||||||
clearScreen(black);
|
clearScreen(black);
|
||||||
updateScreen();
|
updateScreen();
|
||||||
clearScreen(black);
|
clearScreen(black);
|
||||||
|
|
|
@ -64,11 +64,24 @@ void initPlayer()
|
||||||
|
|
||||||
void exitPlayer()
|
void exitPlayer()
|
||||||
{
|
{
|
||||||
|
charger_fired = false;
|
||||||
|
|
||||||
if (player.weaponType[1] == W_CHARGER)
|
if (player.weaponType[1] == W_CHARGER)
|
||||||
player.ammo[1] = 0;
|
player.ammo[1] = 0;
|
||||||
|
|
||||||
if (player.weaponType[1] == W_LASER)
|
if (player.weaponType[1] == W_LASER)
|
||||||
player.ammo[1] = 0;
|
player.ammo[1] = 0;
|
||||||
|
|
||||||
|
// Remove the Supercharge, if it is there
|
||||||
|
if (currentGame.difficulty > DIFFICULTY_EASY)
|
||||||
|
{
|
||||||
|
weapon[W_PLAYER_WEAPON].reload[0] = max(weapon[W_PLAYER_WEAPON].reload[0],
|
||||||
|
rate2reload[currentGame.maxPlasmaRate]);
|
||||||
|
weapon[W_PLAYER_WEAPON].ammo[0] = min(weapon[W_PLAYER_WEAPON].ammo[0],
|
||||||
|
currentGame.maxPlasmaOutput);
|
||||||
|
weapon[W_PLAYER_WEAPON].damage = min(weapon[W_PLAYER_WEAPON].damage,
|
||||||
|
currentGame.maxPlasmaDamage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void doPlayer()
|
void doPlayer()
|
||||||
|
@ -121,8 +134,8 @@ void doPlayer()
|
||||||
{
|
{
|
||||||
if (!charger_fired)
|
if (!charger_fired)
|
||||||
{
|
{
|
||||||
player.ammo[1] += 1;
|
limitCharAdd(&player.ammo[1], 1, 0, 200);
|
||||||
if (player.ammo[1] >= 125)
|
if (player.ammo[1] >= 200)
|
||||||
{
|
{
|
||||||
fireBullet(&player, 1);
|
fireBullet(&player, 1);
|
||||||
player.ammo[1] = 0;
|
player.ammo[1] = 0;
|
||||||
|
|
|
@ -34,7 +34,7 @@ struct object {
|
||||||
signed char speed;
|
signed char speed;
|
||||||
unsigned char damage; // Contact damage for bullets
|
unsigned char damage; // Contact damage for bullets
|
||||||
int score; // How much a kill of this is worth
|
int score; // How much a kill of this is worth
|
||||||
unsigned char ammo[2]; // Ammo for 2nd weapon. Max of 100 (except laser)
|
unsigned char ammo[2]; // Ammo for 2nd weapon.
|
||||||
|
|
||||||
signed char face; // Either 0 or 1
|
signed char face; // Either 0 or 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue