A person who wishes to remain anonymous contributed this. It's a tweak for

the discharge on the lightning gun. If you read the code it's fairly obvious
what it does - sustains a sane amount of damage over a longer period of time,
you won't discharge the entire amount over 100 all at once anymore. Makes it
impossible to do instant kills obviously, but makes it better IMHO.

Tim McGrath (Hikaru/Misty)
This commit is contained in:
Timothy C. McGrath 2002-09-02 02:28:32 +00:00
parent d714395ec3
commit 1e27af318b

View file

@ -1915,23 +1915,28 @@ void() W_FireLightning =
#ifdef BIGLIGHT #ifdef BIGLIGHT
//We do this by capping the maximum ammo at 100, and using all //We do this by capping the maximum ammo at 100, and using all
//cells above that in one tremendous shot //cells above that in one tremendous shot
if (self.ammo_cells > 100) { if (self.ammo_cells > 300) {
excess = self.ammo_cells - 100; excess = 22;
self.ammo_cells = 100; self.ammo_cells -= 8;
} } else if (self.ammo_cells > 200) {
else { excess = 18;
excess = 0; self.ammo_cells -= 4;
self.ammo_cells = self.ammo_cells - 0.75; } else if (self.ammo_cells > 100) {
excess = 14;
self.ammo_cells -= 2;
} else {
excess = 10;
self.ammo_cells -= 1;
} }
#else #else
//Or this method, which consumes cells at a rate to ensure we run out //Or this method, which consumes cells at a rate to ensure we run out
//In a few seconds, no matter what. But resupplying is a bitch. //In a few seconds, no matter what. But resupplying is a bitch.
excess = 0; excess = 0;
self.ammo_cells = self.ammo_cells - ceil(self.maxammo_cells / 30); self.ammo_cells = self.ammo_cells - ceil(self.maxammo_cells / 30);
if (self.ammo_cells < 0) self.ammo_cells = 0; if (self.ammo_cells < 0)
self.ammo_cells = 0;
#endif #endif
self.currentammo = self.ammo_cells; self.currentammo = self.ammo_cells;
org = self.origin + '0 0 16'; org = self.origin + '0 0 16';
@ -1974,10 +1979,8 @@ void() W_FireLightning =
//WK Either way of firing the gun, we handle it here //WK Either way of firing the gun, we handle it here
//WK2 - Tone it down a LOT //WK2 - Tone it down a LOT
if (excess) { if (excess) {
sprint(self,PRINT_HIGH,"You discharge your excess cells\n");
LightningDamage (self.origin, trace_endpos + v_forward*4, self, excess); LightningDamage (self.origin, trace_endpos + v_forward*4, self, excess);
} } else
else
//WK 30. Lowered damage to make it a $2200 weapon //WK 30. Lowered damage to make it a $2200 weapon
LightningDamage (self.origin, trace_endpos + v_forward*4, self, 12); LightningDamage (self.origin, trace_endpos + v_forward*4, self, 12);
}; };