From cc1bec4e1559fdebd385f668f893cd062a8ac8b8 Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Sun, 31 Mar 2019 12:30:32 -0300
Subject: Every 5 Crazyfefe rounds make monsters stronger. Prevents excessive
 difficulty trimming when total difficulty >= 250.

---
 npc/006-1/crazyfefe.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'npc')

diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt
index 5f32f7e71..aac877ccd 100644
--- a/npc/006-1/crazyfefe.txt
+++ b/npc/006-1/crazyfefe.txt
@@ -6,7 +6,7 @@
 //    Crazyfefe will wake up when he smells battle
 // Variables:
 //      $@FEFE_CAVE_LEVEL
-//          Tracks if a fight is going on, and the current round if true.
+//          Tracks if a fight is going on, and the magic number to determine how many mobs show up.
 //      $@FEFE_DELAY
 //          Tracks the delay between challenges. Also used to start the combat. Set it to zero so you can start fight at once.
 //      $@FEFE_CAVE_HERO$
@@ -84,7 +84,7 @@ L_StartFight:
 L_Enjoy:
     npctalk3 l("Pay attention to the fight, @@!", strcharinfo(0));
     if (is_gm())
-        dispbottom l("Round @@", $@FEFE_CAVE_LEVEL);
+        dispbottom l("Round @@", $@FEFE_WAVE);
     end;
 
 L_NotEnough:
@@ -168,8 +168,9 @@ L_NextRound:
     .wtime=0;
     $@FEFE_WAVE = $@FEFE_WAVE + 1;
     // Prepare next round, and reward survivors
-    $@FEFE_CAVE_LEVEL = $@FEFE_CAVE_LEVEL + $@FEFE_CAVE_PLAYER_COUNT + rand(1,3) + $@FEFE_WAVE;
+    $@FEFE_CAVE_LEVEL = $@FEFE_CAVE_LEVEL + $@FEFE_CAVE_PLAYER_COUNT + rand(1,3) + ($@FEFE_WAVE*3);
     $@FEFE_DIFFICULTY+=$@FEFE_CAVE_PLAYER_COUNT+$@FEFE_WAVE*6;
+    $@FEFE_DIFFICULTY+=(($@FEFE_WAVE/5)*10);
     areatimer "006-1", 20, 20, 70, 60, 10, "Crazyfefe::OnReward";
 
     mapannounce "006-1", "The wave nÂș "+$@FEFE_WAVE+" is starting with " + $@FEFE_CAVE_PLAYER_COUNT + " player(s) left alive." , 0;
@@ -228,7 +229,8 @@ L_Summon:
         }
         areamonster "006-1", 20, 20, 70, 60, strmobinfo(1, .@monsterId), .@monsterId, 1, "Crazyfefe::OnPetDeath";
         // We must lower difficulty according to summoned monster. Only 60% is lowered.
-        $@FEFE_DIFFICULTY=$@FEFE_DIFFICULTY-max(1, .@lv*6);
+        // If total level exceeds 250, it will cap at that to prevent excessive "slooping"
+        $@FEFE_DIFFICULTY=$@FEFE_DIFFICULTY-max(1, min(25, .@lv)*6);
     }
     freeloop(false);
     initnpctimer;
-- 
cgit v1.2.3-70-g09d2