diff --git a/JotunnModStub/Aswid/AswidConfig.cs b/JotunnModStub/Aswid/AswidConfig.cs index 8723800..dd9dbc5 100644 --- a/JotunnModStub/Aswid/AswidConfig.cs +++ b/JotunnModStub/Aswid/AswidConfig.cs @@ -56,6 +56,8 @@ namespace RacesOfValheim public static ConfigEntry AuraBaseDamage; public static ConfigEntry AuraBloodMagicScaling; public static ConfigEntry AuraExecuteThreshold; + public static ConfigEntry AuraInBatForm; + public static ConfigEntry BatAuraUnlockState; // ─── Superhuman Senses (tier 5+ passive) ───────────────────────────────── public static ConfigEntry SensesRadius; @@ -173,6 +175,10 @@ namespace RacesOfValheim new ConfigDescription("Extra damage per tick at 100 Blood Magic skill (scales linearly from 0).", new AcceptableValueRange(0f, 20f))); AuraExecuteThreshold = config.Bind(aura, "Execute Threshold", 0.20f, new ConfigDescription("Non-boss enemies at or below this fraction of max health are executed by the aura instead of merely damaged.", new AcceptableValueRange(0f, 1f))); + AuraInBatForm = config.Bind(aura, "Active In Bat Form", false, + new ConfigDescription("Lets the aura drain while you are a bat from the start, as it did before. Off: the bat has no aura until the unlock state below.", null)); + BatAuraUnlockState = config.Bind(aura, "Bat Form Unlock State", 7, + new ConfigDescription("The progression state at which the bat gets its aura back (7 = The Queen). 0 means never, so only the setting above can turn it on.", new AcceptableValueRange(0, 8))); const string senses = "Aswid - Superhuman Senses"; SensesRadius = config.Bind(senses, "Detection Radius", 100f, diff --git a/JotunnModStub/Aswid/AswidRace.cs b/JotunnModStub/Aswid/AswidRace.cs index 2304b4a..d96b68c 100644 --- a/JotunnModStub/Aswid/AswidRace.cs +++ b/JotunnModStub/Aswid/AswidRace.cs @@ -1165,13 +1165,14 @@ namespace RacesOfValheim private float damageTickTimer = 0f; /// - /// The Vampiric Aura drains on its own, in every form, with no key to hold - but it does not + /// The Vampiric Aura drains on its own, with no key to hold (as a bat only once + /// BatAuraAllowed says so) - but it does not /// distinguish traders from monsters, so it can execute Haldor/Hildir on approach. AuraEnabled /// (toggled with Devour on the same key) is the escape hatch for that. /// private void HandleVampiricAura() { - if (!AuraEnabled) + if (!AuraEnabled || (IsBatForm() && !BatAuraAllowed(BossProgressionManager.GetCurrentProgressionState()))) { damageTickTimer = 0f; return; @@ -1184,6 +1185,24 @@ namespace RacesOfValheim PerformLifeDrain(); } + private static bool IsBatForm() + { + return Player.m_localPlayer.GetSEMan().HaveStatusEffect("SE_BatForm".GetStableHashCode()); + } + + /// + /// Whether the aura drains while the player is a bat. Off until the Queen by default: a bat + /// gliding over enemies that cannot reach it, draining them the whole way, was the "unfun + /// optimal way to play" Dissolution reported. The flag turns it back on for everyone; the + /// unlock state brings it back as a late-game reward, 0 meaning never. + /// + public static bool BatAuraAllowed(int state) + { + if (AswidConfig.AuraInBatForm.Value) return true; + int unlock = AswidConfig.BatAuraUnlockState.Value; + return unlock > 0 && state >= unlock; + } + /// Half damage as a human, full as a bat, double as mist. private float GetAuraFormMultiplier() { diff --git a/JotunnModStub/Package/README.md b/JotunnModStub/Package/README.md index 1fb44ec..a1ec2f4 100644 --- a/JotunnModStub/Package/README.md +++ b/JotunnModStub/Package/README.md @@ -20,7 +20,7 @@ This mod currently introduces 4 custom races: ### 4. Aswid - **The Vampire**: A creature of the night with powerful life-draining abilities. - **Bat Transformation**: Press `G` to transform into a bat, allowing you to fly over obstacles and travel quickly. -- **Blood Magic**: Block to channel a life-draining aura that saps the life of enemies in an area around you (doubled radius at night). +- **Vampiric Aura**: Always on (toggle with [I]): drains the life of nearby enemies, with a doubled radius at night. Silent in Bat form until The Queen falls (configurable). - **Blood Magic Mastery**: You can cast Blood Magic items with infinite Eitr, relying purely on their health costs. - **Night Prowler**: Your passive speed and jump bonuses double during the night. - **Undead Vigor**: The Aswid has a large stamina pool that grows with every boss, on top of its food. You consume the lifeforce of fallen foes directly instead of eating standard food. @@ -73,7 +73,7 @@ This mod currently introduces 4 custom races: - **Bonemass**: Superhuman Senses (Aura reveals untamed creatures). - **Moder**: Freezing Blood (Permanent immunity to Freezing and Poison). - **Yagluth**: Enslavement Power (E Key - Enslave non-tameable enemies). -- **The Queen**: Mist Form (H Key - Immune to physical/poison, double aura damage, weak to fire/frost/spirit. Breaks at sunrise). +- **The Queen**: Mist Form (H Key: immune to physical/poison, double aura damage, breaks at sunrise). The Vampiric Aura works in Bat form. - **Fader**: +10% Size, +30 Physical Damage. Physical kills automatically consume enemies. ### Skadi Progression diff --git a/JotunnModStub/README.md b/JotunnModStub/README.md index 041b292..85525ac 100644 --- a/JotunnModStub/README.md +++ b/JotunnModStub/README.md @@ -23,7 +23,7 @@ This mod currently introduces 6 custom races: ### 4. Aswid - **The Vampire**: A creature of the night with powerful life-draining abilities. - **Bat Transformation**: Press G to transform into a bat, allowing you to fly over obstacles and travel quickly. -- **Blood Magic**: Block to channel a life-draining aura that saps the life of enemies in an area around you (doubled radius at night). **Only available while in Bat or Mist form.** +- **Vampiric Aura**: Always on (toggle with [I]): drains the life of nearby enemies, with a doubled radius at night. Silent in Bat form until The Queen falls (configurable). - **Blood Magic Mastery**: You can cast Blood Magic items with infinite Eitr, relying purely on their health costs. - **Day walker, Night stalker**: Your passive speed and jump bonuses double during the night. - **Undead Vigor**: The Aswid has a large stamina pool that grows with every boss, on top of its food. You consume the lifeforce of fallen foes directly instead of eating standard food. @@ -73,7 +73,7 @@ This mod currently introduces 6 custom races: - **Bonemass**: Superhuman Senses (Aura reveals untamed creatures). - **Moder**: Freezing Blood (Permanent immunity to Freezing and Poison). - **Yagluth**: Enslavement Power (E Key — Enslave non-tameable enemies). -- **The Queen**: Mist Form (H Key — Immune to physical/poison, double aura damage, weak to fire/frost/spirit. Breaks at sunrise). +- **The Queen**: Mist Form (H Key: immune to physical/poison, double aura damage, breaks at sunrise). The Vampiric Aura works in Bat form. - **Fader**: +10% Size, +30 Physical Damage. Physical kills automatically consume enemies. ### Skadi Progression diff --git a/JotunnModStub/RaceCompendium.cs b/JotunnModStub/RaceCompendium.cs index a8688cf..7b997fe 100644 --- a/JotunnModStub/RaceCompendium.cs +++ b/JotunnModStub/RaceCompendium.cs @@ -478,6 +478,13 @@ namespace RacesOfValheim sb.AppendLine(ModText.Get("rov_compendium_aswid_vampiric_aura_passive_toggle")); sb.AppendLine(ModText.Get("rov_compendium_aswid_always_active_every_form_with", auraRadiusDay, auraRadiusNight, auraExecute)); + int batAuraUnlock = AswidConfig.BatAuraUnlockState.Value; + if (AswidRace.BatAuraAllowed(state)) + sb.AppendLine(ModText.Get("rov_compendium_aswid_aura_bat_on")); + else if (batAuraUnlock > 0) + sb.AppendLine(ModText.Get("rov_compendium_aswid_aura_bat_locked", BossProgressionManager.GetBossTokenForState(batAuraUnlock))); + else + sb.AppendLine(ModText.Get("rov_compendium_aswid_aura_bat_never")); // The live figure, so the entry cannot drift from the code: it is the same yardstick // the Sverm's own claws are measured against, which is what keeps the three races even. diff --git a/JotunnModStub/Translations/English/compendium.json b/JotunnModStub/Translations/English/compendium.json index aad0c9e..b4e1288 100644 --- a/JotunnModStub/Translations/English/compendium.json +++ b/JotunnModStub/Translations/English/compendium.json @@ -23,7 +23,10 @@ "rov_compendium_alfar_crystals": "Crystals: the Nexus grows them slowly and stops at $1 until someone - you or a drone - collects them. An upgrade for $2 crystals makes it faster.\n", "rov_compendium_alfar_ljosgard": "Ljosgard: a module of the Nexus that turns Magecap and Jotun Puffs into Sap, the slow way to farm magic.\n", "rov_compendium_alfar_towers": "Prismavard: bronze and crystal turrets with their own shield, powered by the Nexus radius, repaired with the hammer.\n", - "rov_compendium_aswid_always_active_every_form_with": "Always active, in every form, with no key to hold - only the on/off toggle. Drains a $1m radius by day, $2m by night, for magic damage that scales with your Blood Magic skill, healing you for the damage dealt. Enemies at or below $3% health are executed outright. The aura hits for half in human form, full as a Bat, and double as Mist. It cannot tell traders from monsters, so switch it off with [I] before talking to Haldor or Hildir.\n", + "rov_compendium_aswid_always_active_every_form_with": "Always active, with no key to hold - only the on/off toggle. Drains a $1m radius by day, $2m by night, for magic damage that scales with your Blood Magic skill, healing you for the damage dealt. Enemies at or below $3% health are executed outright. The aura hits for half in human form and double as Mist. It cannot tell traders from monsters, so switch it off with [I] before talking to Haldor or Hildir.\n", + "rov_compendium_aswid_aura_bat_on": "As a Bat the aura drains at full strength.\n", + "rov_compendium_aswid_aura_bat_locked": "As a Bat you have no aura until $1 falls. From then on it drains at full strength.\n", + "rov_compendium_aswid_aura_bat_never": "As a Bat you have no aura.\n", "rov_compendium_aswid_asmund_passive": "[Fader Unlock] Asmund (Passive):", "rov_compendium_aswid_aswid_s_curse": "The Aswid's Curse\n", "rov_compendium_aswid_bat_form_g_key_night": "[Eikthyr Unlock] Bat Form ('G' Key, night only): Take the shape of a bat.\n", diff --git a/JotunnModStub/Translations/Italian/compendium.json b/JotunnModStub/Translations/Italian/compendium.json index d0ffc39..9f1627a 100644 --- a/JotunnModStub/Translations/Italian/compendium.json +++ b/JotunnModStub/Translations/Italian/compendium.json @@ -23,7 +23,10 @@ "rov_compendium_alfar_crystals": "Cristalli: il Nexus li coltiva lentamente e si ferma a $1 finché qualcuno - tu o un drone - non li raccoglie. Un potenziamento da $2 cristalli lo rende più veloce.\n", "rov_compendium_alfar_ljosgard": "Ljosgard: un modulo del Nexus che trasforma Magecap e Jotun Puffs in Linfa, il modo lento di coltivare la magia.\n", "rov_compendium_alfar_towers": "Prismavard: torrette di bronzo e cristallo con uno scudo proprio, alimentate dal raggio del Nexus, riparabili con il martello.\n", - "rov_compendium_aswid_always_active_every_form_with": "Sempre attiva, in ogni forma, senza tasti da tenere premuti: solo l'interruttore acceso/spento. Prosciuga un raggio di $1m di giorno e $2m di notte, con danni magici che crescono con la tua abilità di Magia del sangue, e ti cura per i danni inflitti. I nemici al $3% di salute o meno vengono giustiziati all'istante. L'aura colpisce a metà in forma umana, piena da pipistrello e doppia da nebbia. Non distingue i mercanti dai mostri, quindi spegnila con [I] prima di parlare con Haldor o Hildir.\n", + "rov_compendium_aswid_always_active_every_form_with": "Sempre attiva, senza tasti da tenere premuti: solo l'interruttore acceso/spento. Prosciuga un raggio di $1m di giorno e $2m di notte, con danni magici che crescono con la tua abilità di Magia del sangue, e ti cura per i danni inflitti. I nemici al $3% di salute o meno vengono giustiziati all'istante. L'aura colpisce a metà in forma umana e doppia da nebbia. Non distingue i mercanti dai mostri, quindi spegnila con [I] prima di parlare con Haldor o Hildir.\n", + "rov_compendium_aswid_aura_bat_on": "Da pipistrello l'aura prosciuga a piena forza.\n", + "rov_compendium_aswid_aura_bat_locked": "Da pipistrello non hai aura finché $1 non cade. Da quel momento prosciuga a piena forza.\n", + "rov_compendium_aswid_aura_bat_never": "Da pipistrello non hai aura.\n", "rov_compendium_aswid_asmund_passive": "[Sblocco Fader] Asmund (passiva):", "rov_compendium_aswid_aswid_s_curse": "La maledizione degli Aswid\n", "rov_compendium_aswid_bat_form_g_key_night": "[Sblocco Eikthyr] Forma di pipistrello (tasto 'G', solo di notte): prendi la forma di un pipistrello.\n", diff --git a/JotunnModStub/Translations/Russian/compendium.json b/JotunnModStub/Translations/Russian/compendium.json index 26a60a6..d56ec08 100644 --- a/JotunnModStub/Translations/Russian/compendium.json +++ b/JotunnModStub/Translations/Russian/compendium.json @@ -23,7 +23,10 @@ "rov_compendium_alfar_crystals": "Кристаллы: Нексус медленно выращивает их и останавливается на $1, пока кто-нибудь - вы или дрон - их не соберёт. Улучшение за $2 кристаллов ускоряет его.\n", "rov_compendium_alfar_ljosgard": "Льоскгард: модуль Нексуса, превращающий Магекап и Ётунские пуфы в Сок - медленный способ растить магию.\n", "rov_compendium_alfar_towers": "Призмавард: башни из бронзы и кристалла со своим щитом, питаются от радиуса Нексуса, чинятся молотом.\n", - "rov_compendium_aswid_always_active_every_form_with": "Активна всегда и в любом облике, не требует зажатия клавиши — только переключение вкл/выкл. Высасывает жизнь в радиусе $1 м днем и $2 м ночью, нанося магический урон, зависящий от навыка «Магия крови», и исцеляя вас на величину нанесенного урона. Враги с запасом здоровья $3% и ниже погибают мгновенно. В человеческом облике аура наносит половинный урон, в облике летучей мыши — полный, а в облике тумана — удвоенный. Аура не отличает торговцев от монстров, поэтому отключайте ее клавишей [I] перед разговором с Хальдором или Хильдир.\n", + "rov_compendium_aswid_always_active_every_form_with": "Активна всегда, не требует зажатия клавиши — только переключение вкл/выкл. Высасывает жизнь в радиусе $1 м днем и $2 м ночью, нанося магический урон, зависящий от навыка «Магия крови», и исцеляя вас на величину нанесенного урона. Враги с запасом здоровья $3% и ниже погибают мгновенно. В человеческом облике аура наносит половинный урон, а в облике тумана — удвоенный. Аура не отличает торговцев от монстров, поэтому отключайте ее клавишей [I] перед разговором с Хальдором или Хильдир.\n", + "rov_compendium_aswid_aura_bat_on": "В облике летучей мыши аура действует в полную силу.\n", + "rov_compendium_aswid_aura_bat_locked": "В облике летучей мыши у вас нет ауры, пока не падет $1. После этого она действует в полную силу.\n", + "rov_compendium_aswid_aura_bat_never": "В облике летучей мыши у вас нет ауры.\n", "rov_compendium_aswid_asmund_passive": "[Награда: Прародитель] Асмунд (Пассивное):", "rov_compendium_aswid_aswid_s_curse": "Проклятие Асвида\n", "rov_compendium_aswid_bat_form_g_key_night": "[Награда: Эйктюр] Облик летучей мыши (клавиша «G», только ночью): Примите облик летучей мыши.\n",