summaryrefslogtreecommitdiff
path: root/npc/018-5-4
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-09-13 22:25:33 -0300
committerJesusaves <cpntb1@ymail.com>2020-09-13 22:25:33 -0300
commite8596019c219152f53e0f89244b8ded88356fc56 (patch)
tree1bf817725263f7067d447469bc61a81485d3de99 /npc/018-5-4
parentd14b00ad3b384f9cb559aa84f1aa55ee578eaae9 (diff)
downloadserverdata-e8596019c219152f53e0f89244b8ded88356fc56.tar.gz
serverdata-e8596019c219152f53e0f89244b8ded88356fc56.tar.bz2
serverdata-e8596019c219152f53e0f89244b8ded88356fc56.tar.xz
serverdata-e8596019c219152f53e0f89244b8ded88356fc56.zip
Release Duck Elder quest, remove some insanities on it
But it should not be using summon() :-( @dangerDuck we could use monster+CANNOT_ATTACK for "citizens" if you wanna prevent AOE And if any of these citizens die, you instantly lose for betrayal. Example :p
Diffstat (limited to 'npc/018-5-4')
-rw-r--r--npc/018-5-4/elder.txt40
1 files changed, 26 insertions, 14 deletions
diff --git a/npc/018-5-4/elder.txt b/npc/018-5-4/elder.txt
index 13e907590..bf150d1e3 100644
--- a/npc/018-5-4/elder.txt
+++ b/npc/018-5-4/elder.txt
@@ -29,7 +29,7 @@
select
rif(.@q == 0, l("I've heard tidings of strange goings-on in this area...")),
rif(.@q == 1, l("I'm here to help you restock...")),
- rif(.@q == 2, l("What did the Council of Elders say? Is there any news of the pirates?")),
+ rif(.@q == 2, l("What did the Council of Elders say? Is there any news of the pirates?")), // FIXME Lv50 players missed this info S:
rif(.@q == 3, l("Have the pirates been routed? Will they return?")),
rif(.@q == 4, l("I'm here as an Initiate. May I enter Duck Dungeon?")),
l("Oh, I'm just exploring. What can you tell me about this island?"),
@@ -170,11 +170,7 @@ function elderPirateAttack {
mesq l("The pirates amass for their siege, but they will not attack yet. Return when you are stronger. King DD is working to find a solution.");
return;
}
- if (!is_staff()) {
- mesn;
- mesc l("I'm afraid King DD did not finish his testing on this!"), 1;
- return;
- }
+
mesn;
mesq l("The pirates have been surrounding our island for many sun rises. We expect they will attack any time.");
next;
@@ -228,14 +224,14 @@ OnBegin:
// Spawn Monsters
// FIXME MIGHT NOT WORK WITH COORDINATES ZERO (for several reasons)
// PLEASE PREFER AREAMONSTER
- monster("018-5-4", 0, 0, "Ocean Pirate", OceanPirate, (.pLvl*4), "Duck Elder::OnPirateKilled");
- .total_pirates+=(.pLvl*4);
+ monster("018-5-4", 0, 0, "Ocean Pirate", OceanPirate, .pLvl, "Duck Elder::OnPirateKilled");
+ .total_pirates+=.pLvl;
monster("018-5-4", 0, 0, "Pirate Captain", OceanPirate, (.pLvl/10), "Duck Elder::OnPirateKilled"); // FIXME
.total_pirates+=(.pLvl/10);
- monster("018-5-4", 0, 0, "Desert Pirate", DesertBandit, .pLvl, "Duck Elder::OnPirateKilled");
- .total_pirates+=(.pLvl);
- monster("018-5-4", 0, 0, "Marsh Pirate", Bandit, .pLvl, "Duck Elder::OnPirateKilled");
- .total_pirates+=(.pLvl);
+ monster("018-5-4", 0, 0, "Desert Pirate", DesertBandit, (.pLvl/2), "Duck Elder::OnPirateKilled");
+ .total_pirates+=(.pLvl/2);
+ monster("018-5-4", 0, 0, "Marsh Pirate", Bandit, (.pLvl/2), "Duck Elder::OnPirateKilled");
+ .total_pirates+=(.pLvl/2);
monster("018-5-4", 0, 0, "Buccaneer", Sarracenus, (.pLvl/5), "Duck Elder::OnPirateKilled");
.total_pirates+=(.pLvl/5);
monster("018-5-4", 0, 0, "Corsair", RobinBandit, (.pLvl/5), "Duck Elder::OnPirateKilled");
@@ -246,12 +242,24 @@ OnBegin:
.total_pirates+=(.pLvl/25);
// Reinforcements
+ // FIXME: We might not want summon() here (summon is immune to AOE)
+ // We probably want bg_monster (blame Jesusalva) or monster w/ alchemy flag
for(.@i = 0; .@i < min(10, .pLvl/5); ++.@i) {
- summon("Duck Soldier", Duck, 300000, "Duck Elder::OnDuckKilled");
+ .@sd=summon("Duck Soldier", Duck, 300000, "Duck Elder::OnDuckKilled");
+ .@bhp=getunitdata(.@sd, UDT_MAXHP);
+ // Abizit makes bonus HP vary (like AdjustSpellpower)
+ .@lvx = .@bhp * (80 + abizit() * rand2(5,10)) / 100;
+ setunitdata(.@mids, UDT_MAXHP, .@lvx);
+ setunitdata(.@mids, UDT_HP, .@lvx);
.total_duck++;
}
for(.@i = 0; .@i < min(5, .pLvl/20); ++.@i) {
- summon("Duck Initiate", EliteDuck, 300000, "Duck Elder::OnDuckKilled");
+ .@sd=summon("Duck Initiate", EliteDuck, 300000, "Duck Elder::OnDuckKilled");
+ .@bhp=getunitdata(.@sd, UDT_MAXHP);
+ // Abizit makes bonus HP vary (like AdjustSpellpower)
+ .@lvx = .@bhp * (80 + abizit() * rand2(5,10)) / 100;
+ setunitdata(.@mids, UDT_MAXHP, .@lvx);
+ setunitdata(.@mids, UDT_HP, .@lvx);
.total_duck++;
}
@@ -383,5 +391,9 @@ OnInit:
.sex = G_OTHER;
.distance = 4;
end;
+
+OnInstanceInit:
+ disablenpc instance_npcname(.name$);
+ end;
}