From 898ad77faa9ed091298ae4b0da9d2b9fdec89f96 Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Sat, 22 Jun 2019 16:26:42 -0300
Subject: Repeating already used skills now *can* give you a single mana exp
 point, depending on the skill power. (Mana Magic only).

---
 npc/config/magic.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index 5d4df94bd..6516a2609 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -20,8 +20,10 @@ function	script	GetManaExp	{
     .@sk=getarg(0);
     .@pt=getarg(1);
     .@bonus=rand(0,getskilllv(TMW2_SAGE)*3/2);
-    if (LAST_SKILL == .@sk)
-        end;
+    if (LAST_SKILL == .@sk) {
+        .@pt=limit(0, (.@pt+.@bonus)/3, 1);
+        .@bonus=0;
+    }
     LAST_SKILL=.@sk;
     MAGIC_EXP=MAGIC_EXP+.@pt+.@bonus;
     return;
-- 
cgit v1.2.3-70-g09d2