summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-06-20 13:11:08 -0300
committerJesusaves <cpntb1@ymail.com>2022-06-20 13:11:08 -0300
commit59bc3ad02cb1d16308cd498150e474c8f08e9fc0 (patch)
tree1ca928b5c789ca91e8f970d6551cc60196491568
parenta95c275a6a1a3641bf7c4b38f7a91762a26cbc4f (diff)
downloadserverdata-59bc3ad02cb1d16308cd498150e474c8f08e9fc0.tar.gz
serverdata-59bc3ad02cb1d16308cd498150e474c8f08e9fc0.tar.bz2
serverdata-59bc3ad02cb1d16308cd498150e474c8f08e9fc0.tar.xz
serverdata-59bc3ad02cb1d16308cd498150e474c8f08e9fc0.zip
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
-rw-r--r--npc/functions/treasure.txt7
1 files changed, 6 insertions, 1 deletions
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