summaryrefslogtreecommitdiff
path: root/npc/craft/options.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/craft/options.txt')
-rw-r--r--npc/craft/options.txt91
1 files changed, 88 insertions, 3 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index ab5b7dcf7..63757d3d9 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -198,10 +198,95 @@ function script csys_Generate {
.@stk+=1;
}
- // Clear the dummies
- array_remove(@csys_attr, DeathPenalty);
- array_remove(@csys_penalty, DeathPenalty);
+ /////////////////////////////////////////////////////////////
+ // Third tier
+ if (.@gid & CRGROUP_SCRESIST) {
+ .@lvl=CRAFTSYS[CRGROUP_SCRESIST];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, IOPT_SCRESIST_POISON);
+ }
+ if (.@lvl >= 2) {
+ array_push(@csys_attr, IOPT_SCRESIST_SILENCE);
+ }
+ if (.@lvl >= 3) {
+ array_push(@csys_attr, IOPT_SCRESIST_BLIND);
+ }
+ if (.@lvl >= 4) {
+ array_push(@csys_attr, IOPT_SCRESIST_CURSE);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ if (.@gid & CRGROUP_SCINFLICT) {
+ .@lvl=CRAFTSYS[CRGROUP_SCINFLICT];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_POISON);
+ }
+ if (.@lvl >= 2) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_SILENCE);
+ }
+ if (.@lvl >= 3) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_BLIND);
+ }
+ if (.@lvl >= 4) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_CURSE);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ if (.@gid & CRGROUP_MANAUSE) {
+ .@lvl=CRAFTSYS[CRGROUP_MANAUSE];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, SP_DRAIN);
+ }
+ if (.@lvl >= 5) {
+ array_push(@csys_attr, DEC_SP_CONSUMPTION);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ if (.@gid & CRGROUP_BOSSATK) {
+ .@lvl=CRAFTSYS[CRGROUP_BOSSATK];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, HP_DRAIN);
+ }
+ if (.@lvl >= 5) {
+ array_push(@csys_attr, CLASS_DAMAGE_BOSS_TARGET);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+
+ /////////////////////////////////////////////////////////////
+ // Final tier (needs minimum lv 3)
+ if (.@gid & CRGROUP_FINAL) {
+ .@lvl=CRAFTSYS[CRGROUP_FINAL];
+ if (.@lvl >= 3) {
+ array_push(@csys_attr, IOPT_EXPGAIN);
+ }
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ ///////////////////////////////
// Return the average level
if (!.@stk)
return 0;