Downloads containing xlmlake.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Lake PartyFeatured Download Dragusela Battle 9.5 Download file

File preview

const bool MLLESetupSuccessful = MLLE::Setup(array<MLLEWeaponApply@> = {null, null, BubbleGun::Weapon(), null, null, null, null, se::FireworkMLLEWrapper(), null}); ///@MLLE-Generated
#include "MLLE-Include-1.6w.asc" ///@MLLE-Generated
#pragma require "xlmlake-MLLE-Data-2.j2l" ///@MLLE-Generated
#pragma require "xlmlake-MLLE-Data-1.j2l" ///@MLLE-Generated
#pragma require "Beach.j2t" ///@MLLE-Generated
#pragma require "CarrFix.j2t" ///@MLLE-Generated
#pragma require "PalmtreePlazaNight.j2t" ///@MLLE-Generated
#pragma require "xlmlake.j2l" ///@MLLE-Generated
#include "SEfirework-mlle.asc" ///@MLLE-Generated
#pragma require "SEfirework-mlle.asc" ///@MLLE-Generated
#include "BubbleGun.asc" ///@MLLE-Generated
#pragma require "BubbleGun.asc" ///@MLLE-Generated
///@SaveAndRunArgs -server -battle ///@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);
}

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;
}