Commit Graph

42 Commits

Author SHA1 Message Date
onpon4 5ba8759804 Increased the chance of the cloak fighter running.
Also fixed the chance in Classic difficulty; accidentally made it
10 times as likely as in the original.
2016-01-10 19:07:16 -05:00
onpon4 8793aaa780 Added a small chance of getting intercepted in Spirit.
These interceptions only have "dualfighters" on them, since that is
in-line with the normal difficulty of Spirit.
2016-01-09 10:26:15 -05:00
onpon4 fa43f2aabe Fixed the experimental fighter not running away from chargers.
This oddity was caused by exactly what I thought it was caused by:
the code assumed that all bullets are created equal, and each bullet
had a 1 in 50 chance of causing the ship to run away. Well, the
charger inflicts so much damage that 50 shots would be a ridiculous
amount of damage for even the experimental fighter.

So now, except in Classic difficulty, whether or not it runs away
is determined partly by how much damage a weapon inflicts.
Specifically, the chance is now the damage of the bullet out of 150.

High-damage weapons are still a useful idea; after all, a 100 damage
weapon is 100 guaranteed damage, even if the fighter is likely to flee.
However, it gets rid of the skewed nature of the fleeing behavior and
prevents the charger from subverting the purpose of the behavior.
2016-01-09 08:01:23 -05:00
onpon4 efb7a135be Some cleanup 2016-01-09 07:50:12 -05:00
onpon4 9104fcaa10 Changed the AI of the executive transport to "evasive".
This makes more sense; it's unarmed, after all. A quick test shows
that it doesn't cause any problems (like making the game annoying).
2016-01-09 07:37:36 -05:00
onpon4 14a9dace7e Let Kline switch weapons on Venus (except in Classic difficulty).
It's a modified version of the weapon switching: if Kline's health
is less than 1500, the spread shot replaces the concentrated triple
shot.

This also keeps Kline with bullet weapons during the third phase.

The main purpose of this change is to make Kline consistent. He now
switches his secondary weapon, and that's about it. The way it was
in the original, it started out much easier than previous encounters,
then it went to slightly easier than previous encounters, then
something completely unlike previous encounters, and finally
something noticeably harder than previous encounters. Now, it starts
out exactly the same as previous encounters, and then gets
progressively harder.
2016-01-08 18:09:35 -05:00
onpon4 66faa897a5 Permit Kline to drop mines in all of his appearances.
I don't understand why there is code to prevent Kline from dropping
mines after his first appearance. So except in Classic difficulty,
this limitation has been removed. He now drops mines in all of his
appearances.
2016-01-08 17:37:18 -05:00
onpon4 54eb5230fe Fixed failure to use left-pointing images for a couple ships.
Whoops!
2016-01-08 17:09:42 -05:00
onpon4 75029e45ee Fixed being able to get hurt after the mission is over.
There were two problems:

1. Some areas did not have any code to protect against this.

2. In one area that did have such code, it was malformed, and actually
   caused the "no damage" cheat to be negated after the mission was
   completed.

Both have been fixed.
2016-01-08 16:36:20 -05:00
onpon4 a889d43296 Fixed drones and small asteroids being given special alien slots.
This could cause small asteroids and drones to be given labels that
said "Sid", "Phoebe", "Ursula", or "Kline".
2016-01-08 12:10:50 -05:00
onpon4 e7abfe30a6 Fixed the bug that caused mobile rays to shoot bullets.
This was a strange cause, and I wonder why it happened. Quite simply,
there was an assumption in the code that any alien's primary weapon
was a bullet, despite the fact that the secondary weapon code could
handle any weapon, including bullets. I've fixed this by getting rid
of the special primary weapon mechanism; the one for the secondary
weapons is used on primary weapons as well.
2016-01-07 19:01:25 -05:00
onpon4 822ff849e4 Removed the very last of the image-related magic numbers (in source code).
The only magic numbers left now are related to positioning, image
sizing, and the remaining "data" files (the "planets" and "brief" ones).
At least, I'm pretty sure that's the case.
2016-01-06 20:35:37 -05:00
onpon4 97f1f441c2 Removed more magic numbers. 2016-01-05 06:44:26 -05:00
onpon4 5acc9f37f3 Moved cutscenes to C. 2016-01-04 20:17:06 -05:00
onpon4 0da184f424 Moved the ship image definitions to C code.
Now, this has an unfortunate effect of screwing up cutscenes. I'll
fix that by moving cutscene definitions to C as well.
2016-01-04 16:34:29 -05:00
onpon4 aad7b550a9 Renamed "FACE_" enum values to "FS_". 2016-01-04 09:07:30 -05:00
onpon4 697a302fc6 Some cleanup I forgot to do in gfx.cpp. 2016-01-03 22:39:16 -05:00
onpon4 6af4e67874 Added back in the annoying ships for Urusor in Classic difficulty. 2016-01-03 16:41:26 -05:00
onpon4 56240606e9 Changed all the magic number ship indexes to named ship indexes.
Also, now that the magic numbers are gone, I was able to get rid of
all the hardsetting of numbers for the special ship indexes (which
was only in place to avoid breaking the magic numbers).
2016-01-03 16:20:22 -05:00
onpon4 16473a715f Moved alien definitions from ".dat" files to alien.cpp.
Like "scripts", these definitions in text files make absolutely no
sense. They are completely unreadable, and Starfighter's engine is
inflexible anyway.
2016-01-03 14:14:31 -05:00
onpon4 ce94477b70 More cleanup. 2016-01-02 16:59:48 -05:00
onpon4 0f10c6d5c7 Converted the three "collision" functions to four differently-named ones.
The fourth is simply a duplicate of ship_collision for bullets. A
bit redundant, but I figure it's clearer of a definition. Besides,
this opens up the door to possibly making bullets a different struct
type in the future, if that turns out to be desirable.
2015-09-25 16:28:09 -04:00
onpon4 3850f8e946 Removed "asteroid collision damage" message. 2015-06-16 10:36:42 -04:00
onpon4 6fa0321d31 Edited dialog.
Mainly to better match Chris's new portrait.
2015-06-11 12:51:57 -04:00
onpon4 9be21cbd3a Made it possible to hit the Uranus boss via its wings.
The idea is clearly supposed to be breaking the boss in two and then
destroying the halves, so it makes no sense for the wings you break
off to also act as shields, which they did. Pretty much all this did
was cause a lot of shots to be wasted.
2015-06-02 12:43:06 -04:00
onpon4 f306825636 Removed the "nomove" and "nofire" cheats.
I honestly don't understand why these cheats were here. Preventing
enemies from moving breaks some missions and doesn't do anything
useful, and preventing enemies from firing is basically no better
than the invincibility cheat (and might even be worse, if it applies
to Sid; I didn't check).
2015-05-20 19:41:43 -04:00
onpon4 5982fcc0d8 Some reorganization. 2015-04-24 16:27:07 -04:00
onpon4 fdd780ca0f Fixed a duplicate variable.
The only effect I noticed was creating asteroid explosions in the
wrong places, but it could be that it had far more disasterous results.
2015-04-14 18:50:07 -04:00
onpon4 e5ed96e1c6 More cleanup. 2015-04-07 19:16:46 -04:00
onpon4 0a08df38f0 Removed some odd limits on what certain aliens could drop. 2015-03-29 15:36:25 -04:00
onpon4 9f7809de1c Made the mines in Mars more sparse and numerous.
There. Together with spreading out the asteroids, this has the effect
of getting rid of the sort of boxed-in feel this mission originally
had, and preventing the mission from being beaten simply by going
up or down forever.
2015-03-29 14:27:29 -04:00
onpon4 f9da05655d In the Mars mission, create asteroids more sparsely. 2015-03-29 14:18:19 -04:00
onpon4 5019244da1 Added an enum for missions/areas.
Eliminating another set of magic numbers, and God, that was tedious.
2015-03-29 13:11:12 -04:00
onpon4 576d254e4a Replaced rrand function with RANDRANGE macro. 2015-03-29 10:19:53 -04:00
onpon4 b28effb17d Tweaked handling of powerups.
Now, rather than powerups being replaced with ammo, their collection
effect has been changed from "make the plasma ammo at least 50" to
"add the powerup's amount to the plasma ammo" (i.e. powerups are also
treated as plasma ammo). This left the initial ammo of a powerup a
little low, so to compensate, I increased the collectValue of the
transport ship from 30 to 40.

Additionally, transport ships now show up in interceptions again,
but powerups, when collected, do *not* increase ammo. If you have
no ammo at the time, the powerup does nothing. If this happens with
the Super Charge, you get a humorous message.
2015-03-23 21:33:15 -04:00
onpon4 ad8a2f2ad9 Replaced various "limit" functions with LIMIT and LIMIT_ADD macros.
This is mainly because the old "limit" functions were all restricted
to certain types, which is incredibly silly given how simple they are.
Macros are much simpler, and a warning gets raised if they're used
improperly with multiple types, anyway.

In the process, I also found and fixed a bug: it seems the original
author intended for escaping enemies to gradually accelerate to
fleeing speed, but the low value was indicated as the max value, and
the way limitFloat was written, that caused the max value to be used
(it was supposed to reduce the speed to a minimum of -15, but it
instead effectively assigned the speed to -15). It might be a good
idea to re-implement the old buggy behavior intentionally; depends
on whether the acceleration of jumping looks better or worse than
just immediately going to jump speed.
2015-03-17 19:00:13 -04:00
onpon4 717d56755c Moved fireRay to the ship module.
Also removed a really bad convention where a variable called "anEnemy"
was used, rather than just "aliens[i]".
2015-03-17 10:34:29 -04:00
onpon4 f58e15615b Changed "DAMAGEOWNER" flag to work when damaged, rather than destroyed.
This change in behavior has some very significant effects:

1. Damaging a child alien isn't rendered meaningless if you are
   primarily attacking the owner. This could be especially annoying
   with the miner bosses, which have tiny parts that are completely
   impractical to aim at.
2. Again, for the miner boss: previously, you couldn't see how much
   total health the ship had; the health bar only uselessly showed
   whether or not you defeated half of the ship (which you could
   already tell by looking at it). Now, the health bar tells you
   how much more damage you have to do in total.
2015-03-14 21:06:37 -04:00
onpon4 2a0234c300 Added ship module, moved fireBullet to it (as ship_fireBullet).
For functions that are used by both aliens and the player.
2015-03-13 10:10:58 -04:00
onpon4 8842d7775b Removed the code that prevented transports from spawning based on player state.
Since it now gives you money if you're not able to power up, there's
no point in preventing it from spawning when you can't power up.
2015-03-12 23:12:21 -04:00
onpon4 1834011314 Organization stuff 2015-03-11 15:36:42 -04:00
onpon4 1c73a37c8e aliens.{cpp|h} -> alien.{cpp|h} 2015-03-09 19:32:03 -04:00