diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-05-28 11:12:10 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-05-28 11:12:10 -0300 |
commit | 823c055d4fef95524c6898517962b42dc866111f (patch) | |
tree | f7cfa20127ac682f8516eda3dc68e5c9c968ec90 /npc/craft/options.txt | |
parent | 8fb9a82849539c346c1ff20a25858dfa6b864f58 (diff) | |
download | serverdata-823c055d4fef95524c6898517962b42dc866111f.tar.gz serverdata-823c055d4fef95524c6898517962b42dc866111f.tar.bz2 serverdata-823c055d4fef95524c6898517962b42dc866111f.tar.xz serverdata-823c055d4fef95524c6898517962b42dc866111f.zip |
All tiers registered, penalty TODO
Diffstat (limited to 'npc/craft/options.txt')
-rw-r--r-- | npc/craft/options.txt | 91 |
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; |