Created
March 23, 2021 23:26
-
-
Save Lala5th/f11e7566cfdb15a6000b42efedd91b6d to your computer and use it in GitHub Desktop.
Noita mod 83 crib dragger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modulo = 83 | |
c0 = "Rb%P^-k=8]Jfb^@.q(/n\"=-Q!prH_q53 HSa:.5fOLPJ3P-O3Qh?%8#K[cAQI\\5:>%94g+jX$j3g$SIKphV_oq/0L?>,AY<-`KP" | |
c1 = "pb%P^-k=8]Jfb^@.q(/n\"=-Q!=+>Tq53 9:V4.5fOLPJ3P-O3QL:[m`Ko<h`!>i7c&A9`qdN1D-15d-)NcYB^r/*i^\"+ahEL*Kd^)B2" | |
c2 = "Db%P^-k=8]Jfb^@.q(/n\"=-Q!elT)Pbp6`YHQn#0X3OHp&-`=Q`_&Q?-0*M8:m*\\q]BVf5/$bmJE>6 +IhY47YaI72hJ%#:n(%VMm9`]0LVS4_9+:MU\\FB" | |
c3 = "lb%QkVeN@!J\\:PRp@8W]O,5,QVB9D/XW4)(^-r)L=\\UrJp%Kg#pmOnB9^2*Q^`Tq+b^-O1Tf:7@?`7C@R&!9(EOK:ladp1'M_.U_\\0" | |
c4 = "_b%QkV\"\\=HnO\kcg\\\"a'O.Mj[Ip-\\-q6CRHG\"[P?l\"pk!Xc+5(HaMkWG\\J-#6Y\"&Z)f!ZX_d9o'43`\"bi>g0,>aE4-6_2N`[Iqr6nDO1$&1%Do_!`e/K$ZX?.`Z2Lne! N4gi9C(8" | |
c5 = "Bb%QkV7j+-<:3PcYE\\B<j*1@+23K3qJ$^)NQ@SlZ$KO1co5@L0>E:<IdYBS*ef(&NK2GOK/-A>C^E E%FWE-H9)5+`%oJd+g+P#c]H6.CR]G+\"bQSU1iDkjV8>Vf" | |
c6 = ";b%QkV\"\\=H\"W)/[2d#D%OmLF!2<l$B\\_Zp1VokPVW3^`.OSfk%+OMZdeo9FMiOdRBMn:oY$X6\\2kK\\[c_JQAHaom'#:^?n:YeH$7:-cJFh+Ga\\9&pbdm[n3" | |
c7 = "mb%QkV\"\\=H\"W)/[2d#D%O\\5p!hW0rCY3!b2;G1jqG.n 9aKb`Fq78RY>gk:dVYXRgi.5(@:_%E3KbOUBb7i?VFmc+_o&65Sej5%1cE=5\\.rL>$4JC!?VN4H>" | |
c8 = "Ab%QkV\"\\=H\"W)/[2d#D%OA5[L2<l[B\\_o;,V%QPVWT^he*Y6ZPcU'B@>?3:(BN'>gWBkV)&\\%79MJp9,6l4S^5H)I*Li(Afi&?5h%H]SJb`j]9_J8I" | |
c = [c0, c1, c2, c3, c4, c5, c6, c7, c8] | |
def add(a,b): | |
ret = "" | |
for i in range(min(len(a),len(b))): | |
ret += chr((ord(a[i]) + ord(b[i]) - 65) % modulo + 65) | |
return ret | |
def sub(a,b): | |
ret = "" | |
for i in range(min(len(a),len(b))): | |
ret += chr((ord(a[i]) - ord(b[i])) % modulo) | |
return ret | |
def crib_drag(a,substr): | |
for i in range(len(a) - len(substr)): | |
yield add(a[i:],substr) | |
s = [] | |
for ca in c: | |
ss = [] | |
for cb in c: | |
ss.append(sub(ca,cb)) | |
s.append(ss) | |
def print_drag(substr): | |
gens = [] | |
for sa in s: | |
gen = [] | |
for sb in sa: | |
gen.append(crib_drag(sb,substr)) | |
gens.append(gen) | |
while True: | |
for gen in gens: | |
for g in gen: | |
print(next(g),end = " | ") | |
print("") | |
print("------------------------------") | |
input() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment