warvulture
This commit is contained in:
parent
70bb263609
commit
4559e0b9e1
14 changed files with 455 additions and 48 deletions
|
|
@ -5,9 +5,10 @@ namespace RacesOfValheim
|
|||
/// <summary>
|
||||
/// The Claws of the Beast: the Bjorn claw, burned down to almost black.
|
||||
///
|
||||
/// Everything about how they behave - issued once, never dropped, back in hand the moment the
|
||||
/// hands are free, tier damage as slash - lives in RaceClawSet. This file is only the Aswid's
|
||||
/// half of the answer: which model, what colour, and when the race is wearing another body.
|
||||
/// Everything about how they behave - a timed skill (RaceClawsConfig.ActivateKey), issued and
|
||||
/// retracted on its own, back in hand the moment the hands are free while it runs, tier damage
|
||||
/// as slash - lives in RaceClawSet. This file is only the Aswid's half of the answer: which
|
||||
/// model, what colour, and when the race is wearing another body.
|
||||
///
|
||||
/// The tint is config rather than a constant because "almost black" is a look, not a number,
|
||||
/// and it needs one pass in front of a mirror. It is applied to the item's own copies of the
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ namespace RacesOfValheim
|
|||
TameKey = config.Bind(keybinds, "Tame", new KeyboardShortcut(KeyCode.U),
|
||||
new ConfigDescription("Tames the creature under your cursor, if your tier allows it."));
|
||||
ToggleDevourKey = config.Bind(keybinds, "Toggle Devour Ability", new KeyboardShortcut(KeyCode.I),
|
||||
new ConfigDescription("Turns the automatic Devour-on-kill behavior on or off."));
|
||||
new ConfigDescription("Turns the Vampiric Aura and the automatic Devour-on-kill behavior on or off together. Turn this off before talking to Haldor/Hildir - the aura does not recognize traders and will attack them."));
|
||||
|
||||
const string combat = "Aswid - Passive Combat";
|
||||
DamageBonusPerState = config.Bind(combat, "Damage Bonus Per State", 2f,
|
||||
|
|
|
|||
|
|
@ -532,7 +532,8 @@ namespace RacesOfValheim
|
|||
if (__instance == Player.m_localPlayer && RaceInput.Allowed && AswidConfig.ToggleDevourKey.Value.IsDown())
|
||||
{
|
||||
AswidRace.DevourEnabled = !AswidRace.DevourEnabled;
|
||||
string msg = AswidRace.DevourEnabled ? "Devour Ability: ENABLED" : "Devour Ability: DISABLED";
|
||||
AswidRace.AuraEnabled = AswidRace.DevourEnabled;
|
||||
string msg = AswidRace.DevourEnabled ? "Vampiric Aura: ENABLED" : "Vampiric Aura: DISABLED";
|
||||
__instance.Message(MessageHud.MessageType.Center, msg);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -832,11 +832,18 @@ namespace RacesOfValheim
|
|||
private float damageTickTimer = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// The Vampiric Aura is passive: it drains on its own, in every form, with no key to hold and
|
||||
/// no icon or message of its own. The form only decides how hard it bites.
|
||||
/// The Vampiric Aura drains on its own, in every form, with no key to hold - 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.
|
||||
/// </summary>
|
||||
private void HandleVampiricAura()
|
||||
{
|
||||
if (!AuraEnabled)
|
||||
{
|
||||
damageTickTimer = 0f;
|
||||
return;
|
||||
}
|
||||
|
||||
damageTickTimer += Time.deltaTime;
|
||||
if (damageTickTimer < AswidConfig.AuraTickInterval.Value) return;
|
||||
|
||||
|
|
@ -914,6 +921,7 @@ namespace RacesOfValheim
|
|||
}
|
||||
|
||||
public static bool DevourEnabled = true;
|
||||
public static bool AuraEnabled = true;
|
||||
private static float lastConsumeTime = 0f;
|
||||
|
||||
public static void TryConsumeMob(Character c, float maxHp, bool bypassCooldown = false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue