Skip to content

Commit 604eac4

Browse files
committed
Fixes
1 parent a7d6766 commit 604eac4

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

app/Flare/Services/DwelveMonsterService.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ class DwelveMonsterService {
1515
'chr',
1616
'int',
1717
'ac',
18+
'spell_damage',
19+
'max_affix_damage',
1820
];
1921

2022
const PERCENTAGE_STATS = [
2123
'spell_evasion',
2224
'affix_resistance',
23-
'healing_percentage',
25+
'max_healing',
2426
'entrancing_chance',
2527
'devouring_light_chance',
2628
'devouring_darkness_chance',
2729
'accuracy',
2830
'casting_accuracy',
2931
'dodge',
3032
'criticality',
33+
'ambush_chance',
34+
'counter_chance',
35+
'counter_resistance_chance',
36+
'ambush_resistance_chance',
37+
'increases_damage_by',
38+
'life_stealing_resistance'
3139
];
3240

3341
public function createMonster(array $monster, Character $character): array {
@@ -53,6 +61,12 @@ public function createMonster(array $monster, Character $character): array {
5361

5462
$monster = $this->increaseMonsterStats($monster, $monsterDamageStat);
5563

64+
$monster["elemental_atonement"] =[
65+
"fire" => 0,
66+
"ice" => 0,
67+
"water" => 0,
68+
];
69+
5670
return $this->increasePercentageAttributes($monster, $increaseAmount);
5771
}
5872

app/Game/Exploration/Jobs/DwelveExploration.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ public function handle(
118118
'increase_enemy_strength' => $dwelveAutomation->increase_enemy_strength + 0.0625
119119
]);
120120

121+
$this->updateMonsterForNextFight($dwelveAutomation);
122+
121123
DwelveExploration::dispatch($this->character, $this->automationId, $this->dwelveAutomationId, $this->attackType, $this->timeDelay)->delay(now()->addMinutes($this->timeDelay))->onQueue('default_long');
122124

123125
return;
@@ -154,6 +156,20 @@ public function handle(
154156
event(new ExplorationTimeOut($this->character->user, 0));
155157
}
156158

159+
private function updateMonsterForNextFight(DwelveExplorationModel $dwelveExploration): void {
160+
$monsterId = Monster::where('is_celestial_entity', false)
161+
->where('is_raid_monster', false)
162+
->where('is_raid_boss', false)
163+
->where('game_map_id', $dwelveExploration->character->map->game_map_id)
164+
->inRandomOrder()
165+
->first()
166+
->id;
167+
168+
$this->updateDwelveAutomation($dwelveExploration, [
169+
'monster_id' => $monsterId
170+
]);
171+
}
172+
157173
private function updateDwelveAutomation(DwelveExplorationModel $dwelveExploration, array $data): void {
158174
$dwelveExploration->update($data);
159175
}

app/Game/Exploration/Services/DwelveExplorationAutomationService.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ public function __construct(
2727
public function beginAutomation(Character $character, array $params)
2828
{
2929

30-
$monsterId = Monster::where('game_map_id', $character->map->game_map_id)->inRandomOrder()->first()->id;
30+
$monsterId = Monster::where('is_celestial_entity', false)
31+
->where('is_raid_monster', false)
32+
->where('is_raid_boss', false)
33+
->where('game_map_id', $character->map->game_map_id)
34+
->inRandomOrder()
35+
->first()
36+
->id;
3137

3238
$automation = CharacterAutomation::create([
3339
'character_id' => $character->id,

0 commit comments

Comments
 (0)