Two casts were held open 40.8 s and 37 s by ACE's fast-tick turn-to-cast wait; every later send was answered UseDone 0x1D and a heal was re-sent every 2.5 s. - ActionPacer: after a 0x1D UseDone nothing starts until the server answers; with no cast of ours open, one probe after 1.5 s, then doubling (max 6 s). Attack repeats are not held (ACE sends no UseDone for a swing), and a latch with no cast of ours open ends after LatchMaxMs (15 s). A cast still unanswered 1 s past its normal cycle (learned per spell, at least 3 s) is turned to face its target; 2 s past it (capped by Stuck Cast Break, default 8000 ms) or on a 0x1D while it has been open 3 s, it is broken with a jump (TapJump; ACE fails a cast on a fast-tick jump). Starts wait until landed; no UseDone 3 s after landing -> Peace mode; 3 s more -> going on. Every hold is bounded: a cast StaleCastMs old, or sent before a frame gap of 5 s (keyed on the gap's end), is dropped with the latch, never broken. No breaker step in portal space; Forget on portal-enter and the death hold. A burst of 5 'too busy' answers in a second holds every start except a heal. A refused forced jump with no cast open leaves no breaker stage. A cast a script chose (the combat hook) is not jumped before 6 s from its send (ScriptCastMinBreakMs, the held-cast nudge's HeldAfterIncantMs). Stuck Cast Break is read from the settings once per tick. - MoveAudit: no start in the tick of a movement change; 150 ms and a clear motion queue (or 600 ms) let it go. A held stop sent later by FlushPendingStops counts as a movement change too; the forced flush in CastSpellFor still goes out in the same tick as the cast that follows it. - Blacklist: casts answered 0x1D (or unanswered while the server is busy) are not no-damage casts. - Combat hook: ctx.pending is the cast in flight; ctx.last is the most recent RESOLVED cast, its err final (the first UseDone after its send; nil only when none could be read: 7 s timeout, or another answer came first). The casts in flight of both kinds resolve in send order through one queue. The send-time UseDone count comes from the pacer (LastCastSeqAtSend). CombatRequestV1 appends Resolved*/Pending* fields (StructSize-gated, no Version bump); an older RynthAi keeps the old ctx.last. - HP failsafe (BuffManager.HpFailsafe.cs): at or under Emergency Heal At with no heal landing for 3 rounds of 2.5 s, a forced jump; 3 more rounds, the macro stops and /lifestone goes out (HP Failsafe Recall, default on). Nothing counts in portal space; a pending recall is dropped on death; a recall that never starts turns the macro back on (only one the failsafe stopped, never past the VTank yield) and re-arms after a 30 s cooldown. Recovery retry: recovery vitals (Heal Self, Stamina to Health, Revitalize, Stamina to Mana) refused for "not enough mana" retry after Recovery Retry (200 ms, a setting) instead of resting the family: ACE rolls Mana Conversion on every attempt before the windup and a refusal costs nothing. At most 5 recovery casts a second, 20 refusals in a row, stamina and Mana Conversion checks, an episode with no refusal for 7 s ends; an episode summary line. Stamina to Mana and Revitalize are still held under their cost by the mana reserve (AttemptVitalCast), so for them the retry applies when the mana reading is stale or costs are unknown; Heal Self and Stamina to Health, which are tried below cost, gain the most. When the retry stops, the vital rests as the existing mana reserve has it (LowManaHealRestSec, 2 s). Script heals and other casts are unchanged. Tests: StuckCastTests (incl. the script cast's break floor), PacerEdgeTests, RecoveryRetryTests (incl. costs known: Stamina to Mana held), HpFailsafeTests, CombatHookTests (ctx.last/ctx.pending, send order, an answer during the send, 0x1D blacklist, script heal keeps its rest, script attack and heal not jumped before 6 s with or without a 'too busy' answer); HealLatencyTests' and ManaReserveTests' low-mana rest cases pin untrained Mana Conversion; RynthLua compat combathook.lua. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
299 lines
17 KiB
C#
299 lines
17 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using RynthCore.Plugin.RynthAi;
|
|
using RynthCore.Plugin.RynthAi.LegacyUi;
|
|
using RynthCore.RynthAiHostTests.Fakes;
|
|
using RynthCore.RynthAiTests.Harness;
|
|
|
|
namespace RynthCore.RynthAiHostTests.Tests;
|
|
|
|
// The mana reserve (2026-10-11). A void mage, Life Magic 304, at 1/383 mana and 289/383 stamina
|
|
// against Rampagers: "You don't have enough Mana to cast this spell", and RynthAi kept casting
|
|
// Corruption instead of Stamina to Mana. Combat had drained mana under what Stamina to Mana costs,
|
|
// its refusal parked it 15 s, and with no mana potion nothing held the arbiter for vitals. Now a
|
|
// caster keeps ManaReserveFactor x Stamina to Mana's cost: under it Stamina to Mana goes first and
|
|
// combat holds its casts; under the cost, the highest level it can pay for goes, or mana
|
|
// regenerates while attacks wait, and a mana refusal rests the vital only briefly.
|
|
internal static class ManaReserveTests
|
|
{
|
|
private const uint Player = 0x50000B21;
|
|
private const uint STypeLife = 33;
|
|
private const uint STypeVoid = 43;
|
|
private const int Target = 0x7000A021;
|
|
private const string NotEnoughMana = "You don't have enough Mana to cast this spell.";
|
|
|
|
public static void Register(Runner r)
|
|
{
|
|
r.Add("mana reserve: under 1.5x Stamina to Mana's cost, Stamina to Mana is chosen over an attack", ReserveChoosesStaminaToMana);
|
|
r.Add("mana reserve: under Stamina to Mana's cost, no attack spam and no 15 s park on 'not enough Mana'", StarvedNoSpamNoPark);
|
|
r.Add("mana reserve: as mana regenerates, the level it can pay for goes, then attacks resume", RecoversAsManaRegenerates);
|
|
r.Add("mana reserve: stamina too low for Stamina to Mana - stamina is refilled first", StaminaFirst);
|
|
r.Add("mana reserve: combat holds an attack it can't pay for, and casts once mana is back", CombatHoldsCast);
|
|
r.Add("mana reserve: a melee fighter's attacks aren't held; Get Mana At off means no reserve", MeleeAndOff);
|
|
r.Add("mana reserve: the dat's BaseMana is read (when this PC has a portal.dat)", DatBaseMana);
|
|
r.Add("mana reserve: a buff that would leave mana under the reserve waits for Stamina to Mana (melee too)", BuffWaitsForReserve);
|
|
}
|
|
|
|
private static int Family(string name) => SpellTableStub.GetById(SpellTable.Named(name).First().Id)!.Family;
|
|
private static int Id(string name) => SpellTable.Named(name).First().Id;
|
|
private static string NameOf(int id) => SpellTableStub.GetById(id)?.Name ?? $"#{id}";
|
|
private static int CostByLevel(int id) => (SpellTableStub.GetById(id)?.Level ?? 0) * 10;
|
|
private static int FamilyOfCast(int i) => SpellTableStub.GetById(FakeHost.Casts[i].SpellId)?.Family ?? 0;
|
|
|
|
private sealed class Rig
|
|
{
|
|
public readonly BuffManager B;
|
|
public readonly LegacyUiSettings S;
|
|
public readonly PlayerVitalsCache V;
|
|
public bool InCombat = true;
|
|
|
|
public Rig(uint mana, uint stamina = 289, int getManaAt = 20, int combatMode = 0)
|
|
{
|
|
FakeHost.Reset();
|
|
FakeHost.WeaponCalls = true;
|
|
FakeHost.CombatModeValue = combatMode == 0 ? CombatMode.Magic : combatMode;
|
|
foreach (var row in SpellTable.Rows) FakeHost.Spellbook.Add((uint)row.Id);
|
|
FakeHost.Skills[(Player, STypeLife)] = (304, 2);
|
|
FakeHost.Skills[(Player, STypeVoid)] = (400, 3);
|
|
BuffManager.ManaCostOverride = CostByLevel; // level x 10: I 10 ... VII 70, VIII 80
|
|
var host = FakeHost.Create();
|
|
S = new LegacyUiSettings
|
|
{
|
|
IsMacroRunning = true, HealAt = 0, TopOffHP = 0, EmergencyHealAt = 0, StaminaToHealthAt = 0,
|
|
GetManaAt = getManaAt, TopOffMana = getManaAt, RestamAt = 0, TopOffStam = 0, UsePotions = false,
|
|
EnableBuffing = false,
|
|
};
|
|
var skills = new CharacterSkills(host);
|
|
skills.SetPlayerId(Player);
|
|
var sm = new SpellManager(host, S);
|
|
sm.InitializeNatively();
|
|
sm.SetCharacterSkills(skills);
|
|
V = new PlayerVitalsCache { MaxHealth = 400, CurrentHealth = 400, MaxStamina = 383, CurrentStamina = stamina, MaxMana = 383, CurrentMana = mana };
|
|
B = new BuffManager(host, S, sm, V);
|
|
B.SetCharacterSkills(skills);
|
|
B.InCombatOverride = () => InCombat;
|
|
}
|
|
|
|
public int LogCount(string part) => FakeHost.Logs.Count(l => l.Contains(part, StringComparison.Ordinal));
|
|
}
|
|
|
|
private static BotActivity Arbiter(BuffManager b)
|
|
{
|
|
var inputs = new ArbiterInputs(true, b.PendingSpellId != 0 || b.WantsVitalRecharge, wantCombat: true,
|
|
wantLooting: false, wantSalvaging: false, wantNav: true, combatEngaged: true);
|
|
return ActivityArbiter.Decide(in inputs);
|
|
}
|
|
|
|
// 2026-10-12, Drakkon (melee): a full rebuff spent mana down to 6%, under Stamina to Mana's cost.
|
|
private static void BuffWaitsForReserve()
|
|
{
|
|
var r = new Rig(mana: 300); // in Magic stance: the buff path readies magic before this check
|
|
int bane = Id("Blade Bane VI"); // level VI: cost 60 here
|
|
int reserve = r.B.ManaReserve();
|
|
Check.True(reserve > 0, $"a reserve for a melee character too ({reserve})");
|
|
|
|
Check.False(r.B.BuffWaitsForMana(bane, "Blade Bane"), "300/383: the buff goes");
|
|
Check.Eq(FakeHost.Casts.Count, 0, "nothing cast by the check");
|
|
|
|
r.V.CurrentMana = (uint)(reserve + 30); // the buff (60) would leave it under the reserve
|
|
Check.True(r.B.BuffWaitsForMana(bane, "Blade Bane"), "the buff waits");
|
|
Check.Eq(FakeHost.Casts.Count, 1, "Stamina to Mana is cast instead");
|
|
Check.Eq(FamilyOfCast(0), Family("Stamina to Mana Self I"), $"it is Stamina to Mana ({NameOf(FakeHost.Casts[0].SpellId)})");
|
|
|
|
// Under even the lowest Stamina to Mana's cost (10) and the buff's: buffing waits, no cast.
|
|
var low = new Rig(mana: 5);
|
|
Check.True(low.B.BuffWaitsForMana(bane, "Blade Bane"), "5/383: buffing waits for regen");
|
|
Check.Eq(FakeHost.Casts.Count, 0, "nothing the server would refuse is sent");
|
|
}
|
|
|
|
private static void ReserveChoosesStaminaToMana()
|
|
{
|
|
// Over Get Mana At 20% (77 of 383), but under 1.5x the top Stamina to Mana's cost.
|
|
var r = new Rig(mana: 300);
|
|
int corruption = Id("Corruption VII");
|
|
int reserve = r.B.ManaReserve();
|
|
Check.True(reserve > 77, $"the reserve ({reserve}) is over Get Mana At's 77 points");
|
|
r.V.CurrentMana = (uint)(reserve - 5);
|
|
Check.True(r.V.ManaPct >= 20, $"{r.V.CurrentMana}/383 is over Get Mana At");
|
|
Check.True(r.B.WantsManaNow(), "under the reserve, in combat: vitals want the tick");
|
|
Check.True(r.B.WantsVitalRecharge, "...which is what the arbiter reads");
|
|
Check.Eq(Arbiter(r.B), BotActivity.Buffing, "the arbiter gives vitals the tick over combat");
|
|
string? hold = r.B.OffensiveCastHold(corruption);
|
|
Check.True(hold != null && hold.Contains("reserve"), $"combat's Corruption VII waits ({hold})");
|
|
|
|
Check.True(r.B.CheckVitals(), "vitals act");
|
|
Check.Eq(FakeHost.Casts.Count, 1, "one cast");
|
|
Check.Eq(FamilyOfCast(0), Family("Stamina to Mana Self I"), $"it is Stamina to Mana ({NameOf(FakeHost.Casts[0].SpellId)})");
|
|
int cost = CostByLevel(FakeHost.Casts[0].SpellId);
|
|
Check.Eq(r.B.ManaReserve(), (int)Math.Ceiling(cost * BuffManager.ManaReserveFactor), "the reserve is 1.5x that level's cost");
|
|
|
|
// Plenty of mana: nothing held.
|
|
r.V.CurrentMana = 300;
|
|
Check.False(r.B.WantsManaNow(), "300/383: no hold");
|
|
Check.Null(r.B.OffensiveCastHold(corruption), "300/383: combat casts");
|
|
}
|
|
|
|
private static void StarvedNoSpamNoPark()
|
|
{
|
|
// The report: 1/383 mana. No Stamina to Mana level costs 1 or less.
|
|
var r = new Rig(mana: 1);
|
|
int corruption = Id("Corruption VII");
|
|
for (int i = 0; i < 5; i++)
|
|
Check.True(r.B.CheckVitals(), $"check {i}: vitals hold the tick (mana regenerating)");
|
|
Check.Eq(FakeHost.Casts.Count, 0, "no Stamina to Mana sent that the server would refuse");
|
|
Check.Eq(r.LogCount("is under"), 1, "logged once");
|
|
Check.True(r.LogCount("attacks wait, regenerating") == 1, "the log says attacks wait");
|
|
Check.True(r.B.WantsManaNow(), "vitals keep the tick while it regenerates");
|
|
Check.Eq(Arbiter(r.B), BotActivity.Buffing, "combat doesn't get it");
|
|
string? hold = r.B.OffensiveCastHold(corruption);
|
|
Check.True(hold != null && hold.Contains("Corruption VII's cost"), $"an attack under its own cost waits ({hold})");
|
|
Check.Eq(r.B.BuffingLabel, BuffManager.LabelMana, "the slot reads Restoring mana");
|
|
|
|
// Costs unknown (no dat): Stamina to Mana is tried; refused for mana it rests 2 s, not 15 s,
|
|
// and mana regenerates meanwhile with attacks still held.
|
|
var u = new Rig(mana: 50);
|
|
BuffManager.ManaCostOverride = _ => 0;
|
|
// Mana Conversion untrained: the rest below. Trained, a recovery vital retries in 200 ms
|
|
// instead (RecoveryRetryTests).
|
|
FakeHost.Skills[(Player, 16)] = (10, 1);
|
|
Check.True(u.B.CheckVitals(), "50/383 under Get Mana At: Stamina to Mana goes");
|
|
Check.Eq(FakeHost.Casts.Count, 1, "one cast");
|
|
u.B.OnChatWindowText(NotEnoughMana, 0);
|
|
Check.True(FakeHost.Logs.Any(l => l.Contains("not enough mana; resting the family 2s", StringComparison.Ordinal)), "rested 2 s, not 15 s");
|
|
Check.True(u.B.CheckVitals(), "inside the rest: vitals still hold (regenerating)");
|
|
Check.Eq(FakeHost.Casts.Count, 1, "no re-cast inside the rest");
|
|
Check.True(u.B.WantsManaNow(), "the short rest doesn't let combat in");
|
|
System.Threading.Thread.Sleep(2100);
|
|
u.V.CurrentMana = 70;
|
|
Check.True(u.B.CheckVitals(), "2 s later");
|
|
Check.Eq(FakeHost.Casts.Count, 2, "Stamina to Mana is cast again");
|
|
Check.Eq(FamilyOfCast(1), Family("Stamina to Mana Self I"), "Stamina to Mana");
|
|
}
|
|
|
|
private static void RecoversAsManaRegenerates()
|
|
{
|
|
var r = new Rig(mana: 1);
|
|
Check.True(r.B.CheckVitals(), "1 mana: waiting");
|
|
Check.Eq(FakeHost.Casts.Count, 0, "nothing cast");
|
|
|
|
r.V.CurrentMana = 15; // pays for level I (10), nothing higher
|
|
Check.True(r.B.CheckVitals(), "15 mana");
|
|
Check.Eq(FakeHost.Casts.Count, 1, "a Stamina to Mana goes");
|
|
Check.True(CostByLevel(FakeHost.Casts[0].SpellId) <= 15, $"the level it can pay for ({NameOf(FakeHost.Casts[0].SpellId)})");
|
|
|
|
r.V.CurrentMana = (uint)(r.B.ManaReserve() - 1); // the top level is payable again; still under the reserve
|
|
Check.True(r.B.CheckVitals(), "just under the reserve");
|
|
Check.Eq(FakeHost.Casts.Count, 2, "Stamina to Mana again");
|
|
int top = r.B.ManaReserve();
|
|
Check.True(CostByLevel(FakeHost.Casts[1].SpellId) * BuffManager.ManaReserveFactor >= top - 1,
|
|
$"the top level this time ({NameOf(FakeHost.Casts[1].SpellId)})");
|
|
|
|
r.V.CurrentMana = 300;
|
|
Check.False(r.B.WantsManaNow(), "300 mana: vitals let go");
|
|
Check.Null(r.B.OffensiveCastHold(Id("Corruption VII")), "attacks resume");
|
|
Check.False(r.B.CheckVitals(), "nothing for vitals to do");
|
|
}
|
|
|
|
private static void StaminaFirst()
|
|
{
|
|
// 50 mana (under Get Mana At 20% = 77) and 10% stamina: Stamina to Mana can't go (stamina
|
|
// under 15%), so Revitalize first - at a level 50 mana pays for.
|
|
var r = new Rig(mana: 50, stamina: 38);
|
|
Check.True(r.B.CheckVitals(), "vitals act");
|
|
Check.Eq(FakeHost.Casts.Count, 1, "one cast");
|
|
Check.Eq(FamilyOfCast(0), Family("Revitalize Self I"), $"Revitalize ({NameOf(FakeHost.Casts[0].SpellId)})");
|
|
Check.True(CostByLevel(FakeHost.Casts[0].SpellId) <= 50, "a level the mana pays for");
|
|
Check.Eq(r.B.BuffingLabel, BuffManager.LabelStamina, "Restoring stamina");
|
|
Check.False(r.B.WantsManaNow(), "with no stamina kit or potion, attacks aren't held for mana (Revitalize costs mana too)");
|
|
|
|
// Re-stam At off and Stamina to Mana unaffordable doesn't matter: stamina goes first all the same.
|
|
var off = new Rig(mana: 50, stamina: 38);
|
|
off.S.RestamAt = 0;
|
|
Check.True(off.B.CheckVitals(), "Re-stam At 0: still refilled for Stamina to Mana");
|
|
Check.Eq(FamilyOfCast(0), Family("Revitalize Self I"), "Revitalize");
|
|
}
|
|
|
|
private static void CombatHoldsCast()
|
|
{
|
|
FakeHost.Reset();
|
|
foreach (string n in new[] { "Flame Bolt VI" })
|
|
foreach (var row in SpellTable.Named(n)) FakeHost.Spellbook.Add((uint)row.Id);
|
|
var s = new LegacyUiSettings { IsMacroRunning = true, GetManaAt = 20, TopOffMana = 20, UsePotions = false, RingRange = 0 };
|
|
s.MinSkillLevelTier1 = 0; s.MinSkillLevelTier2 = 0; s.MinSkillLevelTier3 = 0; s.MinSkillLevelTier4 = 0;
|
|
s.MinSkillLevelTier5 = 0; s.MinSkillLevelTier6 = 0; s.MinSkillLevelTier7 = 10000; s.MinSkillLevelTier8 = 10000;
|
|
s.MonsterRules.Add(new MonsterRule { Name = "Rampager", DamageType = "Fire", UseBolt = true });
|
|
FakeHost.PlayerPose = (0x0101001Bu, 0f, 0f, 0f);
|
|
FakeHost.Positions[Player] = FakeHost.PlayerPose;
|
|
FakeHost.Positions[(uint)Target] = (0x0101001Bu, 0f, 10f, 0f);
|
|
FakeHost.Names[(uint)Target] = "Rampager";
|
|
FakeHost.CombatModeValue = CombatMode.Magic;
|
|
BuffManager.ManaCostOverride = CostByLevel;
|
|
var host = FakeHost.Create(Player);
|
|
var cache = FakeHost.MakeCache(host, Player, new[] { (uint)Target });
|
|
var c = new CombatManager(host, s, cache);
|
|
c.SetPlayerId(Player);
|
|
var sm = new SpellManager(host, s);
|
|
sm.InitializeNatively();
|
|
sm.RefreshKnownSpells();
|
|
c.SetSpellManager(sm);
|
|
var v = new PlayerVitalsCache { MaxHealth = 400, CurrentHealth = 400, MaxStamina = 383, CurrentStamina = 289, MaxMana = 383, CurrentMana = 1 };
|
|
var b = new BuffManager(host, s, sm, v);
|
|
b.InCombatOverride = () => true;
|
|
c.ManaReserveHold = id => b.OffensiveCastHold(id);
|
|
c.activeTargetId = Target;
|
|
var target = new WorldObject(Target, "Rampager");
|
|
MethodInfo attack = typeof(CombatManager).GetMethod("AttackWithMagic", BindingFlags.NonPublic | BindingFlags.Instance)!;
|
|
FieldInfo held = typeof(CombatManager).GetField("_manaCastHeld", BindingFlags.NonPublic | BindingFlags.Instance)!;
|
|
|
|
for (int i = 0; i < 3; i++) attack.Invoke(c, new object[] { target });
|
|
Check.Eq(FakeHost.Casts.Count, 0, "1 mana: Flame Bolt VI (60) isn't sent");
|
|
Check.True((bool)held.GetValue(c)!, "held for mana");
|
|
Check.Eq(c.LastCombatSkipReason, "mana-reserve", "the skip reason says so");
|
|
Check.Eq(FakeHost.Logs.Count(l => l.Contains("[CombatCast] attacks wait: mana 1/383 is under Flame Bolt VI's cost (60)", StringComparison.Ordinal)), 1, "logged once");
|
|
|
|
v.CurrentMana = 300;
|
|
attack.Invoke(c, new object[] { target });
|
|
Check.Eq(FakeHost.Casts.Count, 1, "mana back: the bolt goes");
|
|
Check.Eq(NameOf(FakeHost.Casts[0].SpellId), "Flame Bolt VI", "Flame Bolt VI");
|
|
Check.False((bool)held.GetValue(c)!, "not held");
|
|
Check.True(FakeHost.Logs.Any(l => l.Contains("attacks resume", StringComparison.Ordinal)), "and says attacks resume");
|
|
}
|
|
|
|
private static void MeleeAndOff()
|
|
{
|
|
// A melee fighter (no combat manager: the stance decides) at low mana: no reserve, no hold.
|
|
var melee = new Rig(mana: 1, combatMode: CombatMode.Melee);
|
|
Check.False(melee.B.WantsManaNow(), "melee: vitals don't hold the fight for mana");
|
|
melee.V.CurrentMana = 85; // 22%: over Get Mana At 20%, under a caster's reserve (90)
|
|
Check.False(melee.B.ManaUnderLine(true, out int line), $"melee: only Get Mana At ({line})");
|
|
|
|
// Get Mana At 0 (mana recharge off in combat): no reserve, nothing held.
|
|
var off = new Rig(mana: 100, getManaAt: 0);
|
|
Check.False(off.B.WantsManaNow(), "Get Mana At 0: no hold");
|
|
Check.Null(off.B.OffensiveCastHold(Id("Corruption VII")), "Get Mana At 0: combat casts (it can pay)");
|
|
Check.False(off.B.CheckVitals(), "and vitals do nothing for mana");
|
|
}
|
|
|
|
private static void DatBaseMana()
|
|
{
|
|
var saved = BuffManager.ManaCostOverride;
|
|
BuffManager.ManaCostOverride = null;
|
|
try
|
|
{
|
|
int s2m1 = Id("Stamina to Mana Self I");
|
|
if (!ComponentDatabase.TryGetSpellBaseMana(s2m1, out int m1))
|
|
{
|
|
Console.WriteLine(" (no portal.dat on this PC: BaseMana not checked)");
|
|
return;
|
|
}
|
|
string[] names = { "Stamina to Mana Self I", "Stamina to Mana Self IV", "Stamina to Mana Self VI",
|
|
"Revitalize Self VI", "Heal Self VI", "Corruption VII", "Flame Bolt VI" };
|
|
string line = string.Join(", ", names.Select(n => $"{n} {BuffManager.SpellManaCost(Id(n))}"));
|
|
Console.WriteLine(" dat BaseMana: " + line);
|
|
Check.True(m1 > 0, $"Stamina to Mana Self I costs something ({m1})");
|
|
Check.True(BuffManager.SpellManaCost(Id("Stamina to Mana Self VI")) > m1, "level VI costs more than level I");
|
|
}
|
|
finally { BuffManager.ManaCostOverride = saved; }
|
|
}
|
|
}
|