Downloads containing Tropical Turmoil Options.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Tropical Turmoil (Boss... jjturbo9 Single player 5 Download file

File preview

const bool MLLESetupSuccessful = MLLE::Setup(array<MLLEWeaponApply@> = {BubbleGun::Weapon(), null, null, null, null, null, null, null, null}); ///@MLLE-Generated
#include "MLLE-Include-1.8w.asc" ///@MLLE-Generated
#pragma require "Tropical Turmoil Options.j2l" ///@MLLE-Generated
#include "BubbleGun.asc" ///@MLLE-Generated
#pragma require "BubbleGun.asc" ///@MLLE-Generated

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



void onLevelBegin() {

    jjPLAYER@ p = jjLocalPlayers[0];
	p.lives = 0;
    jjPLAYER@ player = jjLocalPlayers[0];
/*     if (!player.bossActivated) {
        player.activateBoss();
    } */
	
	    jjPLAYER@ FastFiredUp = jjLocalPlayers[0];
    //FastFiredUp.fastfire = 9; // change 6 into 1 for fastest gun in the WildWest, now default max (from collecting FastFire items)
    for (int i = 1; i <= 9; i++) {
        jjWeapons[i].allowed = false;
        jjWeapons[i].allowedPowerup = false;
        FastFiredUp.ammo[i] = 0;
        FastFiredUp.powerup[i] = true;
    }
	
}

const int KEY_SPACE = 32; // SPACE key
const int KEY_ALT   = 18; // ALT key

bool spacePrev       = false;
bool altPrev         = false;
bool allowCharSwitch = true;

void onMain()
{
    jjPLAYER@ p = jjLocalPlayers[0];
    if (p is null) return;

    // =========================
    // CHARACTER SWITCH (SPACE)
    // =========================
    bool spaceNow = jjKey[KEY_SPACE];

    if (allowCharSwitch && spaceNow && !spacePrev)
    {
        // Cycle characters: Jazz -> Spaz -> Lori -> Jazz
        if (p.charCurr == CHAR::JAZZ)
        {
            p.morphTo(CHAR::SPAZ);
            p.charOrig = CHAR::SPAZ;
        }
        else if (p.charCurr == CHAR::SPAZ)
        {
            p.morphTo(CHAR::LORI);
            p.charOrig = CHAR::LORI;
        }
        else if (p.charCurr == CHAR::LORI)
        {
            p.morphTo(CHAR::JAZZ);
            p.charOrig = CHAR::JAZZ;
        }
    }
    spacePrev = spaceNow;

    // =========================
    // SCREEN POSITION
    // =========================
    int screenX = int(p.cameraX) + 57;
    int screenY = int(p.cameraY);

    // =========================
    // INFO TEXT
    // =========================
    jjDrawString(screenX + 0, screenY + 150,
        "        !!!If you touch this sleeping Uterus you'll fight again!!!",
        STRING::SMALL, STRING::NORMAL, 6, p.localPlayerID);

    jjDrawString(screenX + 0, screenY + 180,
        "                       -Press SPACE to switch character-",
        STRING::SMALL, STRING::NORMAL, 6, p.localPlayerID);

    jjDrawString(screenX + 20, screenY + 270,
        "                        (Or go down there to exit)",
        STRING::SMALL, STRING::NORMAL, 6, p.localPlayerID);

    jjDrawString(screenX + 5, screenY + 440,
        "                                                               BPM now: 125 (Original)",
        STRING::SMALL, STRING::NORMAL, 6, p.localPlayerID);

    // =========================
    // DIFFICULTY SWITCH (ALT)
    // =========================
    bool altNow = jjKey[KEY_ALT];

    if (altNow && !altPrev)
    {
        if      (jjDifficulty == 0) jjDifficulty = 1; // Easy → Normal
        else if (jjDifficulty == 1) jjDifficulty = 2; // Normal → Hard
        else if (jjDifficulty == 2) jjDifficulty = 3; // Hard → Turbo
        else                        jjDifficulty = 0; // Turbo → Easy
    }
    altPrev = altNow;

    // =========================
    // DIFFICULTY DISPLAY
    // =========================
    int diffX = int(p.cameraX) + 50;
    int diffY = int(p.cameraY) + 50;

    if (jjDifficulty == 0)
    {
        jjDrawString(diffX, diffY, "Difficulty: Easy (BPM: 135)",
            STRING::MEDIUM, STRING::NORMAL, 0, p.localPlayerID);
        jjDrawString(diffX, diffY + 25,
            "You'll get a faster fire-rate and carrots (Press ALT to change)",
            STRING::SMALL, STRING::NORMAL, 0, p.localPlayerID);
    }
    else if (jjDifficulty == 1)
    {
        jjDrawString(diffX, diffY, "Difficulty: Normal (BPM: 145)",
            STRING::MEDIUM, STRING::NORMAL, 0, p.localPlayerID);
        jjDrawString(diffX, diffY + 25,
            "(Press ALT to change)",
            STRING::SMALL, STRING::NORMAL, 0, p.localPlayerID);
    }
    else if (jjDifficulty == 2)
    {
        jjDrawString(diffX, diffY, "Difficulty: Hard (BPM: 155)",
            STRING::MEDIUM, STRING::NORMAL, 0, p.localPlayerID);
        jjDrawString(diffX, diffY + 25,
            "More Spikeballs (Press ALT to change)",
            STRING::SMALL, STRING::NORMAL, 0, p.localPlayerID);
    }
    else if (jjDifficulty == 3)
    {
        jjDrawString(diffX, diffY, "Difficulty: Turbo (BPM: 165)",
            STRING::MEDIUM, STRING::NORMAL, 0, p.localPlayerID);
        jjDrawString(diffX, diffY + 25,
            "More Spikeballs, less health (Press ALT to change)",
            STRING::SMALL, STRING::NORMAL, 0, p.localPlayerID);
    }
}

void onFunction101()
{
    // Disable character switching before level change
    allowCharSwitch = false;
    spacePrev = true; // prevent accidental switch on transition frame

    jjNxt("Tropical Turmoil.j2l", true, true);
}

void onLevelLoad() {
/*   jjObjectPresets[OBJECT::UTERUS].behavior = Fundus; */
  
  jjObjectPresets[OBJECT::UTERUS].energy = 127;
    // Optional: spikeball or attack tweaks
    jjObjectPresets[OBJECT::UTERUSSPIKEBALL].energy = 20;
}