summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-13 12:17:25 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-13 12:17:25 -0300
commit70c4cda878f92670d49268be15f0545d1ea99897 (patch)
tree03d08ac2d38a8aa67e05468956e5268ab9f4eaf5 /npc
parente9fac5b29405eaad267639167215b42cc50ae868 (diff)
downloadserverdata-70c4cda878f92670d49268be15f0545d1ea99897.tar.gz
serverdata-70c4cda878f92670d49268be15f0545d1ea99897.tar.bz2
serverdata-70c4cda878f92670d49268be15f0545d1ea99897.tar.xz
serverdata-70c4cda878f92670d49268be15f0545d1ea99897.zip
Reconfigure abizit(), in TMW Legacy it has 10 levels instead of 5
Diffstat (limited to 'npc')
-rw-r--r--npc/magic/config.txt83
-rw-r--r--npc/magic/final.txt32
2 files changed, 62 insertions, 53 deletions
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index ddb56902..57d42189 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -5,8 +5,24 @@
//
// Used for our pseudo-magic.
// These are only helpers, you can add more restrictions and effects freely.
-// FIXME
+// Here abizit() goes up to 10 instead of 5
function script abizit {
+ if (!getskilllv(SKILL_MAGIC)) return 0;
+ switch (getskilllv(SKILL_MAGIC)) {
+ case 1:
+ .@base = 10; break;
+ case 2:
+ .@base = 120; break;
+ case 3:
+ .@base = 1500; break;
+ case 4:
+ .@base = 20000; break;
+ case 5:
+ .@base = 250000; break;
+ default:
+ return 0;
+ }
+ return min(MAGIC_EXP/.@base, 10);
return 0;
}
@@ -41,8 +57,8 @@ function script AdjustSpellpower {
} else {
.@dmg = .@power; .@power = 100;
}
- // Abizit Influence (80%~130% at best, worst shot at perfect ctrl is 105%)
- .@dmg = .@dmg * (80 + abizit() * rand2(5,10)) / 100;
+ // Abizit Influence (50%~110% at best, perfect ctrl is 100%~110%)
+ .@dmg = .@dmg * (50 + abizit() * rand2(5,6)) / 100;
.@dmg = .@dmg * .@power / 100;
return .@dmg;
}
@@ -95,7 +111,7 @@ function script SummonMagic {
for (.@i = 0; .@i < (.@lv+(.@adj-1))/.@adj; .@i++) {
.@lifetime=rand2(35,50)+.@lv*10;
// Abizit makes lifetime vary (like AdjustSpellpower)
- .@lifetime = .@lifetime * (80 + abizit() * rand2(5,10)) / 100;
+ .@lifetime = .@lifetime * (50 + abizit() * rand2(5,6)) / 100;
// Unfortunately this version does not returns the summoned monster GID
summon("Summoned Monster", .@id, .@lifetime);
/*
@@ -104,7 +120,7 @@ function script SummonMagic {
// Each skill level raises HP in 5%
.@lvx=.@bhp + max(0, (.@lv-1)*.@bhp/20);
// Abizit makes bonus HP vary (like AdjustSpellpower)
- .@lvx = .@lvx * (80 + abizit() * rand2(5,10)) / 100;
+ .@lvx = .@lvx * (50 + abizit() * rand2(5,6)) / 100;
setunitdata(.@mids, UDT_MAXHP, .@lvx);
setunitdata(.@mids, UDT_HP, .@lvx);
// Reconfigure monster modes
@@ -186,17 +202,17 @@ function script rectharm {
function script SK_summon {
.@mob=getarg(0);
.@amt=getarg(1);
- .@mex=getarg(2);
+ .@mex=getarg(2, 1);
if ($@GM_OVERRIDE || debug) debugmes "Skill "+@skillId+" Lv "+@skillLv;
- if (rand2(5) < abizit()) {
+ if (rand2(10) < abizit()) {
// Summon Magic (with magic level bonus)
SummonMagic(@skillId, .@mob, .@amt, MAGIC_LVL+@skillLv-1, @skillLv);
- } else if (rand2(5) < abizit()) {
+ } else if (rand2(10) < abizit()) {
// Re-roll
dispbottom l("You cannot complete the casting correctly!");
SummonMagic(@skillId, .@mob, 1, 1, 1);
- } else if (abizit() <= 1 && any(true, false, false)) {
+ } else if (abizit() <= rand2(3)) {
// Spell overwhelms you, causing it to be spawned as aggro vs you. (33%)
dispbottom l("The spell takes a mind of its own backfires!");
getmapxy(.@m$, .@x, .@y, 0);
@@ -319,20 +335,41 @@ function script ShowAbizit {
mesn l("Current Magic Control");
// FIXME
- .@val=MAGIC_EXP+rand(-MAGIC_LVL*5, MAGIC_LVL*5);
- .@base=((MAGIC_LVL*2)**3);
- if (.@val > .@base*5)
- mescordialog l("You are perfectly in control of your magic."), 3, .@dial;
- else if (.@val > .@base*4)
- mescordialog l("You are mostly in control of your magic."), 2, .@dial;
- else if (.@val > .@base*3)
- mescordialog l("You are somewhat in control of your magic."), 4, .@dial;
- else if (.@val > .@base*2)
- mescordialog l("Your magic is more powerful than you, but you can control."), 7, .@dial;
- else if (.@val > .@base)
- mescordialog l("You still are overwhelmed by your magic."), 6, .@dial;
- else
- mescordialog l("You are completly overwhelmed by your magic."), 1, .@dial;
+ switch (abizit()) {
+ case 10:
+ mescordialog l("Magic flows naturally from you, readily and with ease. You feel in perfect control of your magic."), 3, .@dial;
+ break;
+ case 9:
+ mescordialog l("You feel in almost perfect control of your magic."), 2, .@dial;
+ break;
+ case 8:
+ mescordialog l("You feel that you have very good control of your magic."), 2, .@dial;
+ break;
+ case 7:
+ mescordialog l("You feel quite in control of your magic."), 4, .@dial;
+ break;
+ case 6:
+ mescordialog l("You feel mostly in control of your magic."), 4, .@dial;
+ break;
+ case 5:
+ mescordialog l("You feel somewhat in control of your magic."), 7, .@dial;
+ break;
+ case 4:
+ mescordialog l("You feel you still have a few difficulties in controlling your magic."), 7, .@dial;
+ break;
+ case 3:
+ mescordialog l("Trying to control your magic is still rather troublesome."), 6, .@dial;
+ break;
+ case 2:
+ mescordialog l("You feel that you have only the bare minimum of control over your magic."), 6, .@dial;
+ break;
+ case 1:
+ mescordialog l("You feel quite overwhelmed by your magic, but are beginning to see patterns."), 1, .@dial;
+ break;
+ case 0:
+ mescordialog l("You feel completely overwhelmed by your magic."), 1, .@dial;
+ break;
+ }
return;
}
diff --git a/npc/magic/final.txt b/npc/magic/final.txt
index f98ab4a6..96cc7440 100644
--- a/npc/magic/final.txt
+++ b/npc/magic/final.txt
@@ -332,27 +332,15 @@ function script HUB_SkillInvoke {
// More complex summons
case TMW2_KALMURK:
.@mobId=Maggot;
- if (abizit() > 4 &&
- GHMEMO[GHQ_GetQuestIDByMonsterID(Maggot)] >= 10000 &&
- MAGIC_LVL >= 3)
- {
- .@mobId=any(Maggot, Maggot, Maggot, Maggot, GiantMaggot);
- }
SK_summon(.@mobId, (.@mobId == Maggot ? 2 : 4), any(1,2));
break;
case TMW2_HALHISS:
.@mobId=Snake;
- if (abizit() > 3 &&
- GHMEMO[GHQ_GetQuestIDByMonsterID(MountainSnake)] >= 10000 &&
- rand2(1,3) == 2)
- {
- .@mobId=MountainSnake;
- }
SK_summon(.@mobId, 4, any(3,4));
break;
case TMW2_FROZENHEART:
.@mobId=Moggun;
- if (rand2(6,12) < (abizit()*2)+1)
+ if (rand2(6,12) < abizit()+1)
{
.@mobId=Yeti;
}
@@ -360,7 +348,7 @@ function script HUB_SkillInvoke {
break;
case TMW2_STONEHEART:
.@mobId=Terranite;
- if (rand2(9,12) < (abizit()*2)+1 &&
+ if (rand2(9,12) < abizit()+1 &&
BaseLevel > 80)
{
.@mobId=TerraniteProtector;
@@ -369,22 +357,6 @@ function script HUB_SkillInvoke {
break;
case TMW2_DUCKY:
.@mobId=Duck;
- .@q=getq(LilitQuest_PiratesOfSARAH);
- if (!alignment_cansummon())
- break;
- if (abizit() > 4 &&
- .@q > 2 &&
- MAGIC_LVL >= 3)
- {
- // GHQ Complete: 33% chances
- // Otherwise: 8% chances
- if (GHMEMO[GHQ_GetQuestIDByMonsterID(Duck)] >= 10000)
- .@mobId=any(Duck, Duck, EliteDuck);
- else
- .@mobId=any(Duck, Duck, Duck, Duck,
- Duck, Duck, Duck, Duck,
- Duck, Duck, Duck, EliteDuck);
- }
SummonMagic(@skillId, .@mobId, 2);
GetManaExp(@skillId, 1);
break;