summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/util.txt13
-rw-r--r--npc/items/books.txt2
2 files changed, 14 insertions, 1 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 55fdba9bc..f36ff8a4d 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -264,3 +264,16 @@ function script total_subclass {
return .@i;
}
+// Gets how many subclasses were actually allowed
+// max_subclass()
+function script max_subclass {
+ return (MAGIC_LVL/2);
+}
+
+
+// Gets subclass current degree
+// degree_subclass()
+function script degree_subclass {
+ return (MAGIC_LVL/2)+(MAGIC_LVL%1);
+}
+
diff --git a/npc/items/books.txt b/npc/items/books.txt
index 68a9ae56e..0932a6337 100644
--- a/npc/items/books.txt
+++ b/npc/items/books.txt
@@ -193,7 +193,7 @@ OnInit:
next;
break;
case 3:
- mesc l("You currently have @@/@@ subclass(es).", total_subclass(),(MAGIC_LVL/2));
+ mesc l("You currently have @@/@@ subclass(es).", total_subclass(),max_subclass());
if (MAGIC_SUBCLASS & CL_PALADIN)
mesc lg("* Paladin");
if (MAGIC_SUBCLASS & CL_TANKER)