map 11 collides

This commit is contained in:
Baptiste 2023-12-26 22:10:35 +01:00
parent c900c18cbc
commit 990d88af67
2 changed files with 6 additions and 4 deletions

View file

@ -48,7 +48,8 @@ let portals = [new Portal(250,457,0,516,789,1),//O
new Portal(209,731,8,235,182,8), //troll map8
new Portal(209,110,8,235,730,8), //troll map8
new Portal(500,340,9,58,269,10), //out map 9 (vers suite du donjon)
new Portal(786,254,10,1089,227,0) //sortie vers la map 0
new Portal(786,254,10,276,860,11), //sortie vers la map 0
new Portal(260,399,11,1089,227,0) //sortie vers la map 0
];
let map0Squares = [new Square(1064,371,0,126,125),new Square(1160,113,0,143,126),new Square(1017,113,0,146,80),new Square(1018,192,0,10,47),new Square(1028,227,0,45,12),new Square(1101,227,0,66,12),new Square(791,113,0,176,126),new Square(522,129,0,103,13),new Square(654,128,0,104,15),new Square(747,144,0,12,34),new Square(748,194,0,10,44),new Square(655,224,0,101,15),new Square(520,227,0,106,13),new Square(522,195,0,11,39),new Square(522,131,0,8,46),new Square(588,154,0,10,22),new Square(651,153,0,10,21),new Square(698,188,0,12,19),new Square(697,373,0,318,124),new Square(697,497,0,158,112),new Square(1001,629,0,188,155),new Square(696,626,0,159,158),new Square(281,627,0,173,156),new Square(168,243,0,61,250),new Square(229,259,0,87,218),new Square(311,242,0,62,254),new Square(296,112,0,79,95),new Square(2,0,0,1350,14),new Square(1337,2,0,130,927),new Square(119,909,0,1250,17),new Square(4,1,0,129,923),new Square(543,156,0,16,18),new Square(559,207,0,16,17),new Square(598,179,0,17,29),new Square(721,157,0,13,17),new Square(673,205,0,14,17)];
@ -62,6 +63,7 @@ let map7Squares = [new Square(865,306,7,5,356),new Square(289,60,7,667,32),new S
let map8Squares = [new Square(180,739,8,245,12),new Square(328,508,8,9,232),new Square(325,126,8,11,238),new Square(1118,176,8,17,588),new Square(1099,117,8,45,62),new Square(1000,115,8,101,24),new Square(995,106,8,27,41),new Square(1060,113,8,28,35),new Square(989,91,8,12,32),new Square(1002,85,8,0,0),new Square(1002,85,8,0,0),new Square(1002,85,8,0,0),new Square(756,75,8,268,25),new Square(661,71,8,92,77),new Square(405,68,8,260,32),new Square(395,72,8,37,52),new Square(400,111,8,26,35),new Square(325,106,8,77,29),new Square(328,109,8,29,37),new Square(180,108,8,167,26),new Square(1123,727,8,5,37),new Square(1101,694,8,43,80),new Square(1058,725,8,31,33),new Square(1082,735,8,41,16),new Square(995,727,8,29,44),new Square(1000,736,8,62,27),new Square(986,750,8,26,31),new Square(762,771,8,276,30),new Square(664,725,8,23,28),new Square(680,735,8,64,19),new Square(734,726,8,19,77),new Square(424,769,8,260,27),new Square(401,726,8,24,31),new Square(407,750,8,22,39),new Square(335,728,8,21,11),new Square(371,573,8,286,28),new Square(755,574,8,289,28),new Square(756,655,8,288,28),new Square(373,656,8,284,25),new Square(373,187,8,283,29),new Square(757,187,8,287,28),new Square(756,269,8,288,29),new Square(372,269,8,287,28),new Square(388,179,8,254,46),new Square(770,176,8,261,51),new Square(773,260,8,257,48),new Square(388,259,8,256,50),new Square(386,565,8,258,47),new Square(387,641,8,255,49),new Square(660,745,8,20,46),new Square(772,561,8,253,49),new Square(774,643,8,255,50),new Square(272,158,8,28,169),new Square(270,541,8,29,173),new Square(244,675,8,31,17),new Square(243,617,8,33,18),new Square(246,559,8,30,20),new Square(246,174,8,33,21),new Square(244,231,8,32,21),new Square(244,281,8,32,25),new Square(145,694,8,35,75),new Square(144,91,8,37,84),new Square(132,169,8,25,561),new Square(153,323,8,14,221)]
let map9Squares = [new Square(1,2,9,15,429),new Square(55,179,9,16,303),new Square(2,469,9,67,14),new Square(13,424,9,46,5),new Square(55,110,9,15,31),new Square(71,69,9,0,0),new Square(57,1,9,14,68),new Square(15,0,9,883,14),new Square(885,1,9,15,823),new Square(863,810,9,36,15),new Square(808,755,9,21,70),new Square(629,755,9,268,17),new Square(702,702,9,16,57),new Square(704,810,9,71,16),new Square(704,816,9,12,71),new Square(709,864,9,190,32),new Square(1,880,9,711,16),new Square(164,829,9,31,53),new Square(182,809,9,15,72),new Square(628,756,9,37,87),new Square(0,471,9,16,418),new Square(468,7,9,16,61),new Square(468,53,9,68,16),new Square(522,52,9,16,189),new Square(449,234,9,0,0),new Square(450,232,9,216,19),new Square(577,158,9,15,75),new Square(576,53,9,15,72),new Square(577,52,9,195,17),new Square(813,10,9,13,105),new Square(813,74,9,32,51),new Square(108,52,9,324,18),new Square(415,61,9,15,53),new Square(397,107,9,87,17),new Square(468,107,9,17,63),new Square(450,163,9,34,15),new Square(397,161,9,15,132),new Square(402,178,9,65,18),new Square(162,108,9,195,16),new Square(343,116,9,16,133),new Square(108,56,9,15,192),new Square(110,234,9,87,16),new Square(165,181,9,14,53),new Square(164,180,9,106,16),new Square(254,160,9,16,36),new Square(181,162,9,33,19),new Square(52,521,9,199,17),new Square(217,504,9,34,34),new Square(216,360,9,17,160),new Square(232,341,9,18,87),new Square(578,111,9,85,14),new Square(703,109,9,14,31),new Square(703,109,9,68,13),new Square(755,63,9,18,131),new Square(756,177,9,63,18),new Square(812,160,9,34,33),new Square(810,186,9,15,51),new Square(758,234,9,85,16),new Square(758,244,9,14,175),new Square(630,118,9,14,77),new Square(631,181,9,89,13),new Square(639,163,9,25,22),new Square(702,191,9,15,110),new Square(340,289,9,377,12),new Square(576,298,9,14,122),new Square(632,343,9,31,30),new Square(661,342,9,56,14),new Square(703,342,9,14,34),new Square(703,412,9,139,17),new Square(812,394,9,31,31),new Square(829,396,9,13,320),new Square(758,702,9,83,15),new Square(757,632,9,13,75),new Square(757,577,9,75,13),new Square(810,584,9,25,61),new Square(648,648,9,112,14),new Square(648,648,9,15,67),new Square(525,703,9,139,14),new Square(632,666,9,21,40),new Square(704,520,9,12,130),new Square(705,520,9,86,17),new Square(654,468,9,118,15),new Square(648,369,9,15,167),new Square(812,289,9,12,61),new Square(811,342,9,36,16),new Square(813,287,9,76,15),new Square(52,521,9,19,53),new Square(111,579,9,13,83),new Square(111,576,9,83,14),new Square(182,585,9,11,24),new Square(118,587,9,22,20),new Square(54,648,9,69,15),new Square(53,647,9,17,120),new Square(10,757,9,60,15),new Square(110,288,9,14,233),new Square(162,294,9,17,189),new Square(112,287,9,135,16),new Square(236,235,9,13,64),new Square(237,233,9,121,16),new Square(290,244,9,14,119),new Square(290,357,9,119,22),new Square(345,342,9,64,33),new Square(397,342,9,14,130),new Square(451,413,9,200,15),new Square(290,415,9,15,110),new Square(290,414,9,69,16),new Square(290,523,9,242,15),new Square(344,468,9,266,16),new Square(524,482,9,14,114),new Square(524,595,9,67,15),new Square(577,595,9,14,68),new Square(526,651,9,12,66),new Square(472,651,9,66,12),new Square(472,577,9,11,86),new Square(416,577,9,67,33),new Square(414,577,9,14,139),new Square(416,704,9,68,14),new Square(470,704,9,14,85),new Square(524,756,9,15,77),new Square(577,711,9,16,131),new Square(234,826,9,358,20),new Square(235,811,9,86,18),new Square(234,721,9,18,118),new Square(289,758,9,14,55),new Square(294,758,9,31,13),new Square(109,755,9,131,17),new Square(219,702,9,15,54),new Square(107,700,9,71,17),new Square(162,648,9,14,55),new Square(162,649,9,90,15),new Square(236,579,9,16,85),new Square(290,578,9,15,31),new Square(245,594,9,60,15),new Square(126,716,9,17,39),new Square(107,757,9,18,89),new Square(55,830,9,70,16),new Square(74,809,9,40,25),new Square(291,650,9,14,66),new Square(290,702,9,63,16),new Square(363,773,9,68,16),new Square(414,757,9,16,16),new Square(362,668,9,14,120),new Square(343,535,9,21,182),new Square(359,533,9,18,78),new Square(579,522,9,13,31),new Square(588,522,9,74,14),new Square(631,533,9,15,74),new Square(632,576,9,34,32),new Square(894,822,9,5,44)]
let map10Squares = [new Square(0,0,10,32,560),new Square(30,0,10,76,70),new Square(105,0,10,705,33),new Square(2,493,10,104,69),new Square(103,528,10,706,32),new Square(212,492,10,69,36),new Square(353,492,10,77,44),new Square(421,457,10,37,72),new Square(69,315,10,37,143),new Square(71,104,10,33,142),new Square(599,29,10,35,25),new Square(352,26,10,105,43),new Square(211,28,10,70,42),new Square(422,29,10,35,76),new Square(455,105,10,37,35),new Square(527,106,10,103,34),new Square(599,86,10,36,90),new Square(563,136,10,71,41),new Square(775,31,10,35,119),new Square(740,100,10,70,110),new Square(740,206,10,34,40),new Square(740,316,10,34,46),new Square(740,352,10,70,108),new Square(776,458,10,32,72),new Square(456,422,10,37,36),new Square(528,421,10,79,37),new Square(598,388,10,36,87),new Square(563,387,10,70,36),new Square(598,509,10,35,21),new Square(806,206,10,4,148)]
let map11Squares = [new Square(445,1,11,118,143),new Square(0,2,11,116,141),new Square(112,1,11,342,90),new Square(1,910,11,562,75),new Square(461,627,11,103,355),new Square(0,624,11,104,304),new Square(0,136,11,5,488),new Square(558,138,11,6,493)]
let map4Circles = [new Circle(1057.96875,16,4,61.07372593840988),new Circle(962.96875,54,4,14.866068747318506),new Circle(404.96875,132,4,22.02271554554524),new Circle(184.96875,69,4,20.024984394500787),new Circle(59.96875,67,4,20),new Circle(882.96875,133,4,14.142135623730951),new Circle(890.96875,249,4,17.029386365926403)]
@ -70,7 +72,7 @@ let map6Circles = [new Circle(599.96875,330,6,13.892443989449804),new Circle(366
let map7Circles = [new Circle(829.96875,545,7,17.204650534085253),new Circle(253.96875,491,7,25.079872407968907),new Circle(256.96875,227,7,22),new Circle(686.96875,541,7,19.026297590440446),new Circle(540.96875,181,7,18.110770276274835),new Circle(395.96875,180,7,19),new Circle(251.96875,178,7,21.37755832643195),new Circle(251.96875,542,7,20),new Circle(395.96875,542,7,20.223748416156685),new Circle(541.96875,543,7,18.027756377319946),new Circle(686.96875,182,7,17.029386365926403),new Circle(827.96875,183,7,19),new Circle(75.96875,233,7,23.08679276123039),new Circle(91.96875,171,7,27.80287754891569),new Circle(127.96875,131,7,19.1049731745428),new Circle(168.96875,86,7,20.591260281974),new Circle(74.96875,494,7,21.18962010041709),new Circle(93.96875,551,7,21.095023109728988),new Circle(127.96875,603,7,17.804493814764857),new Circle(175.96875,647,7,17.69180601295413),new Circle(53.96875,353,7,52.773099207835045),new Circle(70.96875,191,7,29.68164415931166),new Circle(92.96875,125,7,37.48332962798263),new Circle(128.96875,81,7,38.8329756778952),new Circle(177.96875,45,7,41.182520563948),new Circle(59.96875,531,7,34.92849839314596),new Circle(89.96875,595,7,36.40054944640259),new Circle(128.96875,649,7,39.6232255123179),new Circle(190.96875,668,7,21.470910553583888)]
let map8Circles = [new Circle(746,80.79999923706055,8,31.304951684997057),new Circle(740,789.2000045776367,8,32.64965543462902),new Circle(158,176.79999923706055,8,18.439088914585774),new Circle(157,257.79999923706055,8,16.0312195418814),new Circle(160,341.79999923706055,8,16.0312195418814),new Circle(160,531.2000045776367,8,14.035668847618199),new Circle(150,615.2000045776367,8,26.076809620810597),new Circle(152,701.2000045776367,8,26.1725046566048),new Circle(505,767.2000045776367,8,7.0710678118654755),new Circle(587,765.2000045776367,8,5),new Circle(831,772.2000045776367,8,11),new Circle(916,772.2000045776367,8,8.246211251235321),new Circle(503,100.79999923706055,8,10),new Circle(585,98.79999923706055,8,12.041594578792296),new Circle(830,96.79999923706055,8,13),new Circle(920,95.79999923706055,8,16.76305461424021),new Circle(445,365.79999923706055,8,15.033296378372908),new Circle(587,366.79999923706055,8,12.041594578792296),new Circle(447,503.79999923706055,8,14.035668847618199),new Circle(587,505.79999923706055,8,12),new Circle(830,366.79999923706055,8,12),new Circle(970,366.79999923706055,8,15.620499351813308),new Circle(969,506.79999923706055,8,14.422205101855956),new Circle(836,506.79999923706055,8,15.231546211727817),new Circle(984,361.79999923706055,8,12),new Circle(985,506.79999923706055,8,12.165525060596439),new Circle(840,363.79999923706055,8,13),new Circle(1120,196.79999923706055,8,13),new Circle(1114,270.79999923706055,8,10),new Circle(1116,346.79999923706055,8,12),new Circle(1118,526.2000045776367,8,13.038404810405298),new Circle(1120,602.2000045776367,8,13.038404810405298),new Circle(1115,680.2000045776367,8,10)]
let map10Circles = [new Circle(448,448,10,10),new Circle(436,458,10,9),new Circle(459,440,10,12),new Circle(446,113,10,11),new Circle(436,99,10,13),new Circle(457,121,10,11),new Circle(316,174,10,20),new Circle(316,386,10,20),new Circle(475,228,10,10),new Circle(687,156,10,10),new Circle(686,403,10,11),new Circle(686,333,10,9),new Circle(687,228,10,10),new Circle(582,228,10,10),new Circle(581,333,10,11),new Circle(474,334,10,10)]
let map11Circles = [new Circle(211,881,11,10),new Circle(355,882,11,9),new Circle(105,339,11,13),new Circle(458,337,11,14),new Circle(459,505,11,14),new Circle(104,505,11,16),new Circle(282,240,11,19),new Circle(282,211,11,17),new Circle(329,531,11,7),new Circle(236,531,11,5),new Circle(236,623,11,5),new Circle(327,624,11,7),new Circle(235,718,11,6),new Circle(329,718,11,7),new Circle(326,810,11,6),new Circle(235,811,11,7)]
let maps = [new Game_Map(portals.slice(0,8),0,map0Squares,[]),
@ -84,7 +86,7 @@ let maps = [new Game_Map(portals.slice(0,8),0,map0Squares,[]),
new Game_Map(portals.slice(16,19),8,map8Squares,map8Circles),
new Game_Map(portals.slice(19,20),9,map9Squares,[]),
new Game_Map(portals.slice(20,21),10,map10Squares,map10Circles),
new Game_Map([],11,[],[])];
new Game_Map([],11,map11Squares,map11Circles)];
players.push(new Player(-1,-50,-50,-1,"VOITURES",0));

View file

@ -2,7 +2,7 @@ var ctx = document.getElementById("canvas").getContext("2d");
var cv = document.getElementById("canvas");
const fond = new Image();
fond.src = "../../public_html/assets/map/laby.jpg";
fond.src = "../../public_html/assets/map/map11.jpg";
var mapWidth = fond.width
var mapHeith = fond.height
ctx.canvas.width = mapWidth