summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorxemplum <morxemplum+github@gmail.com>2021-08-06 21:07:11 -0700
committerMorxemplum <morxemplum+github@gmail.com>2021-08-06 21:07:11 -0700
commit410f5d287d6d8476033df360eb90b8187020d196 (patch)
tree49f6ae192de82cee967b9440f6a9d2e346897d24
parent9e9af73f4f9925cdc207c35a6cd2e2d93d58a438 (diff)
Import Lua & add dependency reliancenew_hypercube
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua105
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua74
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua183
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/evotutorial.lua300
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua147
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua149
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua242
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua100
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua116
-rw-r--r--_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua154
10 files changed, 905 insertions, 665 deletions
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua
index e7646e99..09d2faa9 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua
@@ -6,46 +6,51 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "nextpatterns.lu
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then pACBarrage()
- elseif mKey == 1 then pACBarrageMulti()
- elseif mKey == 2 then pACBarrageMultiAltDir()
- end
+ if mKey == 0 then pACBarrageDecelerate()
+ elseif mKey == 1 then pACBarrageMulti()
+ elseif mKey == 2 then pACSpiral()
+ elseif mKey == 3 and u_getDifficultyMult() >= 1 then pACBarrageDeception()
+ elseif mKey == 4 then pACAltBarrage(math.random(2, 3))
+ elseif mKey == 5 then pACAltBarrageMulti()
+ elseif mKey == 6 then pACAltBarrageReveal(math.random(3, 4))
+ elseif mKey == 7 then pACInverseBarrage();
+ elseif mKey == 8 then pACTunnelReveal(math.random(2, 4));
+ end
end
-- shuffle the keys, and then call them to add all the patterns
-- shuffling is better than randomizing - it guarantees all the patterns will be called
-keys = { 0, 0, 1, 1, 2, 2, 0, 0, 0, 0, 0 }
+keys = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 7, 8}
shuffle(keys)
index = 0
achievementUnlocked = false
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(2.25)
- l_setSpeedInc(0.045)
- l_setSpeedMax(2.35);
- l_setRotationSpeed(0.27)
- l_setRotationSpeedMax(0.45)
- l_setRotationSpeedInc(0.045)
- l_setDelayMult(1.1)
- l_setDelayInc(-0.01)
- l_setDelayMin(1.07)
- l_setFastSpin(71.0)
- l_setSides(6)
- l_setSidesMin(5)
- l_setSidesMax(7)
- l_setIncTime(15)
+ l_setSpeedMult(2.2)
+ l_setSpeedInc(0.1)
+ l_setSpeedMax(4.5);
+ l_setRotationSpeed(0.27)
+ l_setRotationSpeedMax(0.45)
+ l_setRotationSpeedInc(0.045)
+ l_setDelayMult(1.1)
+ l_setFastSpin(71.0)
+ l_setSides(6)
+ l_setSidesMin(5)
+ l_setSidesMax(7)
+ l_setIncTime(15)
- l_setPulseMin(64)
- l_setPulseMax(84)
- l_setPulseSpeed(1.05)
- l_setPulseSpeedR(1.34)
- l_setPulseDelayMax(7)
+ l_setPulseMin(64)
+ l_setPulseMax(84)
+ l_setPulseSpeed(1.05)
+ l_setPulseSpeedR(1.34)
+ l_setPulseDelayMax(7)
+
+ l_setBeatPulseMax(15)
+ l_setBeatPulseDelayMax(21.8)
- l_setBeatPulseMax(15)
- l_setBeatPulseDelayMax(21.8)
-
- enableSwapIfDMGreaterThan(1.4)
+ enableSwapIfDMGreaterThan(1.4)
+ l_setSwapCooldownMult(1 / u_getDifficultyMult());
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
@@ -55,13 +60,13 @@ end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- addPattern(keys[index])
- index = index + 1
+ addPattern(keys[index])
+ index = index + 1
- if index - 1 == #keys then
- index = 1
- shuffle(keys)
- end
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
end
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
@@ -76,25 +81,25 @@ end
dirChangeTime = 400
hueIMin = 0.0
hueIMax = 22.0
-hueIStep = 0.0065
+hueIStep = 6.5
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- dirChangeTime = dirChangeTime - mFrameTime;
- if dirChangeTime < 0 then
- -- do not change direction while fast spinning
- if u_isFastSpinning() == false then
- l_setRotationSpeed(l_getRotationSpeed() * -1.0)
- dirChangeTime = 400
- end
- end
+ dirChangeTime = dirChangeTime - mFrameTime;
+ if dirChangeTime < 0 then
+ -- do not change direction while fast spinning
+ if u_isFastSpinning() == false then
+ l_setRotationSpeed(l_getRotationSpeed() * -1.0)
+ dirChangeTime = 400
+ end
+ end
- if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a13_acceleradiant")
- achievementUnlocked = true
- end
+ if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a13_acceleradiant")
+ achievementUnlocked = true
+ end
- s_setHueInc(s_getHueInc() + hueIStep)
- if(s_getHueInc() > hueIMax) then hueIStep = hueIStep * -1 end
- if(s_getHueInc() < hueIMin) then hueIStep = hueIStep * -1 end
+ s_setHueInc(s_getHueInc() + hueIStep * mFrameTime/FPS)
+ if(s_getHueInc() > hueIMax) then hueIStep = hueIStep * -1 end
+ if(s_getHueInc() < hueIMin) then hueIStep = hueIStep * -1 end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua
index 51b61b73..6a29a89a 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua
@@ -5,57 +5,65 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "commonpatterns.
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "nextpatterns.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatterns.lua")
-curveSpeed = 1
+curveSpeed = 15
achievementUnlocked = false
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(2.91)
- l_setSpeedInc(0.0)
- l_setRotationSpeed(0.0)
- l_setRotationSpeedMax(0.0)
- l_setRotationSpeedInc(0.0)
- l_setDelayMult(1.35)
- l_setDelayInc(0.0)
- l_setFastSpin(0.0)
- l_setSides(30)
- l_setSidesMin(30)
- l_setSidesMax(30)
- l_setIncTime(10)
+ l_setSpeedMult(2.8)
+ l_setSpeedInc(0.0)
+ l_setRotationSpeed(0.0)
+ l_setRotationSpeedMax(0.0)
+ l_setRotationSpeedInc(0.0)
+ l_setDelayMult(1.35)
+ l_setDelayInc(0.0)
+ l_setFastSpin(0.0)
+ l_setSides(30)
+ l_setSidesMin(30)
+ l_setSidesMax(30)
+ l_setIncTime(10)
- l_setWallSkewLeft(0)
+ l_setWallSkewLeft(0)
- l_setPulseMin(60)
- l_setPulseMax(60)
- l_setPulseSpeed(0)
- l_setPulseSpeedR(0)
- l_setPulseDelayMax(6.8)
+ l_setPulseMin(60)
+ l_setPulseMax(60)
+ l_setPulseSpeed(0)
+ l_setPulseSpeedR(0)
+ l_setPulseDelayMax(6.8)
- l_setBeatPulseMax(19)
- l_setBeatPulseDelayMax(28.346)
+ l_setBeatPulseMax(20)
+ l_setBeatPulseDelayMax(27.2)
- l_setSwapEnabled(true)
- l_addTracked("curveSpeed", "curve speed")
+ l_setSwapEnabled(true)
+ l_setSwapCooldownMult(0.8/u_getDifficultyMult())
+ l_addTracked("curveSpeed", "curve speed")
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
+ if (u_getDifficultyMult() > 1) then
+ e_messageAdd("Difficulty > 1\nWalls travel constantly!", 120)
+ end
end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- hmcSimpleBarrageSNeigh(getRandomSide(), getRandomDir() * curveSpeed, 4)
- t_wait(getPerfectDelayDM(THICKNESS) * 6.22)
+ if (u_getDifficultyMult() > 1) then
+ hmcSimpleBarrageSNeigh(getRandomSide(), getRandomDir() * curveSpeed / 1.5, 4)
+ t_wait(getPerfectDelay(THICKNESS) * 7.5)
+ else
+ hmcBarrageStop(getRandomSide(), getRandomDir() * curveSpeed, 4)
+ t_wait(getPerfectDelay(THICKNESS) * 7)
+ end
+
end
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- if curveSpeed < 3 then
- curveSpeed = curveSpeed + 0.4
- e_messageAddImportant("Curve speed: "..curveSpeed, 120)
- end
+ curveSpeed = curveSpeed + 5
+ e_messageAddImportant("Curve speed: "..curveSpeed, 120)
end
-- onUnload is an hardcoded function that is called when the level is closed/restarted
@@ -64,8 +72,8 @@ end
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- if not achievementUnlocked and l_getLevelTime() > 45 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a19_centrifugalforce")
- achievementUnlocked = true
- end
+ if not achievementUnlocked and l_getLevelTime() > 45 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a19_centrifugalforce")
+ achievementUnlocked = true
+ end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua
index 896e15f5..15453218 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua
@@ -7,59 +7,82 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatter
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then pAltBarrage(u_rndInt(1, 3), 2)
- elseif mKey == 1 then pMirrorSpiral(u_rndInt(2, 4), 0)
- elseif mKey == 2 then pBarrageSpiral(u_rndInt(0, 3), 1, 1)
- elseif mKey == 3 then pBarrageSpiral(u_rndInt(0, 2), 1.2, 2)
- elseif mKey == 4 then pBarrageSpiral(2, 0.7, 1)
- elseif mKey == 5 then pInverseBarrage(0)
- elseif mKey == 6 then hmcDefBarrageSpiral()
- elseif mKey == 7 then pMirrorWallStrip(1, 0)
- elseif mKey == 8 then hmcDefSpinner()
- elseif mKey == 9 then hmcDefBarrage()
- elseif mKey == 10 then hmcDef2Cage()
- elseif mKey == 11 then hmcDefBarrageSpiralSpin()
- end
+ -- Normal Palette
+ if mKey == 0 then pAltBarrage(math.random(2, 4), 2)
+ elseif mKey == 1 then pMirrorSpiral(math.random(2, 4), 0)
+ elseif mKey == 2 then pBarrageSpiral(math.random(0, 3), 1, 1)
+ elseif mKey == 3 then pBarrageSpiral(math.random(0, 2), 1.2, 2)
+ elseif mKey == 4 then pBarrageSpiral(2, 0.7, 1)
+ elseif mKey == 5 then pInverseBarrage(0)
+ elseif mKey == 6 then hmpBarrageSpiral(math.random(1, 3), 2, clamp(level + 1, 2, 6))
+ elseif mKey == 7 then pMirrorWallStrip(1, 0)
+ elseif mKey == 8 then hmpSpinner(1, clamp(level, 1, 6))
+ elseif mKey == 9 then hmpBarrage(1, clamp(level, 1, 6))
+ elseif mKey == 10 then hmcDef2Cage()
+ elseif mKey == 11 then hmpBarrageSpiralSpin(math.random(7, 14), 2, clamp(level + 1, 2, 6))
+ elseif mKey == 12 then hmpGrowTunnel(math.random(2, 3))
+ elseif mKey == 13 then
+ hmcGrowBarrage(getRandomSide(), getRandomSide())
+ t_wait(getPerfectDelay(getPerfectThickness(THICKNESS)) * 4.5)
+ elseif mKey == 14 then pSwapBarrage(getRandomSide())
+ elseif mKey == 15 then pSwapCorridor(math.random(2, 3))
+ elseif mKey == 16 then hmpTwirl(math.random(2, 4), clamp(level + 1, 2, 5), 1)
+ -- Specials Palette
+ elseif mKey == 101 then
+ hmpBarrageStop(3, 12)
+ if (u_getDifficultyMult() > 1) then
+ t_wait(getPerfectDelay(THICKNESS) * 3)
+ end
+ elseif mKey == 102 then hmpSwarm(clamp(level, 1, 6), 3 * clamp(level, 1, 6), true, level > 10, false)
+ end
end
+--globalHueModifier = 0
+level = 1;
+
-- shuffle the keys, and then call them to add all the patterns
-- shuffling is better than randomizing - it guarantees all the patterns will be called
-keys = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 10, 8, 8, 9, 9, 9, 9, 6, 11, 11, 10, 10 }
+keys = { 0, 0, 1, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 12, 13, 13, 14, 14, 15, 16, 16 }
+specialKeys = {} -- For specials.
shuffle(keys)
-index = 0
+index = 1
+specialIndex = 1
achievementUnlocked = false
-specials = { "cage", "spinner", "barrage" }
+specials = { "spinner", "barrage", "grow", "swarm" }
+shuffle(specials)
+currSpecial = 1
special = "none"
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(1.7)
- l_setSpeedInc(0.15)
- l_setSpeedMax(2.9)
- l_setRotationSpeed(0.1)
- l_setRotationSpeedMax(0.415)
- l_setRotationSpeedInc(0.035)
- l_setDelayMult(1.2)
- l_setDelayInc(0.0)
- l_setFastSpin(0.0)
- l_setSides(6)
- l_setSidesMin(6)
- l_setSidesMax(6)
- l_setIncTime(15)
+ l_setSpeedMult(1.7)
+ l_setSpeedInc(0)
+ l_setSpeedMax(3.5)
+ l_setRotationSpeed(0.1)
+ l_setRotationSpeedMax(0.415)
+ l_setRotationSpeedInc(0)
+ l_setDelayMult(1.2)
+ l_setDelayInc(0.0)
+ l_setFastSpin(0.0)
+ l_setSides(6)
+ l_setSidesMin(6)
+ l_setSidesMax(6)
+ l_setIncTime(15)
- l_setPulseMin(77)
- l_setPulseMax(95)
- l_setPulseSpeed(1.937)
- l_setPulseSpeedR(0.524)
- l_setPulseDelayMax(13.05)
+ l_setPulseMin(77)
+ l_setPulseMax(95)
+ l_setPulseSpeed(1.937)
+ l_setPulseSpeedR(0.524)
+ l_setPulseDelayMax(13.05)
l_setPulseInitialDelay(28.346) -- skip a beat to match with the clap
- l_setBeatPulseMax(17)
- l_setBeatPulseDelayMax(28.346)
+ l_setBeatPulseMax(17)
+ l_setBeatPulseDelayMax(28.346)
- l_setSwapEnabled(true)
- l_addTracked("special", "special")
+ l_setSwapEnabled(true)
+ l_setSwapCooldownMult(1.4/u_getSpeedMultDM());
+ l_addTracked("special", "special")
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
@@ -69,34 +92,64 @@ end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- if special == "none" then
- addPattern(keys[index])
- index = index + 1
-
- if index - 1 == #keys then
- index = 1
- shuffle(keys)
- end
- elseif special == "cage" then
- addPattern(10)
- elseif special == "spinner" then
- addPattern(8)
- elseif special == "barrage" then
- addPattern(9)
- end
+ if (special == "none") then
+ addPattern(keys[index])
+ index = index + 1
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
+ else
+ addPattern(specialKeys[specialIndex])
+ if (#specialKeys > 1) then
+ specialIndex = specialIndex + 1;
+
+ if specialIndex - 1 == #specialKeys then
+ specialIndex = 1
+ shuffle(specialKeys)
+ end
+ end
+ end
end
+local constantFlag = false
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- shuffle(specials)
-
- if special == "none" then
- special = specials[1]
- e_messageAddImportant("Special: "..special, 120)
- else
- special = "none"
- end
+ if special == "none" then
+ special = specials[currSpecial]
+ e_messageAddImportant("Special: "..special, 120)
+ currSpecial = currSpecial + 1
+ if (currSpecial - 1 == #specials) then
+ currSpecial = 1
+ shuffle(specials)
+ end
+ specialIndex = 1
+ if (special == "cage") then
+ specialKeys = {10};
+ elseif (special == "spinner") then
+ specialKeys = {8};
+ elseif (special == "barrage") then
+ specialKeys = {101};
+ elseif (special == "grow") then
+ specialKeys = {13};
+ elseif (special == "swarm") then
+ specialKeys = {102};
+ if (level > 10 and not constantFlag) then
+ e_messageAddImportant("Constant Speed Enabled!", 90)
+ constantFlag = true
+ end
+ end
+ shuffle(specialKeys)
+ l_setSpeedInc(0.1)
+ l_setRotationSpeedInc(0.035)
+ else
+ special = "none"
+ level = level + 1;
+ l_setSpeedInc(0)
+ l_setRotationSpeedInc(0)
+ end
+ l_setSwapCooldownMult(1.7/u_getSpeedMultDM());
end
-- onUnload is an hardcoded function that is called when the level is closed/restarted
@@ -105,8 +158,8 @@ end
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a12_disco")
- achievementUnlocked = true
- end
+ if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a12_disco")
+ achievementUnlocked = true
+ end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/evotutorial.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/evotutorial.lua
index b27b9b49..5b2e5bcd 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/evotutorial.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/evotutorial.lua
@@ -7,10 +7,10 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatter
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then cBarrage(0)
- elseif mKey == 1 then hmcBarrageN(0, 0, 0, 0.05, -3.8, 2.7, true); t_wait(55)
- elseif mKey == 2 then hmcBarrageN(0, 0, 0, -0.05, -2.7, 3.8, true); t_wait(55)
- end
+ if mKey == 0 then cBarrage(0)
+ elseif mKey == 1 then hmcBarrageN(0, 0, 0, 0.05, -3.8, 2.7, true); t_wait(55)
+ elseif mKey == 2 then hmcBarrageN(0, 0, 0, -0.05, -2.7, 3.8, true); t_wait(55)
+ end
end
-- shuffle the keys, and then call them to add all the patterns
@@ -22,132 +22,161 @@ achievementUnlocked = false
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(1.1)
- l_setSpeedInc(0.045)
- l_setRotationSpeed(0.1)
- l_setRotationSpeedMax(0.4)
- l_setRotationSpeedInc(0.045)
- l_setDelayMult(1.0)
- l_setDelayInc(0.0)
- l_setFastSpin(71.0)
- l_setSides(6)
- l_setSidesMin(5)
- l_setSidesMax(7)
- l_setIncTime(0)
-
- l_setWallSkewLeft(18)
-
- l_setPulseMin(68)
- l_setPulseMax(82.93)
- l_setPulseSpeed(1.521)
- l_setPulseSpeedR(1.4)
- l_setPulseDelayMax(7)
-
- l_setBeatPulseMax(15)
- l_setBeatPulseDelayMax(27.48)
-
- l_setSwapEnabled(true)
-
- l_setTutorialMode(true)
- l_setIncEnabled(false)
+ l_setSpeedMult(1.1)
+ l_setSpeedInc(0.045)
+ l_setRotationSpeed(0.1)
+ l_setRotationSpeedMax(0.4)
+ l_setRotationSpeedInc(0.045)
+ l_setDelayMult(1.0)
+ l_setDelayInc(0.0)
+ l_setFastSpin(71.0)
+ l_setSides(6)
+ l_setSidesMin(5)
+ l_setSidesMax(7)
+ l_setIncTime(0)
+
+ l_setWallSkewLeft(18)
+
+ l_setPulseMin(64)
+ l_setPulseMax(84)
+ l_setPulseSpeed(1.05)
+ l_setPulseSpeedR(1.35)
+ l_setPulseDelayMax(7)
+
+ l_setBeatPulseMax(15)
+ l_setBeatPulseDelayMax(110)
+
+ l_setSwapEnabled(true)
+
+ l_setTutorialMode(true)
+ l_setIncEnabled(false)
end
swappedOnce = false
+swapTime = false
-- onCursorSwap is executed whenever the player executes a successful 180° swap
function onCursorSwap()
- if swappedOnce == false then
- u_log("swap detected!")
- swappedOnce = true
- end
+ if (swapTime and not swappedOnce) then
+ swappedOnce = true
+ e_clearMessages()
+ end
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
- e_messageAddImportant("welcome to the evolution tutorial", 120)
- e_messageAddImportant("today you'll be introduced to...", 120)
- e_messageAddImportant("1. swapping!", 100)
- e_messageAddImportant("2. curving walls!", 100)
- e_messageAddImportant("", 120)
- e_messageAddImportant("press space or middle mouse button\nto swap", 250)
- e_messageAddImportant("it allows you to rotate 180 degrees!", 200)
- e_messageAddImportant("", 120)
-
- e_messageAddImportant("now: curving walls", 120)
- e_messageAddImportant("they can be simple...", 120)
- e_messageAddImportant("", 120 * 3 + 80)
-
- t_wait(135 * 8)
- hmcSimpleBarrage(1)
- t_wait(100)
- hmcSimpleBarrage(-1)
- t_wait(50)
- hmcSimpleBarrage(1)
- t_wait(100)
- hmcSimpleBarrage(-2.5)
- t_wait(80)
- hmcSimpleBarrage(2.5)
- t_wait(80)
- hmcSimpleBarrage(3)
-
- t_wait(50)
- e_messageAddImportant("...in various patterns...", 130)
- e_messageAddImportant("", 120 * 5 + 80)
- t_wait(130)
-
- hmcSimpleTwirl(5, 1, 0)
- t_wait(50)
- hmcSimpleTwirl(5, -2.5, 0.3)
-
- e_messageAddImportant("...or can accellerate!", 130)
- e_messageAddImportant("", 120 * 4 + 40)
- t_wait(130)
-
- hmcBarrage(0, 0.05, -1.5, 3, true)
- t_wait(80)
- hmcBarrage(0, -0.05, -3, 3, true)
- t_wait(100)
- hmcBarrage(0, 0.1, -2, 2, true)
- t_wait(100)
- hmcBarrage(0, 0.1, -3, 3, true)
- t_wait(200)
-
- e_messageAddImportant("they can also do crazy stuff!", 130)
- e_messageAddImportant("", 120 * 8 + 50)
-
- hmcSimpleCage(2.5, 1)
- t_wait(80)
- hmcSimpleCage(2.5, -1)
- t_wait(100)
- hmcSimpleCage(2.5, 1)
- hmcSimpleCage(2.5, 1)
- t_wait(100)
- hmcSimpleCage(2.5, 1)
- hmcSimpleCage(2.5, -1)
- t_wait(100)
- hmcSimpleSpinner(1)
- t_wait(100)
- hmcSimpleSpinner(-2)
- t_wait(100)
- hmcSimpleSpinner(3)
- t_wait(100)
- hmcSimpleCage(1.5, 1)
- hmcSimpleCage(2.5, 1)
- t_wait(100)
- hmcSimpleCage(1.5, 1)
- hmcSimpleCage(2.5, -1)
- t_wait(100)
- hmcSimpleSpinner(1)
- hmcSimpleSpinner(1.2)
- t_wait(100)
- hmcSimpleSpinner(1)
- hmcSimpleSpinner(-1.2)
- t_wait(500)
-
- e_messageAddImportant("now play some real levels!", 138)
- e_messageAddImportant("good luck!", 130)
-
- t_kill()
+ e_waitS(1)
+ e_messageAddImportant("Welcome to the evolution tutorial", 150)
+ e_messageAddImportant("Today you'll be introduced to...", 120)
+ e_messageAddImportant("swapping, accelerating walls, and curving walls!", 300)
+ e_wait(570 + 120)
+ e_messageAddImportant("Swapping allows you to instantly rotate 180 degrees!", 200)
+ e_messageAddImportant("You can only swap when your player\nblinks red and yellow!", 250)
+ e_wait(450)
+
+ e_eval([[swapTime = true]])
+ e_messageAddImportant("Try swapping now!\nPress space or middle mouse button to swap", 10000)
+end
+
+function partTwo()
+ e_messageAddImportant("Awesome!", 120)
+ e_messageAddImportant("After swapping, you must wait before\nswapping again!", 250)
+ e_messageAddImportant("Let's introduce a swap pattern.", 180);
+ e_messageAddImportant("For this pattern, you must swap to survive", 180)
+ e_messageAddImportant("Swap at the right moment!", 180)
+ e_wait(180 * 3 + 120 + 250 + 120)
+ e_messageAddImportant("Excellent! You know how to swap!", 120)
+ t_wait(610)
+ pSwapBarrage(getRandomSide(), 2)
+
+ e_messageAddImportant("Let's talk about accelerating walls", 180);
+ e_messageAddImportant("These walls can change speed over time", 180);
+ e_messageAddImportant("They can either accelerate...", 180);
+ e_messageAddImportant("Decelerate...", 180);
+ e_messageAddImportant("Or go completely backwards to trick you!", 180);
+ e_wait(180 * 5 + 120 + 120)
+
+ t_wait(760);
+ pACBarrageAccelerate();
+ t_wait(120);
+ pACBarrageDecelerate();
+ t_wait(100);
+ pACBarrageDeception(3, 1);
+
+ e_messageAddImportant("But wait, it gets crazier!", 120);
+ e_messageAddImportant("Let's focus on curving walls", 120)
+ e_messageAddImportant("they can be simple...", 120)
+ e_wait(300 + 410)
+
+ t_wait(300)
+ hmcSimpleBarrage(0, 1)
+ t_wait(100)
+ hmcSimpleBarrage(0, -1)
+ t_wait(50)
+ hmcSimpleBarrage(0, math.random(1, 6))
+ t_wait(100)
+ hmcSimpleBarrage(0, -math.random(1, 6))
+ t_wait(80)
+ hmcSimpleBarrage(0, math.random(1, 6))
+ t_wait(80)
+ hmcSimpleBarrage(0, math.random(-6, 6))
+
+ t_wait(50)
+ e_messageAddImportant("...in various patterns...", 130)
+ e_wait(100 + 120 * 5 + 80)
+ t_wait(130)
+
+ hmcSimpleTwirl(5, math.random(-3, 3), 0)
+ t_wait(50)
+ hmcSimpleTwirl(5, -2, 1)
+
+ e_messageAddImportant("...or can accelerate!", 130)
+ e_wait(130 + 340)
+ t_wait(130)
+
+ hmcBarrage(0, 0.05, -1.5, 3, true)
+ t_wait(80)
+ hmcBarrage(0, -0.05, -3, 3, true)
+ t_wait(100)
+ hmcBarrage(0, 0.1, -2, 2, true)
+ t_wait(100)
+ hmcBarrage(0, 0.1, -3, 3, true)
+ t_wait(200)
+
+ e_messageAddImportant("they can also do crazy stuff!", 180)
+ e_wait(120 * 9)
+
+ hmcSimpleCage(2, 1)
+ t_wait(80)
+ hmcSimpleCage(2, -1)
+ t_wait(100)
+ hmcSimpleCage(2, 1)
+ hmcSimpleCage(2, 1)
+ t_wait(100)
+ hmcSimpleCage(2, 1)
+ hmcSimpleCage(2, -1)
+ t_wait(100)
+ hmcSimpleSpinner(getRandomSide(), 1)
+ t_wait(100)
+ hmcGrowBarrage(getRandomSide(), 0)
+ t_wait(100)
+ hmcGrowBarrage(getRandomSide(), 3)
+ t_wait(100)
+ hmcGrowBarrage(getRandomSide(), 6)
+ t_wait(100)
+ hmcAssembleBarrage(getRandomSide())
+ t_wait(100)
+ hmcAssembleBarrage(getRandomSide())
+ t_wait(100)
+ hmcAssembleBarrage(getRandomSide())
+ t_wait(700)
+
+ e_messageAddImportant("Well done!", 130)
+ e_messageAddImportant("You should be prepared to take on Hypercube!", 300)
+ e_messageAddImportant("Have fun!", 1000)
+
+ e_wait(340)
+ e_kill()
end
-- onStep is an hardcoded function that is called when the level timeline is empty
@@ -168,17 +197,22 @@ dirChangeTime = 600
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- dirChangeTime = dirChangeTime - mFrameTime;
- if dirChangeTime < 0 then
- -- do not change direction while fast spinning
- if u_isFastSpinning() == false then
- l_setRotationSpeed(l_getRotationSpeed() * -1.0)
- dirChangeTime = 400
- end
- end
-
- if not achievementUnlocked and l_getLevelTime() > 69 then
- steam_unlockAchievement("a11_evotutorial")
- achievementUnlocked = true
- end
+ --print(l_getPulse());
+ if (swappedOnce and swapTime) then
+ partTwo()
+ swapTime = false
+ end
+ dirChangeTime = dirChangeTime - mFrameTime;
+ if dirChangeTime < 0 then
+ -- do not change direction while fast spinning
+ if u_isFastSpinning() == false then
+ l_setRotationSpeed(l_getRotationSpeed() * -1.0)
+ dirChangeTime = 400
+ end
+ end
+
+ if not achievementUnlocked and l_getLevelTime() > 69 then
+ steam_unlockAchievement("a11_evotutorial")
+ achievementUnlocked = true
+ end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua
index 27cb7170..9d7d7d55 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua
@@ -6,21 +6,21 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "nextpatterns.lu
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatterns.lua")
function gforceBarrage()
- cBarrage(getRandomSide())
- t_wait(getPerfectDelayDM(THICKNESS) * 6.1)
+ cBarrage(getRandomSide())
+ t_wait(getPerfectDelay(THICKNESS) * 6.1)
end
function gforceBarrageAssault()
- cBarrage(getRandomSide())
- t_wait(getPerfectDelayDM(THICKNESS) * 3.1)
+ cBarrage(getRandomSide())
+ t_wait(getPerfectDelay(THICKNESS) * 3.5)
end
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then hmcDefAccelBarrage()
- elseif mKey == 1 then gforceBarrage()
- end
+ if mKey == 0 then hmpDefAccelBarrage()
+ elseif mKey == 1 then gforceBarrage()
+ end
end
-- shuffle the keys, and then call them to add all the patterns
@@ -31,27 +31,29 @@ index = 0
achievementUnlocked = false
specials = { "double", "assault", "incongruence", "dizzy" }
+shuffle(specials)
+currSpecial = 1
special = "none"
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(2.1)
- l_setSpeedInc(0.16)
- l_setSpeedMax(3.9)
- l_setRotationSpeed(0.12)
- l_setRotationSpeedMax(0.6)
- l_setRotationSpeedInc(0.035)
- l_setDelayMult(1.9)
- l_setDelayInc(0.0)
- l_setFastSpin(0.0)
- l_setSides(4)
- l_setSidesMin(4)
- l_setSidesMax(4)
- l_setIncTime(10)
-
- l_setWallSkewLeft(-15)
-
- l_setPulseInitialDelay(13.953 * 2)
+ l_setSpeedMult(2.1)
+ l_setSpeedInc(0) -- Disable it for right now
+ l_setSpeedMax(3.9)
+ l_setRotationSpeed(0.12)
+ l_setRotationSpeedMax(0.65)
+ l_setRotationSpeedInc(0.0175)
+ l_setDelayMult(1.9)
+ l_setDelayInc(0.0)
+ l_setFastSpin(0.0)
+ l_setSides(4)
+ l_setSidesMin(4)
+ l_setSidesMax(4)
+ l_setIncTime(10)
+
+ l_setWallSkewLeft(-15)
+
+ l_setPulseInitialDelay(13.953 * 2)
l_setPulseMin(67.62)
l_setPulseMax(95)
l_setPulseSpeed(2.791)
@@ -61,8 +63,9 @@ function onInit()
l_setBeatPulseMax(17)
l_setBeatPulseDelayMax(13.953)
- l_setSwapEnabled(true)
- l_addTracked("special", "special")
+ l_setSwapEnabled(true)
+ l_setSwapCooldownMult(1.9/u_getSpeedMultDM())
+ l_addTracked("special", "special")
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
@@ -72,48 +75,58 @@ end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- if special == "incongruence" then
- l_setSides(u_rndInt(4, 5))
- else
- l_setSides(4)
- end
-
- if special == "assault" then
- gforceBarrageAssault()
- return
- end
-
- if special == "dizzy" then
- addPattern(0)
- return
- end
-
- if special ~= "double" then
- addPattern(keys[index])
- else
- addPattern(keys[index])
- addPattern(keys[index])
- end
-
- index = index + 1
-
- if index - 1 == #keys then
- index = 1
- shuffle(keys)
- end
+ if special == "incongruence" then
+ l_setSides(u_rndInt(4, 5))
+ else
+ l_setSides(4)
+ end
+
+ if special == "assault" then
+ gforceBarrageAssault()
+ return
+ end
+
+ if special == "dizzy" then
+ addPattern(0)
+ return
+ end
+
+ if special ~= "double" then
+ addPattern(keys[index])
+ else
+ addPattern(keys[index])
+ addPattern(keys[index])
+ end
+
+ index = index + 1
+
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
end
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- shuffle(specials)
-
- if special == "none" then
- special = specials[1]
- e_messageAddImportant("Special: "..special, 120)
- else
- special = "none"
- end
+ if special == "none" then
+ special = specials[currSpecial]
+ currSpecial = currSpecial + 1
+ if (currSpecial - 1 == #specials) then
+ currSpecial = 1
+ shuffle(specials)
+ end
+ e_messageAddImportant("Special: "..special, 120)
+ l_setSpeedInc(0.16)
+ else
+ special = "none"
+ l_setSpeedInc(0)
+ end
+ if (special == "assault") then
+ l_setSwapCooldownMult(1/u_getSpeedMultDM()) -- Assault has tighter spacing so we need lower swap cooldown.
+ else
+ l_setSwapCooldownMult(1.9/u_getSpeedMultDM())
+ end
end
-- onUnload is an hardcoded function that is called when the level is closed/restarted
@@ -122,8 +135,8 @@ end
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a14_gforce")
- achievementUnlocked = true
- end
+ if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a14_gforce")
+ achievementUnlocked = true
+ end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua
index 1add3d7c..2ccc7a18 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua
@@ -6,15 +6,25 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "nextpatterns.lu
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then pRCBarrage()
- elseif mKey == 1 then pRCBarrageDouble()
- elseif mKey == 2 then pRCBarrageSpin()
- end
+ if mKey == 0 then pBarrage()
+ elseif mKey == 1 then pRCBarrageDouble()
+ elseif mKey == 2 then pBarrageSpiral(math.random(1, 2), 0.8)
+ elseif mKey == 3 then
+ if (l_getSides() > 8) then
+ pAltBarrage(math.random(2, 3), 3, 0.75)
+ else
+ pAltBarrage(math.random(2, 3), 2, 0.75)
+ end
+ -- "Dynamic" Patterns
+ elseif mKey == 4 then pRCAscendBarrageRandom(lowerBound, upperBound)
+ elseif mKey == 5 then pRCAscendBarrage(getRandomSide(), lowerBound, upperBound)
+ elseif mKey == 6 then pRCDynamicAltBarrage(2, math.random(3, 4), lowerBound, upperBound)
+ end
end
-- shuffle the keys, and then call them to add all the patterns
-- shuffling is better than randomizing - it guarantees all the patterns will be called
-keys = { 0, 0, 1, 1, 2 }
+keys = { 0, 0, 0, 1, 1, 2, 3 }
shuffle(keys)
index = 0
lowerBound = 4
@@ -23,60 +33,71 @@ achievementUnlocked = false
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(2.7)
- l_setSpeedInc(0.11)
- l_setSpeedMax(3.14) -- A lot of the difficulty is coming from the changing sides. Speed isn't too important here.
- l_setRotationSpeed(0.27)
- l_setRotationSpeedMax(0.5)
- l_setRotationSpeedInc(0.045)
- l_setDelayMult(1.1)
- l_setDelayInc(-0.04)
- l_setDelayMin(0.86)
- l_setFastSpin(71.0)
- l_setSides(6)
- l_setSidesMin(0)
- l_setSidesMax(0)
- l_setIncTime(15)
-
- l_setPulseMin(62.27)
- l_setPulseMax(100.22)
- l_setPulseSpeed(1.971)
- l_setPulseSpeedR(0.71)
- l_setPulseDelayMax(13.01)
-
- l_setBeatPulseMax(15)
- l_setBeatPulseDelayMax(21.428)
-
- l_addTracked("lowerBound", "min")
- l_addTracked("upperBound", "max")
- l_enableRndSideChanges(false)
-
- enableSwapIfDMGreaterThan(1.5)
+ l_setSpeedMult(2.7)
+ l_setSpeedInc(0.1)
+ l_setSpeedMax(3.8) -- A lot of the difficulty is coming from the changing sides. Speed isn't too important here.
+ l_setRotationSpeed(0.27)
+ l_setRotationSpeedMax(0.5)
+ l_setRotationSpeedInc(0.045)
+ l_setDelayMult(1.1)
+ l_setDelayInc(0)
+ l_setFastSpin(71.0)
+ l_setSides(6)
+ l_setSidesMin(0)
+ l_setSidesMax(0)
+ l_setIncTime(15)
+
+ l_setPulseMin(64)
+ l_setPulseMax(84)
+ l_setPulseSpeed(1.05)
+ l_setPulseSpeedR(1.34)
+ l_setPulseDelayMax(1.74)
+
+ l_setBeatPulseMax(15)
+ l_setBeatPulseDelayMax(21.428)
+
+ l_addTracked("lowerBound", "min")
+ l_addTracked("upperBound", "max")
+ l_enableRndSideChanges(false)
+
+ enableSwapIfDMGreaterThan(1.5)
+ l_setSwapCooldownMult(1 / u_getDifficultyMult())
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
- e_messageAddImportant("Sides ("..lowerBound.." / "..upperBound..")", 170)
+ if (u_getDifficultyMult() >= 1) then
+ keys[#keys + 1] = 4
+ keys[#keys + 1] = 4
+ if (u_getDifficultyMult() > 1) then
+ e_messageAdd("Difficulty > 1\n\"Dynamic\" patterns enabled!", 120)
+ keys[#keys + 1] = 5
+ keys[#keys + 1] = 6
+ end
+ shuffle(keys)
+ end
+ e_messageAddImportant("Sides: "..lowerBound.." - "..upperBound, 120)
end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- l_setSides(u_rndInt(lowerBound, upperBound))
- addPattern(keys[index])
- index = index + 1
-
- if index - 1 == #keys then
- index = 1
- shuffle(keys)
- end
+ l_setSides(u_rndInt(lowerBound, upperBound))
+ addPattern(keys[index])
+ index = index + 1
+
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
end
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- lowerBound = u_rndInt(4, 6)
- upperBound = lowerBound + u_rndInt(1, 3)
- e_messageAddImportant("Sides ("..lowerBound.." / "..upperBound..")", 170)
+ lowerBound = math.floor(u_rndInt(4, 6))
+ upperBound = math.floor(lowerBound + u_rndInt(1, 4))
+ e_messageAddImportant("Sides: "..lowerBound.." - "..upperBound, 120)
+ t_clear()
end
-- onUnload is an hardcoded function that is called when the level is closed/restarted
@@ -86,26 +107,26 @@ end
-- continuous direction change (even if not on level increment)
dirChangeTime = 400
hueIMin = 0.0
-hueIMax = 22.0
+hueIMax = 15.0
hueIStep = 0.0065
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- dirChangeTime = dirChangeTime - mFrameTime;
- if dirChangeTime < 0 then
- -- do not change direction while fast spinning
- if u_isFastSpinning() == false then
- l_setRotationSpeed(l_getRotationSpeed() * -1.0)
- dirChangeTime = 400
- end
- end
-
- if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a15_incongruence")
- achievementUnlocked = true
- end
-
- s_setHueInc(s_getHueInc() + hueIStep)
- if(s_getHueInc() > hueIMax) then hueIStep = hueIStep * -1 end
- if(s_getHueInc() < hueIMin) then hueIStep = hueIStep * -1 end
+ dirChangeTime = dirChangeTime - mFrameTime;
+ if dirChangeTime < 0 then
+ -- do not change direction while fast spinning
+ if u_isFastSpinning() == false then
+ l_setRotationSpeed(l_getRotationSpeed() * -1.0)
+ dirChangeTime = 400
+ end
+ end
+
+ if not achievementUnlocked and l_getLevelTime() > 90 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a15_incongruence")
+ achievementUnlocked = true
+ end
+
+ s_setHueInc(s_getHueInc() + hueIStep)
+ if(s_getHueInc() > hueIMax) then hueIStep = hueIStep * -1 end
+ if(s_getHueInc() < hueIMin) then hueIStep = hueIStep * -1 end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua
index 31f2f65c..03d2f845 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua
@@ -5,110 +5,182 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "commonpatterns.
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "nextpatterns.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatterns.lua")
+local side = 0
+local sideSpawn = 0;
+
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then pAltBarrage(u_rndInt(1, 2), 2)
- elseif mKey == 1 then pBarrageSpiral(2, 0.6, 1)
- elseif mKey == 2 then pInverseBarrage(0)
- elseif mKey == 3 then hmcDefBarrageSpiralFast()
- elseif mKey == 4 then pWallExVortex(0, 1, 1)
- elseif mKey == 5 then pDMBarrageSpiral(u_rndInt(2, 4), 0.4, 1)
- elseif mKey == 6 then pRandomBarrage(u_rndInt(1, 3), 2.25)
- elseif mKey == 7 then pInverseBarrage(0)
- elseif mKey == 8 then pMirrorWallStrip(1, 0)
- elseif mKey == 9 then hmcDefSpinner()
- elseif mKey == 10 then hmcDefBarrageSpiral()
- elseif mKey == 11 then hmcDef2CageD()
- elseif mKey == 12 then hmcDefBarrageSpiralSpin()
- elseif mKey == 13 then hmcDefSpinnerSpiralAcc()
- elseif mKey == 14 then hmcDefBarrageSpiralRnd()
- elseif mKey == 15 then hmcDefBarrageInv()
- end
+ if mKey == 0 then pAltBarrage(math.random(2, 4), 2)
+ elseif mKey == 1 then pBarrageSpiral(2, 0.6, 1)
+ elseif mKey == 2 then pInverseBarrage(0)
+ elseif mKey == 3 then hmpTunnelDynamic(math.random(2, 3))
+ elseif mKey == 4 then pWallExVortex(0, 1, 1)
+ elseif mKey == 5 then pDMBarrageSpiral(math.random(2, 4), 0.4, 1)
+ elseif mKey == 6 then pRandomBarrage(math.random(1, 3), 2.25)
+ elseif mKey == 7 then pInverseBarrage(0)
+ elseif mKey == 8 then pMirrorWallStrip(1, 0)
+ elseif mKey == 9 then hmpSpinner(1, clamp(level, 1, 6))
+ elseif mKey == 10 then hmpBarrageSpiral(math.random(1, 3), 2, clamp(level + 1, 2, 5))
+ elseif mKey == 11 then hmcDef2CageD()
+ elseif mKey == 12 then hmpBarrageSpiralSpin(math.random(4, 8), 2, clamp(level + 1, 2, 5))
+ elseif mKey == 13 then hmpBarrageSpiralStop(math.random(2, 4), 2, 6);
+ elseif mKey == 14 then hmcBarrageInv(1, clamp(level + 1, 2, 5))
+ elseif mKey == 15 then hmpStripeSnakeBarrage(getRandomSide(), math.random(3, 6))
+ elseif mKey == 16 then hmpStripeSnakeAltBarrage(math.random(5, 8), 2)
+ elseif mKey == 17 then hmpGrowTunnel(math.random(2, 3))
+ elseif mKey == 18 then hmpAssembleTunnel(math.random(2, 3))
+ elseif mKey == 19 then pSwapBarrage(getRandomSide())
+ elseif mKey == 20 then pSwapCorridor(math.random(2, 3))
+ elseif mKey == 21 then hmpTwirl(math.random(2, 3), clamp(level + 1, 2, 5), 1)
+
+ -- Special-exclusive patterns
+ -- Assemble Pattern
+ elseif mKey == 101 then
+ hmcAssembleBarrage(getRandomSide(), 1, 4)
+ t_wait(getPerfectDelay(getPerfectThickness(THICKNESS)) * 4.5)
+ -- Chaser Pattern
+ elseif mKey == 102 then
+ hmpChaserAltBarrage(math.random(1, 3), 2, math.random(getHalfSides(), l_getSides() - 1), true);
+ -- Turnaround pattern
+ elseif mKey == 103 then
+ sideSpawn = side + math.random(0, 1) * getHalfSides();
+ local revealChance = math.random(1, 3)
+ hmcTurnaroundSector(sideSpawn, revealChance == 1)
+ -- Alternate pattern
+ elseif mKey == 104 then
+ hmpAlternate()
+ -- Tunnel exclusive pattern
+ elseif mKey == 105 then
+ hmpTunnelSpinner(math.random(1, 3), 2, clamp(level + 1, 2, 5))
+ elseif mKey == 106 then
+ hmpSwarm(clamp(level, 1, 6), 3 * clamp(level, 1, 6), true, true, level > 14)
+ -- Consistency pattern
+ elseif mKey == 107 then
+ hmpTwirl(10, clamp(level, 1, 4), 1)
+ end
end
+level = 1;
+
-- shuffle the keys, and then call them to add all the patterns
-- shuffling is better than randomizing - it guarantees all the patterns will be called
-keys = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }
+keys = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 17, 18, 19, 19, 19, 20, 20, 21, 21 }
+specialKeys = {} -- For specials.
shuffle(keys)
-index = 0
+index = 1
+specialIndex = 1
achievementUnlocked = false
-specials = { "cage", "spinner", "barrage", "spiral" }
+specials = { "assemble", "turnaround", "alternate", "chaser", "tunnel", "swarm", "consistency"}
+shuffle(specials)
+currSpecial = 1;
special = "none"
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(2.7)
- l_setSpeedInc(0.04)
- l_setSpeedMax(3)
- l_setRotationSpeed(0.25)
- l_setRotationSpeedMax(0.4)
- l_setRotationSpeedInc(0.015)
- l_setDelayMult(1.35)
- l_setDelayInc(0.0)
- l_setFastSpin(71.0)
- l_setSides(6)
- l_setSidesMin(6)
- l_setSidesMax(6)
- l_setIncTime(10)
-
- l_setPulseMin(61.01)
+ l_setSpeedMult(2.7)
+ l_setSpeedInc(0)
+ l_setSpeedMax(3.5)
+ l_setRotationSpeed(0.25)
+ l_setRotationSpeedMax(0.7)
+ l_setRotationSpeedInc(0)
+ l_setDelayMult(1.35)
+ l_setDelayInc(0.0)
+ l_setFastSpin(71.0)
+ l_setSides(6)
+ l_setSidesMin(6)
+ l_setSidesMax(6)
+ l_setIncTime(20)
+
+ l_setPulseMin(61.01)
l_setPulseMax(80.48)
l_setPulseSpeed(2.4)
l_setPulseSpeedR(1.449)
- l_setPulseDelayMax(6.8)
+ l_setPulseDelayMax(6.8)
- l_setBeatPulseMax(18)
- l_setBeatPulseDelayMax(28.346)
+ l_setBeatPulseMax(18)
+ l_setBeatPulseDelayMax(28.346)
- l_setSwapEnabled(true)
- l_addTracked("special", "special")
+ l_setSwapEnabled(true)
+ l_setSwapCooldownMult(0.6)
+ l_addTracked("special", "special")
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
- setCurveMult(0.85)
end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- if special == "none" then
- addPattern(keys[index])
- index = index + 1
-
- if index - 1 == #keys then
- index = 1
- shuffle(keys)
- end
- elseif special == "cage" then
- addPattern(11)
- addPattern(9)
- elseif special == "spinner" then
- addPattern(14)
- addPattern(9)
- elseif special == "barrage" then
- addPattern(3)
- addPattern(14)
- addPattern(13)
- addPattern(15)
- elseif special == "spiral" then
- addPattern(12)
- addPattern(4)
- end
+ if (special == "none") then
+ addPattern(keys[index])
+ index = index + 1
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
+ else
+ addPattern(specialKeys[specialIndex])
+ if (#specialKeys > 1) then
+ specialIndex = specialIndex + 1;
+
+ if specialIndex - 1 == #specialKeys then
+ specialIndex = 1
+ shuffle(specialKeys)
+ end
+ end
+ end
end
+local accelFlag = false
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- shuffle(specials)
-
- if special == "none" then
- special = specials[1]
- e_messageAddImportant("Special: "..special, 120)
- else
- special = "none"
- end
+ if (special == "none") then
+ special = specials[currSpecial]
+ currSpecial = currSpecial + 1
+ if (currSpecial - 1 == #specials) then
+ currSpecial = 1
+ shuffle(specials)
+ end
+ specialIndex = 1
+ -- If branch to set up keys
+ if (special == "turnaround") then
+ side = getRandomSide();
+ specialKeys = {103};
+ elseif (special == "assemble") then
+ specialKeys = {101};
+ elseif (special == "alternate") then
+ specialKeys = {104};
+ elseif (special == "chaser") then
+ specialKeys = {102};
+ elseif (special == "tunnel") then
+ specialKeys = {3, 17, 18, 105};
+ elseif (special == "swarm") then
+ specialKeys = {106};
+ if (level > 14 and not accelFlag) then
+ e_messageAddImportant("Accelerating Speed Enabled!", 90)
+ accelFlag = true
+ end
+ elseif (special == "consistency") then
+ specialKeys = {107}
+ end
+ shuffle(specialKeys);
+ l_setIncTime(10);
+ e_messageAddImportant("Special: "..special, 90);
+
+ -- Enable the speed and rotation increment
+ l_setSpeedInc(0.05)
+ l_setRotationSpeedInc(0.015)
+ else
+ level = level + 1;
+ special = "none";
+ l_setIncTime(20);
+ -- Disable the speed and rotation increment
+ l_setSpeedInc(0)
+ l_setRotationSpeedInc(0)
+ end
end
-- continuous direction change (even if not on level increment)
@@ -120,17 +192,17 @@ end
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- dirChangeTime = dirChangeTime - mFrameTime;
- if dirChangeTime < 0 then
- -- do not change direction while fast spinning
- if u_isFastSpinning() == false then
- l_setRotationSpeed(l_getRotationSpeed() * -1.0)
- dirChangeTime = 200
- end
- end
-
- if not achievementUnlocked and l_getLevelTime() > 60 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a20_massacre")
- achievementUnlocked = true
- end
+ dirChangeTime = dirChangeTime - mFrameTime;
+ if dirChangeTime < 0 then
+ -- do not change direction while fast spinning
+ if u_isFastSpinning() == false then
+ l_setRotationSpeed(l_getRotationSpeed() * -1.0)
+ dirChangeTime = 200
+ end
+ end
+
+ if not achievementUnlocked and l_getLevelTime() > 60 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a20_massacre")
+ achievementUnlocked = true
+ end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua
index f1bf65d3..d79360f9 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua
@@ -10,7 +10,7 @@ incrementTime = 10
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then pTrapBarrage(u_rndInt(0, l_getSides()))
+ if mKey == 0 then pTrapBarrage(u_rndInt(0, l_getSides()))
elseif mKey == 1 then pTrapBarrageDouble(u_rndInt(0, l_getSides()))
elseif mKey == 2 then pTrapBarrageInverse(u_rndInt(0, l_getSides()))
elseif mKey == 3 then pTrapBarrageAlt(u_rndInt(0, l_getSides()))
@@ -26,20 +26,20 @@ achievementUnlocked = false
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(2.0)
- l_setSpeedInc(0.0)
- l_setRotationSpeed(0.27)
- l_setRotationSpeedMax(0.4)
- l_setRotationSpeedInc(0.045)
- l_setDelayMult(1.1)
- l_setDelayInc(0.0)
- l_setFastSpin(71.0)
- l_setSides(4)
- l_setSidesMin(0)
- l_setSidesMax(0)
- l_setIncTime(10)
-
- l_setPulseMin(64)
+ l_setSpeedMult(2.0)
+ l_setSpeedInc(0.0)
+ l_setRotationSpeed(0.27)
+ l_setRotationSpeedMax(0.4)
+ l_setRotationSpeedInc(0.045)
+ l_setDelayMult(1.1)
+ l_setDelayInc(0.0)
+ l_setFastSpin(71.0)
+ l_setSides(4)
+ l_setSidesMin(0)
+ l_setSidesMax(0)
+ l_setIncTime(10)
+
+ l_setPulseMin(64)
l_setPulseMax(84.99)
l_setPulseSpeed(1.036)
l_setPulseSpeedR(1.353)
@@ -48,39 +48,39 @@ function onInit()
l_setBeatPulseMax(16)
l_setBeatPulseDelayMax(24.489)
- l_addTracked("level", "level")
- l_addTracked("lowerBound", "min")
- l_addTracked("upperBound", "max")
- l_enableRndSideChanges(false)
+ l_addTracked("level", "level")
+ l_addTracked("lowerBound", "min")
+ l_addTracked("upperBound", "max")
+ l_enableRndSideChanges(false)
- enableSwapIfDMGreaterThan(1.5)
+ enableSwapIfDMGreaterThan(1.5)
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
- e_messageAddImportant("level: "..(extra + 1).." / time: "..incrementTime, 170)
+ e_messageAddImportant("level: "..(extra + 1).." / time: "..incrementTime, 170)
end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- addPattern(keys[index])
- index = index + 1
+ addPattern(keys[index])
+ index = index + 1
- if index - 1 == #keys then
- index = 1
- shuffle(keys)
- end
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
end
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- extra = extra + 1
- level = extra + 1
- incrementTime = incrementTime + 5
- l_setSides(l_getSides() + 1)
- l_setIncTime(incrementTime)
- e_messageAddImportant("level: "..(extra + 1).." / time: "..incrementTime, 170)
+ extra = extra + 1
+ level = extra + 1
+ incrementTime = incrementTime + 5
+ l_setSides(l_getSides() + 1)
+ l_setIncTime(incrementTime)
+ e_messageAddImportant("level: "..(extra + 1).." / time: "..incrementTime, 170)
end
-- onUnload is an hardcoded function that is called when the level is closed/restarted
@@ -95,21 +95,21 @@ hueIStep = 0.0065
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- dirChangeTime = dirChangeTime - mFrameTime;
- if dirChangeTime < 0 then
- -- do not change direction while fast spinning
- if u_isFastSpinning() == false then
- l_setRotationSpeed(l_getRotationSpeed() * -1.0)
- dirChangeTime = 400
- end
- end
-
- if not achievementUnlocked and l_getLevelTime() > 60 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a17_polyhedrug")
- achievementUnlocked = true
- end
-
- s_setHueInc(s_getHueInc() + hueIStep)
- if(s_getHueInc() > hueIMax) then hueIStep = hueIStep * -1 end
- if(s_getHueInc() < hueIMin) then hueIStep = hueIStep * -1 end
+ dirChangeTime = dirChangeTime - mFrameTime;
+ if dirChangeTime < 0 then
+ -- do not change direction while fast spinning
+ if u_isFastSpinning() == false then
+ l_setRotationSpeed(l_getRotationSpeed() * -1.0)
+ dirChangeTime = 400
+ end
+ end
+
+ if not achievementUnlocked and l_getLevelTime() > 60 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a17_polyhedrug")
+ achievementUnlocked = true
+ end
+
+ s_setHueInc(s_getHueInc() + hueIStep)
+ if(s_getHueInc() > hueIMax) then hueIStep = hueIStep * -1 end
+ if(s_getHueInc() < hueIMin) then hueIStep = hueIStep * -1 end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua
index af1a1ed2..3f1857be 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua
@@ -6,92 +6,100 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "nextpatterns.lu
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatterns.lua")
gap = 7
-minGap = 3
+minGap = 4
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
- if mKey == 0 then cBarrageN(getRandomSide(), gap) t_wait(getPerfectDelayDM(THICKNESS) * 6)
- elseif mKey == 1 then hmcSimpleBarrageSNeigh(getRandomSide(), 0, gap) t_wait(getPerfectDelayDM(THICKNESS) * 6)
- end
+ if mKey == 0 then cBarrageN(getRandomSide(), gap) t_wait(getPerfectDelay(THICKNESS) * 6)
+ elseif mKey == 1 then hmcSimpleBarrageSNeigh(getRandomSide(), 0, gap) t_wait(getPerfectDelay(THICKNESS) * 6)
+ elseif mKey == 2 then
+ if (u_getDifficultyMult() < 1) then
+ cSwapBarrageN(getRandomSide(), gap, 1.25)
+ else
+ cSwapBarrageN(getRandomSide(), gap, .75)
+ end
+ t_wait(getPerfectDelay(THICKNESS) * 6)
+ end
end
-- shuffle the keys, and then call them to add all the patterns
-- shuffling is better than randomizing - it guarantees all the patterns will be called
-keys = { 0, 0, 0, 1, 1, 1 }
+keys = { 0, 0, 0, 1, 1, 1, 2, 2 }
shuffle(keys)
index = 0
achievementUnlocked = false
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(3.0)
- l_setSpeedInc(0.0)
- l_setRotationSpeed(0.22)
- l_setRotationSpeedMax(0.4)
- l_setRotationSpeedInc(0.0)
- l_setDelayMult(1.35)
- l_setDelayInc(0.0)
- l_setFastSpin(71.0)
- l_setSides(32)
- l_setSidesMin(32)
- l_setSidesMax(32)
- l_setIncTime(10)
-
- l_setWallSkewLeft(15)
-
- l_setPulseMin(60.98)
+ l_setSpeedMult(3.0)
+ l_setSpeedInc(0.0)
+ l_setRotationSpeed(0.22)
+ l_setRotationSpeedMax(0.75)
+ l_setRotationSpeedInc(0.03)
+ l_setDelayMult(1.5)
+ l_setDelayInc(0.0)
+ l_setFastSpin(71.0)
+ l_setSides(32)
+ l_setSidesMin(32)
+ l_setSidesMax(32)
+ l_setIncTime(15)
+
+ l_setWallSkewLeft(15)
+
+ l_setPulseMin(60.98)
l_setPulseMax(80.06)
l_setPulseSpeed(3.597)
l_setPulseSpeedR(1.448)
l_setPulseDelayMax(7.23)
- l_setBeatPulseMax(19)
+ l_setBeatPulseMax(19)
l_setBeatPulseDelayMax(25.714)
- l_setSwapEnabled(true)
- l_addTracked("gap", "gap size")
-
- if(u_getDifficultyMult() >= 1.59) then
- gap = 9
- minGap = 5
- l_setSwapCooldownMult(0.8)
- elseif(u_getDifficultyMult() >= 1.39) then
- gap = 8
- minGap = 4
- l_setSwapCooldownMult(0.9)
- else
- gap = 7
- minGap = 3
- l_setSwapCooldownMult(1.0)
- end
+ l_setSwapEnabled(true)
+ l_setSwapCooldownMult(0.7/u_getDifficultyMult())
+ l_addTracked("gap", "gap size")
+
+ if(u_getDifficultyMult() >= 1.59) then
+ gap = 9
+ minGap = 5
+ elseif(u_getDifficultyMult() >= 1.39) then
+ gap = 8
+ minGap = 4
+ else
+ gap = 7
+ minGap = 3
+ end
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
- syncCurveWithRotationSpeed(0, 0)
- e_messageAdd("remember, swap with spacebar!", 120)
+ syncCurveWithRotationSpeed(0, 0)
+ e_messageAdd("Remember to swap!", 120)
+ if (u_getDifficultyMult() > 1) then
+ minGap = 5
+ end
end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- addPattern(keys[index])
+ addPattern(keys[index])
- index = index + 1
+ index = index + 1
- if index - 1 == #keys then
- index = 1
- shuffle(keys)
- end
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
end
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- if gap > minGap then
- gap = gap -1
- e_messageAddImportant("Gap size: "..gap, 120)
- end
+ if gap > minGap then
+ gap = gap -1
+ e_messageAddImportant("Gap size: "..gap, 120)
+ end
end
-- onUnload is an hardcoded function that is called when the level is closed/restarted
@@ -100,8 +108,8 @@ end
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- if not achievementUnlocked and l_getLevelTime() > 45 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a18_reppaws")
- achievementUnlocked = true
- end
+ if not achievementUnlocked and l_getLevelTime() > 45 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a18_reppaws")
+ achievementUnlocked = true
+ end
end
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua
index 9534573f..ad3e72f1 100644
--- a/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua
+++ b/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua
@@ -7,13 +7,14 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatter
-- shuffle the keys, and then call them to add all the patterns
-- shuffling is better than randomizing - it guarantees all the patterns will be called
-keys = { 0 }
+keys = { 0, 0, 0, 1, 2 }
shuffle(keys)
index = 0
achievementUnlocked = false
smin = 2
smax = 2
+completed = false
level = 1
incrementTime = 10
@@ -21,46 +22,58 @@ incrementTime = 10
range = "("..(smin * 2).."/"..(smax * 2).."]"
function slitherSpiralAcc()
- t_wait(getPerfectDelayDM(THICKNESS) * 2.1)
- t_wait(getPerfectDelayDM(THICKNESS) * 2.1)
- local side = getRandomSide()
+ t_wait(getPerfectDelay(THICKNESS) * 2.1)
+ t_wait(getPerfectDelay(THICKNESS) * 2.1)
+ local side = getRandomSide()
- local acc = u_rndInt(50, 90) / 500.0 * getRandomDir()
- local minimum = u_rndInt(15, 21) / 10.0 * -1
- local maximum = -minimum
+ local acc = u_rndInt(50, 90) / 500.0 * getRandomDir()
+ local minimum = u_rndInt(15, 21) / 10.0 * -1
+ local maximum = -minimum
- t_wait(getPerfectDelayDM(THICKNESS) * 3.1)
+ t_wait(getPerfectDelay(THICKNESS) * 3.1)
- for i = 0, u_rndInt(6, 10) do
- hmcSimpleSpinnerSAcc(side, 0, acc, minimum, maximum, true)
- t_wait(getPerfectDelay(THICKNESS) * 0.55)
- end
+ for i = 0, u_rndInt(6, 10) do
+ hmcSimpleSpinnerSAcc(side, 0, acc, minimum, maximum, true)
+ t_wait(getPerfectDelay(THICKNESS) * 0.55)
+ end
- t_wait(getPerfectDelayDM(THICKNESS) * 5.3)
+ t_wait(getPerfectDelay(THICKNESS) * 5.3)
+end
+
+-- this function adds a pattern to the timeline based on a key
+function addPattern(mKey)
+ if (mKey == 0) then slitherSpiralAcc()
+ elseif (mKey == 1) then
+ hmpStripeSnakeBarrage(getRandomSide(), u_rndInt(5, 10), getHalfSides(), l_getSides())
+ t_wait(getPerfectDelay(THICKNESS) * 2)
+ elseif (mKey == 2) then
+ hmpStripeSnakeAltBarrage(u_rndInt(5, 10), 2, getHalfSides(), l_getSides())
+ t_wait(getPerfectDelay(THICKNESS) * 2)
+ end
end
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
- l_setSpeedMult(1.7)
- l_setSpeedInc(0.1)
- l_setSpeedMax(2.9)
+ l_setSpeedMult(1.8)
+ l_setSpeedInc(0) -- This will be set later.
+ l_setSpeedMax(2.9)
- l_setRotationSpeed(0.2)
- l_setRotationSpeedMax(0.4)
- l_setRotationSpeedInc(0.035)
+ l_setRotationSpeed(0.2)
+ l_setRotationSpeedMax(0.5)
+ l_setRotationSpeedInc(0.035)
- l_setDelayMult(1.1)
- l_setDelayInc(0.0)
+ l_setDelayMult(1.1)
+ l_setDelayInc(0.0)
- l_setFastSpin(0.0)
+ l_setFastSpin(0.0)
- l_setSides(3)
- l_setSidesMin(3)
- l_setSidesMax(3)
+ l_setSides(3)
+ l_setSidesMin(3)
+ l_setSidesMax(3)
- l_setIncTime(10)
+ l_setIncTime(10)
- l_setWallAngleLeft(-25)
+ l_setWallAngleLeft(-25)
l_setPulseMin(49.98)
l_setPulseMax(88.73)
@@ -71,43 +84,56 @@ function onInit()
l_setBeatPulseMax(16)
l_setBeatPulseDelayMax(24.657)
- l_setSwapEnabled(true)
- l_addTracked("level", "level")
- l_addTracked("next at", "incrementTime")
- l_addTracked("range", "range")
+ l_setSwapEnabled(true)
+ l_addTracked("level", "level")
+ l_addTracked("next at", "incrementTime")
+ l_addTracked("range", "range")
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
- e_messageAdd("remember, you can focus with lshift!", 150)
+ e_messageAdd("remember, you can focus with lshift!", 150)
end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
- l_setSides(u_rndInt(smin, smax) * 2)
- slitherSpiralAcc()
+ l_setSides(math.random(smin, smax) * 2)
+ addPattern(keys[index])
+ index = index + 1
+ if index - 1 == #keys then
+ index = 1
+ shuffle(keys)
+ end
end
-
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
- level = level + 1
- incrementTime = incrementTime + 5
- e_messageAddImportant("level: "..(level).." / time: "..incrementTime, 150)
-
- if smax < 4 then
- smax = smax + 1;
- else
- smin = smin + 1;
- smax = smin;
- end
-
- range = "("..(smin * 2).."/"..(smax * 2).."]"
- e_messageAddImportant("Range: "..range, 100)
-
- l_setSides(l_getSides() + 2)
- l_setIncTime(incrementTime)
+ level = level + 1
+ e_messageAddImportant("level: "..(level).." / time: "..incrementTime, 120)
+ if (not completed) then
+ incrementTime = incrementTime + 5
+ smin = smin + 1
+ if (smin > smax) then
+ smin = 2
+ smax = smax + 1
+ if (smax > 4) then
+ completed = true
+ l_setSpeedInc(0.1) -- Enable the speed increment
+ incrementTime = 30
+ end
+ end
+ end
+ if (completed) then
+ smin = math.random(2, 3)
+ smax = clamp(smin + math.random(0, 3), smin, 5)
+ end
+
+ range = "("..(smin * 2).."/"..(smax * 2).."]"
+ e_messageAddImportant("Range: "..range, 100)
+
+ l_setSides(l_getSides() + 2)
+ l_setIncTime(incrementTime)
end
-- continuous direction change (even if not on level increment)
@@ -119,17 +145,17 @@ end
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
- dirChangeTime = dirChangeTime - mFrameTime;
- if dirChangeTime < 0 then
- -- do not change direction while fast spinning
- if u_isFastSpinning() == false then
- l_setRotationSpeed(l_getRotationSpeed() * -1.0)
- dirChangeTime = 400
- end
- end
-
- if not achievementUnlocked and l_getLevelTime() > 60 and u_getDifficultyMult() >= 1 then
- steam_unlockAchievement("a16_slither")
- achievementUnlocked = true
- end
+ dirChangeTime = dirChangeTime - mFrameTime;
+ if dirChangeTime < 0 then
+ -- do not change direction while fast spinning
+ if u_isFastSpinning() == false then
+ l_setRotationSpeed(l_getRotationSpeed() * -1.0)
+ dirChangeTime = 400
+ end
+ end
+
+ if not achievementUnlocked and l_getLevelTime() > 60 and u_getDifficultyMult() >= 1 then
+ steam_unlockAchievement("a16_slither")
+ achievementUnlocked = true
+ end
end