From 35ad4b573976f1357a9ff7722070763cedf5977f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 19 May 2020 21:50:12 -0300 Subject: Spell #manatez (summons Mana Tyrant); Soul Menhir; submodule update. --- client-data | 2 +- world/map/db/mob_db_over_100.txt | 1 + world/map/npc/functions/doomsday.txt | 28 +++++++++-- world/map/npc/magic/_import.txt | 1 + world/map/npc/magic/event-summon-managuardian.txt | 2 + world/map/npc/magic/event-summon-manatyrant.txt | 61 +++++++++++++++++++++++ 6 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 world/map/npc/magic/event-summon-manatyrant.txt diff --git a/client-data b/client-data index 4d44851d..64773818 160000 --- a/client-data +++ b/client-data @@ -1 +1 @@ -Subproject commit 4d44851d99c5aca6a8a36218d621ade999c472e3 +Subproject commit 647738181023c02d573de126a3ef45e3536b042d diff --git a/world/map/db/mob_db_over_100.txt b/world/map/db/mob_db_over_100.txt index 54a08647..44720cab 100644 --- a/world/map/db/mob_db_over_100.txt +++ b/world/map/db/mob_db_over_100.txt @@ -53,3 +53,4 @@ 1147, Koyntety, Koyntety, 181, 27000, 280, 72000, 5000, 4, 220, 240, 52, 52, 31, 22, 90, 127, 255, 105, 31, 30, 1, 0, 69, 181, 240, 1400, 672, 50, 649, 5, 650, 5, 653, 5, 1227, 35, 509, 10000, 1257, 2, 759, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 1148, DoomGolem, DoomGolem, 180, 22000, 280, 65000, 2000, 3, 160, 180, 60, 30, 31, 22, 90, 127, 255, 105, 31, 30, 1, 0, 69, 181, 320, 1000, 672, 50, 5253, 4, 666, 30, 537, 800, 779, 150, 780, 150, 777, 70, 1198, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 1149, Enchanter, Enchanter, 181, 19000, 280, 55000, 2000, 8, 140, 180, 30, 60, 31, 22, 90, 127, 255, 105, 31, 30, 1, 0, 69, 181, 240, 800, 672, 50, 1227, 2, 666, 30, 537, 800, 779, 90, 780, 80, 777, 70, 1198, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +1150, ManaTyrant, ManaTyrant, 180, 24000, 280, 27000, 5000, 2, 300, 325, 42, 67, 31, 22, 90, 127, 255, 95, 31, 30, 1, 0, 69, 181, 180, 1050, 672, 50, 759, 1, 5237, 20, 1253, 5, 720, 100, 825, 500, 868, 20, 1172, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/world/map/npc/functions/doomsday.txt b/world/map/npc/functions/doomsday.txt index eec6635d..50774bbd 100644 --- a/world/map/npc/functions/doomsday.txt +++ b/world/map/npc/functions/doomsday.txt @@ -33,6 +33,7 @@ function|script|DoomsdayDebug mes ""; mes "Can players summon Mana Guardians? "+if_then_else($DOOMSDAY_SUMMON, "Yes", "No"); mes "Is TMW under Jande's control? "+if_then_else($DOOMSDAY_TAKENOVER, "Yes", "No"); + mes "Zealite Upgrade? "+if_then_else($DOOMSDAY_SUMMON > 1, "Yes", "No"); //($DOOMSDAY_SUMMON ? "Yes" : "No"); next; // Only GM 80 and above can modify Doomsday @@ -51,6 +52,7 @@ function|script|DoomsdayDebug "[2][4][1] Council - Tulimshar's Guild",L_TulimCouncil, "[2][4][2] Council - Celestia's Residence",L_HurnsCouncil, "[2][4][3] Council - Blue Sage's Residence",L_NivalCouncil, + "[2][4][4] Toggle Zealite Upgrade",L_Zealite, "[3][5][0] Kage's Final Battle",L_Kage, "[-] Close",L_Close; @@ -142,6 +144,16 @@ L_NivalCouncil: gmlog strcharinfo(0) + " called the Council to Nivalis."; return; +L_Zealite: + set $DOOMSDAY_SUMMON, 2; + disablenpc "Soul Menhir#deadmire"; + disablenpc "Soul Menhir#hurnscald"; + disablenpc "Soul Menhir#nivalis"; + disablenpc "Soul Menhir#tulimshar"; + //disablenpc "Soul Menhir#candor"; + gmlog strcharinfo(0) + " changed the availability of #manatez spell."; + return; + // Act 5: The Doomsday L_Kage: mes "//-- TODO --//"; @@ -312,6 +324,16 @@ OnDoomsday2Restart: fakenpcname "Mede", "Mana Shopkeeper#_D", 420; fakenpcname "Bracco", "Mana Shopkeeper#2_D", 420; + + if ($DOOMSDAY_SUMMON == 2) + goto L_MenhirUpdate; + end; + +L_MenhirUpdate: + disablenpc "Soul Menhir#deadmire"; + disablenpc "Soul Menhir#hurnscald"; + disablenpc "Soul Menhir#nivalis"; + disablenpc "Soul Menhir#tulimshar"; end; /////// Act 3 sieges @@ -374,9 +396,9 @@ L_Doomsday3: // Nivalis if ($@DoomsdayLoc == 2) - setarray $@DD_XPOS, 44, 62, 63, 56, 70, 36, 62, 85; + setarray $@DD_XPOS, 90, 62, 63, 56, 70, 36, 62, 85; if ($@DoomsdayLoc == 2) - setarray $@DD_YPOS, 55, 49, 61, 83, 41, 37, 26, 30; + setarray $@DD_YPOS, 47, 49, 61, 83, 41, 37, 26, 30; // Make an extra announce for those whom missed @@ -566,7 +588,7 @@ L_DD3Hurns: L_DD3Nival: // Compulsory spawns set $@DD_IDX, rand(getarraysize($@doomsday_mobs)); - monster "031-1", 44, 55, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3"; + monster "031-1", 90, 47, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3"; set $@DD_INT, $@DD_INT+1; set $@DD_IDX, rand(getarraysize($@doomsday_mobs)); diff --git a/world/map/npc/magic/_import.txt b/world/map/npc/magic/_import.txt index 4671ac7a..c3cd11ec 100644 --- a/world/map/npc/magic/_import.txt +++ b/world/map/npc/magic/_import.txt @@ -44,3 +44,4 @@ npc: npc/magic/level2-make-tanktop.txt npc: npc/magic/level2-make-shirt.txt npc: npc/magic/level3-necromancy.txt npc: npc/magic/event-summon-managuardian.txt +npc: npc/magic/event-summon-manatyrant.txt diff --git a/world/map/npc/magic/event-summon-managuardian.txt b/world/map/npc/magic/event-summon-managuardian.txt index e18c08ce..bad1213c 100644 --- a/world/map/npc/magic/event-summon-managuardian.txt +++ b/world/map/npc/magic/event-summon-managuardian.txt @@ -4,6 +4,8 @@ OnCast: if(call("magic_checks")) end; + // FIXME: Incomplete check, should still work during sieges + if (getmapflag(getmap(), MF_TOWN)) end; if (Sp < 100) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (countitem("TinyManaElixir") < 1) end; diff --git a/world/map/npc/magic/event-summon-manatyrant.txt b/world/map/npc/magic/event-summon-manatyrant.txt new file mode 100644 index 00000000..f91b2a87 --- /dev/null +++ b/world/map/npc/magic/event-summon-manatyrant.txt @@ -0,0 +1,61 @@ +-|script|summon-tyrant|32767 +{ + end; + +OnCast: + if(call("magic_checks")) end; + if ($DOOMSDAY_SUMMON < 2) end; + if (getmapflag(getmap(), MF_TOWN)) end; + if (Sp < 100) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + if (countitem("LargeManaElixir") < 1) end; + if (@dd4cooldown > gettimetick(2)) goto L_Cooldown; + delitem "LargeManaElixir", 1; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 15000, "Magic Timer::OnClear"; // set the new debuff + callfunc "adjust_spellpower"; + set Sp, Sp - 100; + misceffect FX_MAGIC_MAGGOT_CAST, strcharinfo(0); + callfunc "magic_exp"; + set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; + set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); + if (.@puppet < 1) end; + set .master, BL_ID, .@puppet; + set .lifetime, (@spellpower*9)+150000, .@puppet; + set @dd4cooldown, gettimetick(2)+160; // This is measured in seconds + addnpctimer 10000, .@puppet$+"::OnSummon"; + addnpctimer 11000, .@puppet$+"::OnDestroy"; + // Causes caster to heal (I thought in converting MP to HP but meh) + heal 30000, 0; + end; + +OnSummon: + if (!(isloggedin(.master))) destroy; + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map + specialeffect FX_MAGIC_MAGGOT_SPAWN; + set .@x, getnpcx(); + set .@y, getnpcy(); + set .@map$, strnpcinfo(3); + callsub S_SummonAll; + end; + +OnDestroy: + destroy; + +S_SummonAll: + summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1150, 2, .lifetime; + destroy; + +L_Cooldown: + message strcharinfo(0), "This skill is in forced cooldown; Please wait your first summon to expire."; + end; + +OnInit: + set .school, SKILL_MAGIC_ASTRAL; + set .invocation$, chr(MAGIC_SYMBOL) + "manatez"; // used in npcs that refer to this spell + void call("magic_register", "OnCast"); + set .level, 1; + set .exp_gain, 1; + end; +} -- cgit v1.2.3-70-g09d2