diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-05-18 15:36:19 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-05-18 15:36:19 -0300 |
commit | 966da363ff81f37f96b31b7c4f3811c9babecc58 (patch) | |
tree | 6165b0d57b94f6a191660e22d6d8ce0ffd9e8214 | |
parent | d8dc10568406e5ece48b327b3658183736891d54 (diff) | |
download | serverdata-966da363ff81f37f96b31b7c4f3811c9babecc58.tar.gz serverdata-966da363ff81f37f96b31b7c4f3811c9babecc58.tar.bz2 serverdata-966da363ff81f37f96b31b7c4f3811c9babecc58.tar.xz serverdata-966da363ff81f37f96b31b7c4f3811c9babecc58.zip |
Add 7 difficulty modes for Monster King showdown after his first demise.
-rw-r--r-- | npc/026-6/ctrl.c | 18 | ||||
-rw-r--r-- | npc/026-7/boss.txt | 40 |
2 files changed, 47 insertions, 11 deletions
diff --git a/npc/026-6/ctrl.c b/npc/026-6/ctrl.c index 1f5f67618..79539b399 100644 --- a/npc/026-6/ctrl.c +++ b/npc/026-6/ctrl.c @@ -61,7 +61,23 @@ OnTouch: // NOT a fortwarp() - there is no Barbara Bonus for the Showdown! warp "026-7", 21, 28; if (!$@MK_CHALLENGE) { - $@MK_CHALLENGE=true; + if ($GAME_STORYLINE >= 5) { + mes l("Do you want to challenge the Monster King? If so, on which difficulty?"); + next; + menuint + l("No, I changed my mind."), 0, + l("Normal"), 1, + l("Hard"), 2, + l("Crazy"), 3, + l("Cadis Mode"), 5, + l("Ultimate Pandorica"), 7, + l("Portable Apocalypse"), 10, + rif(REBIRTH >= 4, l("Judgment Day")), 15; + closeclientdialog; + } + // Already started or no difficulty selected + if ($@MK_CHALLENGE || !@menuint) end; + $@MK_CHALLENGE=@menuint; kamibroadcast(strcharinfo(0)+" has CHALLENGED the MONSTER KING to a SHOWDOWN!", "WORLD HEART"); sleep(2500); mapannounce("026-6", "WORLD HEART : The teleporter is now enabled... Get to positions!", bc_map|bc_npc); diff --git a/npc/026-7/boss.txt b/npc/026-7/boss.txt index 1983094dd..711882713 100644 --- a/npc/026-7/boss.txt +++ b/npc/026-7/boss.txt @@ -10,12 +10,15 @@ OnInit: .MK=0; - .maxhp = 1000000; // 1,000,000 HP + .maxhp = 1000000; // 1,000,000 HP (used by scripts) .mana = 0; // More mana = more likely to cast skills .immortal = true; // Set to FALSE when all four guardians are defeated .memohp = 999; // Memorand HP, controls spawns .mou = 0; // Temporary for Cutscene .start_time = gettimetick(2); // Controls Death Touch + .dmhp1 = 750000; // The "default" max HP + .dmhp2 = 250000; // The "extra" max HP + .reward = 0; // Reward modifier ($@MK_CHALLENGE) end; // Maybe not OnTouch, but OnSit? @@ -48,9 +51,10 @@ function _boostMe { .@bdf=getunitdata(.@mg, UDT_DEF); .@bcr=getunitdata(.@mg, UDT_CRIT); .@bag=getunitdata(.@mg, UDT_AGI); - .@s=3+max(0, (TOP3AVERAGELVL()-100 / 5)); // Over-100 scaling - .@bat = .@bat * 3 / 2; - .@bcr = .@bcr * 3 / 2; + .@bf = $@MK_CHALLENGE + 2; // The booster from selected difficulty + .@s=.@bf+max(0, (TOP3AVERAGELVL()-100 / 5)); // Over-100 scaling + .@bat = .@bat * .@bf / 2; + .@bcr = .@bcr * .@bf / 2; setunitdata(.@mg, UDT_ATKMAX, .@bat+(.@s*5)); setunitdata(.@mg, UDT_DEF, .@bdf+(.@s*4)); setunitdata(.@mg, UDT_CRIT, .@bcr+(.@s*3)); @@ -65,21 +69,28 @@ OnBegin: // Monster King is somewhere else, so nothing happens if ($@MK_SCENE != MK_NONE) end; + // It is a false positive? Something gone wrong? + if ($@MK_CHALLENGE < 1) + end; // Lock the MK in the showdown $@MK_SCENE=MK_SHOWDOWN; .start_time = gettimetick(2); // Controls Death Touch + // Recalculate Max HP + .maxhp = .dmhp1 + (.dmhp2 * $@MK_CHALLENGE); // Initial assortment of monsters //siege_cast("026-7", .name$, 15, TP_TULIM|TP_HURNS|TP_NIVAL); - areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", EvilWisp, 1); - areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", EpiphanyWisp, 1); - areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", SacredWisp, 1); - areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", PanthomWisp, 1); + .@am = ($@MK_CHALLENGE + 1) / 2; + areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", EvilWisp, .@am); + areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", EpiphanyWisp, .@am); + areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", SacredWisp, .@am); + areamonster("026-7", 30, 27, 50, 50, "Heart's Curse", PanthomWisp, .@am); // Spawn the boss himself .MK=monster("026-7", 39, 34, "The Monster King", MonsterKing, 1); immortal(.MK); // Immortal until conditions are met .immortal = true; // Mana is mostly carried over between attempts, but no negatives .mana = max(.mana, 0); + .mana += $@MK_CHALLENGE; // Difficulty mode starting MP booster .memohp = 999; // Reset Memorand HP // Give MK some extra defense setunitdata(.MK, UDT_DEF, getunitdata(.MK, UDT_DEF) * 4 / 3); // +30% @@ -207,6 +218,10 @@ OnTimer10000: maptimer2("026-7", 10, "Impregnable#B7F::OnMFDispose"); .mana += (.immortal ? 1 : 2); // Recover mana + // Bonus MP regeneration from difficulty mode selection + if ($@MK_CHALLENGE > 1) + .mana += $@MK_CHALLENGE-1; + /* Regeneration & Defeat Loop */ .@end = false; if (.immortal) @@ -229,6 +244,7 @@ OnTimer10000: /* Maybe the fight is over */ if (!mobcount("026-7", "all") || getunittype(.MK) < 0 || .@end) { stopnpctimer; + .reward = max(1, $@MK_CHALLENGE); $@MK_SCENE = MK_NONE; $@MK_CHALLENGE=false; killmonsterall("026-7"); @@ -672,8 +688,12 @@ OnVictory: if (!playerattached()) end; // Prizes - Mobpt += 165; - getitem StrangeCoin, 50; + Mobpt += 150 + (.reward * 15); + getitem StrangeCoin, 45 + min(55, .reward * 5); // 50 ~ 100 coins reward + // Give some additional EXP for higher difficulty settings + if (.reward > 1) + getexp (.reward/2) * getmonsterinfo(MonsterKing, MOB_BASEEXP), + (.reward/2) * getmonsterinfo(MonsterKing, MOB_JOBEXP); if (!MK_WINNER) { MK_WINNER=gettimetick(2); // TODO getitem StrangeCoin, 1950; // Total: 2,000 Strange Coins on first win |