+ add option to add a projectile to timon's axe (splits mana use) + add option to speed up sapphire wand + make pickup flashes bright + make sapphire wand's trail look more like the explosion + add option to display a detailed quest log on the automap + make ettins and centaurs not play a hit sound when missing + add an option to set the behaviour of centaurs to make them more vulnerable + add an option to make players shatter frozen enemies on touch + add an option to change the sapphire wand's damage function + make sapphire wand's projectile appear at the proper height + add an option to change the frost spell's damage function + add an option to make bloodscourge's projectiles foil invulnerability
156 lines
3.9 KiB
Plaintext
156 lines
3.9 KiB
Plaintext
class VhtQuest abstract play {
|
|
int m_mapNum, m_step, m_flags;
|
|
VhtHubQuest m_hubQuest;
|
|
virtual VhtQuest vhtInit(VhtHubQuest hubQuest) {
|
|
m_mapNum = level.levelNum;
|
|
m_hubQuest = hubQuest;
|
|
return self;
|
|
}
|
|
virtual void vhtTick() {}
|
|
virtual void vhtTravelled() {}
|
|
virtual void vhtPreTravelled() {}
|
|
virtual string vhtDescribe() {
|
|
let s = StringTable.localize("$VHT_QST_" .. m_mapNum .. "_" .. m_step);
|
|
s.replace("@=", multiplayer ? "us" : "me");
|
|
s.replace("@'", multiplayer ? "our" : "my");
|
|
s.replace("@", multiplayer ? "we" : "i");
|
|
return s;
|
|
}
|
|
LevelInfo vhtLevelInfo() const {
|
|
return LevelInfo.findLevelByNum(m_mapNum);
|
|
}
|
|
}
|
|
|
|
class VhtHubQuest : VhtQuest abstract {
|
|
override VhtQuest vhtInit(VhtHubQuest hubQuest) {
|
|
super.vhtInit(self);
|
|
vhtInitHub();
|
|
return self;
|
|
}
|
|
virtual void vhtInitHub() {}
|
|
}
|
|
|
|
// quest 1: winnowing hall
|
|
class VhtQuest1 : VhtHubQuest {
|
|
VhtFnPlayer m_fStep0; // quest 1 step 0: walk into courtyard
|
|
VhtFnPlayer m_fStep1; // quest 1 step 1: pick up silver key
|
|
Line m_lStep2; // quest 1 step 2: ring the bell
|
|
override void vhtInitHub() {
|
|
m_fStep0 = new("VhtFnPlayerInSector") .vhtInit(115);
|
|
m_fStep1 = new("VhtFnPlayerInvAmount").vhtInit("KeySilver", 1);
|
|
m_lStep2 = level.lines[level.createLineIdIterator(2).next()];
|
|
}
|
|
// same hub, but cannot return
|
|
override void vhtTravelled() {
|
|
destroy();
|
|
}
|
|
override void vhtTick() {
|
|
switch(m_step) {
|
|
case 0: if(m_fStep0.vhtRun()) {m_step = 1;} break;
|
|
case 1: if(m_fStep1.vhtRun()) {m_step = 2;} // -->
|
|
case 2: if(!(m_lStep2.flags & Line.ML_BLOCKING)) {m_step = 3;} break;
|
|
}
|
|
}
|
|
}
|
|
|
|
// quest 2: seven portals
|
|
class VhtQuest2 : VhtHubQuest {
|
|
// quest 2 step 1: 3 switches pulled in first puzzle
|
|
int m_guardianOfFire, m_guardianOfSteel;
|
|
override void vhtTravelled() {
|
|
// quest 2 step 0: return from guardian of ice
|
|
if(m_step == 0 && level.levelNum == m_mapNum) {
|
|
++m_step;
|
|
}
|
|
}
|
|
override string vhtDescribe() {
|
|
let s = super.vhtDescribe();
|
|
if(m_step == 1) {
|
|
s = string.format(s, m_guardianOfFire, m_guardianOfSteel);
|
|
}
|
|
return s;
|
|
}
|
|
}
|
|
|
|
// quest 3: guardian of ice
|
|
class VhtQuest3 : VhtQuest {
|
|
override void vhtPreTravelled() {
|
|
// quest 3 step 0: exit to hub
|
|
if(m_step == 0) {
|
|
++m_step;
|
|
}
|
|
}
|
|
}
|
|
|
|
// quest 4: guardian of fire
|
|
class VhtQuest4 : VhtQuest {}
|
|
|
|
// quest 5: guardian of steel
|
|
class VhtQuest5 : VhtQuest {}
|
|
|
|
// quest 6: bright crucible
|
|
class VhtQuest6 : VhtQuest {}
|
|
|
|
class VhtQuest13 : VhtHubQuest {}
|
|
class VhtQuest8 : VhtQuest {}
|
|
class VhtQuest9 : VhtQuest {}
|
|
class VhtQuest10 : VhtQuest {}
|
|
class VhtQuest12 : VhtQuest {}
|
|
class VhtQuest11 : VhtQuest {}
|
|
|
|
class VhtQuest27 : VhtHubQuest {}
|
|
class VhtQuest32 : VhtQuest {}
|
|
class VhtQuest33 : VhtQuest {}
|
|
class VhtQuest34 : VhtQuest {}
|
|
class VhtQuest28 : VhtQuest {}
|
|
class VhtQuest30 : VhtQuest {}
|
|
class VhtQuest31 : VhtQuest {}
|
|
|
|
class VhtQuest22 : VhtHubQuest {}
|
|
class VhtQuest21 : VhtQuest {}
|
|
class VhtQuest23 : VhtQuest {}
|
|
class VhtQuest24 : VhtQuest {}
|
|
class VhtQuest25 : VhtQuest {}
|
|
class VhtQuest26 : VhtQuest {}
|
|
|
|
class VhtQuest35 : VhtHubQuest {}
|
|
class VhtQuest36 : VhtQuest {}
|
|
class VhtQuest37 : VhtQuest {}
|
|
class VhtQuest38 : VhtQuest {}
|
|
class VhtQuest39 : VhtQuest {}
|
|
|
|
class VhtQuest40 : VhtHubQuest {}
|
|
|
|
class VhtQuestHolder : Inventory {
|
|
default {
|
|
Inventory.InterHubAmount 0;
|
|
+Inventory.UnDroppable;
|
|
+Inventory.UnClearable;
|
|
}
|
|
VhtHubQuest m_hubQuest;
|
|
array<VhtQuest> m_quests;
|
|
void vhtAddQuest(class<VhtQuest> ty) {
|
|
if(ty) {
|
|
let qst = VhtQuest(new(ty)).vhtInit(m_hubQuest);
|
|
if(qst is "VhtHubQuest") {
|
|
m_hubQuest = VhtHubQuest(qst);
|
|
}
|
|
m_quests.push(qst);
|
|
}
|
|
}
|
|
override void depleteOrDestroy() {
|
|
m_hubQuest = null;
|
|
m_quests.clear();
|
|
}
|
|
override void preTravelled() {
|
|
for(int i = 0, j = m_quests.size(); i < j; ++i) {
|
|
m_quests[i].vhtPreTravelled();
|
|
}
|
|
}
|
|
override void travelled() {
|
|
for(int i = 0, j = m_quests.size(); i < j; ++i) {
|
|
m_quests[i].vhtTravelled();
|
|
}
|
|
}
|
|
}
|