summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-01-14 15:43:55 -0300
committerJesusaves <cpntb1@ymail.com>2021-01-14 15:43:55 -0300
commitbb8871036d09f3de7ffe4c1d94bcf2ffb6d357c4 (patch)
treec661741c3674b7e6d19f684e2355f4b735d17eb2
parent62cae6d400579b0e02026f4889084c50423cfad3 (diff)
downloadserverdata-bb8871036d09f3de7ffe4c1d94bcf2ffb6d357c4.tar.gz
serverdata-bb8871036d09f3de7ffe4c1d94bcf2ffb6d357c4.tar.bz2
serverdata-bb8871036d09f3de7ffe4c1d94bcf2ffb6d357c4.tar.xz
serverdata-bb8871036d09f3de7ffe4c1d94bcf2ffb6d357c4.zip
The Monster Army main forces. Increase EXP in Fortress Sigil in 25% (all mobs)
-rw-r--r--db/re/map_zone_db.conf1
-rw-r--r--npc/025-1/ctrl.c92
2 files changed, 91 insertions, 2 deletions
diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf
index 4492995c7..402a1cbb2 100644
--- a/db/re/map_zone_db.conf
+++ b/db/re/map_zone_db.conf
@@ -622,6 +622,7 @@ zones: (
mapflags: (
"nowarpto",
+ "bexp 125",
"nosave 025-2,100,27",
)
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index 9817f1077..12b50c682 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -109,6 +109,8 @@ function script FTStatue {
// Main gate - Also where the World Hero can begin the siege
025-1,99,112,0 script Fortress NPC_NO_SPRITE,{
+ function spawnMob;
+ function spawnCore;
// Main Story block - WHAT
if ($GAME_STORYLINE < 3)
die();
@@ -143,10 +145,14 @@ function script FTStatue {
// Spawn the gate
monster("025-1", 99, 113, "Fortress Gate", FortressGate, 1, .name$+"::OnOpenGate");
- // TODO: Initial defending waves
+ // Initial defending waves
+ spawnCore(true);
+ spawnCore(false);
+
// TODO: Enable the statues
// Player blacklist (unable to use 025-2 warp)
maptimer2("025-1", 10, "Fortress::OnMPBlacklist");
+ kamibroadcast($MOST_HEROIC$+"'s team has begun a siege on Fortress Town. Will they prevail?");
close;
/////////////////////////////////////////////////////////
@@ -157,6 +163,13 @@ OnOpenGate:
kamibroadcast("The Fortress Town Gate has been breached!");
close;
+// Heartbeat (B1)
+OnTimer15000:
+ .@breach=($@FORTRESS_STATUE & 1024);
+ spawnCore(.@breach);
+ end;
+
+// Heartbeat (B2)
OnTimer30000:
.@breach=($@FORTRESS_STATUE & 1024);
.@ppl=getmapusers("025-1");
@@ -168,7 +181,8 @@ OnTimer30000:
end;
}
- // TODO: Spawn mobs
+ // Spawn mobs
+ spawnCore(.@breach);
// Summon reinforcements
maptimer2("025-1", 10, "Fortress::OnMPReinforce");
@@ -193,17 +207,91 @@ OnMPReinforce:
end;
/////////////////////////////////////////////////////////
+// spawnMob(Mob, X1, Y1, X2, Y2)
+function spawnMob {
+ .@mob=areamonster("025-1", getarg(1), getarg(2), getarg(3), getarg(4), strmobinfo(1, getarg(0)), getarg(0), 1);
+ .@opt=getunitdata(.@mob, UDT_MODE);
+ // Make aggressive
+ .@opt=.@opt|MD_AGGRESSIVE;
+ // All forces can suffer knockback
+ if (.@opt & MD_NOKNOCKBACK)
+ .@opt=.@opt^MD_NOKNOCKBACK;
+ // Save new options
+ setunitdata(.@ob, UDT_MODE, .@opt);
+
+ // Increase health in 1%+1% per siege
+ .@bhp=getunitdata(.@mob, UDT_MAXHP);
+ .@bhp=.@bhp*(101+$MK_TEMPVAR)/100;
+ setunitdata(.@mob, UDT_MAXHP, .@bhp);
+ setunitdata(.@mob, UDT_HP, .@bhp);
+
+ // Increase accuracy in 10%+1% per siege
+ .@acc=getunitdata(.@mob, UDT_HIT);
+ .@acc=.@acc*(110+$MK_TEMPVAR)/100;
+ setunitdata(.@mob, UDT_HIT, .@acc);
+
+ // TODO: adjust ViewRange
+ return;
+}
+
+// spawnCore(breach)
+function spawnCore {
+ // Now, the thing is, I don't care with how powerful your invading forces are.
+ // I only care with how many success you have.
+ if (getarg(0)) {
+ .@x1=24;
+ .@y1=21;
+ .@x2=175;
+ .@y2=105;
+ .@am=2+$MK_TEMPVAR;
+ } else {
+ .@x1=25;
+ .@y1=110;
+ .@x2=180;
+ .@y2=120;
+ .@am=1+($MK_TEMPVAR/3);
+ }
+ freeloop(true);
+ // Level 40~60 Section
+ for (.@i = 0; .@i < .@am*3; ++.@i) {
+ spawnMob(any(Tipiou, Pollet, Wolvern, FireSkull, DarkLizard, BlackScorpion, EarthFairy, FireFairy, WaterFairy, WindFairy, NatureFairy, DustGatling, DustRifle, DustRevolver, MountainSnake, HoodedNinja, ForestMushroom, GoldenScorpion, Yeti), .@x1, .@y1, .@x2, .@y2);
+ }
+ // Level 60~80 Section
+ for (.@i = 0; .@i < .@am*2; ++.@i) {
+ spawnMob(any(Yeti, WickedMushroom, Archant, Scar, Crafty, AzulSkullSlime, YellowSkullSlime, Forain, GreenDragon, Michel, EliteDuck, Troll, Moonshroom, Terranite), .@x1, .@y1, .@x2, .@y2);
+ }
+ // Level 80~100 section
+ for (.@i = 0; .@i < .@am; ++.@i) {
+ spawnMob(any(RedSkullSlime, Terranite, JackO, BlackMamba, GreenSkullSlime, Centaur, GoboBear, TerraniteProtector), .@x1, .@y1, .@x2, .@y2);
+ }
+ // Summoners Section
+ for (.@i = 0; .@i < .@am; ++.@i) {
+ spawnMob(any(GreenSlimeMother, BlueSlimeMother, YellowSlimeMother, RedSlimeMother, WhiteSlimeMother, AzulSlimeMother, LavaSlimeMother, BlackSlimeMother), .@x1, .@y1, .@x2, .@y2);
+ }
+ if (getarg(0)) {
+ // DemiBoss section (Internal only, increases every ~2 weeks)
+ for (.@i = 0; .@i < (.@am/2); ++.@i) {
+ spawnMob(any(VanityPixie, HolyPixie, ShadowPixie, NulityPixie, Reaper, BlackSkullSlime, NightmareDragon, WhirlyBird, PinkieSuseran), .@x1, .@y1, .@x2, .@y2);
+ }
+ }
+ freeloop(false);
+ return;
+}
+
+/////////////////////////////////////////////////////////
OnInit:
FTCleanup($FORTRESS_STATE);
end;
OnTue0000:
FTCleanup(false);
+ kamibroadcast("The Monster Army has retaken Fortress Town!");
end;
OnConquest:
$MK_TEMPVAR+=1;
FTCleanup(true);
+ kamibroadcast("Fortress Town has been captured by the Allied Forces!");
end;
}