Downloads containing ab26btl06.j2as

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

File preview

#include "MLLE-Include-1.6.asc" ///@MLLE-Generated
#pragma require "ab26btl06-MLLE-Data-1.j2l" ///@MLLE-Generated
#pragma require "ab26btl06.j2l" ///@MLLE-Generated
const bool MLLESetupSuccessful = MLLE::Setup();
#pragma require "ezhypviol-MLLE-Data-1.j2l"
#pragma require "ezhypviol.j2l"
#pragma require "Syringe.j2a"

void onLevelLoad() {
	jjTexturedBGTexture = TEXTURE::DESOLATION;
	jjUseLayer8Speeds = true;

	for (int i = 1; i < 255; i++) {
		jjOBJ@ preset = jjObjectPresets[i];
		if (preset.playerHandling == HANDLING::PICKUP) {
			preset.behavior = CannotBeBuried();
		}
	}
	
	jjWeapons[WEAPON::TOASTER].multiplier = 24;
	
	jjAnimSets[ANIM::HATTER].load();
	jjAnimSets[ANIM::MONKEY].load();
	jjAnimSets[ANIM::CUSTOM[28]].load(0, "Syringe.j2a");
	
	jjAnimations[jjAnimSets[ANIM::AMMO] + 62] = jjAnimations[jjAnimSets[ANIM::CUSTOM[28]] + 0];
	jjAnimations[jjAnimSets[ANIM::AMMO] + 61] = jjAnimations[jjAnimSets[ANIM::CUSTOM[28]] + 1];
	jjAnimations[jjAnimSets[ANIM::PLUS_COMMON] + 0] = jjAnimations[jjAnimSets[ANIM::CUSTOM[28]] + 3]; //gun 8 crate

	jjObjectPresets[OBJECT::FIREBALLBULLET].behavior = jjObjectPresets[OBJECT::FIREBALLBULLETPU].behavior = BloodSpear();
	jjObjectPresets[OBJECT::FIREBALLBULLET].ySpeed = -1.5;
	jjObjectPresets[OBJECT::FIREBALLBULLET].xSpeed = 8;
	jjObjectPresets[OBJECT::FIREBALLBULLET].counterEnd = 75;
	jjObjectPresets[OBJECT::FIREBALLBULLET].var[6] = 0;
	jjObjectPresets[OBJECT::FIREBALLBULLETPU].ySpeed = -2;
	jjObjectPresets[OBJECT::FIREBALLBULLETPU].xSpeed = 8.5;
	jjObjectPresets[OBJECT::FIREBALLBULLETPU].counterEnd = 85;
	jjObjectPresets[OBJECT::FIREBALLBULLETPU].var[6] = 8;
	
	jjObjectPresets[OBJECT::GUN8POWERUP].determineCurAnim(ANIM::CUSTOM[28], 2, true);
	jjObjectPresets[OBJECT::GUN8POWERUP].determineCurFrame();

	jjWeapons[WEAPON::GUN8].gradualAim = false;
	jjWeapons[WEAPON::GUN8].defaultSample = false;
	jjWeapons[WEAPON::GUN8].replacedByBubbles = true;
}

class CannotBeBuried : jjBEHAVIORINTERFACE {
	void onBehave(jjOBJ@ obj) {
		obj.behave(BEHAVIOR::PICKUP);
		if (jjMaskedPixel(int(obj.xPos), int(obj.yPos) + 8)) {
			obj.state = STATE::FLOAT;
		}
	}
}

class BloodSpear : jjBEHAVIORINTERFACE {
	void onBehave(jjOBJ@ obj) {
		obj.behave(BEHAVIOR::BULLET, false);
		obj.var[0] = int(atan2(-obj.ySpeed, obj.xSpeed) * (512.f * 0.318309886142228f));
		
		if (obj.counter == 1 && obj.state == STATE::FLY && jjPlayers[obj.creatorID].isLocal) {
			jjSample(jjPlayers[obj.creatorID].xPos, jjPlayers[obj.creatorID].yPos, SOUND::HATTER_PTOEI, 0, obj.eventID == OBJECT::FIREBALLBULLETPU? 19000:20000);
		}
		
		if (obj.state == STATE::FLY) {
			jjDrawRotatedSprite(obj.xPos, obj.yPos, ANIM::HATTER, 3, jjGameTicks >> 2, obj.var[0], 2, 1, SPRITE::SINGLEHUE, obj.eventID == OBJECT::FIREBALLBULLETPU? 15:24);
			switch (obj.direction) {
				case 1: obj.xSpeed -= 0.1; obj.ySpeed += 0.1; break;
				case -1: obj.xSpeed += 0.1; obj.ySpeed += 0.1; break;
			}
			if (obj.xSpeed == 0) obj.ySpeed += 0.15;
			
			jjPARTICLE@ blood = jjAddParticle(PARTICLE::ICETRAIL);
			blood.xPos = obj.xPos;
			blood.yPos = obj.yPos;
			blood.icetrail.color = obj.eventID == OBJECT::FIREBALLBULLETPU? 16:24;
			blood.icetrail.colorStop = obj.eventID == OBJECT::FIREBALLBULLETPU? 24:32;
		}
		
		if (obj.state == STATE::EXPLODE) {
			if (obj.var[2] == 0) {
				obj.frameID = 1;
				obj.var[2] = 1;
			}
			jjDrawSprite(obj.xPos, obj.yPos, ANIM::MONKEY, 1, obj.curFrame, obj.direction, SPRITE::SINGLEHUE, obj.eventID == OBJECT::FIREBALLBULLETPU? 15:24);
			if (obj.var[1] < 27) {
				if (obj.var[1] == 1) jjSample(obj.xPos, obj.yPos, SOUND::HATTER_SPLOUT, 0, 20000);
				obj.var[1] = obj.var[1] + 1;
			}
			if (obj.var[1] == 27) {
				obj.var[1] = 0;
				obj.delete();
			}
		}
		
	}
}

void onPlayer(jjPLAYER@ play) {
	float MaxHealth = jjMaxHealth + 1;
	float Health = play.health + 1;
	float healthratio = MaxHealth / Health;

	if (healthratio < 1.3) jjWeapons[WEAPON::GUN8].spread = SPREAD::NORMAL;
	if (healthratio >= 1.3 && healthratio < 2) jjWeapons[WEAPON::GUN8].spread = SPREAD::RFNORMAL;
	if (healthratio >= 2) jjWeapons[WEAPON::GUN8].spread = SPREAD::RFPU;
}

void onFunction0(jjPLAYER@ play) {
	play.showText("@@@@Hyperviolence!@Created by PurpleJazz of EZ (2015-2017, 2019)@Tileset by Skulg, with additional tiles by Blade@np: Sonic Mayhem - Quad Machine [3:35]");
}