undertale_fight.py

Created by frablock

Created on April 28, 2021

3.28 KB

Partager

Un petit combat, you gonna have a bad time

GeMaDDLC est requis (https://workshop.numworks.com/python/frablock/gemaddlc)


try:from gemaddlc import *
except:print("GeMaDDLC est requis")
gm_w("Choisissez votre difficulte\nJeu original de Toby Fox","Undertale",1)
gm_a("Facile","Moyen","Difficile","Rage",5,"Sans")
d=gm_c(1,2,3,4,5,5)
fr(0,0,320,225,(0,0,0))
pal=[[0, 0, 0], [148, 151, 148], [202, 204, 201], [255, 255, 255], [87, 97, 99], [43, 45, 43], [0, 179, 178], [0, 246, 245], [112, 157, 185], [157, 216, 253], [0, 80, 135], [17, 118, 196], [4, 53, 94], [182, 119, 175], [254, 171, 246], [121, 79, 117]]
im="A196BC16A59BD23CAEBA48EBD29CBA46BCD32FA43BCD35C2A41BD37CA40CD39BA39CD6C8D11C8D7EA38CD3CB2EA7BCD8BEAEG4AB3D4EA38CD2BEA11BD8A2GH6GA2D4EA38CD2EA12BD8AGH3G2H3GA2CD2EA38BCDCEA11BD2C3D3BEG2H4G2A2BCDCEA39BD2C3EA7BCD2BA2D4EAFG4ABC2D2CA42BD11ACD2BEA2ECD3BED9CEA42BD8B3D4FA4CD5B2CD6CEA41BD5B2CD8B5CD9ABCD3CA41BD2CB2EBCB2CD17CB2A2EBD2CA41BD5ECDAC2B17C2A2CD4CA43D5CEACD3B2D2B2D4AD3AC2BD5BA38EI5CD6B2C3B2D2B2D4AD2CABCD5CBI5A32IJ6IBCD7C2BEB2E2B4ABC3D6BIJ4I2K3A29E4IJ5B2CD24B2IJ5EKL2KMA26M2L4M4IJ4IE3BD15CE4J6IML5KA25K2L9KI3J6IAB2A6B2AI3J7I3KL7KA24K2L11K2I2J5ACDC6D2AJ7I2EAKL4K2L4KMA22KL6ML8KE5D12BE6L8MKL7KA18M2L8AKL7KFE3FD12EF2AL11MKL8MA17KL9AKL7KFE3FD12E3AL10KMKL9KMA14KL10AKL7KAE2F2D12EF2AL8K2A2KL10KA14L11AMKLKM5FE3FD12EFEAL6M4LMKL10KA14L11AM3L7AE3FCD10BE2AL3M4L4MKL11KA13L10K2L10AE4BCD9BEFALKAL8KM2L10KA13K2L8AL11AE3ACD10BE2ALKAL9KML10KA14M2L7AL11AE2FACD10BFMLK2L10KML9KMA17KL5AL12ME2ACD10BEMLK2L10KML8A23L3AL12ME2ACD10BEMKL11KM2L6KA24L3AK3L9MFEAB11EFML11KA2MLK4MA25M3A3M2L8MA17M11A4MA146F2A47F2A3F2A23F3A46F2A3F3A23F3A8F2A36F2A2F3A13F2A9F3A8F2A36F2A2F3A12F2AFA8F4A7F2A36F2A2F3A12F2AFA8F4A7F3A34FA3F3A13F2A2F2A6F4A8F2A34FA3F3A12F3A2F2A6F4A8F2A34FA3F3A12FA4F2A7F3A8F2A34FA3F3A12FA4F2A7F3A8F2A34F7A12FA4F2A7F5A2F6A40F13A6F16A69FBEA45N6A2BC5A18EDC8BA3N5A28O9NBD4A17BD9BEPO9PA23NO12ACDCA17BD7CPO13NA22NO12NP2N2PA14N8PNO13N2A22PN13P2N2PA14N8P2N13P"
gm_i(im,pal,1,120,50)
def ba():
 for i in range(100):fr(60+i,200,1,10,(255-i*2,60,0))
 for j in range(100):fr(60+j+i,200,1,10,(0+j*2,60,0))
def res(a=True):
 if a:fr(20,100,280,100,"white")
 else:fr(20,100,280,100,(0,0,0))
 fr(21,101,278,98,(0,0,0))
pv,pve,po,c,rt,mc,pox,poy,aie,re=100,999,0,True,0,True,140,140,[0,1],False
while True:
 rt+=1
 if keydown(KEY_BACK):break
 if pv<1:
  gm_w("Tu peux reesayer avec\nde la determination","Tu as perdu...")
  break
 elif pve<1:
  gm_wi("Bravo, mais pourquoi ?",pv)
  break
 elif mc:
  if rt==1 or re:res()
  if int(aie[0])>270:aie,re=[0,randint(0,1)],True
  else:re=False
  fr(pox,poy,10,10,(0,0,0))
  fr(290-aie[0],100+45*aie[1],10,45,"white")
  if keydown(KEY_UP):poy-=1
  if keydown(KEY_DOWN):poy+=1
  if keydown(KEY_RIGHT):pox+=1
  if keydown(KEY_LEFT):pox-=1
  if not 290>pox>20:pox=140
  if not 190>poy>100:poy=140
  fr(pox,poy,10,10,"red")
  if get_pixel(pox+11,poy+5)==(248,252,248):pv-=1
  aie[0]+=d
  ds(str(pv)+"/100 ",130,200)
  if rt>1000:
   rt,mc,po,c=0,False,0,True
   fr(0,200,320,10,(0,0,0))
   res(False)
 else:
  ds("[ok]attaquer",140,140)
  fr(60+po,190,1,10,(0,0,0))
  if c:po+=1
  else:po-=1
  fr(60+po,190,1,10,"red")
  if rt>200 and c==False:c,rt=True,0
  elif rt>200 and c==True:c,rt=False,0
  ba()
  if keydown(KEY_OK):
   a=get_pixel(60+po,205)[0]
   gm_w("-"+str(100-a),"")
   pve,rt,mc=pve-(100-a),0,True
   ds(rch(["Non!!!","A mon tour","Attention..."])+" "*5,200,60)
   sl(2)
   fr(0,0,20,225,(0,0,0))
   fr(0,200,320,10,(0,0,0))

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.