summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf1
-rw-r--r--npc/craft/options.txt14
2 files changed, 14 insertions, 1 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 9c370e90e..ea27b8bf8 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -2299,6 +2299,7 @@ constants_db: {
CSYS_OTHER: 64
CSYS_SAVIOR: 128
CSYS_SHIELD: 256
+ CSYS_LEGENDARY: 512
comment__: "Easter eggs enum"
EE_NONE: 0
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index 4570a7b25..b61dfb1fd 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -440,6 +440,10 @@ function script csys_ArmorFix {
// Special sets
if (compare("savior", strtolower(getitemname(getarg(0)))))
@csysArmor=@csysArmor|CSYS_SAVIOR;
+
+ // Legendary Weapons, this formula is hardcoded in C
+ if (is_between(3600, 3610, getarg(0)))
+ @csysArmor=@csysArmor|CSYS_LEGENDARY;
return;
}
@@ -479,7 +483,11 @@ function script csys_WeaponFix {
if (compare("savior", strtolower(getitemname(getarg(0)))))
@csysArmor=@csysArmor|CSYS_SAVIOR;
- // Lightbringer
+ // Legendary Weapons, this formula is hardcoded in C
+ if (is_between(3600, 3610, getarg(0)))
+ @csysArmor=@csysArmor|CSYS_LEGENDARY;
+
+ // Lightbringer have even higher bonuses
if (getarg(0) == Lightbringer)
@csysArmor=@csysArmor|CSYS_SAVIOR;
@@ -504,6 +512,10 @@ function script csys_BonusCalc {
if (.@base >= (.@avg+1)*7/10)
.@base=rand2(1, .@avg+1);
+ // Legendary Weapon? Effects +50%
+ if (@csysArmor & CSYS_LEGENDARY)
+ .@base=max(1, .@base*3/2);
+
// Savior Set? Effects +20%
if (@csysArmor & CSYS_SAVIOR)
.@base=max(1, .@base*6/5);