@@ -43,26 +43,7 @@ public function movementConjure(Character $character): void
4343 $ x = $ this ->getXPosition ();
4444 $ y = $ this ->getYPosition ();
4545
46- if ($ this ->isEventWithCelestialsRunning ()) {
47-
48- $ currentDate = now ();
49-
50- $ eventsRunning = Event::where ('started_at ' , '<= ' , $ currentDate )->where ('ends_at ' , '>= ' , $ currentDate )->get ();
51-
52- foreach ($ eventsRunning as $ event ) {
53- if ($ this ->isCelestialFromEventMap ($ event , $ monster )) {
54-
55- $ x = $ this ->getXPosition ();
56- $ y = $ this ->getYPosition ();
57-
58- $ monster = $ this ->createCelestialRecord ($ x , $ y , [
59- $ monster ->gameMap ->name ,
60- ]);
61- }
62- }
63- } else {
64- $ monster = $ this ->createCelestialRecord ($ x , $ y , [MapNameValue::DELUSIONAL_MEMORIES , MapNameValue::ICE_PLANE ]);
65- }
46+ $ monster = $ this ->createCelestialRecord ($ x , $ y , [MapNameValue::ICE_PLANE ]);
6647
6748 $ types = ['has awoken ' , 'has angered ' , 'has enraged ' , 'has set free ' , 'has set loose ' ];
6849 $ randomIndex = rand (0 , count ($ types ) - 1 );
@@ -219,10 +200,10 @@ private function isCelestialFromEventMap(Event $event, Monster $monster): bool
219200 return $ monsterGameMapId === $ gameMapId ;
220201 }
221202
222- private function createCelestialRecord (int $ x , int $ y , array $ additionalInvalidMaps = []): Monster
203+ private function createCelestialRecord (int $ x , int $ y , array $ invalidMapNames = []): Monster
223204 {
224205
225- $ invalidMaps = GameMap::whereIn ('name ' , array_merge ([MapNameValue:: PURGATORY , MapNameValue:: HELL ], $ additionalInvalidMaps ) )->pluck ('id ' )->toArray ();
206+ $ invalidMaps = GameMap::whereIn ('name ' , $ invalidMapNames )->pluck ('id ' )->toArray ();
226207
227208 $ monster = Monster::where ('is_celestial_entity ' , true )
228209 ->whereNotIn ('game_map_id ' , $ invalidMaps )
0 commit comments