Downloads containing VDom5.j2as

Downloads
Name Author Game Mode Rating
JJ2+ Only: violetclm DOM Episodes I... Violet CLM Custom / Concept N/A Download file

File preview

  1. const bool MLLESetupSuccessful = MLLE::Setup(array<MLLEWeaponApply@> = {null, null, null, WeaponVMega::Pathfinder::Weapon(), NapsWeapons::AntiGravityBouncer(), null, null, null, null}); ///@MLLE-Generated
  2. #include "MLLE-Include-1.5w.asc" ///@MLLE-Generated
  3. #pragma require "Jungle1.j2t" ///@MLLE-Generated
  4. #pragma require "vdom.j2t" ///@MLLE-Generated
  5. #pragma require "VDom5.j2l" ///@MLLE-Generated
  6. #include "AntiGravBouncers.asc" ///@MLLE-Generated
  7. #pragma require "AntiGravBouncers.asc" ///@MLLE-Generated
  8. #include "WeaponVMega4.asc" ///@MLLE-Generated
  9. #pragma require "WeaponVMega4.asc" ///@MLLE-Generated
  10.  
  11. ///@SaveAndRunArgs -dom -server
  12.  
  13. bool onDrawAmmo(jjPLAYER@ player, jjCANVAS@ canvas) {
  14.         return MLLE::WeaponHook.drawAmmo(player, canvas);
  15. }
  16.  
  17. //const jjBEHAVIOR realFlickerLight = jjObjectPresets[OBJECT::FLICKERLIGHT].behavior;
  18. void onLevelReload() { MLLE::Palette.apply(); }
  19. void onLevelLoad() {
  20.         jjObjectPresets[OBJECT::BOUNCERPOWERUP].behavior = NoFallMonitor;
  21.         jjObjectPresets[OBJECT::BRIDGE].behavior = MoveBridgeUp;
  22.         jjObjectPresets[OBJECT::FLICKERLIGHT].behavior = MoveLightUp;
  23.         jjObjectPresets[OBJECT::BEES].freeze = jjObjectPresets[OBJECT::ICEBULLET].freeze;
  24.        
  25.         jjANIMATION@ bridge = jjAnimations[jjAnimSets[ANIM::BRIDGE] + 2];
  26.         for (uint i = 0; i < bridge.frameCount; ++i) { 
  27.                 jjANIMFRAME@ frame = jjAnimFrames[bridge + i];
  28.                 jjPIXELMAP image(frame);
  29.                 for (uint x = 0; x < image.width; ++x)
  30.                         for (uint y = 0; y < image.height; ++y)
  31.                                 if (image[x,y] != 0)
  32.                                         image[x,y] += 80;
  33.                 image.save(frame);
  34.         }
  35.        
  36.         jjObjectPresets[OBJECT::APPLE].playerHandling = HANDLING::PARTICLE;
  37.         jjObjectPresets[OBJECT::APPLE].determineCurAnim(ANIM::HATTER, 1);
  38.         jjObjectPresets[OBJECT::APPLE].frameID = 7;
  39.         jjObjectPresets[OBJECT::APPLE].determineCurFrame();
  40.         jjObjectPresets[OBJECT::APPLE].behavior = Hat;
  41.        
  42.         jjObjectPresets[OBJECT::BOUNCERBULLET].behavior = BouncerNoWallWrapper;
  43.         jjObjectPresets[OBJECT::BOUNCERBULLETPU].behavior = BouncerPUNoWallWrapper;
  44.        
  45.         jjEnforceLighting = LIGHT::COMPLETE;
  46.        
  47.         //for (uint i = 720; i < 1030; ++i)
  48.         //      jjTileType[i] = 5;
  49. }
  50. void onLevelBegin() {
  51.         jjWeapons[WEAPON::SEEKER].allowedPowerup = true;
  52. }
  53.  
  54. void BouncerNoWallWrapper(jjOBJ@ obj) { //from MLLE-DefaultWeapons.asc
  55.         const bool right = obj.xSpeed >= 0;
  56.         obj.behave(BEHAVIOR::BOUNCERBULLET);
  57.         if (right != (obj.xSpeed >= 0))
  58.                 obj.var[7] = -obj.var[7];
  59. }
  60. void BouncerPUNoWallWrapper(jjOBJ@ obj) { //
  61.         const bool right = obj.xSpeed >= 0;
  62.         obj.behave(BEHAVIOR::BOUNCERBULLETPU);
  63.         if (right != (obj.xSpeed >= 0))
  64.                 obj.var[7] = -obj.var[7];
  65. }
  66.  
  67. void NoFallMonitor(jjOBJ@ obj) {
  68.         obj.direction = SPRITE::FLIPV;
  69.         obj.behavior = BEHAVIOR::MONITOR;
  70.         obj.behave();
  71.         obj.direction = (jjRandom() & 1) == 1 ? SPRITE::FLIPV : SPRITE::FLIPHV;
  72. }
  73.  
  74. void MoveBridgeUp(jjOBJ@ obj) {
  75.         obj.behave(BEHAVIOR::BRIDGE);
  76.         obj.yOrg = obj.yPos -= 11;
  77.         obj.xOrg = obj.xPos += 1;
  78.         obj.var[0] = obj.var[0] - 16;
  79.         obj.behavior = BEHAVIOR::BRIDGE;
  80. }
  81. void MoveLightUp(jjOBJ@ obj) {
  82.         //obj.behave(realFlickerLight);
  83.         obj.yPos -= abs(obj.xPos - obj.yPos) < 64 ? 24 : 16;
  84.         obj.behavior = BEHAVIOR::BEES;
  85. }
  86.  
  87. void onFunction0(jjPLAYER@ player) {
  88.         if (player.health > 0)
  89.                 player.hurt(7, true);
  90. }
  91.  
  92. const array<int> StartPosX = {37, 142,  31, 143, 90};
  93. const array<int> StartPosY = {41,  32, 138, 129, 94};
  94. void onPlayer(jjPLAYER@ player) {
  95.         player.powerup[WEAPON::SEEKER] = true; //just because it's blue
  96.         player.lightType = LIGHT::NONE;
  97.         if (player.health == 0) {
  98.                 bool foundTeamCompatibleStart = false;
  99.                 int startID;
  100.                 for (startID = 0; startID < 5; ++startID) {
  101.                         const bool doStart = (startID < 4) ? (jjGameCustom != GAME::DOM || jjControlPoints[startID].controlTeam == player.team) : (!foundTeamCompatibleStart);
  102.                         jjEventSet(StartPosX[startID], StartPosY[startID], doStart ? uint8(AREA::JAZZSTART) : 0);
  103.                         foundTeamCompatibleStart = foundTeamCompatibleStart || doStart;
  104.                 }
  105.         }
  106.         jjLayerYOffset[7] = jjLayerYOffset[7] + 0.08; //accept #924 already you cowards
  107. }
  108.  
  109. void Hat(jjOBJ@ obj) {
  110.         if (obj.state == STATE::START) {
  111.                 obj.putOnGround();
  112.                 obj.state = STATE::STOP;
  113.         }
  114.         jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos, obj.curFrame);
  115. }
  116.  
  117. const array<string> Pipes = {"|||", "||", "|", "||||"};
  118. bool onDrawGameModeHUD(jjPLAYER@, jjCANVAS@ canvas) {
  119.         if (jjGameCustom == GAME::DOM) {
  120.                 int y = 12;
  121.                 int x = 4;
  122.                 for (uint i = 0, numberOfTeamScoresDrawn = 0; i < 4; i++) {
  123.                         if (jjEnabledTeams[i]) {
  124.                                 canvas.drawString(x, y, Pipes[i] + jjTeamScore[TEAM::Color(i)] + "/" + jjMaxScore, STRING::MEDIUM);
  125.                                 if(++numberOfTeamScoresDrawn != 2) {
  126.                                         y += 24;
  127.                                 } else {
  128.                                         x += 100;
  129.                                         y = 12;
  130.                                 }
  131.                         }
  132.                 }
  133.                
  134.                 int extra_yPos = 75;
  135.                 canvas.drawString(4, extra_yPos + 5, "1CPs: ");
  136.                 for (int n = 0; n < 4; n++) {
  137.                         const int teamID = jjControlPoints[n].controlTeam;
  138.                         const int extra_xPos = 45 + (n & 1) * 10;
  139.                         if (teamID == TEAM::NEUTRAL)
  140.                                 canvas.drawString(extra_xPos, extra_yPos, "x", STRING::SMALL, STRING::DARK);
  141.                         else
  142.                                 canvas.drawString(extra_xPos, extra_yPos, Pipes[teamID] + "o");
  143.                         if (n == 1)
  144.                                 extra_yPos += 10;
  145.                 }
  146.                
  147.                 return true;
  148.         }
  149.         return false;
  150. }