From 01bcc2d23194af037846049e92c5dec3a8582af5 Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Wed, 28 Sep 2022 23:08:59 -0300
Subject: Optimize a bit the boss raid formula so they show up less often for
 weak mob

---
 npc/functions/aurora.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index 58f7ee551..42a5af266 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -386,7 +386,7 @@ function	script	FYE_Expo	{
 
 // Configure Dream Tower
 function	script	FYEConf_Tower	{
-    $DREAMTOWER_SAGE$=any("Jaxad", "Mr. Saves", "Tux", "Freeyorp", "Cassy", "Crush", "Rotonen", "Kage", "Bjorn", "The Elven Sage", "Hocus Pocus the Fidibus");
+    $DREAMTOWER_SAGE$=any("Jaxad", "Mr. Saves", "Tux", "Freeyorp", "Cassy", "Crush", "Rotonen", "Kage", "Bjorn", "The Elven Sage", "Hocus Pocus the Fidibus", "Elli");
     // Bertram? (https://forums.themanaworld.org/viewtopic.php?p=105296#p105296)
     setarray $FYREWARD_PT, 1, 4, 7, 10, 15,
                            22, 30, 45, 60, 75,
@@ -448,9 +448,13 @@ function	script	FYE_Raid	{
     // Actually - ignore system or auto-generated entities
     if (.@mob > 1490)
         return;
+    .@lv=getmonsterinfo(.@mob, MOB_LV);
     // Chance goes from 10% to 1%
     // Defeating the boss lowers the chance in 0.1%
     if (rand2(1000) > max(100-FYRAID_LV, 10)) return;
+    // Low level mobs may, at their level rate, abort
+    // So a lv 100 mob has 1%, a lv 1 mob has 50%, etc.
+    if (!rand2(.@lv)) return;
 
     /* A boss was found, update data */
     .@id = array_find($FYRAID_OWNER, getcharid(3));
-- 
cgit v1.2.3-70-g09d2