diff options
author | Vittorio Romeo <vittorio.romeo@outlook.com> | 2021-10-27 22:40:59 +0100 |
---|---|---|
committer | Vittorio Romeo <vittorio.romeo@outlook.com> | 2021-10-27 22:40:59 +0100 |
commit | 8eaf89e2b292a55097ad454c0515fa29b5c863bc (patch) | |
tree | c8db8c3d3ab45c5c58775f72ad752f3f37acfb83 | |
parent | 173ae781da2b88a027059e055761052be80564e1 (diff) |
Add hypercube hard achievements to Lua (hypercube god)
9 files changed, 54 insertions, 0 deletions
diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua index 4b5b720d..00823c0f 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/acceleradiant.lua @@ -24,6 +24,7 @@ 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 +hardAchievementUnlocked = false -- onInit is an hardcoded function that is called when the level is first loaded function onInit() @@ -99,6 +100,11 @@ function onUpdate(mFrameTime) achievementUnlocked = true end + if not hardAchievementUnlocked and l_getLevelTime() > 30 and u_getDifficultyMult() > 2.2 then + steam_unlockAchievement("a39_acceleradiant_hard") + hardAchievementUnlocked = true + 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 diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua index 3bdf33d3..1fb6f9c5 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/centrifugal.lua @@ -7,6 +7,7 @@ u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatter curveSpeed = 15 achievementUnlocked = false +hardAchievementUnlocked = false -- onInit is an hardcoded function that is called when the level is first loaded function onInit() @@ -76,4 +77,9 @@ function onUpdate(mFrameTime) steam_unlockAchievement("a19_centrifugalforce") achievementUnlocked = true end + + if not hardAchievementUnlocked and l_getLevelTime() > 30 and u_getDifficultyMult() > 1.5 then + steam_unlockAchievement("a45_centrifugalforce_hard") + hardAchievementUnlocked = true + end end diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua index 78ad7da6..c5b945ae 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/disc-o.lua @@ -48,6 +48,7 @@ shuffle(keys) index = 1 specialIndex = 1 achievementUnlocked = false +hardAchievementUnlocked = false specials = { "spinner", "barrage", "grow", "swarm" } shuffle(specials) @@ -162,4 +163,9 @@ function onUpdate(mFrameTime) steam_unlockAchievement("a12_disco") achievementUnlocked = true end + + if not hardAchievementUnlocked and l_getLevelTime() > 40 and u_getDifficultyMult() > 2.5 then + steam_unlockAchievement("a38_disco_hard") + hardAchievementUnlocked = true + end end diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua index c1c369bf..b5511bd4 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/g-force.lua @@ -29,6 +29,7 @@ keys = { 0, 1 } shuffle(keys) index = 0 achievementUnlocked = false +hardAchievementUnlocked = false specials = { "double", "assault", "incongruence", "dizzy" } shuffle(specials) @@ -139,4 +140,9 @@ function onUpdate(mFrameTime) steam_unlockAchievement("a14_gforce") achievementUnlocked = true end + + if not hardAchievementUnlocked and l_getLevelTime() > 40 and u_getDifficultyMult() > 2.5 then + steam_unlockAchievement("a40_gforce_hard") + hardAchievementUnlocked = true + end end diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua index 04dcff36..62d2b08d 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/incongruence.lua @@ -30,6 +30,7 @@ index = 0 lowerBound = 4 upperBound = 6 achievementUnlocked = false +hardAchievementUnlocked = false -- onInit is an hardcoded function that is called when the level is first loaded function onInit() @@ -126,6 +127,11 @@ function onUpdate(mFrameTime) achievementUnlocked = true end + if not hardAchievementUnlocked and l_getLevelTime() > 45 and u_getDifficultyMult() > 1.5 then + steam_unlockAchievement("a41_incongruence_hard") + hardAchievementUnlocked = 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 diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua index badcc40c..15264b73 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/massacre.lua @@ -70,6 +70,7 @@ shuffle(keys) index = 1 specialIndex = 1 achievementUnlocked = false +hardAchievementUnlocked = false specials = { "assemble", "turnaround", "alternate", "chaser", "tunnel", "swarm", "consistency"} shuffle(specials) @@ -205,4 +206,9 @@ function onUpdate(mFrameTime) steam_unlockAchievement("a20_massacre") achievementUnlocked = true end + + if not hardAchievementUnlocked and l_getLevelTime() > 30 and u_getDifficultyMult() > 1.5 then + steam_unlockAchievement("a46_massacre_hard") + hardAchievementUnlocked = true + end end diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua index f1bf65d3..b2a77dc5 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/polyhedrug.lua @@ -23,6 +23,7 @@ keys = { 0, 0, 1, 1, 2, 2, 3, 3 } shuffle(keys) index = 0 achievementUnlocked = false +hardAchievementUnlocked = false -- onInit is an hardcoded function that is called when the level is first loaded function onInit() @@ -109,6 +110,11 @@ function onUpdate(mFrameTime) achievementUnlocked = true end + if not hardAchievementUnlocked and l_getLevelTime() > 45 and u_getDifficultyMult() > 1.5 then + steam_unlockAchievement("a43_polyhedrug_hard") + hardAchievementUnlocked = 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 diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua index 772d0f46..a92adcee 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/reppaws.lua @@ -28,6 +28,7 @@ keys = { 0, 0, 0, 1, 1, 1, 2, 2 } shuffle(keys) index = 0 achievementUnlocked = false +hardAchievementUnlocked = false -- onInit is an hardcoded function that is called when the level is first loaded function onInit() @@ -112,4 +113,9 @@ function onUpdate(mFrameTime) steam_unlockAchievement("a18_reppaws") achievementUnlocked = true end + + if not hardAchievementUnlocked and l_getLevelTime() > 30 and u_getDifficultyMult() > 1.5 then + steam_unlockAchievement("a44_reppaws_hard") + hardAchievementUnlocked = true + end end diff --git a/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua b/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua index 04d2b7d4..dc316ff3 100644 --- a/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua +++ b/_RELEASE/Packs/hypercube/Scripts/Levels/slither.lua @@ -11,6 +11,7 @@ keys = { 0, 0, 0, 1, 2 } shuffle(keys) index = 0 achievementUnlocked = false +hardAchievementUnlocked = false smin = 2 smax = 2 @@ -158,4 +159,9 @@ function onUpdate(mFrameTime) steam_unlockAchievement("a16_slither") achievementUnlocked = true end + + if not hardAchievementUnlocked and l_getLevelTime() > 30 and u_getDifficultyMult() > 1.8 then + steam_unlockAchievement("a42_slither_hard") + hardAchievementUnlocked = true + end end |