0,*? 9OöÖ½Ã£Š™uwbqNI_ÿA¦ösï÷ôôô”°ÂVl†3>?????????????????????? &&((**++,,--..////////////////ŠÐÐà à à Ð Ð >Á=À>Ð=Ð>à=>=>= > = > =>=ð>à=à>Ð=Ð>Ð=Ð>Ð=Ð>à=ñ>=>!=1ÿþù  ‚: ‡,¸,·-6-´..////////////////////////ŠÊ ã ã § 9=>??????????????????????????? 999996 6 6 6 6 6 3 33333333333333???? " ‚  b & +u(///////////////////////////0 ýýýýûûûûûøøøøøøøøøøøøûûûûûýýýý`p b  b   b   b   b   c  b á €P  €ð €Q€€ €S€€€€ €S €P€€ €P€€€€Q€€€€€ €Q d d d d d d d d d d d d d d d d d d d d d d €p€€€ m€€ € B B  B  bb B B B B B B B B B B J J J J:ĆÀ?wwwgfffVUUEDDDDDDDDDDDDDDDDDDTUeffvwwwgffVUUUUUUUUUUUUETUUUeffffffffVUEDDDDDDDDDDDDDDDTUefvw‡ˆˆˆˆxwwffUUUDDDDDDDDDDDDDDDwwgffffUUUDDDDDDDDDDDDDDDDDDDUUffwwwwwwgffVUUUUUUUUUUDDDUUUeffffffffVUUDDDDDDDDDDDDDDTUUffwwˆˆˆˆˆˆwwfVUUEDDDDDDDDDDDDDDDgfffffVUUEDDDDDDDDDDDDDDDDDDTUefwwwwwwwwffVUUUUUUUUUDDDDTUUeffffffffVUUDDDDDDDDDDDDDDUUUfvwwˆˆˆˆˆxwwfVUUDDDDDDDDDDDDDDDDffffffUUUEDDDDDDDDDDDDDDDDDDUefvww‡ˆˆxwwgffUUUUUUUUDDDDDDUUefffffffffUUEDDDDDDDDDDDDUUUefvw‡ˆˆˆˆˆxwwfVUEDDDDDDDDDDDDDDDDfffffVUUUDDDDDDDDDDDDDDDDDDTUffwwˆˆˆˆˆxwwffUUUUUUUDDDDDDDUUefffvwgfffVUUDDDDDDDDDDDTUUUffww‡ˆˆˆˆˆxwgfVUEDDDDDDDDDDDDDDDDfffffUUUUDDDDDDDDDDDDDDDDDDUUfvw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EDDDtwwwDDDDeffffffffffˆˆXUEDDDDuwwwwwwwwwww‡ˆ#RDtwwDBDDDDDDDˆ"„ˆˆxwWDDDUUˆˆw‡ˆˆˆwwwwwUDDDDDDDDDDD…ˆˆˆˆˆˆˆˆˆˆˆˆgfffffˆEDDDDwwwDDDDeffffffffffffˆˆUUDDDuwwwwwwwwwwwˆˆ#RDwwDDDDDDDDDT(2A„ˆˆˆwwEUUˆˆxww‡ˆˆxwwwwwwUUDDDDDDDDD…ˆˆˆˆˆˆˆˆˆˆˆˆffffffˆEDDDDDwGDDDDefffffffffffff†ˆˆUUTwwwwwwwwwww‡ˆˆD#RwwHDˆˆHDDDDdU"AˆˆˆˆwwUˆˆhwwwwˆˆˆxwwwwwwwˆUUDDDDDDTˆˆˆˆˆˆˆˆˆˆˆˆˆffffffˆXDDDDDtDDDDDTfffffffffffffff†ˆˆUwwwwˆxwwww‡ˆˆˆH1"wG„ˆDDDDDDfvU"Aˆˆˆˆww‡xfwwwwwˆˆˆxwwwwwwwˆˆˆUUDDDDTˆˆˆˆˆˆˆˆˆˆˆˆˆffffffˆXDDDDDDDDDDDTfffffffffffffffff†xwwwˆˆˆˆˆˆˆˆˆˆˆH1"GDDDDDDDDffv%2Dˆˆˆˆwwwwwwwww‡ˆˆˆxwwwwwwwˆˆˆˆXUEDDTˆˆˆˆˆˆˆˆˆˆˆˆˆffffff†XDDDDDDDDDDDTffffffffffffffffffwwwˆˆˆˆˆˆˆˆˆˆˆˆH1"HDDDDDDdffFw"A„ˆˆˆˆwwwwwwwww‡ˆˆˆxwwwwwwwˆˆˆˆˆˆXUE…ˆˆˆˆˆˆˆˆˆˆˆˆˆffffff†XDDDDDDDDDDDTfffffffDDDDffffffvwwwˆˆˆˆˆˆˆˆˆˆˆˆH4"HDDDDDdffFT'2AˆˆˆˆˆwwwwwwwwwˆˆˆˆxwwwwwwwˆˆˆˆˆˆˆˆX…ˆˆˆˆˆˆˆˆˆˆˆˆˆffffff†XDDDDDDDDDDDTfffffFD433Cdfffffvww‡ˆˆˆHD„ˆˆˆˆˆˆˆ4"HDDDDfffDTU'2Dˆˆˆˆˆwwwwwwww‡ˆˆˆˆxwwwwwwwˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆwffffff†ˆEDDDDDDDDDDDeUeffD3#""2DdffffwwwˆˆˆˆD3Dˆˆˆˆˆˆˆ#BDDDfffDˆDU"At‡ˆˆˆˆwwwwwwwwˆˆˆˆˆˆwwwwwwwˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆxwffffff†ˆEDDDDDDDDDDUUUefF4"""""3Dfffvww‡ˆˆˆH4"C„ˆˆˆˆˆˆ#RDdffF„ˆDD&2Dxw‡ˆˆˆwwwwwww‡ˆˆˆˆˆˆwwwwwDDDˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆxwwfffffffˆEDDDDDDDDUUUUUefD#"BDD$"Cdffvww‡ˆˆDD#"2Dˆˆˆˆˆˆ#RfffF„HDDdf"Txww‡ˆxwwwwwwwˆˆˆˆˆˆˆxwwwG43C„ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆwwwwfffffffˆEDDDDDTUUˆˆXUUeF4"FDDDˆ"2DffwwwˆˆH44"D"C„ˆˆˆˆˆD#RffD„HDDDfF$2DxwwwwwwwwwwwˆˆHDDDˆD„wwwD#"2DˆˆˆˆˆˆˆˆˆˆˆˆˆˆwwwwwwgfffffffˆUDDDUU…ˆˆˆXUUUfF#bfF„ˆDD"CDDww‡ˆˆD##BD$2DˆˆˆˆˆH1"FDˆHDDDdfDD"Cdwwwwwwwwww‡ˆˆD33CD4DxwG4"""C„ˆˆˆˆˆˆˆˆˆˆˆxwwwwwwgffffffffˆXTUUˆˆˆˆffUUUefD#Bf†HDDD$24CDt‡ˆH4""DDD"CˆˆˆˆˆH1"wˆDDDUDfFDD$2DvwwwwwwwDDDDD4""2D#C„wD#BD$2„ˆˆˆˆˆˆˆˆˆˆxwwwwwwwfffffffffˆX…ˆˆˆhffffUUUff4"DˆhfFDD$2#23DˆˆD#B"DDD"CˆˆˆˆˆH1"wwwwGUefDDDd"Cdwww‡ˆˆH4333C#"""3"2DD4"DD$2„ˆˆˆˆˆˆˆˆˆˆwwwwwwwfffffffUUU†ˆˆˆfffffffUUffF4"ˆDDffDDD""""C„H4#B$EdV"CˆˆˆˆˆH4"wwwwwWuFDDDd&2DwwwˆˆˆD#"""2"DD$"B"C43"DD'2„ˆˆˆˆˆˆˆˆˆwwwwwwgffffffVUUUU…XfffffffffffffF#BDDDDffDD"B$"2DD##B$UfW"Cˆˆˆˆˆˆ#BDDDw'uwwwwgF"CvwwˆˆH4""""""DD$"D$2#""ww'2„ˆˆˆˆˆˆˆˆxwwwwgfffffUffUUUUUUUUffffffffffffF#BDDDDwgfT"BDD"C4""BfRw'2Aˆˆˆˆˆˆ#BDDDD&rxwwwww"Cvw‡ˆˆH#BDDD$"effBDD"""rww'2„ˆˆˆˆˆˆˆˆwwwwffffffVUfUUUUUUUUUefffffffffffF#BDDDDwwfU"DDT"C#B"bf"G$2Aˆˆˆˆˆˆ#RDDDd&"ˆDdFww"Cvw‡ˆˆH#BDdff&efDDDT"rwwww$2„ˆˆˆˆˆˆˆwwwwfffffffUUVUUUUUUUUUUfffffffffffF#bDDDD"rw%"DDT"3"f"fFBD$2AˆˆˆˆˆˆD#RDDDff"ˆEdffD"Ctw‡ˆˆH#BfffffbFDDwU"wwwDD&2„ˆˆˆˆˆˆxwwwfffffffVUUUUUUUUUUUUUefffffffffvG#rffDD""wffff%2#bfbDDBDD"CˆˆˆˆˆˆH#RDDDff"‚ugffD$2twˆˆˆH#bfffffrtww‡%rGDDff$2„ˆˆˆˆˆxwwwgffffffVUUUUUUUUUUUUUUeffffffffvwG#rfffF"""ffff%""fFDDDBDD"CˆˆˆˆˆˆH1"DDdff""…wDfD$2twˆˆˆH#RUUFDDrwwwˆ"BDffff%2tw‡ˆˆwwwwgfffffffUUUUUUUUUUUUUUUefffffffvwwG1"Ddfff"bfffff&"FDDDTBDD"CˆˆˆˆˆˆH1"EDdfv"#‚GDDD$2twˆˆˆH#RUUDDD"tG„("bffgFD%2twwwwwwwwfffffffVUUUUUUUUUUUUUUUeffffffvwwwG1"EDDff"bfffff&"DDDDTBDD"C„ˆˆˆˆˆG1"EDffv"#‚DDDD$2twˆˆˆH1""DDDD"GD…"#bftwDD"twwwwwwwgffffffVUUUUUUUUUUUUUUUUefffffvwwwwG1"UDDDD&rwdfff&"DDDD%RDD$2„ˆˆˆˆˆG4"Edffw'2"EDDT%2twˆˆˆH1"ffDDD"HD$2#BDtrD„"twwwwwwwfffffffUUUUUUUUUUUUUUUUUefffffwwwwwD#"REDDDDrGDDvf&"EˆXU%RDD$2„ˆˆˆˆxw#Bdffw'2"ETUU%2twˆˆˆH#rwwwww"xw'2#rw'"ˆx"twwwwwwfffffffVUUUUUUUUUUUUUUUUUeffffwwwwwG4"""UDDtw'BDDtw'"uwWU""DD$2„ˆˆˆˆww#Rffvw'2"UUUU%2twˆˆˆH#BdVeff"BfF"#BD$"DD"CtwwwwwffffffffUUUUUUUUUUUUUUUUUUeffffwwwwwH#B$"RUtGD$BDD$w'"rww"2"‡ˆ$2„ˆˆˆˆww#Rffw‡(2#RUU%"twˆˆˆH#rGUUdf"RFD"#B„ˆBDD"CfffffffffffffVUUUUUUUUUUUUUUUUUUefffvwwwwwD#BD""U…DD$BDD$""#‚DD"3"xw(2DˆˆˆxwgD#Rfvˆˆ(2#R%""2twˆˆˆH#rw%RDD"RDD$"‚HDDDD"CfffffffffffffUUUUUUUUUUUUUUUUUUUefffvwwww‡4"DD"""…DD$DDt%"2#‚ww"3"xww"CˆˆˆwwgF1"wwˆˆ(21"""2twˆˆˆH#rw'BDD""DD$"Bdffff"CfffffffffffffUUUUUUUUUUUUUUUUUUUUfffvwwww‡4"Dtw"""DD$Dww%""3"DD"3#BDD"CˆˆˆwwfF1"ww‡("#23Adw‡ˆˆH#‚wwwwW""Edf"Rfffff"CfffffffffffffUUUUUUUUUUUUUUUUUUUUfffvwwwwG4"twwG"Btw'wwww""2"DD$2#BDD"CˆˆˆwwfF1"w'""21Dfw‡ˆˆH#‚xww‡X""efw"Rgfffv"CfffffffffffffUUUUUUUUUUUUUUUUUUUUffffwwwwG#rwwDDDtww'wGDDDD""DD$2#RDD"CˆˆxwwfF#"""2ATfw‡ˆˆH1"ˆˆˆˆ(2#rww""wwwww"CfffffffffffffUUUUUUUUUUUUUUUUUUUUefffvwwwG#rwDDDtwGt(DDDDDD""DD$2#RDT"CˆˆxwgfU1"23ADADUfvwˆˆH#‚ˆˆ("#rw"2#rwww'2AfffffffffffffUUUUUUUUUUUUUUUUUUUUefffvwwwG#‚HDDDwGD„(UEDDDT""ED$21"TU"CˆˆxwgfU3DDADDTUevwˆˆH1""""21"""1"""""AfffffffffffffUUUUUUUUUUUUUUUUUUUUUffffwwwG#‚XDDwwDD…"UUUUDT""UU%21"U%2AˆˆxwgfUDADDDDDDDUefw‡ˆH#""2#"3#"""2AfffffffffffffVUUUUUUUUUUUUUUUUUUUUeffffwwG1"REtwDDT%""RUUU%2#RU%21"%"AˆˆxwgfUEADDDDDDDDUUfvwˆˆD133A131333DfffffffffffffVUUUUUUEUUUUUUUUUUUUUUffffvwG#"UwGDDU"3""""U%21"""#"2AˆˆxwgfUEDADDDDDDDDDDTUfvw‡ˆHDAAtffffffffffffffUUUUUUEUUUUUUUUUUUUUUfffffvG1#RˆXUU%23#""""#"212DˆˆxwgfUEDDDDDDDDDDDDDDUefwwˆˆDA„DDDDwwwwwwwwwffffffVUUUUUEUUeUUUUUUUUUUUefffffF1"ˆXUU"133"213A„ˆˆxwgfUEDDDDDDDDDDDDDDTUfvw‡ˆHADˆHDtGAtwwwwwwwwwwgfffffUUUUUUUffffUUUUUUUUUUffffffD#""""23ADDˆˆˆˆwgfUEDDDDDDDDDDDDDDTUefwwˆˆDDDDˆˆwDDtwwDDDDDwwwwwwwwwwwwgffffUUUUUUffffffUUUUUUUUUefffffF1""""DADDHA„ˆˆˆˆwgfUUDDDDDDDDDDDDDDDUUfvwwˆˆˆˆˆˆwwwwgffwwwwwwwwwwwwwwwwwwgfffVUUUUUffffffVUUUUUUUUUefffffD3333ADDDFA„ˆDADˆˆˆˆˆwwfVUDDDDDDDDDDDDDDDTUefwww‡ˆˆˆwwwwfffffvwwwwwwwWwwwwwwwwwffffUUUUUfffffffUUUUUUUUUUffffffDDffDDDAdfDDD‡ˆHDˆˆˆˆˆˆxwfVUEDDDDDDDDDDDDDDDUeffwwwwwwwwwfffffffvwwwwwWE…wwwwwwwwwfffVUUUUfffffffVUUUUUUUUUUfffffFAdffffFDDffvww‡ˆˆˆˆˆˆˆˆˆxwfUUUUUUUUUUUUDDDDDDUUffvwwwwwwgfffffffffvwwwwUDUxwwwwwwwwwfffUUUUffffffffUUUUUUTUUUUffffVDDfffffffffffwwwˆˆˆˆˆˆˆˆˆxwfEDDDDDDDDDDTHDDDDDTUeffvwwwwffffffffffffvwwUDDTˆw‡ˆˆˆwwwwgffVUUUffffffffVUUUUXDTUUUUUUUUEDDDDTeffffffffffwwwˆˆˆˆˆˆˆˆˆxwgEDDDDDDDDDDTHDDDDDDUUefffffffffUUUUefffffvUDDDD…wˆˆˆˆˆwwwwfffUUUfffffffffUUU…EDDTUUUUUUUUUUUUUeffffffffffvww‡ˆˆˆˆˆˆˆˆxwgEDADDDDDDDTHDDDDDDUUUfffffffVUUUUUUeffffUDDDDD…xˆˆˆˆˆˆwwwgffVUUfffffffffVUU…EDDDUUUUUUUUUUUUUUfffffffffffwwwˆˆˆˆˆˆˆˆˆwgEADDDDDDDTHDDDDDDTUUefffffUUUUUUUUUeffVEDDDDDTxˆˆˆˆˆˆˆwwwfffVUffffffffffUUXDDDDDUUUUUUUUUUUUUfffffffffffvww‡ˆˆˆˆˆˆˆˆwwEADDDDDDDTHDDDDDDDUUUeffVUUUUUUUUUUUfVEDDDDDDT…ˆˆˆˆˆˆˆxwwgfffVffffffffffUUXDD3DDD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DDETDETDDDDDDTHDDDDEDDDDDDDTˆˆˆˆˆˆxwwwwffeffffffff†EDDDDDDDDDDDTUUUUUUfff†EDDDDDDDDDDTfvwwwwwwwwgEDDDADDTXUEDDDDDEDEEEDDDDDDTHDDDDUDDDDDDADD…‡ˆˆˆˆwwwwwwwefffvwwffXDDDD33CDDDDDTUUUUUefff†EDDDDDDDDDDTfvwwwwwwwwgEDDDDDTXUEDDDDDEDETDDDDDDDTHDDDTUDDDDDDD…xˆˆˆxwwwwwwwefffwwwgfXDDDD33CDDDDDUUUUUUffff†EDDDDtDDDDDTffwwwwwwwwfEDDADTXUEDDDDDEDEDDDDDDDDDEDDDTUEDDDDDTxˆˆˆwwwwwwwwfffvwwww†EDDDD333DDDDDUUUUUUffff†EDDDDwGDDDDeffwwwwwwwwfEDDDTXUEDDDDDEDDDDDEDDDDD…DDDUUEDDDDDD…wˆxwwwwwwwwfffwwwww‡EDD3433CDDDDTUUUUUUffff†EDDDwwwDDDDeffwwwwwwwgfEDDDTXUEDDDDDEDDDDTUDDDDD…DDDUUUDDDDDD…xwwwwwwwwwwffvwwwwwXDD43343CDDDDTUUUUUeffffWDDDtwwwDDDDeffwwwwwwwgfEDDDTXUEDDDDDTDDDDUUUDDDD…DDTUUUEDDADDDDTxwwwwwwwwwwffwwwwwwXDD43C4CCDDDDUUUUUUeffffXDDtwwwwGDDDeffwwwwwwwffEDDDTXUEDDDDDTDDDDUUUEDDD…DDUUUUEDDADDDT…wwwwwwwwwwfvwwwww‡EDD3333C43DDDUUUUUUffffvXDtwwwwwwDDDeffwwwwwwwffEDDDTXUEDDDDDTDDDTUUUUEDD…DDUUUeVDDADDAD…xwwwwwwvwwfwwwwwwWEDD4333333DDTUUUUUUffffwXDtwwwwwwDDDeffwwwwwwgffEDDAADTXUEDDDDDTDDDUUUUUUDD…DTUUefVEDDDADDADTxwwwwwffvwvwwwwwwXDDD4333333DDTUUUUUUffffwXDtwwwwwwGDTfffwwwwwwfffEDDDDDDDDDTXUEDDDDDTDDDUUUUUUEDTDUUUfffEDDDDDDDDDTˆwwwwgffvwwww‡ˆˆˆUDDDDD33333DDUUUUUUUfffvwEDtwwwwwwGDTfffwwwwwgfffEDDDDADDDTXUEDDDDDTDDTUUUUUUDDTXUUefffVDDDDDDDDDDDD…wwwgffffwww‡ˆˆˆˆEDDDDD3333CDDUUUUUUefffw‡EDtwwwwwwGDTfffwwwwwffffEDDDDDDDDDDTXUEDDDDDTDDUUUUUUEDDTXUefffvWDDDDDDDDDDDDDTxwwfffffwwwˆˆˆˆXDDDDDD43D4DDTUUUUUUefffw‡EDwwwwwwwGDTfffvwwwfffffEDDDDDDDDDDTXUEDDDDDDEDTUUUUUEDDTXUfffvwwEDDDDDDDDDDDT…ˆwffffffvwˆˆˆˆˆXDDDDDD3CDDDDTUUUUUUfffvw‡EDtwwtwwwGDTfffvwwffffffEDDDDDDDDDDTXUEDDDDDDEDDUUUUUDDDTXeffvwwwUDDDDDDDDDDT…ˆxfffffffv‡ˆˆˆˆˆEDDDDDDDDDDDDUUUUUUUfffvw‡EDDwGDwwwGDefffffffffffUEDDDDDDDDDDTXUEDDDDDDEDDDUUUEDDDTXffvwwwwWDDDDDDDDDDUˆxffffffffvˆˆˆˆˆˆXEDDDDDDDDDDTUUUUUUefffww‡EDDDDDtwwDDeffffffffffUUEDDDDDDDDDDTXUEDDDDDDEDDDTUUEDDDThffwwww‡ˆEDDDDDDDDUˆˆffffffffffˆˆˆˆˆˆˆXEDDDDDDDDDTUUUUUUeffvwwWDDDDDDDDGDDefffffffffUUUEDDDDDDDDDDTXUEDDDDDDEDDDDTUDDDDDefwwwwˆˆˆUDDDDDDDUˆˆfffffffffffˆˆˆˆˆˆˆˆXEDDDDDDDDUUUUUUUfffvwwXDDDDDDDDDDDeffffffffUUUUEDDDDDDDDDDTXUEDDDDDDEDDDDDEDDDDD…vwwwˆˆˆˆXDDDDDDUˆˆffffffffffffˆˆˆˆˆˆˆˆˆXEDDDDDDDUUUUUUefffwwwXDDDDDDDDDDDefffffffUUUUUUUUUUUUUUUUUXUEDDDDDDEDDDDDDDDDDD…wwwˆˆˆˆˆˆEDDDDT…ˆfffffffffffffˆˆˆˆˆˆˆˆˆˆXEDDDDDTUUUUUUfffvwwwXDDDDDDDtGDDeffffffUUUUUU…ˆˆˆˆˆˆˆˆˆˆˆXUUDDDDDDTDDDDDDDDDDD…wwˆˆˆˆˆˆˆEDDDT…ˆhffffffUUefffvˆˆˆˆˆˆˆˆˆˆˆUEDDDDTUUUUUefffvwwwXDDDDDDDDwGTfffffVUUUUUUUUUUUffffffffVUUDDDDDDTDDDDDDDDDDD…w‡ˆˆˆˆˆˆˆXDDT…ˆhffffffUUUefffvˆˆˆˆˆˆˆˆx‡ˆˆUEDDDUUUUUUffffwwwwEDDDDDDDGGDTffffUUUUUUUDDUUUUffffffffVUUEDDDDDTDDDDDDDDDDD…wˆˆˆˆˆˆˆˆXET…ˆxgffffVUUUUUfffvˆˆˆˆˆˆˆˆxwˆˆˆUDDDUUUUUefffvwww‡EDDDDDDDtDDTfffUUUUUUEDDDTUUUffffffffVUUUDDDDDTDDDDDDDDDDD…ˆˆˆˆˆˆˆˆˆˆEUˆxwgffffUUUUUUfffvˆˆˆˆˆˆˆˆxwwˆˆˆUDTUUUUUffffvwwwˆUEDDDDDDtDDTffVUUUUUEDDDDTUUUffffffffVUUUEDDDDTDDDDDDDDDDDTˆˆˆˆˆˆˆˆˆˆXˆˆwwffffVUUUUUUfffwˆˆˆˆˆˆˆˆxwwgˆˆˆUTUUUUfffffwww‡ˆˆXUUEDDDDDDTffUUUUUEDDDDDTUUeffffffffVUUUUDDDDTDDDDDDDDDDDTˆˆˆˆˆˆˆˆˆˆˆˆwwwffffUUUUUUefffwˆˆˆˆˆˆˆˆxwwgfˆˆˆUUUUeffffvwww‡ˆˆˆˆˆXUUDDDDeffUUUUUDDDDDDTUUefffffffffUUUUUEDUUEDDDDDDDDDUUˆˆˆˆˆˆˆˆˆˆˆˆwwwfffVUUUUUUeffvwˆˆˆˆˆˆˆˆxwwwffˆˆUUUefffffvwwwˆˆˆˆˆˆˆˆˆUUUDefVUUUUEDDDDDDTUUefffffffffVUUUUUUUUEDDDDDUUUUˆˆˆˆˆˆˆˆˆˆˆˆˆˆwwwfffVUUUUUUeffvwˆˆˆˆˆˆˆˆxwwwfffhVUeffffffwwwwˆˆˆˆˆˆˆˆˆˆˆˆUefVUUUEDDDDDDDTUUfffffffffffUUUUUUUUEDUUUUˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆxwwfffVUUUUUUfffwwˆˆˆˆˆˆˆˆxwwwffffffffffffvwww‡ˆˆˆˆˆˆˆˆˆxw‡ˆffVUUUEDDDDDDDTUUfffffffffffVUUUUUUUUUˆˆˆˆxwwwˆˆˆˆˆˆˆˆˆˆˆˆˆˆxwwfffVUUUUUUfffwwˆˆˆˆˆˆˆˆxwwwgfffffffffffvwww‡ˆˆˆˆˆˆˆˆˆxwwwffVUUUDDDDDDDDUUUffffffffffffUUUUUUU…ˆhfffvww‡ˆˆˆˆˆˆˆˆˆˆˆˆˆˆxwwfffVUUUUUeffvwwˆˆˆˆˆˆˆˆxwwwgfffffffffffwwwwˆˆˆˆˆˆˆˆˆˆxwwwffVUUUDDDDDDDDUUeffffffffffffVUUUUUUUeffffwww‡ˆˆˆˆˆˆˆˆˆˆˆˆˆˆxwwffffUUUUUfffvwwˆˆˆˆˆˆˆˆxwwwwfffffffffffwwwwˆˆˆˆˆˆˆˆˆˆxwwwffVUUUDDDDDDDTUUefffffffffffffVUUUUUUfffffwwwˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆxwwgfffUUUUUfffvwwnì-- title: StriKard -- author: XeonBrix -- desc: poker card game -- site: https://youtube.com/@XeonBrix -- license: MIT License -- version: 0.1 beta -- script : lua math.randomseed(time()*1000) local m = math min,max,cos,abs,sin,sqrt,floor,rnd,atan2,rad = m.min,m.max,m.cos,m.abs,m.sin,m.sqrt,m.floor,m.random,m.atan2,m.rad abb,del,sort = table.insert,table.remove,table.sort OPTIONS_table = {"Settings","Credits"} menu_ = {x=240/2,y=150,tx=0,ty=0,h=0,w=0} game_next = false GameStat = "INTRO" cards_hand_level = {} hand_poker = { ["High Card"] = {name="High Card", c=5, m=1,lvl=1}, ["St. Flush"] = {name="St. Flush", c=100, m=8,lvl=1}, ["4 of Kind"] = {name="4 of Kind", c=60, m=7,lvl=1}, ["Full House"] = {name="Full House", c=40, m=4,lvl=1}, ["Flush"] = {name="Flush", c=35, m=4,lvl=1}, ["Straight"] = {name="Straight", c=30, m=4,lvl=1}, ["3 of Kind"] = {name="3 of Kind", c=30, m=3,lvl=1}, ["Two Pair"] = {name="Two Pair", c=20, m=2,lvl=1}, ["Pair"] = {name="Pair", c=10, m=2,lvl=1} } name_hand = {"High Card","St. Flush", "4 of Kind","Full House", "Flush","Straight","3 of Kind","Two Pair","Pair"} del_all_card = false card_size = 16 handX =150 handY =110 jokerX = 128 jokerY = 22 table_x = 150 table_y = 72 hand_size = 8 function init_game() for i=#deck,1,-1 do abb(old_deck,del(deck,i)) end for i=#old_deck,1,-1 do local c = old_deck[i] c.x=280 c.y=68 c.playing = false c.size = card_size c.tsize = card_size abb(deck,del(old_deck,i)) end for i=1,#deck do local r = rnd(i) deck[i],deck[r]=deck[r],deck[i] end cards = {} discards_hp = 1 end function init() init_cards() cards = {} discards_hp = 1 old_suit = suitName_table[rnd(#suitName_table)] time_level_hand = 0 time_cards = 0 time_card_hand = 0 time_out = 25 intro_upd = GameStat == "INTRO" and true or false b1 = {x=60,y=5000,tx=62,ty=97} text1 = {x=-5000,y=300,tx=38,ty=34} text2 = {x=5000,y=-80,tx=145,ty=39} k1 = {x=100,y=-5000,tx=104,ty=16} t, all_card = 1, false mobile_mod = false OPTIONS = false Settings = false Credits = false HELP = false new_game = false card_hand_new = false new_card_hand = false oldtime = 0 currenttime = 0 current_score = 0 tcurrent_score = 0 next_score = 300 score = next_score current_chips = 0 current_mult = 0 target_chips = 0 target_mult = 0 score_step = 0 is_scoring = false HP_player = 100 money = 0 max_table_joker = 5 chips = 0 mult = 0 pix_rect = {} table_card = {} cards_playing = {} joker_shop = {} joker_cards = {} t_score_anim = 1 t_anim = 1 joker_step = 1 cards_hand = {} end table_shop = {x=250,y=20,h=240/2,w=136/1.5,tx=121,exits=false} suitName={["S"]="Spades",["H"]="Hearts",["C"]="Clubs",["D"]="Diamonds"} suitName_table={"S","H","C","D"} next = false next_ = {size=0,x=128,y=68} chips_table = {["A"]=11,["2"]=2,["3"]=3,["4"]=4,["5"]=5,["6"]=6,["7"]=7,["8"]=8,["9"]=9,["10"]=10,["J"]=10,["Q"]=10,["K"]=10} rank_values = {["A"]=14,["K"]=13,["Q"]=12,["J"]=11,["10"]=10,["9"]=9,["8"]=8,["7"]=7,["6"]=6,["5"]=5,["4"]=4,["3"]=3,["2"]=2} table_joker = { {name="JOKER", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,couts=4,v=1,color=4,bg_color=5, id = 258,text=" +4 mult" }, {name="Xeon", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,couts=4,v=1,color=4,bg_color=5, id = 260,text=" mult +" }, {name="Brix", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=true,color=4,bg_color=5, id = 262,text=" odd rank give \n +4 mult",couts=5,v=1 }, {name="TIC", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=true,v=1,color=4,bg_color=5, id = 264,text=" even rank give \n +30 Chips",couts=5, }, {name="JAX", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=true,v=1,color=4,bg_color=5, id = 266,text=" mult X1.5 if \n play hand ",couts=rnd(6,8), }, {name="Dempo", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=true,v=1,color=5,bg_color=4, id = 268,text=" Played cards with\n Diamond suit give\n+3 Mult when scored",couts=rnd(4,5), }, -- {name="Hempo", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=true,v=1,color=6,bg_color=4, id = 268,text=" Played cards with\n Heart suit give\n+3 Mult when scored",couts=rnd(4,5), }, {name="Sempo", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=true,v=1,color=1,bg_color=4, id = 268,text=" Played cards with\n Spade suit give\n+3 Mult when scored",couts=rnd(4,5), }, {name="Cempo", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=true,v=1,color=3,bg_color=4, id = 268,text=" Played cards with\n Club suit give\n+3 Mult when scored",couts=rnd(4,5), }, -- {name="The Duo", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=3,bg_color=5, id = 306,text=" X2 Mult if played\n hand contains\n a Pair",couts=rnd(7,8), }, {name="The Trio", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=3,bg_color=5, id = 314,text=" X3 Mult if played\n hand contains\n a 3 of a Kind",couts=rnd(7,8), }, {name="The Family", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=3,bg_color=5, id = 312,text=" X4 Mult if played\n hand contains\n a 4 of a Kind",couts=rnd(7,8), }, {name="The Order", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=3,bg_color=5, id = 316,text=" X3 Mult if played\n hand contains\n a Straight",couts=rnd(7,8), }, {name="The Tribe", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=3,bg_color=5, id = 318,text=" X2 Mult if played\n hand contains\n a Flush",couts=rnd(7,8), }, {name="Jolly", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 355,text=" +8 Mult if played\n hand contains\n a Pair",couts=rnd(4,6), }, {name="Zany", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 355,text=" +12 Mult if played\n hand contains\n a 3 of a Kind",couts=rnd(4,6), }, {name="Mad", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 355,text=" +10 Mult if played\n hand contains\n a Two Pair",couts=rnd(4,6), }, {name="Crazy", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 355,text=" +12 Mult if played\n hand contains\n a Straight",couts=rnd(4,6), }, {name="Droll", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 355,text=" +10 Mult if played\n hand contains\n a Flush",couts=rnd(4,6), }, {name="Sly", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 357,text="+50 Cihps if played\n hand contains\n a Pair",couts=rnd(4,6), }, {name="Wily", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 357,text="+100 Cihps if played\n hand contains\n a 3 of a Kind",couts=rnd(4,6), }, {name="Clever", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 357,text="+80 Cihps if played\n hand contains\n a Two Pair",couts=rnd(4,6), }, {name="Devious", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 357,text="+100 Cihps if played\n hand contains\n a Straight",couts=rnd(4,6), }, {name="Crafty", x=jokerX,size=card_size,tsize=card_size,y=jokerY,tx=jokerX,ty=jokerY,vx=0,last_x=0,ang=0,tang=0,spd=rnd()*6.2, step=false,card=false,v=1,color=4,bg_color=5, id = 357,text="+80 Cihps if played\n hand contains\n a Flush",couts=rnd(4,6), }, -- } joker_type = { ["JOKER"]= function(ctx) ctx.mult = ctx.mult + 4 end, ["Xeon"] = function (ctx) ctx.mult = ctx.mult + rnd(30) end, ["Brix"] = function (ctx,j) if chips_table[ctx.card.val]%2 ~= 0 then j.step = true for i,c in pairs(joker_cards) do if c.name == "Xeon" then ctx.mult = ctx.mult + 8 break end if i==#joker_cards then ctx.mult = ctx.mult + 3 break end end end end, ["TIC"] = function (ctx,j) if chips_table[ctx.card.val]%2 == 0 then ctx.chips = ctx.chips + 30 j.step = true end end, ["JAX"] = function (ctx,j) if ctx.card.suit == ctx.suit then ctx.now_mult = ctx.now_mult * 1.5 pix_rect_card(j,"X1.5",j.size,8) j.step = true end end, ["Dempo"] = function (ctx,j) if ctx.card.suit == "D" then ctx.mult = ctx.mult + 3 j.step = true end end, ["Hempo"] = function (ctx,j) if ctx.card.suit == "H" then ctx.mult = ctx.mult + 3 j.step = true end end, ["Sempo"] = function (ctx,j) if ctx.card.suit == "S" then ctx.mult = ctx.mult + 3 j.step = true end end, ["Cempo"] = function (ctx,j) if ctx.card.suit == "C" then ctx.mult = ctx.mult + 3 j.step = true end end, -- ["The Duo"] = function (ctx,j) if ctx.hand == "Pair" or ctx.hand == "Full House" or ctx.hand == "Two Pair" or ctx.hand == "3 of Kind" or ctx.hand == "4 of Kind" then ctx.now_mult = ctx.now_mult * 2 pix_rect_card(j,"X2",j.size,8) end end, ["The Trio"] = function (ctx,j) if ctx.hand == "3 of Kind" or ctx.hand == "Full House" or ctx.hand == "4 of Kind" then ctx.now_mult = ctx.now_mult * 3 pix_rect_card(j,"X3",j.size,8) end end, ["The Family"] = function (ctx,j) if ctx.hand == "4 of Kind" then ctx.now_mult = ctx.now_mult * 4 pix_rect_card(j,"X4",j.size,8) end end, ["The Order"] = function (ctx,j) if ctx.hand == "Straight" or ctx.hand == "St. Flush" then ctx.now_mult = ctx.now_mult * 3 pix_rect_card(j,"X3",j.size,8) end end, ["The Tribe"] = function (ctx,j) if ctx.hand == "Flush" or ctx.hand == "St. Flush" then ctx.now_mult = ctx.now_mult * 2 pix_rect_card(j,"X2",j.size,8) end end, ["Jolly"] = function (ctx) if ctx.hand == "Pair" or ctx.hand == "Full House" or ctx.hand == "Two Pair" or ctx.hand == "3 of Kind" or ctx.hand == "4 of Kind" then ctx.mult = ctx.mult + 8 end end, ["Zany"] = function (ctx) if ctx.hand == "3 of Kind" or ctx.hand == "Full House" or ctx.hand == "4 of Kind" then ctx.mult = ctx.mult + 12 end end, ["Mad"] = function (ctx) if ctx.hand == "Two Pair" or ctx.hand == "Full House" or ctx.hand == "4 of Kind" then ctx.mult = ctx.mult + 10 end end, ["Crazy"] = function (ctx) if ctx.hand == "Straight" or ctx.hand == "St. Flush" then ctx.mult = ctx.mult + 12 end end, ["Droll"] = function (ctx) if ctx.hand == "Flush" or ctx.hand == "St. Flush" then ctx.mult = ctx.mult + 10 end end, -- ["Sly"] = function (ctx) if ctx.hand == "Pair" or ctx.hand == "Full House" or ctx.hand == "Two Pair" or ctx.hand == "3 of Kind" or ctx.hand == "4 of Kind" then ctx.chips = ctx.chips + 50 end end, ["Wily"] = function (ctx) if ctx.hand == "3 of Kind" or ctx.hand == "Full House" or ctx.hand == "4 of Kind" then ctx.chips = ctxchips + 100 end end, ["Clever"] = function (ctx) if ctx.hand == "Two Pair" or ctx.hand == "Full House" or ctx.hand == "4 of Kind" then ctx.chips = ctx.chips + 80 end end, ["Devious"] = function (ctx) if ctx.hand == "Straight" or ctx.hand == "St. Flush" then ctx.chips = ctx.chips + 100 end end, ["Crafty"] = function (ctx) if ctx.hand == "Flush" or ctx.hand == "St. Flush" then ctx.chips = ctx.chips + 80 end end, } function joker_card_upd(j,ctx) if not j.card then return end local f = joker_type[j.name] if j.name == "Brix" then f(ctx,j) elseif j.name == "TIC" then f(ctx,j) elseif j.name == "JAX" then f(ctx,j) elseif j.name == "Hempo" then f(ctx,j) elseif j.name == "Sempo" then f(ctx,j) elseif j.name == "Dempo" then f(ctx,j) elseif j.name == "Cempo" then f(ctx,j) end local num_old = ctx.mult > 0 and ctx.mult or ctx.chips if ctx.mult ~= 0 or ctx.chips ~= 0 then pix_rect_card(j,"+"..num_old,j.size,ctx.mult > 0 and 7 or 6) end ctx.now_mult = ctx.now_mult + ctx.mult ctx.now_chips = ctx.now_chips + ctx.chips current_chips = ctx.now_chips current_mult = ctx.now_mult ctx.chips = 0 ctx.mult = 0 end function joker_not_card_upd(j,ctx) if j.card then return end local f = joker_type[j.name] if j.name == "JOKER" then f(ctx) elseif j.name == "Xeon" then f(ctx) elseif j.name == "The Duo" then f(ctx,j) elseif j.name == "The Trio" then f(ctx,j) elseif j.name == "The Family" then f(ctx,j) elseif j.name == "The Order" then f(ctx,j) elseif j.name == "The Tribe" then f(ctx,j) elseif j.name == "Jolly" then f(ctx) elseif j.name == "Zany" then f(ctx) elseif j.name == "Mad" then f(ctx) elseif j.name == "Crazy" then f(ctx) elseif j.name == "Droll" then f(ctx) elseif j.name == "Sly" then f(ctx) elseif j.name == "Wily" then f(ctx) elseif j.name == "Clever" then f(ctx) elseif j.name == "Devious" then f(ctx) elseif j.name == "Crafty" then f(ctx) end local num_old = ctx.mult > 0 and ctx.mult or ctx.chips if ctx.mult ~= 0 or ctx.chips ~= 0 then pix_rect_card(j,"+"..num_old,j.size,ctx.mult > 0 and 7 or 6) end ctx.now_mult = ctx.now_mult + ctx.mult ctx.now_chips = ctx.now_chips + ctx.chips current_chips = ctx.now_chips current_mult = ctx.now_mult ctx.chips = 0 ctx.mult = 0 end --abb(joker_cards,table_joker[2]) --abb(joker_cards,table_joker[1]) --abb(joker_cards,table_joker[1]) function get_cards_chips(p_cards) local total = 0 for i=1, #p_cards do local val = p_cards[i].val total = total + (chips_table[val] or 0) end return total end function start_scoring() if #table_card == 0 then return end local hand_info = evaluate_hand(table_card,true) local cards_sum = get_cards_chips(table_card) target_chips = hand_info.c target_mult = hand_info.m current_chips = target_chips current_mult = target_mult score_step = 1 joker_step = 1 is_scoring = true end function update_score_anim() if not is_scoring then return end t_score_anim = t_score_anim + 1 local old_hand = evaluate_hand(table_card,true) if t_score_anim % time_out == 0 then if score_step <= #table_card then sfx(7,"C-5",16,0,15) local c = table_card[score_step] for i=1,#table_card do table_card[i].step = (i == score_step) end local ct = { chips = 0, mult = 0, now_chips = current_chips, now_mult = current_mult, card = c, hand = old_hand.name, suit = old_suit } for i=1,#joker_cards do local jo = joker_cards[i] joker_card_upd(jo,ct) end current_chips = current_chips + chips_table[c.val] pix_rect_card(c,"+"..chips_table[c.val],-c.size,5) score_step = score_step + 1 time_out = 20 elseif joker_step <= #joker_cards then sfx(7,"G-4",16,0,15) for i=1,#table_card do table_card[i].step = false end local c1 = joker_cards[joker_step] local ct2 = { chips = 0, mult = 0, now_chips = current_chips, now_mult = current_mult, card = c1, hand = old_hand.name } joker_not_card_upd(c1,ct2) for i=1,#joker_cards do local j = joker_cards[i] if joker_cards[i] and not joker_cards[i].card then joker_cards[i].step = (i == joker_step) end end joker_step = joker_step + 1 time_out = 15 else current_score = current_chips * current_mult score = score - current_score HP_dameg() is_scoring = false t_score_anim = 0 for i=1,#joker_cards do if joker_cards[i] then joker_cards[i].step = (i == joker_step) end end if score <= 0 then old_suit = suitName_table[rnd(#suitName_table)] rnd_joker_shop() time_level_hand = time_level_hand + 1 if time_level_hand > 2 then new_cards_hand_level() level_hand_ = true else del_all_card = true end new_game = true --sfx(10,"B-3",29,0,15) money = money + (HP_player//20) + rnd(2,3) else all_card = false end end end end function HP_dameg() local hand_info = evaluate_hand(table_card,true) if hand_info.name == "High Card" then HP_player = HP_player - rnd(10,20) elseif hand_info.name == "Pair" then HP_player = HP_player - rnd(5,10) elseif hand_info.name == "Two Pair" then HP_player = HP_player + rnd(1,3) elseif hand_info.name == "3 of Kind" then HP_player = HP_player + rnd(1,3) elseif hand_info.name == "Straight" then HP_player = HP_player + rnd(5,8) elseif hand_info.name == "St. Flush" then HP_player = HP_player + rnd(10,15) elseif hand_info.name == "Flush" then HP_player = HP_player + rnd(5,10) elseif hand_info.name == "4 of Kind" then HP_player = HP_player + rnd(5,20) elseif hand_info.name == "Full House" then HP_player = HP_player + rnd(5,10) end end function level_hand(name) hand_poker[name].m = hand_poker[name].m*2 hand_poker[name].c = hand_poker[name].c*2 hand_poker[name].lvl = hand_poker[name].lvl+1 end function new_cards_hand_level() if #cards_hand_level ~= 0 then for i=#cards_hand_level,1,-1 do del(cards_hand_level,i) end end for i=1,3 do local name_ = name_hand[rnd(1,#name_hand)] local r = hand_poker[name_] local new = { name = r.name, c = r.c, m = r.m, level = r.level , } abb(cards_hand_level,new) end end function evaluate_hand(p_cards,playing) if #p_cards == 0 then return p_cards end local r_counts, s_counts, values = {}, {}, {} for i=1, #p_cards do if playing then if p_cards[i].playing then local r, s = p_cards[i].val, p_cards[i].suit local v = rank_values[r] or 0 r_counts[r] = (r_counts[r] or 0) + 1 s_counts[s] = (s_counts[s] or 0) + 1 abb(values, v) end end end sort(values) local is_flush = false for s, count in pairs(s_counts) do if count >= 5 then is_flush = true end end local is_straight = #values >= 5 if is_straight then for i=1, #values-1 do if values[i+1] ~= values[i] + 1 then is_straight = false break end end end local n_pairs, n_three, n_four = 0, 0, 0 for r, count in pairs(r_counts) do if count == 2 then n_pairs = n_pairs + 1 elseif count == 3 then n_three = n_three + 1 elseif count == 4 then n_four = n_four + 1 end end local res = hand_poker["High Card"] if is_straight and is_flush then res = hand_poker["St. Flush"] elseif n_four > 0 then res = hand_poker["4 of Kind"] elseif n_three > 0 and n_pairs > 0 then res = hand_poker["Full House"] elseif is_flush then res = hand_poker["Flush"] elseif is_straight then res = hand_poker["Straight"] elseif n_three > 0 then res = hand_poker["3 of Kind"] elseif n_pairs >= 2 then res = hand_poker["Two Pair"] elseif n_pairs == 1 then res = hand_poker["Pair"] end return res end function rect_circ(x,y,h,w,c) rect(x+1, y+1, h-2, w-2, c) line(x, y+1, x, y+w-2, c) line(x+1, y, x+h-2, y, c) line(x+h-1, y+1, x+h-1, y+w-2, c) line(x+1, y+w-1, x+h-2, y+w-1, c) end function sort_hand() local n = #cards for i=1,n do for j=1,n-i do local c = rank_values[cards[j].val] or 0 local c2 = rank_values[cards[j+1].val] or 0 if c < c2 then cards[j],cards[j+1] = cards[j+1],cards[j] end end end end old_deck = {} function init_cards() local suits = {"H","D","S","C"} local values = {"A","2","3","4","5","6","7","9","10","J","Q","K"} deck = {} for s=1,#suits do for v=1,#values do local col = 0 if s== 1 then col=6 elseif s==2 then col=5 elseif s==3 then col=1 else col=3 end local new = {suit = suits[s],bc=0,bm=0,bxc=0,bxm=0, val = values[v], last_x=0, x=280,y=68,vx=0,step=false,over=false, tx=handX,ty=handY, ang=0,tang=0, spd=rnd()*6.2, size=16, color= col, tsize = 16, playing = false} abb(deck,new) end end for i=1,#deck do local r = rnd(i) deck[i],deck[r]=deck[r],deck[i] end end mlt = false function new_card() if #cards >= hand_size and #table_card == 0 then all_card = true return end if t%12 == 0 then sfx(8,"D-"..rnd(2,3),8,0,15) for i=1 ,1 do abb(cards,del(deck)) sort_hand() end if #table_card ~= 0 then for i=#table_card,1,-1 do local c = table_card[i] new_del_card(c) abb(old_deck,del(table_card,i)) break end end end end local BG_x = rnd(200) local BG_y = rnd(200) local BG_size = 32 local S = 4 local S_ = true local t1 = time()/6000 function BG_game() for y=0,136,S do for x=68,240,S do local uvx = (x-BG_x)/BG_size local uvy = (y-BG_y)/BG_size local qx = cos(uvy *2.2 + t1) local qy = cos(uvx *2.2 + t1*0.8) local ox = uvx + 9 * qx local oy = uvy + 9 * qy local v = sin(ox * 2.0 + t1) v = v + sin(oy * 1.8 - t1 * 1.5) v = v + sin(sqrt(ox*ox + oy*oy) * 1.5) local col = 0 if v > 1.5 then col = 8 elseif v > 0.6 then col = 3 elseif v > -0.2 then col = 2 elseif v > -1.0 then col = 1 else col = 1 end rect(x, y, S, S, col) end end end function BG_intro() for y=0,136,S do for x=0,240,S do local uvx = (x-BG_x)/BG_size local uvy = (y-BG_y)/BG_size local qx = cos(uvy *2.2 + t1) local qy = cos(uvx *2.2 + t1*0.8) local ox = uvx + 2 * qx local oy = uvy + 0.7 * qy local v = sin(ox * 4 + t1) v = v + sin(oy * 2 - t1 * 1.5) v = v + sin(sqrt(ox*ox + oy*oy) * 1.5) local col = 0 if v > 1.5 then col = 8 elseif v > 0.6 then col = 3 elseif v > -0.2 then col = 2 elseif v > -1.0 then col = 1 else col = 1 end rect(x, y, S, S, col) end end end function BG_menu() for y=0,136,S do for x=0,240,S do local uvx = (x-BG_x)/BG_size local uvy = (y-BG_y)/BG_size local qx = cos(uvy *3.3 + t1) local qy = cos(uvx *3.3 + t1*0.8) local ox = uvx + 0.7 * qx local oy = uvy + 0.7 * qy local v = sin(ox * 2.0 + t1) v = v + sin(oy * 1.8 - t1 * 1.5) v = v + sin(sqrt(ox*ox + oy*oy) * 1.5) local col = 0 if v > 1.5 then col = 4 elseif v > 0.6 then col = 5 elseif v > -0.2 then col = 6 elseif v > -1.0 then col = 7 else col = 8 end --circ(x,y,S,col) --pix(x,y,col) rect(x, y, S, S, col) end end end init() function TIC() cls(5) if (#table_del_card == 0 and #table_card == 0) or GameStat == "MENU" then vx,vy= 0,0 else vx,vy = rnd(-3,3),rnd(-3,3) end pixel_row() _x = lerp(_x,vx,0.2) _y = lerp(_y,vy,0.2) poke(0x03FFB,1) oldtime=currenttime currenttime=time() fps=(1/(currenttime-oldtime))*1000 fps = max(fps,60) mx,my,ml = mouse() if GameStat == "INTRO" then BG_intro() elseif GameStat == "MENU" then BG_menu() menu() elseif GameStat == "GAME" then BG_game() GameLoop() elseif GameStat == "HELP" then BG_intro() help() end if game_next then next_game_upd() end draw_op() mlt, t = ml, t + 1 if S_ then t1 = time()/6000 end --print("FPS: "..floor(fps).."\nMX: "..mx.." MY: "..my,0,0,12) if not mobile_mod then if ml then spr(2,mx,my-1,0) else spr(1,mx,my-1,0) end end end t_i = 0 function help() local text = [[ Poker: You play using cards, and your goal is to build the strongest 5-card hand. You are dealt cards, and you can choose to replace some of them. Your aim is to form combinations like: Pair (two matching cards) Straight (numbers in sequence) Flush (same suit) Each combination gives you a higher score. ]] print(text,0,16,4,true,1,true) print("Click to exit",8,128,5,true,1,true) if ml and not mlt then game_next = true next_.text = "MENU" end end function menu() if not game_next and (not oc_deck and not OPTIONS and not Settings and not Credits ) then upd_menu() end draw_menu() print("v0.1 Beta",0,0,8) end function bg_pix() for y=0,136,2 do for x=0,240,2 do pix(x,y,2) end end end function draw_menu() b1.x = lerp(b1.x,b1.tx,0.1) b1.y = lerp(b1.y,b1.ty,0.1) text1.x = lerp(text1.x,text1.tx,0.1) text1.y = lerp(text1.y,text1.ty,0.1) text2.x = lerp(text2.x,text2.tx,0.1) text2.y = lerp(text2.y,text2.ty,0.1) k1.x = lerp(k1.x,k1.tx,0.1) k1.y = lerp(k1.y,k1.ty,0.1) spr(152,text1.x,text1.y+sin(t/50)*2,0,1,0,0,8,6) spr(128,k1.x,k1.y+sin(t/50)*3,0,1,0,0,6,8) spr(90,text2.x,text2.y+sin(t/50)*2,0,1,0,0,6,4) --bg btn oc --bg btn rect_circ(b1.x,b1.y+2,116,27,1) rect_circ(b1.x,b1.y,116,27,3) --bg btn -- play if hitbox(b1.x+2,b1.y+3,35,21) then rect_circ(b1.x+2,b1.y+3,35,21,2) print("PLAY",b1.x+9,b1.y+12,7) print("PLAY",b1.x+9,b1.y+11,6) else rect_circ(b1.x+2,b1.y+3,35,21,1) rect_circ(b1.x+2,b1.y+2,35,21,2) print("PLAY",b1.x+9,b1.y+11,7) print("PLAY",b1.x+9,b1.y+10,6) end -- text play -- play if hitbox(b1.x+43,b1.y+4,31,18) then rect_circ(b1.x+43,b1.y+5,31,18,2) print("OPTIONS",b1.x+45,b1.y+12,7,true,1,true) print("OPTIONS",b1.x+45,b1.y+11,6,true,1,true) else rect_circ(b1.x+43,b1.y+5,31,18,1) rect_circ(b1.x+43,b1.y+4,31,18,2) print("OPTIONS",b1.x+45,b1.y+11,7,true,1,true) print("OPTIONS",b1.x+45,b1.y+10,6,true,1,true) end -- helping if hitbox(b1.x+79,b1.y+3,31,18) then rect_circ(b1.x+79,b1.y+3,35,21,2) print("HELP",148,b1.y+12,7) print("HELP",148,b1.y+11,6) else rect_circ(b1.x+79,b1.y+3,35,21,1) rect_circ(b1.x+79,b1.y+2,35,21,2) print("HELP",148,b1.y+11,7) print("HELP",148,b1.y+10,6) end end function pix_rect_card(c,num,dy,cz) cz = cz or c.color for i=1,1 do local new = { x=c.x,y=c.y+dy,h=0,w=0,ang=0, th=7,tw=7,c=false, num=num,color=cz, } abb(pix_rect,new) end end function draw_pix_rect() for i=#pix_rect,1,-1 do local p = pix_rect[i] p.y = p.y - 0.5 p.ang = p.ang + 0.15 if not p.c then p.h = lerp(p.h,p.th,0.1) p.w = lerp(p.w,p.tw,0.1) if p.h >= p.th then p.c = true end else p.h,p.w = p.h-0.12,p.w-0.12 end if p.h < 0 then del(pix_rect,i) end local dx = -5 --rect_angle(p.x,p.y,p.h,p.w,-p.ang-0.5,6) rect_angle(p.x,p.y,p.h,p.w,p.ang,p.color) if p.h > 5 then print(p.num,p.x+dx,p.y-3,4,true,1,true) elseif p.h > 4 then print(p.num,p.x+dx,p.y-3,5,true,1,true) end end end function upd_menu() if ml and not mlt and hitbox(64,99,35,21) then sfx(7,"A-2",10,0,15) game_next = true next_.text = "GAME" end if ml and not mlt and hitbox(141,99,35,21) then sfx(7,"A-2",10,0,15) game_next = true next_.text = "HELP" end if ml and not mlt and hitbox(105,101,31,18) then sfx(7,"A-2",10,0,15) OPTIONS = true end --if ml and not mlt and hitbox(20,108,23,11) then sfx(7,"A-2",10,0,15) oc_deck = true end end sfx(11,"B-3",30,0,15) function next_game_upd() if not next then next_.size = next_.size + 3 if next_.size > 148 then next = true end elseif next then next_.size = next_.size - 3 if next_.size < 4 then next = false game_next = false elseif next_.size < 144 and next_.size > 140 then if HP_player <= 0 then init() end GameStat = next_.text end end rect_angle(next_.x,next_.y,next_.size,next_.size,time()*0.005,2) end function GameLoop() if not game_next then if not all_card then new_card() end if new_game then new_card_game() end get_playing_card() if not game_next and (not oc_deck and not OPTIONS and not Settings and not Credits ) and all_card and not new_game and not run_info then if not shop then upd_cards() end upd_joker() end end Ui() upd_fire_score() upd_fire() draw_joker() draw_table_card() draw_cards() text_card() text_joker() draw_del_card() draw_pix_rect() if del_all_card then if #cards == 0 then shop = true del_all_card = false end end if HP_player <= 0 then init() game_next = true next_.text = "MENU" end if shop then draw_shop() upd_shop() text_joker() elseif level_hand_ then upd_level_hand() draw_level_hand() end end function draw_op() if intro_upd then bg_pix() menu_.h = 200 menu_.w = 110 menu_.ty = 136/2-menu_.w/1.5 menu_.ty = max(menu_.ty,8) menu_.x = 240/2-menu_.h/2 menu_.y = lerp(menu_.y,menu_.ty,0.1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+6,1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+4,3) rect_circ(menu_.x,menu_.y,menu_.h,menu_.w,2) local label = [[ A small note before we begin: The project is approximately 85% complete. Some eatures are still unfinished or missing, such as character abilities, card upgrades, and more. Now : v0.1 Beta (^-^) ]] print(label,menu_.x,menu_.y,4,true,1,true) rect_circ(menu_.x+3,menu_.y+menu_.w-17,menu_.h-6,16,1) rect_circ(menu_.x+3,menu_.y+menu_.w-19,menu_.h-6,16,3) print("OK!",menu_.x+menu_.h//2-4-4,menu_.y+menu_.w-19/1.5,4) if ml and not mlt and hitbox(menu_.x+4,menu_.y+menu_.w-19,menu_.h-6,16) then sfx(7,"A-2",10,0,15) menu_.y = 145 intro_upd = false game_next = true next_.text = "MENU" end elseif OPTIONS then bg_pix() if GameStat == "MENU" then menu_.h = 82 menu_.w = 72 menu_.ty = 136/2-menu_.w/1.5 menu_.ty = max(menu_.ty,16) menu_.x = 240/2-menu_.h/2 menu_.y = lerp(menu_.y,menu_.ty,0.1) else menu_.h = 82 menu_.w = 92 menu_.ty = 136/2-menu_.w/1.5 menu_.ty = max(menu_.ty,16) menu_.x = 240/2-menu_.h/2 menu_.y = lerp(menu_.y,menu_.ty,0.1) end rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+6,1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+4,3) rect_circ(menu_.x,menu_.y,menu_.h,menu_.w,2) for i=1,#OPTIONS_table do local o = OPTIONS_table[i] local x = menu_.x+menu_.h/2-(#o*2.5) local y = menu_.y-10+22*i rect_circ(menu_.x+4,y-4,74,16,1) rect_circ(menu_.x+4,y-6,74,16,3) if ml and not mlt and hitbox(menu_.x+4,y-6,74,16) then sfx(7,"A-2",10,0,15) if i==1 then Settings = true else Credits = true end OPTIONS = false menu_.y = 145 end print(o,x,y,4) end rect_circ(menu_.x+4,menu_.y+menu_.w-17,74,16,1) rect_circ(menu_.x+4,menu_.y+menu_.w-19,74,16,3) print("Back",menu_.x+4+74/3+2,menu_.y+menu_.w-19/1.5,4) if ml and not mlt and hitbox(menu_.x+4,menu_.y+menu_.w-19,74,16) then sfx(7,"A-2",10,0,15) menu_.y = 145 OPTIONS = false end if GameStat == "GAME" then rect_circ(menu_.x+4,menu_.y+menu_.w-40,74,16,1) rect_circ(menu_.x+4,menu_.y+menu_.w-42,74,16,3) if ml and not mlt and hitbox(menu_.x+4,menu_.y+menu_.w-42,74,16) then sfx(7,"A-2",10,0,15) menu_.y = 145 OPTIONS = false game_next = true next_.text = "MENU" init() end print("Main Menu",menu_.x+4+14,menu_.y+menu_.w-36,4) end elseif Settings then bg_pix() menu_.h = 100 menu_.w = 92 menu_.ty = 136/2-menu_.w/1.5 menu_.ty = max(menu_.ty,16) menu_.x = 240/2-menu_.h/2 menu_.y = lerp(menu_.y,menu_.ty,0.1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+6,1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+4,3) rect_circ(menu_.x,menu_.y,menu_.h,menu_.w,2) rect_circ(menu_.x+3,menu_.y+13,12,9,8) rect_circ(menu_.x+3,menu_.y+12,12,8,6) spr(16,menu_.x+3+4,menu_.y+12,9,1,1) if ml and not mlt and hitbox(menu_.x+3,menu_.y+12,12,8) then sfx(7,"A-3",10,0,15) S = S - 1 end rect_circ(menu_.x-3-12+menu_.h,menu_.y+13,12,9,8) rect_circ(menu_.x-3-12+menu_.h,menu_.y+12,12,8,6) spr(16,menu_.x-3-12+menu_.h,menu_.y+12,9,1) if ml and not mlt and hitbox(menu_.x-3-12+menu_.h,menu_.y+12,12,8) then sfx(7,"A-3",10,0,15) S = S + 1 end S = max(1,min(S,6)) rect_circ(menu_.x+24,menu_.y+13,64-9,10,8) rect_circ(menu_.x+24,menu_.y+11,64-9,10,6) print(S,menu_.x+(64-9)-6,menu_.y+13,4) -- rect_circ(menu_.x+63,menu_.y+29,10,10,4) rect_circ(menu_.x+64,menu_.y+30,8,8,1) if ml and not mlt and hitbox(menu_.x+63,menu_.y+29,10,10) then sfx(7,"A-4",10,0,15) S_ = not S_ end if not S_ then spr(30,menu_.x+64,menu_.y+30,9) end print("Reduced Motion",menu_.x+3,menu_.y+32,4,true,1,true) -- rect_circ(menu_.x+47,menu_.y+46,10,10,4) rect_circ(menu_.x+48,menu_.y+47,8,8,1) if ml and not mlt and hitbox(menu_.x+47,menu_.y+46,10,10,4) then sfx(7,"A-2",10,0,15) mobile_mod = not mobile_mod end if mobile_mod then spr(30,menu_.x+48,menu_.y+47,9) end print("Mobile Mod",menu_.x+3,menu_.y+48,4,true,1,true) rect_circ(menu_.x+3,menu_.y+menu_.w-17,94,16,1) rect_circ(menu_.x+3,menu_.y+menu_.w-19,94,16,3) print("Back",menu_.x+4+94/3+4,menu_.y+menu_.w-19/1.5,4) if ml and not mlt and hitbox(menu_.x+4,menu_.y+menu_.w-19,74,16) then sfx(7,"A-2",10,0,15) menu_.y = 145 Settings = false end elseif Credits then bg_pix() menu_.h = 200 menu_.w = 92 menu_.ty = 136/2-menu_.w/1.5 menu_.ty = max(menu_.ty,8) menu_.x = 240/2-menu_.h/2 menu_.y = lerp(menu_.y,menu_.ty,0.1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+6,1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+4,3) rect_circ(menu_.x,menu_.y,menu_.h,menu_.w,2) print("Credits",menu_.x+menu_.h//2-17,menu_.y+8,4) --spr(260`,menu_.x+3,menu_.y+16,9,1,0,0,2,3) print("Code : Xeon",menu_.x+3,menu_.y+23,4,true,1,true) print("Art : Brix",menu_.x+3,menu_.y+23+8,4,true,1,true) print("Engine : (my love) TIC-80",menu_.x+3,menu_.y+23+8+8,4,true,1,true) print("Tester Game : Maazxp,ZekryptV1",menu_.x+3,menu_.y+23+8+8+8,4,true,1,true) print("By (C) : XeonBrix",menu_.x+3,menu_.y+23+8+8+8+8,4,true,1,true) rect_circ(menu_.x+3,menu_.y+menu_.w-17,menu_.h-6,16,1) rect_circ(menu_.x+3,menu_.y+menu_.w-19,menu_.h-6,16,3) print("Back",menu_.x+menu_.h//2-4-4,menu_.y+menu_.w-19/1.5,4) if ml and not mlt and hitbox(menu_.x+4,menu_.y+menu_.w-19,menu_.h-6,16) then sfx(7,"A-2",10,0,15) menu_.y = 145 Credits = false end elseif oc_deck then bg_pix() menu_.h = 200 menu_.w = 116 menu_.ty = 136/2-menu_.w/1.5 menu_.ty = max(menu_.ty,8) menu_.x = 240/2-menu_.h/2 menu_.y = lerp(menu_.y,menu_.ty,0.1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+6,1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+4,3) rect_circ(menu_.x,menu_.y,menu_.h,menu_.w,2) rect_circ(menu_.x+3,menu_.y+menu_.w-17,menu_.h-6,16,1) rect_circ(menu_.x+3,menu_.y+menu_.w-19,menu_.h-6,16,3) print("Back",menu_.x+menu_.h//2-4-4,menu_.y+menu_.w-19/1.5,4) if ml and not mlt and hitbox(menu_.x+4,menu_.y+menu_.w-19,menu_.h-6,16) then menu_.y = 145 oc_deck = false end elseif run_info then bg_pix() menu_.h = 200 menu_.w = 116 menu_.ty = 136/2-menu_.w/1.5 menu_.ty = max(menu_.ty,8) menu_.x = 240/2-menu_.h/2 menu_.y = lerp(menu_.y,menu_.ty,0.1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+6,1) rect_circ(menu_.x-2,menu_.y-2,menu_.h+4,menu_.w+4,3) rect_circ(menu_.x,menu_.y,menu_.h,menu_.w,2) rect_circ(menu_.x+3,menu_.y+menu_.w-17,menu_.h-6,16,1) rect_circ(menu_.x+3,menu_.y+menu_.w-19,menu_.h-6,16,3) print("High Card ("..hand_poker["High Card"].c.."/"..hand_poker["High Card"].m..") #"..hand_poker["High Card"].lvl,menu_.x+2,menu_.y+4,4,true,1,true) spr(48,menu_.x+78,menu_.y+2,9) print("Pair ("..hand_poker["Pair"].c.."/"..hand_poker["Pair"].m..") #"..hand_poker["Pair"].lvl,menu_.x+2,menu_.y+14,4,true,1,true) spr(48,menu_.x+71,menu_.y+12,9) spr(48,menu_.x+64,menu_.y+12,9) print("Two Pair ("..hand_poker["Two Pair"].c.."/"..hand_poker["Two Pair"].m..") #"..hand_poker["Two Pair"].lvl,menu_.x+2,menu_.y+24,4,true,1,true) spr(48,menu_.x+82,menu_.y+22,9) spr(48,menu_.x+75,menu_.y+22,9) spr(48,menu_.x+89,menu_.y+22,9) spr(48,menu_.x+96,menu_.y+22,9) print("3 of Kind ("..hand_poker["3 of Kind"].c.."/"..hand_poker["3 of Kind"].m..") #"..hand_poker["3 of Kind"].lvl,menu_.x+2,menu_.y+34,4,true,1,true) spr(48,menu_.x+92,menu_.y+32,9) spr(48,menu_.x+85,menu_.y+32,9) spr(48,menu_.x+78,menu_.y+32,9) print("Straight ("..hand_poker["Straight"].c.."/"..hand_poker["Straight"].m..") #"..hand_poker["Straight"].lvl,menu_.x+2,menu_.y+44,4,true,1,true) spr(82,menu_.x+92,menu_.y+42,9) spr(81,menu_.x+85,menu_.y+42,9) spr(80,menu_.x+78,menu_.y+42,9) spr(83,menu_.x+99,menu_.y+42,9) spr(84,menu_.x+106,menu_.y+42,9) print("Flush ("..hand_poker["Flush"].c.."/"..hand_poker["Flush"].m..") #"..hand_poker["Flush"].lvl,menu_.x+2,menu_.y+54,4,true,1,true) spr(49,menu_.x+92,menu_.y+52,9) spr(49,menu_.x+85,menu_.y+52,9) spr(49,menu_.x+78,menu_.y+52,9) spr(49,menu_.x+99,menu_.y+52,9) spr(49,menu_.x+106,menu_.y+52,9) print("Full House ("..hand_poker["Full House"].c.."/"..hand_poker["Full House"].m..") #"..hand_poker["Full House"].lvl,menu_.x+2,menu_.y+64,4,true,1,true) spr(48,menu_.x+92+3,menu_.y+62,9) spr(48,menu_.x+85+3,menu_.y+62,9) spr(48,menu_.x+78+3,menu_.y+62,9) spr(50,menu_.x+99+3,menu_.y+62,9) spr(50,menu_.x+106+3,menu_.y+62,9) print("4 of Kind ("..hand_poker["4 of Kind"].c.."/"..hand_poker["4 of Kind"].m..") #"..hand_poker["4 of Kind"].lvl,menu_.x+2,menu_.y+74,4,true,1,true) spr(48,menu_.x+92+3,menu_.y+72,9) spr(48,menu_.x+85+3,menu_.y+72,9) spr(48,menu_.x+78+3,menu_.y+72,9) spr(48,menu_.x+99+3,menu_.y+72,9) print("St. Flush ("..hand_poker["St. Flush"].c.."/"..hand_poker["St. Flush"].m..") #"..hand_poker["St. Flush"].lvl,menu_.x+2,menu_.y+84,4,true,1,true) spr(98,menu_.x+92+3,menu_.y+82,9) spr(97,menu_.x+85+3,menu_.y+82,9) spr(96,menu_.x+78+3,menu_.y+82,9) spr(99,menu_.x+99+3,menu_.y+82,9) spr(100,menu_.x+106+3,menu_.y+82,9) print("Back",menu_.x+menu_.h//2-4-4,menu_.y+menu_.w-19/1.5,4) if ml and not mlt and hitbox(menu_.x+4,menu_.y+menu_.w-19,menu_.h-6,16) then sfx(7,"A-2",10,0,15) menu_.y = 145 run_info = false end end end function upd_fire_score() local tscore = current_chips * current_mult if tscore >= score and is_scoring then new_fire(1) new_fire(2) end end table_fire = {} function new_fire(pos_num) local pos_y = 0 local dx = 0 if pos_num == 1 then pos_y = 70 else pos_y = 93 end dx = rnd() <= 0.5 and -1 or 1 for i=1,2 do local new = { x=28+rnd(-19,33),dx=dx,y=pos_y+rnd(2),ty=rnd(1,5)/10, c=6,l=30+rnd(5),h=3,ang=0,tx=28+rnd(-5,5), } abb(table_fire,new) end end function upd_fire() for i=#table_fire,1,-1 do local f = table_fire[i] f.y = f.y - f.ty f.l = f.l - 1 f.ang = f.ang + 0.1 * f.dx f.x = lerp(f.x,f.tx,0.027) if f.l < 0 then del(table_fire,i) end end end function draw_fire() for i=#table_fire,1,-1 do local f = table_fire[i] rect_angle(f.x,f.y,f.h,f.h,f.ang,f.c) end end function upd_card_hand() end function draw_card_hand() end local card_lvl_y = 150 function upd_level_hand() if #cards_hand_level == 0 then card_lvl_y = 150 time_level_hand = 0 shop = true level_hand_ = false end for i=#cards_hand_level,1,-1 do local c = cards_hand_level[i] local r = i - (#cards_hand_level+1)/2 local life_wobble = sin(time()*0.003) * 0.1 local angle = (r / (max(1, #cards_hand_level) / 2)) * 0.1 + life_wobble local tx = 120 + (r*72) local ty = 98 card_lvl_y = lerp(card_lvl_y,ty,0.01) if ml and not mlt and hitbox_card(tx,card_lvl_y,mx,my,card_size) then level_hand(c.name) local v = { x=tx, y=ty, size=card_size } new_del_card(v) del(cards_hand_level,i) del_card_lvl_hand() end end if ml and not mlt and money >= 3 and hitbox(120-16,110,32,16) then money = money - 3 new_cards_hand_level() end end function del_card_lvl_hand() for i=#cards_hand_level,1,-1 do local r = i - (#cards_hand_level+1)/2 local v = { x=120 + (r*72), y=98, size=card_size } new_del_card(v) del(cards_hand_level,i) end end function draw_level_hand() rect_circ(120-16,112,32,16,5) rect_circ(120-16,110,32,16,4) print("Reroll\n $3",120-11,112,5,true,1,true) for i=#cards_hand_level,1,-1 do local c = cards_hand_level[i] local r = i - (#cards_hand_level+1)/2 local life_wobble = sin(time()*0.003) * 0.1 local angle = (r / (max(1, #cards_hand_level) / 2)) * 0.1 + life_wobble local tx = 120 + (r*72) local ty = 68 card_lvl_y = lerp(card_lvl_y,ty,0.03) card_shape(tx,card_lvl_y,angle,card_size,4,6) rect_circ(tx-25,card_lvl_y-card_size*2.5-1,50,20,6) rect_circ(tx-24,card_lvl_y-card_size*2.5+2,48,16,5) rect_circ(tx-24,card_lvl_y-card_size*2.5,48,16,4) print(" Level Up",tx-23,card_lvl_y-card_size*2.5+2,3,true,1,true) if c.name == "High Card" then spr(304,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-21,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "Pair" then spr(306,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-12,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "Two Pair" then spr(308,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-20,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "3 of Kind" then spr(314,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-22,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "4 of Kind" then spr(312,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-22,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "Straight" then spr(316,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-20,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "Flush" then spr(318,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-13,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "St. Flush" then spr(366,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-20,card_lvl_y-card_size*2.5+9,3,true,1,true) elseif c.name == "Full House" then spr(310,tx-card_size/2,card_lvl_y-card_size/1.5,9,1,0,0,2,3) print("'"..c.name.."'",tx-23,card_lvl_y-card_size*2.5+9,3,true,1,true) end end end vx = 0 vy = 0 _x = 0 _y = 0 function pixel_row() poke(0x03FF9,_x) poke(0x03FFA,_y) end function next_game() next_score = next_score *1.5 score = next_score HP_player = 100 init_game() all_card = false shop = false end function rnd_joker_shop() if #joker_shop > 0 then for i=#joker_shop,1,-1 do del(joker_shop,i) end end while #joker_shop < 2 do local r = table_joker[rnd(1,#table_joker)] local new = {name=r.name, x=r.x,size=r.size,tsize=r.tsize,y=r.y,tx=r.tx,ty=r.ty,vx=r.vx,last_x=r.last_x,ang=r.ang,tang=r.tang,spd=r.spd, step=r.step,card=r.card,v=r.v, id = r.id,text=r.text,couts=r.couts,color=r.color,bg_color=r.bg_color } abb(joker_shop,new) if #joker_shop == 2 then if joker_shop[1].name == joker_shop[2].name then del(joker_shop,2) end end end end indx_shop = -1 function upd_shop() local s = table_shop for i,c in pairs(joker_shop) do local cx = i *32 if ml and not mlt and #joker_cards < max_table_joker and hitbox(c.x-c.size/2-1,c.y+c.size,18,12) and money >= c.couts then sfx(7,"D-1",9,0,12) money = money - c.couts c.couts = c.couts // 2 abb(joker_cards,del(joker_shop,i)) end if hitbox_card(c.x,c.y,mx,my,c.size) then text_box_joker(c) end c.tx = s.x + 16 + cx c.x = lerp(c.x,c.tx,0.1) c.y = s.y + 32 rect_circ(c.x-c.size/2-2,c.y+c.size,20,14,1) rect_circ(c.x-c.size/2-1,c.y+c.size+1,18,12,5) rect_circ(c.x-c.size/2-1,c.y+c.size,18,12,4) local dx = c.couts >= 10 and 0 or 3 print("$"..c.couts,c.x-c.size/2+dx ,c.y+c.size+4,5) joker_draw(c) end end function draw_shop() local s = table_shop local e = {x=s.x+3,y=s.y+s.w-18,h=22,w=12,text="Rerol\n $3"} local n = {x=s.x+3,y=s.y+s.w-22-13,h=22,w=12,text="next"} s.x = lerp(s.x,s.tx,0.1) rect_circ(s.x-1,s.y-1,s.h+2,s.w+2,5) rect_circ(s.x,s.y,s.h,s.w,8) if hitbox(e.x,e.y,e.h,e.w) then if ml and not mlt and money >= 3 then sfx(1,"D-3",9,0,15) money = money - 3 rnd_joker_shop() end rect_circ(e.x-1,e.y-1,e.h+2,e.w+4,4) end rect_circ(e.x,e.y+2,e.h,e.w,7) rect_circ(e.x,e.y+1,e.h,e.w,7) rect_circ(e.x,e.y,e.h,e.w,6) print(e.text,e.x+2,e.y+1,5,true,1,true) if hitbox(n.x,n.y,n.h,n.w) then if ml and not mlt then sfx(2,"E-3",9,0,15) sfx(10,"B-3",29,0,15) s.exits = true end rect_circ(n.x-1,n.y-1,n.h+2,n.w+4,4) end rect_circ(n.x,n.y+2,n.h,n.w,7) rect_circ(n.x,n.y+1,n.h,n.w,7) rect_circ(n.x,n.y,n.h,n.w,6) print(n.text,n.x+4,n.y+3,5,true,1,true) if not s.exits then s.tx = 121 else s.tx = 250 if s.x >= 249 then next_game() --if #joker_shop ~= 0 then for i=#joker_shop,1,-1 do del(joker_shop,i) end end s.exits = false end end end function new_card_game() if #cards == 0 and #table_card == 0 then new_game = false if score > 1 then all_card = false end end if t%12 ==0 then sfx(8,"D-"..rnd(2,3),8,0,15) for i=#cards,1,-1 do local c = cards[i] new_del_card(c) abb(old_deck,del(cards,i)) break end for i=#table_card,1,-1 do local c = table_card[i] new_del_card(c) abb(old_deck,del(table_card,i)) break end end end table_del_card = {} function new_del_card(c) sfx(0,"D-4",16,0,15) for i=1,4 do local new = { x=c.x+rnd(-card_size/2,card_size/2),y=c.y+rnd(-card_size/2,card_size/2), l=45, vx=rnd(1,2)*((rnd(0,2)-1)^1), vy=rnd(3,6)*-1, size=card_size/1.5, color=c.color } abb(table_del_card,new) end end -- Updates and draws all particles function draw_del_card() for i=#table_del_card,1,-1 do local c = table_del_card[i] c.l=c.l-1 c.vy=min(c.vy+0.3,5) c.x=c.x+c.vx c.y=c.y+c.vy rect_angle(c.x,c.y,c.size/2,c.size/2,time()*0.005,4) rectb_angle(c.x,c.y,c.size/2,c.size/2,time()*0.005,c.color) if c.l < 0 then del(table_del_card,i) end end end function hitbox(x,y,h,w) return mx < x+h and mx > x and my < y+w and my > y end function play_hand() if card_playing_number == 0 or #table_card >= 1 then sfx(2,"E-2",9,0,15) return end sfx(2,"E-4",9,0,15) for i=#cards,1,-1 do local c = cards[i] if c.playing then abb(table_card,del(cards,i)) end end start_scoring() end discards_ = false function Ui() rect(0,0,70,136,2) rectb(0,0,70,136,1) if hitbox(4,105,29,14) and not game_next and (not oc_deck and not OPTIONS and not Settings and not Credits ) and not run_info then rect_circ(3,104,31,18,4) if ml and not mlt then play_hand() end end --sfx(2,"E-3",9,0,15) rect_circ(4,105+2,29,14,8) rect_circ(4,105+1,29,14,8) rect_circ(4,105,29,14,6) print("Play",11,109,4,true,1,true) if hitbox(40-3,105,29,14) and not game_next and (not oc_deck and not OPTIONS and not Settings and not Credits ) and not run_info then rect_circ(40-4,104,31,18,4) if ml and not mlt and not discards_ then discards_ = true discards_hp = discards_hp + rnd(1,3)end end if discards_ then discards_hand() end rect_circ(40-3,105+2,29,14,8) rect_circ(40-3,105+1,29,14,8) rect_circ(40-3,105,29,14,6) print("Discard",41-3,109,4,true,1,true) rect_circ(3,54,64,48,1) draw_fire() rect_circ(5,68+2,60,8,8) rect_circ(5,68+1,60,8,8) rect_circ(5,68,60,8,7) local hand_info = evaluate_hand(cards,true) local hand_table_card = evaluate_hand(table_card,true) if not is_scoring then print(hand_info.c or 0,7,69,4) else print(current_chips,7,69,4) end rect_circ(5,90+2,60,8,8) rect_circ(5,90+1,60,8,8) rect_circ(5,90,60,8,7) if not is_scoring then print(hand_info.m or 0,7,91,4) else print(current_mult,7,91,4) end spr(31,31,80,9) rect_circ(3,40,64,12,1) print("SCORE",4,33,4) --score = lerp(score, current_score, 0.1) print(floor(score),5,44,4) rect_circ(3,3,64,27,1) print(#joker_cards.."/"..max_table_joker,73,42,6,true,1,true) if not is_scoring then print(hand_info.name or "", 5, 58, 4) else print(hand_table_card.name, 5, 58, 4) end if not is_scoring then if hand_info.lvl then print("lvl."..hand_info.lvl , 5,81, 4,true,1,true) end else print("lvl."..hand_table_card.lvl, 5, 81, 4,true,1,true) end rect_circ(73,8,110,32,2) print(" : "..HP_player,4,123,4,true,1,true) spr(10,4,123,9) print("$"..money,4,129,4,true,1,true) rect_circ(40,7,24,21,8) rect_circ(40,6,24,21,6) if ml and not mlt and hitbox(40,6,24,21) and not game_next and ( not OPTIONS and not Settings and not Credits ) then run_info = true end print(" Run",43,9,4,true,1,true) print("Info",45,18,4,true,1,true) rect_circ(6,7,24,21,8) rect_circ(6,6,24,21,6) if ml and not mlt and hitbox(6,6,24,21) then OPTIONS = true end print("Option",7,13,4,true,1,true) update_score_anim() end function discards_hand() if card_playing_number == 0 then sfx(2,"D-2",9,0,15) discards_ = false return end if t%15 == 0 then for i=#cards,1,-1 do local c = cards[i] if c.playing then new_del_card(c) HP_player = HP_player - rnd(discards_hp-2,discards_hp) abb(old_deck,del(cards,i)) all_card = false break end end end end function hitbox_card(x,y,x1,y1,di) local dx, dy = x-x1, y-y1 return sqrt(dx*dx+dy*dy) <= di end card_playing_number = 0 function get_playing_card() local num = 0 for i=#cards,1,-1 do if cards[i].playing then num = num + 1 end end card_playing_number = num end indx_card, dist = -1, 0 function upd_cards() for i=#cards,1,-1 do local c = cards[i] local hovered = hitbox_card(c.x,c.y,mx,my,c.size) if ml and not mlt and indx_card == -1 and hovered then indx_card, dist = i, 0 break elseif ml and indx_card == i then dist = dist + abs(mx-last_mx) + abs(my-last_my) break elseif not ml and mlt and indx_card == i then if dist < 3 then if not (card_playing_number >= 5 and not c.playing) then if not c.playing then sfx(4,"C-3",8,0,8) else sfx(4,"F-3",5,0,8) end c.playing = not c.playing end end indx_card = -1 break end end last_mx, last_my = mx, my end function draw_table_card() local spacing = 140 / max(1, #table_card) for i,c in pairs(table_card) do local rel_card = i - (#table_card+1)/2 local life_wobble = sin(time() * 0.003 + c.spd) * 0.1 local breath = sin(time() * 0.003 + c.spd) * 2 c.tx, c.ty = table_x + (rel_card * spacing), table_y + breath c.vx = c.x - c.last_x c.tang = (rel_card / (max(1, #table_card) / 2)) * 0.1 + c.vx * 0.05 + life_wobble if c.step then c.tang = rnd(-1,1) c.tsize = c.tsize + rnd(-2,2) c.tsize = max(16,min(c.tsize,18)) else c.tsize = card_size end c.last_x = c.x c.x, c.y = lerp(c.x,c.tx,0.2), lerp(c.y,c.ty,0.2) c.size, c.ang = lerp(c.size,c.tsize,0.1), lerp(c.ang,c.tang,0.1) card_draw(c) end end function pos_card(spacing) if indx_card ~= -1 then local a = del(cards,indx_card) local new_pos = floor((mx-(handX-(#cards*spacing/2)))/spacing)+1 new_pos = max(1,min(#cards+1, new_pos)) abb(cards, new_pos, a) indx_card = new_pos end end function pos_joker(spacing) if indx_joker ~= -1 then local a = del(joker_cards,indx_joker) local new_pos = floor((mx-(jokerX-(#joker_cards*spacing/2)))/spacing)+1 new_pos = max(1,min(#joker_cards+1, new_pos)) abb(joker_cards, new_pos, a) indx_joker = new_pos end end joker_dist = 0 indx_joker = -1 function upd_joker() for i=#joker_cards,1,-1 do local c = joker_cards[i] local hovered = hitbox_card(c.x,c.y,mx,my,c.size) if ml and not mlt and indx_joker == -1 and hovered then indx_joker, joker_dist = i, 0 break elseif ml and indx_joker == i then joker_dist = joker_dist + abs(mx-last_mxj) + abs(my-last_myj) break elseif not ml and mlt and indx_joker == i then if joker_dist < 5 then if not (card_playing_number > 1 and not c.playing) then for i=#joker_cards,1,-1 do local c = joker_cards[i] c.playing = false end c.playing = not c.playing end end indx_joker = -1 break end end last_mxj, last_myj = mx, my end function draw_joker() local spacing = 100 / max(1, #joker_cards) pos_joker(spacing) for i,c in pairs(joker_cards) do local rel_card = i - (#joker_cards+1)/2 local life_wobble = sin(time() * 0.003 + c.spd) * 0.1 local breath = sin(time() * 0.003 + c.spd) * 2 if i == indx_joker then c.tx, c.ty, c.vx = mx, my, c.x - c.last_x c.tang = c.vx * 0.05 else c.tx = jokerX + (rel_card * spacing) c.ty = jokerY + breath c.vx = c.x - c.last_x c.tang = (rel_card / (max(1, #joker_cards) / 2)) * 0.1 + c.vx * 0.05 + life_wobble if c.step then if t%30 == 0 and c.card then c.step = false end c.tang = rnd(-2,2) c.tsize = c.tsize + rnd(-3,3) c.tsize = max(16,min(c.tsize,19)) else c.tsize = card_size end end if c.playing then c.ty = c.ty - 3 rect_circ(186,10,52,30,6) rect_circ(186,9,52,29,5) print(c.name,190,12,4,true,1,true) print("Click sell",193,20,4,true,1,true) print("$"..c.couts,208,28,4,true,1,true) if ml and mlt and hitbox(186,9,52,29) then money = money + c.couts new_del_card(c) del(joker_cards,i) end end c.last_x = c.x c.x, c.y = lerp(c.x,c.tx,indx_joker == i and 0.5 or 0.2), lerp(c.y,c.ty,indx_joker == i and 0.5 or 0.2) c.size, c.ang = lerp(c.size,c.tsize,0.1), lerp(c.ang,c.tang,0.1) if indx_joker ~= i then joker_draw(c) end end if indx_joker > 0 and indx_joker <= #joker_cards then joker_draw(joker_cards[indx_joker]) end end function draw_cards() local spacing = 140 / max(1, #cards) if dist > 3 then pos_card(spacing) end for i,c in pairs(cards) do local rel_card = i - (#cards+1)/2 local life_wobble = sin(time() * 0.003 + c.spd) * 0.1 local breath = sin(time() * 0.003 + c.spd) * 2 if i == indx_card then c.tx, c.ty, c.vx = mx, my, c.x - c.last_x c.tang = c.vx * 0.05 else c.tx = handX + (rel_card * spacing) c.ty = (c.playing and handY -10 or handY) + breath c.vx = c.x - c.last_x c.tang = (rel_card / (max(1, #cards) / 2)) * 0.1 + c.vx * 0.05 + life_wobble end c.last_x = c.x c.x, c.y = lerp(c.x,c.tx,indx_card == i and 0.5 or 0.2), lerp(c.y,c.ty,indx_card == i and 0.5 or 0.2) c.size, c.ang = lerp(c.size,c.tsize,0.1), lerp(c.ang,c.tang,0.1) if indx_card ~= i then card_draw(c) end end if indx_card > 0 and indx_card <= #cards then card_draw(cards[indx_card]) end end function text_card() for i=#cards,1,-1 do if indx_card == -1 and hitbox_card(cards[i].x,cards[i].y,mx,my,cards[i].size) then text_box(cards[i]) break --sfx(6,"F-3",8,0,15) end end end function text_joker() for i=#joker_cards,1,-1 do if indx_joker == -1 and hitbox_card(joker_cards[i].x,joker_cards[i].y,mx,my,joker_cards[i].size) then text_box_joker(joker_cards[i]) break end end end function text_box(c) local msgs, msg, h, w = suitName[c.suit], "Chips +", 48, 22 local x, y = c.x-48/2+3, c.y-c.size*3+4 rect_circ(x-1,y-1,h+2,w+2,4) rect_circ(x,y,h,w,2) rect_circ(c.x-#msg*2-4,c.y-c.size*2,42,8,5) rect_circ(c.x-#msg*2-4,c.y-c.size*2-1,42,8,4) print(msgs,c.x-#msgs*1.5,c.y-c.size*2.5-1,4,true,1,true) print(msg..chips_table[c.val],c.x-#msg*2,c.y-c.size*2,2,true,1,true) end function text_box_joker(c) local msgs, msg, h, w = c.name, c.text, 82, 34 local x, y = c.x-h/2+3, c.y+c.size*1.5+4 local spacing = 160 / max(1, #msg) rect_circ(x-1,y-1,h+2,w+2,4) rect_circ(x,y,h,w,2) rect_circ(c.x-h/2+4,c.y+w*3/2-10+1,h-2,w/2+1,5) rect_circ(c.x-h/2+4,c.y+w*3/2-10,h-2,w/2+1,4) print(msgs,c.x-#msgs*2.3,c.y+w-2,4,true,1,false) if c.name == "Xeon" then print(msg..rnd(30),c.x-h/2+5,c.y+w+8,2,true,1,true) elseif c.name == "JAX" then print(msg..suitName[old_suit],c.x-h/2+5,c.y+w+8,2,true,1,true) else print(msg,c.x-h/2+5,c.y+w+8,2,true,1,true) end end function card_draw(c) local dx = c.x > 180 and 2 or (c.x > 120 and 1 or (c.x > 60 and -1 or -2)) card_shape(c.x-dx,c.y+1,c.ang,c.size,8,8) card_shape(c.x,c.y,c.ang,c.size,4,5) print(c.val,c.val == "10" and c.x-9 or c.x-7 ,c.y-9,c.color) local spr_id = c.suit == "H" and 60 or (c.suit == "D" and 62 or (c.suit == "S" and 56 or 58)) spr(spr_id,c.x-7,c.y-4,9,1,0,0,2,2) end function joker_draw(c) local drnd = 0 local g = false local time_g = 5 if c.name == "Xeon" then g = true time_g = 30 end if t%time_g//8 ==0 and g then drnd = rnd(-2,2) end local dx = c.x > 180 and 2 or (c.x > 120 and 1 or (c.x > 60 and -1 or -2)) card_shape(c.x-dx+drnd,c.y+1+drnd,c.ang,c.size+drnd/2,8,8) card_shape(c.x+drnd,c.y+drnd,c.ang,c.size+drnd/2,c.color,c.bg_color) spr(c.id,c.x-c.size/2.5+drnd/2,c.y-c.size/1.5+drnd/2,9,1,0,0,2,3) if c.name == "Jolly" then spr(405,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Zany" then spr(407,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Mad" then spr(403,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Crazy" then spr(409,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Droll" then spr(411,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Sly" then spr(405,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Wily" then spr(407,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Clever" then spr(403,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Devious" then spr(409,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) elseif c.name == "Crafty" then spr(411,c.x-c.size/2.5,c.y+c.size/1.5-1,9,1,0,0,2,1) end if t%time_g > time_g/1.8 and g then rect(c.x+rnd(-12,12),c.y+rnd(-16,12),rnd(5,8),rnd(5,8),5) rect(c.x+rnd(-12,12),c.y+rnd(-16,12),rnd(5,8),rnd(5,8),6) rect(c.x+rnd(-12,12),c.y+rnd(-16,12),rnd(5,8),rnd(5,8),7) rect(c.x+rnd(-12,12),c.y+rnd(-16,12),rnd(5,8),rnd(5,8),8) end end function lerp(a, b, ti) local v = a + (b-a)*ti return abs(v-b) < 0.5 and b or v end function card_shape(x, y, angle, size, color, edgeColor) local w, h = size * 0.7, size + 0.5 local function getPos(ox, oy) local rx = ox * cos(angle) - oy * sin(angle) local ry = ox * sin(angle) + oy * cos(angle) return x + rx, y + ry end local x1, y1 = getPos(-w, -h) local x2, y2 = getPos(w, -h) local x3, y3 = getPos(w, h) local x4, y4 = getPos(-w, h) tri(x1, y1, x2, y2, x3, y3, color) tri(x1, y1, x3, y3, x4, y4, color) line(x1, y1, x2, y2, edgeColor) line(x2, y2, x3, y3, edgeColor) line(x3, y3, x4, y4, edgeColor) line(x4, y4, x1, y1, edgeColor) end function rect_angle(x,y,h,w,ang,cl) local cx = x local cy = y local c = cos(ang) local si = sin(ang) local x1 = cx + (-h*c - -h*si) local y1 = cy + (-w*si + -w*c) local x2 = cx + ( h*c - -h*si) local y2 = cy + ( w*si + -w*c) local x3 = cx + ( h*c - h*si) local y3 = cy + ( w*si + w*c) local x4 = cx + ( -h*c - h*si) local y4 = cy + ( -w*si + w*c) tri(x1,y1,x2,y2,x3,y3,cl) tri(x2,y2,x3,y3,x4,y4,cl) tri(x3,y3,x4,y4,x1,y1,cl) tri(x4,y4,x1,y1,x2,y2,cl) end function rectb_angle(x,y,h,w,ang,cl) local cx = x local cy = y local c = cos(ang) local si = sin(ang) local x1 = cx + (-h*c - -h*si) local y1 = cy + (-w*si + -w*c) local x2 = cx + ( h*c - -h*si) local y2 = cy + ( w*si + -w*c) local x3 = cx + ( h*c - h*si) local y3 = cy + ( w*si + w*c) local x4 = cx + ( -h*c - h*si) local y4 = cy + ( -w*si + w*c) line(x1,y1,x2,y2,cl) line(x2,y2,x3,y3,cl) line(x3,y3,x4,y4,cl) line(x4,y4,x1,y1,cl) end