const bool MLLESetupSuccessful = MLLE::Setup(array = {null, ArcaneWeapons::MeteorGun::Weapon(), se::EnergyBlastMLLEWrapper(), null, se::FireworkMLLEWrapper(), null, null, null, null}); ///@MLLE-Generated #include "MLLE-Include-1.8w.asc" ///@MLLE-Generated #pragma require "dingledell.j2l" ///@MLLE-Generated #include "SEfirework-mlle.asc" ///@MLLE-Generated #pragma require "SEfirework-mlle.asc" ///@MLLE-Generated #include "SEenergyblast-mlle.asc" ///@MLLE-Generated #pragma require "SEenergyblast-mlle.asc" ///@MLLE-Generated #include "ArcaneWeapon2.asc" ///@MLLE-Generated #pragma require "ArcaneWeapon2.asc" ///@MLLE-Generated ///@SaveAndRunArgs -server -battle ///@MLLE-Generated bool onDrawAmmo(jjPLAYER@ player, jjCANVAS@ canvas) { return MLLE::WeaponHook.drawAmmo(player, canvas); } void onLevelLoad() { jjOBJ@ preset = jjObjectPresets[OBJECT::APPLE]; preset.playerHandling = HANDLING::PARTICLE; preset.behavior = Flower; preset.curAnim = jjAnimSets[MLLEWeapons::GetFirstAvailableCustomAnimsetID()].allocate(array = {4}); jjANIMATION@ flowerAnim = jjAnimations[preset.curAnim]; for (int color = 0; color < 4; ++color) { jjANIMFRAME@ frame = jjAnimFrames[flowerAnim + color]; jjCOLORMAP(0, color * 96, 96,96, 6).save(frame); frame.hotSpotX = frame.hotSpotY = -48; } jjObjectPresets[OBJECT::BLUESPRING].ySpeed -= 27; jjANIMATION@ blueSpring = jjAnimations[jjObjectPresets[OBJECT::BLUESPRING].curAnim]; for (uint i = 0; i < blueSpring.frameCount; ++i) { jjANIMFRAME@ frame = jjAnimFrames[blueSpring + i]; jjCOLORMAP image(frame); for (uint x = 0; x < image.width; ++x) for (uint y = 0; y < image.height; ++y) if (image[x,y].alpha != 0) image[x,y].setHSL(x * 8, 200, image[x,y].getLight()); image.save(frame); } jjObjectPresets[OBJECT::REDSPRING].ySpeed += 3; jjObjectPresets[OBJECT::CARROT].isBlastable = false; jjObjectPresets[OBJECT::FULLENERGY].isBlastable = false; //jjObjectPresets[OBJECT::SEEKERPOWERUP].bulletHandling = HANDLING::IGNOREBULLET; //jjObjectPresets[OBJECT::GUN8POWERUP].bulletHandling = HANDLING::IGNOREBULLET; //jjObjectPresets[OBJECT::GUN9POWERUP].bulletHandling = HANDLING::IGNOREBULLET; //jjObjectPresets[OBJECT::RFPOWERUP].bulletHandling = HANDLING::IGNOREBULLET; //jjObjectPresets[OBJECT::ICEPOWERUP].bulletHandling = HANDLING::IGNOREBULLET; jjObjectPresets[OBJECT::MOTH].behavior = MothWrapper; jjObjectPresets[OBJECT::MOTH].playerHandling = HANDLING::PARTICLE; } uint NextFlowerColor; void Flower(jjOBJ@ obj) { if (obj.state == STATE::START) { obj.frameID = NextFlowerColor++; obj.determineCurFrame(); obj.state = STATE::ROTATE; obj.special = jjRandom(); obj.counter = jjRandom(); } if (!jjLowDetail) { const float scale = (abs(jjSin(obj.special += 4)) / 6.0) + 0.33; obj.counter -= 5; jjDrawRotatedSpriteFromCurFrame(obj.xPos + 2, obj.yPos + 9, obj.curFrame, obj.counter, scale,scale, layerZ: 3, mode: SPRITE::SHADOW); jjDrawRotatedSpriteFromCurFrame(obj.xPos, obj.yPos, obj.curFrame, obj.counter, scale,scale, layerZ: 3); } } array fastCustomSpringSpeeds(jjLocalPlayerCount, 0); void onPlayer(jjPLAYER@ play) { if (!jjLowDetail && (jjGameTicks & 1) == 1) { jjPARTICLE@ particle = jjAddParticle(PARTICLE::FLOWER); if (particle !is null) { const uint random = jjRandom(); particle.xPos = play.cameraX + (random % jjSubscreenWidth); particle.yPos = play.cameraY + (random % jjSubscreenHeight); particle.flower.color = 96 + (random & 48); particle.flower.petals = 3 + (random & 3); particle.flower.angularSpeed = int(random & 15) - 8; particle.flower.size = 96; particle.xSpeed = (int(random & 31) - 15) / 13.0; particle.ySpeed = 0.7 + abs(particle.xSpeed); } } if (play.ySpeed < -32.f) { fastCustomSpringSpeeds[play.localPlayerID] = int(ceil((play.ySpeed + 32.f) / -0.125f)); } else if (fastCustomSpringSpeeds[play.localPlayerID] != 0) { if (play.ySpeed < -31.f) { fastCustomSpringSpeeds[play.localPlayerID]--; play.ySpeed = -32.f; //play.keyFire = false; } else { fastCustomSpringSpeeds[play.localPlayerID] = 0; } } } /* void onPlayerDraw(jjPLAYERDRAW& draw) { if (draw.player.curAnim == jjAnimSets[draw.player.setID] + RABBIT::SPRING && draw.player.ySpeed < -2) { draw.spriteMode = SPRITE::SINGLEHUE; draw.spriteParam = 16 + (jjRandom() & 48); draw.lightType = LIGHT::BRIGHT; draw.light = 15; } } */ /* void onMain() { MLLE::WeaponHook.processMain(); } */ void onPlayerInput(jjPLAYER@ player) { MLLE::WeaponHook.processPlayerInput(player); } void onFunction0(jjPLAYER@ player) { player.showText(0, 0); } void MothWrapper(jjOBJ@ obj) { //copied from CloneV const uint eventX = uint(obj.xPos) >> 5, eventY = uint(obj.yPos) >> 5; int mothType = jjParameterGet(eventX, eventY, 0, 2); if (mothType == 2) { do { mothType = jjRandom() & 3; } while (mothType == 2); jjParameterSet(eventX, eventY, 0,2, mothType); } obj.behavior = BEHAVIOR::MOTH; }