Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Anniversary Bash 26 CTF | Jazz2Online | Capture the flag | N/A | |||||
Anniversary Bash 26 Battle | Jazz2Online | Battle | N/A | |||||
Freeport | Loon | Battle | N/A | |||||
Anniversary Bash 24 CTF | Jazz2Online | Capture the flag | N/A | |||||
Syri i Kaltër | Loon | Capture the flag | 9 | |||||
Giant's Steps | PurpleJazz | Capture the flag | 9.2 | |||||
Anniversary Bash 22 levels | Jazz2Online | Multiple | N/A | |||||
Anniversary Bash 21 Levels | Jazz2Online | Multiple | N/A | |||||
Anniversary Bash 20 Levels | Jazz2Online | Multiple | N/A | |||||
Thermae | Jelly Jam | Battle | 8.5 | |||||
Fishing Village | PurpleJazz | Capture the flag | 9 |
#pragma require "limitedoxygen.asc"
namespace water {
int maxOxygen;
array<int> oxygen(4), count(4);
bool underwater(jjPLAYER@ play) {
return play.yPos > jjWaterLevel;
}
bool gameIsStarted() {
return jjGameState == GAME::STARTED || jjGameState == GAME::PREGAME || jjGameState == GAME::OVERTIME;
}
void limitedOxygen(jjPLAYER@ play) {
if (underwater(play)) {
if (oxygen[play.localPlayerID] > 0 && gameIsStarted()) oxygen[play.localPlayerID]--;
} else {
oxygen[play.localPlayerID] = maxOxygen;
count[play.localPlayerID] = maxOxygen > 350? 6 : uint(maxOxygen/70);
}
jjPARTICLE@ particle = jjAddParticle(PARTICLE::STRING);
if (particle !is null && oxygen[play.localPlayerID] > 0 && oxygen[play.localPlayerID] < 351 && oxygen[play.localPlayerID] % 70 == 0 && play.health > 0 && underwater(play)) {
if (count[play.localPlayerID] > 0) count[play.localPlayerID]--;
particle.xPos = play.xPos;
particle.yPos = play.yPos;
particle.string.text = "|||" + count[play.localPlayerID];
particle.ySpeed = -0.05;
jjSample(play.xPos, play.yPos - 16, SOUND::AMMO_BLUB1);
}
if (oxygen[play.localPlayerID] == 0) {
if (jjActiveGameTicks % 90 == 0 && play.health > 0 && gameIsStarted()) drown(play);
}
}
void drown(jjPLAYER@ play) {
if (play.health > 1) play.health = play.health - 1;
else play.kill();
play.blink = 45;
randomHurtSample(play);
}
void randomHurtSample(jjPLAYER@ play) {
SOUND::Sample sample = SOUND::JAZZSOUNDS_HEY2;
switch (jjRandom()%4) {
case 0: sample = play.charCurr == CHAR::JAZZ? SOUND::JAZZSOUNDS_HEY2 : play.charCurr == CHAR::SPAZ? SOUND::SPAZSOUNDS_AUTSCH1 : SOUND::LORISOUNDS_HURT0; break;
case 1: sample = play.charCurr == CHAR::JAZZ? SOUND::JAZZSOUNDS_HEY3 : play.charCurr == CHAR::SPAZ? SOUND::SPAZSOUNDS_AUTSCH2 : SOUND::LORISOUNDS_HURT1; break;
case 2: sample = play.charCurr == CHAR::JAZZ? SOUND::JAZZSOUNDS_HEY4 : play.charCurr == CHAR::SPAZ? SOUND::SPAZSOUNDS_BURP : SOUND::LORISOUNDS_HURT2; break;
case 3: sample = play.charCurr == CHAR::JAZZ? SOUND::JAZZSOUNDS_JAZZV4 : play.charCurr == CHAR::SPAZ? SOUND::SPAZSOUNDS_OOOH : SOUND::LORISOUNDS_HURT7; break;
}
jjSample(play.xPos, play.yPos, sample);
}
void drawOxygenTimer(jjPLAYER@ play, jjCANVAS@ canvas) {
int oxygenPercent = int(oxygen[play.localPlayerID]/(maxOxygen/100));
int textColor = oxygenPercent > 50? 224 : oxygenPercent > 20? 232 : 216;
if (underwater(play)) {
canvas.drawSprite(jjSubscreenWidth - 68, 73, ANIM::AMMO, 8, jjGameTicks >> 2, 0, SPRITE::TRANSLUCENT);
canvas.drawString(jjSubscreenWidth - 58, 72, "" + (oxygenPercent > 100? 100 : oxygenPercent) + "%", STRING::MEDIUM, STRING::PALSHIFT, textColor);
}
}
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.