mc2.py

Created by furicoda

Created on May 22, 2024

6.01 KB


from mc3 import*
def afftex(px,py,a,game,isininv=False,extra={}):
 tools="?@ABDEFGIJKLNOPQSTUV"
 buk="abc"
 mina={"4":0,"5":1,"6":2,"7":3,"8":4,"9":5,":":6,";":7}
 if isininv:f(px,py,20,20,color(58,69,24) if isininv else game.skycolor)
 if a=="m":f(px,py,20,20,"purple")
 elif a=="Z":
   for i in range(8):f(px+2+i,py+19-i,16-2*i,1,"yellow")
   for t in ((8,1),(2,7),(14,4)):f(px+t[0],py+t[1],2,2,"yellow")
 elif a in"}q":
   f(px+4,py+4,12,12,color(32,78,58));f(px+7,py+2,6,16,color(32,78,58));f(px+2,py+7,16,6,color(32,78,58))
   if a=="}":f(px+5,py+5,10,10,color(97,151,121));f(px+8,py+3,4,14,color(97,151,121));f(px+3,py+8,14,4,color(97,151,121));f(px+8,py+7,4,6,color(200,224,81));f(px+7,py+8,6,4,color(200,224,81));f(px+9,py+9,2,2,"black")
   else:f(px+8,py+8,4,4,"black")
 elif a=="k":f(px,py,20,20,"pink")
 elif a=="]":f(px,py,20,20,"red")
 elif a=="[":f(px,py,20,20,"black")
 elif a=="~":f(px,py,20,20,color(111,21,21))
 elif a=="!":f(px,py,20,20,"brown")
 elif a in buk:
  col=("gray","blue","orange")[buk.index(a)]
  if isininv:
   f(px+5,py+6,10,12,"gray");f(px+6,py+18,8,1,"gray");f(px+7,py+19,6,1,"gray")
   for x in range(3):f(px+6+x,py+6+x,8-2*x,1,col)
  else:f(px,py+2,20,18,col)
 elif a=="u":f(px,py,20,20,"gray");f(px,py+8,20,4,color(100,100,100))
 elif a=="#":f(px,py,20,20,"gray")
 elif a=="*":f(px,py,20,20,color(58,69,24)if isininv else game.skycolor)
 elif a=="$":f(px,py,20,5,"green");f(px,py+5,20,15,"brown")
 elif a=="%":f(px,py,20,20,color(235, 227, 188))
 elif a=="&":f(px,py,20,20,color(101,97,96))
 elif a=="'":f(px,py,20,20,color(110,89,56));f(px+2,py+5,1,10,color(60,47,28));f(px+18,py+1,1,16,color(60,47,28));f(px+13,py+2,1,14,color(60,47,28));f(px+15,py+12,1,4,color(60,47,28))
 elif a=="(":f(px,py,20,20,"pink")
 elif a==")":f(px,py,2,20,color(26,14,12));f(px+18,py,2,20,color(26,14,12));f(px+2,py,16,20,color(191,157,92));f(px+8,py,4,20,color(26,14,12));se(px+6,py,color(26,14,12));se(px+13,py,color(26,14,12));se(px+7,py+1,color(26,14,12));se(px+12,py+1,color(26,14,12));se(px+7,py,color(181,88,76));se(px+12,py,color(181,88,76));f(px+5,py+5,1,4,color(26,14,12));f(px+4,py+9,3,1,color(217,217,217));f(px+13,py+5,3,3,color(26,14,12));f(px+13,py+8,3,2,color(217,217,217));f(px+14,py+10,2,3,color(217,217,217));f(px+15,py+13,1,2,color(217,217,217))
 elif a=="+":f(px,py,20,20,"brown");f(px,py,20,5,color(82,58,10))
 elif a in",Y":
  for y in range(20):f(px-y+18,py+y,3,1,"brown" if a==","else "yellow")
 elif a=="-":f(px+10,py+10,4,4,"green")
 elif a==".":f(px+2,py+20,3,-2,"green");f(px+9,py+20,2,-6,"green");f(px+15,py+20,1,-4,"green")
 elif a=="2":f(px,py+15,6,4,color(215,217,71));se(px,py+19,color(215,217,71));se(px+4,py+19,color(215,217,71));f(px+4,py+15,2,2,"black");f(px+3,py+14,2,1,"black");f(px+5,py+17,2,1,"black");f(px+6,py+13,3,4,color(215,217,71));f(px+8,py+9,8,4,color(215,217,71));f(px+9,py+13,4,2,color(215,217,71));f(px+10,py+5,7,4,color(215,217,71));f(px+9,py+4,5,1,color(215,217,71));f(px+16,py+9,3,2,color(215,217,71));se(px+13,py+3,color(215,217,71));se(px+14,py+2,color(215,217,71));se(px+17,py+5,color(215,217,71));se(px+18,py+4,color(215,217,71));se(px+19,py+4,color(215,217,71));se(px+17,py+8,color(215,217,71));se(px+18,py+11,color(215,217,71));se(px+19,py+11,color(215,217,71));se(px+19,py+12,color(215,217,71))
 elif a=="3":
  for tr in range(7):f(px+1+tr,py-tr+13,12,1,color(187,137,38))
  for yu in range(3):f(px+3-yu,py-yu+19,4+2*yu,1,color(187,137,38));f(px+13-yu,py+yu+1,4+2*yu,1,color(187,137,38))
  for xu in range(3):f(px+1,py+16-xu,9+xu,1,color(187,137,38));f(px+19,py+4+xu,-9-xu,1,color(187,137,38))
  for tu in range(3):f(px+tu+4,py+13+tu,2,1,color(98,77,20));f(px+tu+8,py+9+tu,2,1,color(98,77,20));f(px+tu+12,py+4+tu,2,1,color(98,77,20))
 elif a in mina.keys():
  f(px,py,20,20,"gray");temp=mina[a];colos=("black",color(114,112,70),color(255,202,53),color(38,97,156),"red",color(185,242,255),color(179,103,0),color(92,255,174))[temp]
  for t in {(1,2),(1,3),(1,7),(2,1),(2,2),(2,6),(2,7),(2,9),(3,4),(3,6),(4,1),(4,4),(4,5),(5,1),(5,5),(5,8),(6,3),(6,8),(7,1),(7,2),(7,7),(7,8),(8,6),(8,7)}:f(px+t[0]*2,py+t[1]*2,2,2,colos)
 elif a in"<=":
  f(px,py,20,20,color(62,60,61));f(px+2,py+2,16,18,color(136,135,140));f(px+4,py+4,12,5,"black");f(px+5,py+15,10,5,"black");f(px+5,py+3,10,1,color(62,60,61));f(px+3,py+9,14,1,color(62,60,61));f(px+3,py+6,1,3,color(62,60,61));f(px+16,py+6,1,3,color(62,60,61))
  for yu in range(2):f(px+3+yu,py+5-yu,2,1,color(62,60,61));f(px+17-yu,py+5-yu,-2,1,color(62,60,61));f(px+4+yu,py+20-2*yu,1,-3,color(62,60,61));f(px+15-yu,py+20-2*yu,1,-3,color(62,60,61))
  f(px+6,py+14,8,1,color(62,60,61))
  if a=="=":f(px+5,py+17,10,3,"red");f(px+6,py+15,8,2,"red");f(px+6,py+17,8,3,"orange");f(px+7,py+16,6,1,"orange");f(px+7,py+17,6,3,"yellow")
 elif a==">":f(px,py,20,20,"black")
 elif a in tools:
  oo=tools.index(a);typ=oo//4;c=("brown","gray","white","blue")[oo-typ*4]
  for x in range(13):f(px+x,py+18-x,3,1,"brown")
  if typ==0:f(px+8,py+1,6,4,c);f(px+15,py+6,4,6,c);f(px+12,py+3,5,5,c) 
  if typ==1:
   for x in range(5):f(px+12-x,py+1+x,1+x*2,1,c) 
   for x in range(4):f(px+9+x,py+6+x,8-x,1,c) 
  if typ==2:
   for x in range(12):f(px+5+x,py+13-x,3,1,c) 
   f(px+17,py+1,2,1,c);f(px,py+17,3,3,c)
   for x in range(5):f(px+3+x,py+11+x,1,2,c)
   se(px+8,py+16,c)
  if typ==3:f(px+11,py+5,5,5,c);f(px+14,py+1,5,5,c)
  if typ==4:
   for x in range(4):f(px+7+x,py+1+x,3+x,1,c)
   for x in range(3):f(px+11+x,py+5+x,6-2*x,1,c)
def refreshcase(g,casen):
  temp=g.invcaseposition
  px,py=temp[casen]
  hover=g.player.invcase==casen
  itemin=g.player.inventory[casen]
  nbite=str(g.player.invnumbers[casen])
  f(px,py,26,26,color(58,69,24))
  col="black"if hover else color(121,129,110)
  f(px,py,26,2,col)
  f(px,py,2,26,col)
  f(px,py+24,26,2,col)
  f(px+24,py,2,26,col)
  afftex(px+3,py+3,itemin,g,True)
  if g.player.inventory[casen] in g.tools:
    ceo=int(g.player.invdata[casen]/100*22)
    f(px+2,py+2,ceo,2,color(255-ceo/22*255,ceo/22*255,0))
  l=len(nbite)
  if nbite!="0"and itemin!="*":
    for el in range(l):
      drawnumber(px+el*5-l*5+26,py+18,nbite[el])

def AffFurnace(s):
  for x in range(3):
    refreshcase(s.parent,33+x)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.