diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/config/magic.txt | 21 | ||||
-rw-r--r-- | npc/items/books.txt | 16 |
2 files changed, 22 insertions, 15 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt index 86a0a60ec..f0e9f09a0 100644 --- a/npc/config/magic.txt +++ b/npc/config/magic.txt @@ -75,3 +75,24 @@ function script SummonMagic { dispbottom l("All monsters summoned!"); return; } + +// abizit() +function script abizit { + mesn l("Current Magic Control"); + .@val=MAGIC_EXP+rand(-MAGIC_LVL*5, MAGIC_LVL*5); + .@base=(MAGIC_LVL**3); + if (.@val > .@base*5) + mesc l("You are perfectly in control of your magic."), 3; + else if (.@val > .@base*4) + mesc l("You are mostly in control of your magic."), 2; + else if (.@val > .@base*3) + mesc l("You are somewhat in control of your magic."), 4; + else if (.@val > .@base*2) + mesc l("Your magic is more powerful than you, but you can control."), 7; + else if (.@val > .@base) + mesc l("You still are overwhelmed by your magic."), 6; + else + mesc l("You are completly overwhelmed by your magic."), 1; + return; +} + diff --git a/npc/items/books.txt b/npc/items/books.txt index eae6c4e99..b0a18c083 100644 --- a/npc/items/books.txt +++ b/npc/items/books.txt @@ -235,21 +235,7 @@ OnInit: mesc l("Summon Plants - @sk-plantkingdom"); next; - mesn l("Current Magic Control"); - .@val=MAGIC_EXP+rand(-MAGIC_LVL*5, MAGIC_LVL*5); - .@base=(MAGIC_LVL**3); - if (.@val > .@base*5) - mesc l("You are perfectly in control of your magic."), 3; - else if (.@val > .@base*4) - mesc l("You are mostly in control of your magic."), 2; - else if (.@val > .@base*3) - mesc l("You are somewhat in control of your magic."), 4; - else if (.@val > .@base*2) - mesc l("Your magic is more powerful than you, but you can control."), 7; - else if (.@val > .@base) - mesc l("You still are overwhelmed by your magic."), 6; - else - mesc l("You are completly overwhelmed by your magic."), 1; + abizit(); next; break; case 3: |