Downloads containing xlmplateau.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Distant PlateauFeatured Download Dragusela Capture the flag 8.4 Download file

File preview

const bool MLLESetupSuccessful = MLLE::Setup(array<MLLEWeaponApply@> = {null, null, BubbleGun::Weapon(), null, null, null, null, null, null}); ///@MLLE-Generated
#include "MLLE-Include-1.6w.asc" ///@MLLE-Generated
#pragma require "xlmplateau-MLLE-Data-2.j2l" ///@MLLE-Generated
#pragma require "xlmplateau-MLLE-Data-1.j2l" ///@MLLE-Generated
#pragma require "IC - Jungrock1.j2t" ///@MLLE-Generated
#pragma require "Lomat.j2t" ///@MLLE-Generated
#pragma require "DiambDay.j2t" ///@MLLE-Generated
#pragma require "Aztec2.j2t" ///@MLLE-Generated
#pragma require "xlmplateau.j2l" ///@MLLE-Generated
#include "BubbleGun.asc" ///@MLLE-Generated
#pragma require "BubbleGun.asc" ///@MLLE-Generated

void onLevelLoad() {
	jjUseLayer8Speeds = true;
    for (int i = 1; i < 255; i++) {
        jjOBJ@ preset = jjObjectPresets[i];
        if (preset.playerHandling == HANDLING::PICKUP) {
            preset.behavior = CannotBeShotDown(preset.behavior);
        }
    }
}


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


void onLevelReload() {
	MLLE::ReapplyPalette();
	
}

class CannotBeShotDown : jjBEHAVIORINTERFACE {
    CannotBeShotDown(const jjBEHAVIOR &in behavior) {
        originalBehavior = behavior;
    }
    void onBehave(jjOBJ@ obj) {
        obj.behave(originalBehavior);
        if (obj.state == STATE::FLOATFALL)
            obj.state = STATE::FLOAT;
    }
    bool onObjectHit(jjOBJ@ obj, jjOBJ@ bullet, jjPLAYER@ player, int force) {
        if (bullet is null) {
            obj.behavior = originalBehavior;
            if (player.objectHit(obj, force, obj.playerHandling))
                return true;
            obj.behavior = this;
        }
        return false;
    }
    private jjBEHAVIOR originalBehavior;
}