diff --git a/cvarinfo.txt b/cvarinfo.txt index dcb9f56..1eb13d4 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -6,4 +6,5 @@ server bool vht_mbloodscourge_foilinvul = false; server bool vht_player_touchshatter = true; server bool vht_player_questlog = true; user int vht_player_questlogplural = 0; +server bool vht_player_scruteswitch = true; server int vht_monster_centaur = 2; diff --git a/language.txt b/language.txt index 45fe8ca..a027e36 100644 --- a/language.txt +++ b/language.txt @@ -11,17 +11,21 @@ VHT_MBLOODSCOURGE_FOILINVUL = "Bloodscourge Foils Invulnerability"; VHT_PLAYER_TOUCHSHATTER = "Shatter Frozen Enemies On Touch"; VHT_PLAYER_QUESTLOG = "Enable Quest Log"; VHT_PLAYER_QUESTLOGPLURAL = "Quest Log First-Person Pronouns (English)"; +VHT_PLAYER_SCRUTESWITCH = "Add Messages For Unmarked Switches"; VHT_MONSTER_CENTAUR = "Centaur Behaviour"; VHT_OPT_CONSTANT = "Constant"; VHT_OPT_MODIFIED = "Modified"; VHT_OPT_VANILLA = "Vanilla"; VHT_OPT_NOREFLECT = "No Projectile Reflection"; -VHT_OPT_ANGLED = "No Reflection, Back is Vulnerable"; +VHT_OPT_ANGLED = "No Reflection, Vulnerable Back"; VHT_OPT_SINGULAR = "I/me/my"; VHT_OPT_PLURAL = "we/our/us"; VHT_OPT_PLURAL2 = "we&/our&/us&"; +VHT_SWI_5_1275 = "the path to the left lever opens"; +VHT_SWI_5_1283 = "the path to the right lever opens"; + VHT_QST_1_0 = "@ must find the emerald key\n" "and get through the stronghold.\n" @@ -71,3 +75,8 @@ VHT_QST_4_0 = "there should be a lever somewhere within."; VHT_QST_4_1 = "the lever is pulled."; + +VHT_QST_5_0 = + "there should be two levers here."; +VHT_QST_5_1 = + "the levers have been pulled."; diff --git a/menudef.txt b/menudef.txt index 23ba6d6..5cdc716 100644 --- a/menudef.txt +++ b/menudef.txt @@ -27,16 +27,20 @@ AddOptionMenu "OptionsMenu" { OptionMenu "VhtMenu" { Title "$OPTMNU_VHT" - StaticText "Weapons" Option "$VHT_FAXE_PROJECTILE", "vht_faxe_projectile", "OnOff" + + StaticText "" Option "$VHT_MWAND_DAMAGEFUNC", "vht_mwand_damagefunc", "VhtDamageFunc" ScaleSlider "$VHT_MWAND_SPEED", "vht_mwand_speed", 0, 6, 1, "$VHT_OPT_VANILLA" Option "$VHT_MFROST_DAMAGEFUNC", "vht_mfrost_damagefunc", "VhtDamageFunc" Option "$VHT_MBLOODSCOURGE_FOILINVUL", "vht_mbloodscourge_foilinvul", "OnOff" - StaticText "Players" + + StaticText "" Option "$VHT_PLAYER_TOUCHSHATTER", "vht_player_touchshatter", "OnOff" Option "$VHT_PLAYER_QUESTLOG", "vht_player_questlog", "OnOff" Option "$VHT_PLAYER_QUESTLOGPLURAL", "vht_player_questlogplural", "VhtPlural" - StaticText "Monsters" + Option "$VHT_PLAYER_SCRUTESWITCH", "vht_player_scruteswitch", "OnOff" + + StaticText "" Option "$VHT_MONSTER_CENTAUR", "vht_monster_centaur", "VhtCentaurBehaviour" } diff --git a/vhtzs/events.zsc b/vhtzs/events.zsc index 28bc4ad..1a42e68 100644 --- a/vhtzs/events.zsc +++ b/vhtzs/events.zsc @@ -45,6 +45,15 @@ class VhtEvents : StaticEventHandler { qh.vhtTick(); } } + override void worldLineActivated(WorldEvent e) { + if(vht_player_scruteswitch) { + let which = "VHT_SWI_" .. level.levelNum .. "_" .. e.activatedLine.index(); + let loc = StringTable.localize(which, false); + if(loc != which) { + Console.midPrint(null, loc, true); + } + } + } override void renderUnderlay(RenderEvent e) { if(automapActive && m_useQuestLog) { double x = Screen.getWidth() / 320.0; diff --git a/vhtzs/quest.zsc b/vhtzs/quest.zsc index 0e7d840..1d9a43e 100644 --- a/vhtzs/quest.zsc +++ b/vhtzs/quest.zsc @@ -16,8 +16,8 @@ class VhtQuest abstract play { virtual void vhtPreTravelled() {} virtual ui string vhtDescribe(int pronouns) { let s = StringTable.localize("$VHT_QST_" .. m_mapNum .. "_" .. m_step); - s.replace("@=", m_pronouns[2 + 3 * pronouns]); - s.replace("@'", m_pronouns[1 + 3 * pronouns]); + s.replace("@=", m_pronouns[1 + 3 * pronouns]); + s.replace("@'", m_pronouns[2 + 3 * pronouns]); s.replace("@", m_pronouns[0 + 3 * pronouns]); return s; } @@ -62,16 +62,11 @@ class VhtQuest1 : VhtHubQuest { } 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;} - // fall through + case 0: if(m_fStep0.vhtRun()) {m_step = 1;} break; + case 1: if(m_fStep1.vhtRun()) {m_step = 2;} // fall through case 2: // quest 1 step 2: ring the bell - let ln = vhtGetLine(2); - if(ln && !(ln.flags & Line.ML_BLOCKING)) {m_step = 3;} + if(!(vhtGetLine(2).flags & Line.ML_BLOCKING)) {m_step = 3;} break; } } @@ -88,6 +83,15 @@ class VhtQuest2 : VhtHubQuest { } override void vhtTick() { m_fFlameMask.vhtRun(); + switch(m_step) { + case 1: + if(m_guardianOfFire == 1 && m_guardianOfSteel == 2) { + m_step = 2; + m_guardianOfFire = 0; + m_guardianOfSteel = 0; + } + break; + } } override void vhtTravelled() { // quest 2 step 0: return from guardian of ice @@ -116,10 +120,6 @@ class VhtQuest3 : VhtQuest { // quest 4: guardian of fire class VhtQuest4 : VhtQuest { - override VhtQuest vhtInit(VhtHubQuest hubQuest) { - super.vhtInit(hubQuest); - return self; - } override void vhtTick() { if(level.levelNum == m_mapNum) { switch(m_step) { @@ -143,7 +143,24 @@ class VhtQuest4 : VhtQuest { } // quest 5: guardian of steel -class VhtQuest5 : VhtQuest {} +class VhtQuest5 : VhtQuest { + override void vhtTick() { + if(level.levelNum == m_mapNum) { + switch(m_step) { + case 0: + // quest 5 step 0: press the switches + int levers = 0; + levers += vhtCheckLever(1); + levers += vhtCheckLever(2); + if(levers == 2) { + m_step = 1; + } + VhtQuest2(m_hubQuest).m_guardianOfSteel = levers; + break; + } + } + } +} // quest 6: bright crucible class VhtQuest6 : VhtQuest {}