Downloads containing ab22ctf19.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 22 levels Jazz2Online Multiple N/A Download file

File preview

const bool MLLESetupSuccessful = MLLE::Setup(array<MLLEWeaponApply@> = {null, null, se::EnergyBlastMLLEWrapper(), null, null, null, null, null, null}); ///@MLLE-Generated
#include "MLLE-Include-1.5w.asc" ///@MLLE-Generated
#pragma require "ab22ctf19-MLLE-Data-2.j2l" ///@MLLE-Generated
#pragma require "ab22ctf19-MLLE-Data-1.j2l" ///@MLLE-Generated
#pragma require "ab22ctf19.j2l" ///@MLLE-Generated
#include "SEenergyblast-mlle.asc" ///@MLLE-Generated
#pragma require "SEenergyblast-mlle.asc" ///@MLLE-Generated
#include "limitedoxygen.asc"

void onLevelLoad() {
	jjUseLayer8Speeds = true;
	
	jjSetWaterLevel(100*32, true);
	jjSetWaterGradient(10, 20, 30, 83, 166, 250);
	jjWaterLighting = WATERLIGHT::GLOBAL;
	
	jjWeapons[WEAPON::ICE].maximum = 50;
	
	jjObjectPresets[OBJECT::FULLENERGY].behavior = CannotBeShotDown();
	
	for (int i = 1120; i <= 1489; i++) {
		jjPIXELMAP monoliths(i);
			for (uint x = 0; x < monoliths.width; ++x) {
				for (uint y = 0; y < monoliths.height; ++y) {
					if (monoliths[x,y] == 13 || monoliths[x,y] == 146) monoliths[x,y] = 220;
					if (monoliths[x,y] == 15 || monoliths[x,y] == 176) monoliths[x,y] = 228;
					if (monoliths[x,y] == 57 || monoliths[x,y] == 144 || monoliths[x,y] == 240) monoliths[x,y] = 225;
					if (monoliths[x,y] == 66 || monoliths[x,y] == 113) monoliths[x,y] = 224;
					if (monoliths[x,y] == 65 || monoliths[x,y] == 72 || monoliths[x,y] == 173 || monoliths[x,y] == 177) monoliths[x,y] = 227;
					if (monoliths[x,y] == 73) monoliths[x,y] = 226;
					if (monoliths[x,y] == 115) monoliths[x,y] = 222;
					if (monoliths[x,y] == 119) monoliths[x,y] = 216;
					if (monoliths[x,y] == 56 || monoliths[x,y] == 243 || monoliths[x,y] == 244) monoliths[x,y] = 223;
				}
			}
		monoliths.save(i, true);
	}
	
	jjANIMATION@ anim = jjAnimations[jjAnimSets[ANIM::BRIDGE] + 2];
	for (uint j = 0; j < anim.frameCount; j++) {
		jjANIMFRAME@ frame = jjAnimFrames[anim + j];
		jjPIXELMAP sprite(frame);
		for (uint x = 0; x < sprite.width; ++x) {
			for (uint y = 0; y < sprite.height; ++y) {
				if (sprite[x,y] >= 16 && sprite[x,y] <= 23) sprite[x,y] = 128 + (sprite[x,y]&7)*2;
			}
		}
		sprite.save(frame);
	}
	
	water::maxOxygen = 1500;
	
}

class CannotBeShotDown : jjBEHAVIORINTERFACE {
	void onBehave(jjOBJ@ obj) {
		obj.behave(BEHAVIOR::PICKUP);
		if (obj.state == STATE::FLOATFALL) obj.state = STATE::FLOAT;
	}
}

void onPlayer(jjPLAYER@ play) {
	water::limitedOxygen(play);
	
	play.lightType = LIGHT::NONE;
	
	play.lighting = jjColorDepth == 8? 110:100;
	jjEnforceLighting = jjColorDepth == 8? LIGHT::COMPLETE : LIGHT::OPTIONAL;
}

void onPlayerInput(jjPLAYER@ play) {
	if (play.yPos > jjWaterLevel && play.currWeapon == WEAPON::ICE) play.keyFire = false;
	else MLLE::WeaponHook.processPlayerInput(play);
}

bool onDrawAmmo(jjPLAYER@ play, jjCANVAS@ canvas) {
	return MLLE::WeaponHook.drawAmmo(play, canvas);
}

bool onDrawHealth(jjPLAYER@ play, jjCANVAS@ canvas) {
	water::drawOxygenTimer(play, canvas);
	return false;	
}