summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-05 12:07:08 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-05 12:07:08 -0300
commit3e8011b59d600386320a4ea006a7da8afff16aed (patch)
treeb7e1cc2fa1918906bba9924a2555d5b618ba0722
parente399392302d088576fb0a830b951b085760deb9e (diff)
downloadserverdata-3e8011b59d600386320a4ea006a7da8afff16aed.tar.gz
serverdata-3e8011b59d600386320a4ea006a7da8afff16aed.tar.bz2
serverdata-3e8011b59d600386320a4ea006a7da8afff16aed.tar.xz
serverdata-3e8011b59d600386320a4ea006a7da8afff16aed.zip
Options Penalties - Penalty chance reworked
-rw-r--r--npc/craft/options.txt15
1 files changed, 13 insertions, 2 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index db844d179..a7f97decf 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -442,8 +442,19 @@ function script csys_Apply {
.@slt=0;
while (.@slt < min(2, .@max_pena)) {
// You have 95% for first onus, -30% each, depending on skill lv
- .@base=3000+(.@lv*75);
- if (rand(10000) > 9500-(.@base*.@slt))
+ .@base=(3000*.@slt)+(.@lv*75);
+ // The bigger the base, the best for you.
+ // Initial bonus: 40% (lowering chance to 55%)
+ .@base+=40000;
+ // This _lowers_ base based on how many options you're using (max -30%)
+ // 5% per option enabled. One is always enabled so...
+ .@base-=limit(0, 30000, bitmask_count(CRAFTSYS_CURRENT)*5000);
+ // Lower based on min. tier (max -10%)
+ .@base-=(CRAFTSYS_CURRENT >= CRGROUP_ATK ? 2500 : 0); // 1st tier
+ .@base-=(CRAFTSYS_CURRENT >= CRGROUP_REGEN ? 2500 : 0); // 2nd tier
+ .@base-=(CRAFTSYS_CURRENT >= CRGROUP_SCRESIST ? 2500 : 0); // 3rd tier
+ .@base-=(CRAFTSYS_CURRENT >= CRGROUP_FINAL ? 2500 : 0); // FIN tier
+ if (rand(10000) > 9500-.@base)
break;
// Apply a malus using array_pop (it was shuffled so we're fine)