From 59bc3ad02cb1d16308cd498150e474c8f08e9fc0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 20 Jun 2022 13:11:08 -0300 Subject: Treasure Chest bonuses are now stronger to put you out of commons. The bonus is also stronger to make it rare but not so much. The bonus is weaker if you got a SR, URs will remain ultra rare. For the record, the rare extra bonus stops at 300 instead of 200 becuase SR/UR tier gives only 67%, this normalization ensures the first part of the formula won't give you an "undue" bonus over SR/UR formula --- npc/functions/treasure.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt index d55caedc8..c6d9a70d5 100644 --- a/npc/functions/treasure.txt +++ b/npc/functions/treasure.txt @@ -31,7 +31,12 @@ function script TreasureBox { .@t=TREASURE_OPEN; .@r=rand(0,10000)-(readparam2(bLuk)*2); // Some chests may have different rates - .@r-=getarg(0, 0); + if (.@r > 1600) // UC and C (100 ~ 150% bonus) + .@r-=getarg(0, 0)+min((.@r-1600), getarg(0, 0)/2); + else if (.@r > 200) // Rare (100 ~ 120% bonus) + .@r-=getarg(0, 0)+min((.@r-300), getarg(0, 0)/5); // 300 to normalize + else if (.@r <= 200) // SR and UR (67% Bonus) + .@r-=getarg(0, 0)*2/3; // Select treasure list // You're warranted an ultra rare (0.1%) every 149 open chests -- cgit v1.2.3-60-g2f50