summaryrefslogtreecommitdiff
path: root/npc/functions/refine.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/refine.txt')
-rw-r--r--npc/functions/refine.txt18
1 files changed, 14 insertions, 4 deletions
diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt
index e5c835070..dee5c36e0 100644
--- a/npc/functions/refine.txt
+++ b/npc/functions/refine.txt
@@ -60,8 +60,17 @@ function script refineMaster {
return;
}
+ // Savior items have different rules
+ .@savior = false;
+ if (compare("savior", strtolower(getitemname(getarg(0)))))
+ .@savior = true;
+
+ // Legendary Weapons, this formula is hardcoded in C
+ if (is_between(3600, 3610, getarg(0)))
+ .@savior = true;
+
// Max refining level: 10
- if (getequiprefinerycnt(.@it) >= 10) {
+ if (getequiprefinerycnt(.@it) >= (.@savior ? 12 : 10)) {
mesn;
mesq l("This item cannot be refined further.");
return;
@@ -93,7 +102,8 @@ function script refineMaster {
}
mesn;
mesq l("This @@ is a nice stuff. I can refine it for @@ GP and @@ @@.", getitemlink(.@item), .@price, .@amount, getitemlink(.@rg));
- mesc l("Success ratio is of aprox. @@ %", (100-(.@rlv*7))+rand2(-6,6));
+ .@fake = (.@savior ? rand2(-1,1) : rand2(-6, 6));
+ mesc l("Success ratio is of aprox. @@ %", (100-(.@rlv*7))+.@fake);
next;
if (askyesno() != ASK_YES)
close;
@@ -146,8 +156,8 @@ function script refineMaster {
mesc l("Weapons: +8 attack, +8 magic attack");
mesc l("Armors: +3~5 defense");
next;
- // Item is weakened. (1% per refine level)
- } else if (rand2(100) < .@rlv) {
+ // Item is weakened. (1% per refine level) (Savior Immunity)
+ } else if (rand2(100) < .@rlv && !.@savior) {
downrefitem .@it, 1;
mesn;
mesq l("A masterpiece!... Whaaaat, this stuff got ##Bweaker##b??");