diff options
Diffstat (limited to 'npc/005-4')
-rw-r--r-- | npc/005-4/tolchi.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/npc/005-4/tolchi.txt b/npc/005-4/tolchi.txt index 417a3e47c..a2c2c0f33 100644 --- a/npc/005-4/tolchi.txt +++ b/npc/005-4/tolchi.txt @@ -292,37 +292,46 @@ function tolchi_tweaks { Zeny=Zeny-.@price; // Options which Tolchi knows - setarray .@vartps, 0, + setarray @csys_attr, 0, IOPT_RICHNESS, 11, IOPT_EXPGAIN, 9, IOPT_CRITDMG, 25, VAR_HPACCELERATION, 30, VAR_MAXHPAMOUNT, 35; + // Armor fix + if (getiteminfo(.@handle, ITEMINFO_TYPE) == IT_ARMOR) { + csys_ArmorFix(); + .@lv=max(1, .@lv/4); + } + // Select a bonus and purge it - .@vartp=relative_array_random(.@vartps); + .@vartp=relative_array_random(@csys_attr); .@popindex=getarrayindex(.@vartp); deletearray(.@popindex, 1); deletearray(.@popindex, 1); // Apply the bonus + .@bonus=csys_Multiplier(.@lv); setitemoptionbyindex(.@id, 0, .@vartp, .@bonus); // Re-roll: Easier for lower levels. Equip based. if (rand2(1000) < 250-(.@lv*2)) { - .@vartp=relative_array_random(.@vartps); + .@vartp=relative_array_random(@csys_attr); .@popindex=getarrayindex(.@vartp); deletearray(.@popindex, 1); deletearray(.@popindex, 1); + .@bonus=csys_Multiplier(.@lv); setitemoptionbyindex(.@id, 1, .@vartp, .@bonus); } // Final re-roll: Easier for lower levels. Equip based. Nearly impossible. if (rand2(10000) < 250-(.@lv*2)) { - .@vartp=relative_array_random(.@vartps); + .@vartp=relative_array_random(@csys_attr); .@popindex=getarrayindex(.@vartp); deletearray(.@popindex, 1); deletearray(.@popindex, 1); + .@bonus=csys_Multiplier(.@lv); setitemoptionbyindex(.@id, 1, .@vartp, .@bonus); } |