u/OctonalXX

▲ 13 r/hexcasting+1 crossposts

My Magnus Opum

AreaCast (vec1,vec2,[spells]) => Casts [spells] on every block within the area from vec1 to vec2, putting the current iterating vector on the stack every time [spells] is called (if you don't need it pop it)

This took me two days to refine and test, enjoy.

It's also super long, so you need to learn how to assemble multiple spell pieces into one, and also write & reuse functions below the main one first (basically dependencies)

You are recommended to finish the dependencies from bottom to top to avoid lacking dependencies to implement the ones above.

Comments are denoted by // and can be skipped.

Numbers should be encoded into the code using the regular way.

// AreaCast Version 1


areacast (vec1, vec2, code):
// During the loop the stack looks like:
// startvec, endvec, countvec, code, countvec
// Useful if you need information extracted out of the areacast without ravenmind by pulling it before startvec
Rotation Gambit II
maxminvec
//code,startvec,endvec
Prospector's Gambit
//code,startvec,endvec,countvec
3
Fisherman's Gambit
//startvec,endvec,countvec,code
===Part1 End, Part2===
//Add code to fetch countvec at the start of the code
Introspection:Prospector's Gambit:Retrospection
Jester's Gambit
Additive Distillation
===Part2 End, Part3===
//Add code to the end to function as a loop
Introspection:
//The Stack: startvec,endvec,countvec,code
Jester's Gambit
//startvec,endvec,code,countvec
//First, add 1 to the end
Vector Reflection +Z
Additive Distillation
//startvec,endvec,code,countvec+(0,0,1)
//Then, carry
3
Fisherman's Gambit II
3
Fisherman's Gambit II
//startvec,endvec,code,countvec+(0,0,1),startvec,endvec
Rotation Gambit
//startvec,endvec,code,startvec,endvec,countvec+(0,0,1)
===Part3 End, Part4===
VecCarry
//startvec,endvec,code,countvec
//if x(1) of countvec > x(1) of endvec then stop loop else continue
Gemini Decomposition
1
nab
3
Fisherman's Gambit II
1
nab
===Part4 End, Part 5===
Maximus Distillation
//startvec,endvec,code,countvec,condition
:Introspection
Bookkeeper's Gambit: Dip Dip Dip Dip
:Retrospection
:Introspection
Jester's Gambit
Gemini Decomposition
Hermes' Gambit
:Retrospection
Augur's Exaltation
Hermes' Gambit
===Part5 End, Part6===
:Retrospection
Additive Distillation
//Start
//Stack should be 
Gemini Decomposition
Hermes' Gambit


veccarry (srefvec,erefvec,vec)=>outvec:
Vector Disintegration
// srefvec,erefvec,x,y,z
4
Fisherman's Gambit II
3
nab
// srefvec,erefvec,x,y,z,min
4
Fisherman's Gambit II
3
nab
// srefvec,erefvec,x,y,z,min,max
carry
// srefvec,erefvec,x,y,z(done)
Rotation Gambit II
// srefvec,erefvec,z(done),x,y
4
Fisherman's Gambit
2
nab
4
Fisherman's Gambit
2
nab
// z(done),x,y,min,max
carry
// z(done),x(rounded up),y(done)
Rotation Gambit
// x,y,z
Vector Exaltation



carry (nextvalue, c, min, max)=> carried, c:
// 1, 10.1, 1, 10 => 2, 1.1
// 1, 10, 1, 10 => 1, 10
// if c>max then c=min, nextvalue+=1
// else do nothing and clean
Rotation Gambit
// nextvalue, min, max, c
Dioscuri Gambit
// nextvalue, min, max, c, max, c
Minimus Distillation
// nextvalue, min, max, c, condition
// True Code
Introspection:
// stack while running: nextvalue, min, max, c
Bookkeeper's Gambit: Dip Dip
// nextvalue, updated
// +1 to nextvalue
Jester's Gambit
1
Additive Distillation
Jester's Gambit
:Retrospection
// False Code
:Introspection
Bookkeeper's Gambit: Dip Dip Flat
:Retrospection
// nextvalue, min, max, c, condition, truedo, falsedo
Augur's Exaltation
Hermes' Gambit

maxminvec (vec1,vec2)=>vec1,vec2:
Dioscuri Gambit
//vec1, vec2, vec1, vec2
1
doublenab
max
//vec1, vec2, startvecx
Rotation Gambit II
//startvecx, vec1, vec2
Dioscuri Gambit
//startvecx, vec1, vec2, vec1, vec2
2
doublenab
max
//startvecx, vec1, vec2, startvecy
Rotation Gambit II
//startvecx, startvecy, vec1, vec2
Dioscuri Gambit
3
doublenab
max
Rotation Gambit II
//Now for the min
//startvecx, startvecy, startvecz, vec1, vec2
Dioscuri Gambit
1
doublenab
min
Rotation Gambit II
Dioscuri Gambit
2
doublenab
min
Rotation Gambit II
3
doublenab
min
Vector Exaltation
-3
Fisherman's Gambit
Vector Exaltation


doublenab(vec1,vec2,num)=>num,num:
-1
Fisherman's Gambit II
//vec1,num,vec2,num
nab
//vec1,num,vec2o
Rotation Gambit II
//vec2o,vec1,num
nab
//vec2o,vec1o
Jester's Gambit
//vec1o,vec2o



nab (vec,num)=>num:
//returns the 1st/2nd/3rd of a vector
Jester's Gambit
//num, vec
Vector Disintegration
//num, vecx, vecy, vecz
3
Fisherman's Gambit
//vecx, vecy, vecz, num
3
Jester's Gambit
Subtractive Distillation
//vecx, vecy, vecz, index
Fisherman's Gambit
//vec1, vec2, vecn
Bookkeeper's Gambit: dip, dip, flat

max (num1, num2)=>num:
Dioscuri Gambit
//num1, num2, num1, num2
Maximus Distillation
//num1, num2, bool1
Rotation Gambit II
// bool1, num1, num2
Augur's Exaltation

min (num1, num2)=>num:
Dioscuri Gambit
//num1, num2, num1, num2
Minimus Distillation
//num1, num2, bool1
Rotation Gambit II
// bool1, num1, num2
Augur's Exaltation

The only barrier to this being encoded to a thought-knot in survival are the intermediate spell storage costs (reasonable, around 10-15 knots if you are quite careful) and lag (also reasonable)

For actual running and usage:

You can make something that places/breaks blocks in a customizable area (I personally made a 9x9x9 area miner easily with this)

DO NOT use explode with this, it is not only overkill but also extremely laggy

No, I will not be ever using Thoth's Gambit, it's ass

reddit.com
u/OctonalXX — 5 days ago