summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/craft/options.txt55
1 files changed, 48 insertions, 7 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index 94941537d..2706f5f95 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -387,10 +387,9 @@ function script csys_Multiplier {
case VAR_CRITICALRATE:
case DEC_SP_CONSUMPTION:
case VAR_PLUSASPDPERCENT:
- return 5;
case VAR_MAGICATKPERCENT:
case VAR_ATKPERCENT:
- return 7;
+ return 5;
case IOPT_SCRESIST_POISON:
case IOPT_SCRESIST_SILENCE:
case IOPT_SCRESIST_CURSE:
@@ -427,15 +426,43 @@ function script csys_ArmorFix {
array_remove(@csys_penalty, VAR_MDEFPOWER);
// Save for csys_BonusCalc
- @csysArmor=true;
+ @csysArmor=CSYS_ARMOR;
+
+ // Special sets
+ if (compare("savior", strtolower(getitemname(getarg(0)))))
+ @csysArmor=@csysArmor|CSYS_SAVIOR;
return;
}
// Update problematic bonuses for weapons
// Use getiteminfo before
-// csys_WeaponFix( item )
+// csys_WeaponFix( {item} )
function script csys_WeaponFix {
- @csysArmor=false;
+ .@sub=getiteminfo(getarg(0,Acorn), ITEMINFO_SUBTYPE);
+ @csysArmor=0;
+
+ // Weapon Subtype
+ if (.@sub == W_FIST || .@sub == W_KNUCKLE)
+ @csysArmor=@csysArmor|CSYS_BRAWLING;
+ else if (.@sub == W_2HSWORD || .@sub == W_2HSPEAR ||
+ .@sub == W_2HAXE || .@sub == W_2HMACE ||
+ .@sub == W_2HSTAFF)
+ @csysArmor=@csysArmor|CSYS_ZWEIHANDER;
+ else if (.@sub == W_BOW || .@sub == W_REVOLVER ||
+ .@sub == W_RIFLE || .@sub == W_GATLING ||
+ .@sub == W_SHOTGUN || .@sub == W_GRENADE)
+ @csysArmor=@csysArmor|CSYS_RANGED;
+ else if (.@sub == W_STAFF || .@sub == W_BOOK)
+ @csysArmor=@csysArmor|CSYS_MAGICAL;
+ else if (.@sub == W_KATAR)
+ @csysArmor=@csysArmor|CSYS_SPECIAL;
+ else
+ @csysArmor=@csysArmor|CSYS_OTHER;
+
+ // Special sets
+ if (compare("savior", strtolower(getitemname(getarg(0)))))
+ @csysArmor=@csysArmor|CSYS_SAVIOR;
+
return;
}
@@ -457,8 +484,22 @@ function script csys_BonusCalc {
if (.@base >= (.@avg+1)*7/10)
.@base=rand2(1, .@avg+1);
- // Armor? Crap it to 25%
- if (@csysArmor)
+ // Savior Set? Effects +20%
+ if (@csysArmor & CSYS_SAVIOR)
+ .@base=max(1, .@base*6/5);
+
+ // Attack for 2H?
+ if (.@var == VAR_ATKPERCENT || .@var == VAR_MAGICATKPERCENT) {
+ // Two Hands/Bows: x2
+ if ((@csysArmor & CSYS_ZWEIHANDER) || (@csysArmor & CSYS_RANGED))
+ .@base=max(1, .@base*2);
+ // Brawling/Magical: +80%
+ else if ((@csysArmor & CSYS_BRAWLING) || (@csysArmor & CSYS_MAGICAL))
+ .@base=max(1, .@base*18/10);
+ }
+
+ // Armor? Cap it to 25%
+ if (@csysArmor & CSYS_ARMOR)
.@base=max(1, .@base/4);
return .@base;