Limited damage prevention to only at the "low" and "critical" levels,
plus added a delay for when damage is first inflicted by rays.
This prevents ships with multiple concentrated shots from having
a disadvantage, and it helps make rays easier to avoid at the same
time (just get out of the ray in time and you don't take damage).
Of course, neither of these apply to Classic difficulty, although
the ray damage delay does apply to Nightmare difficulty (which,
given how unpredictable rays are, I think is quite reasonable).
Limits the damage you take somewhat. Basically, this is intended
to prevent sudden deaths; if it doesn't look like you're dying,
you probably won't suddenly get axed. Of course, this is disabled
in Classic difficulty.
The mistake caused the Classic game to deviate from the original
by not allowing Kline to drop mines in the Elamale mission. For
some reason I accidentally put that check in for Moebo instead.
Whoops!
I've made a couple of improvements here:
1. There is now a limit to how much value can be in a single
collectable. This means, most importantly, that there will be
no more 1000 plasma collectables or anything else ridiculous
like that. It also means that bosses now tend to drop a ton of
different collectable objects.
2. Collectables dropped by ships now live longer if a lot of
collectables were dropped. In practice, this only affects bosses;
no normal enemy drops enough to trigger this.
The combined results of these changes are that you're less likely
to get stuck with a useless item when you kill a boss (such as
plasma you don't need) rather than money, and you are more capable
of collecting the huge wads of cash left behind by the bosses that
drop more.
It looks like I'm finally almost done with this! The only thing left
is gradually replacing "Starfighter.h" imports with imports of what
actually is needed.
I did one structural change to the way ship_fireBullet works. It
previously had two separate places for reducing ammo from the player.
I changed this so that it removes ammo in the same place regardless
of which weapon it is, but then performs the plasma "out of ammo"
action afterwards. It seems to work properly.
Also fixed a flaw in the saving which would in some cases cause
the stationed planet to not get saved properly.
This was done with "replace all" actions, but I have checked and
the only collatoral damage has been to capitalize some instances
of "objective" in comments.
At first I was doing the same thing to them I did to the bragging
messages, but when it came to actually thinking of things these
characters should say, nothing I liked came up. The main problem
is nothing fits the characters' expressions. Add to that the
complexity of making this really work right, and it's just not
worth it.
The Sid death message has also been removed, both for consistency
and because of the mismatch of Chris's face with what he said there.
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.
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.
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.
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.
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.
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.
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).
Like "scripts", these definitions in text files make absolutely no
sense. They are completely unreadable, and Starfighter's engine is
inflexible anyway.