Add anti-repeat mob ability selection when multiple options are valid
- Track last used ability key and consecutive-use count on MobInstance - In ProcessMobAbility, avoid repeating the same ability more than 3 times in a row if alternatives are currently usable - Keep existing priority-based selection as primary behavior
This commit is contained in:
@@ -106,6 +106,12 @@ public class MobInstance
|
||||
// === Abilities ===
|
||||
/// <summary>Abilities this mob can use</summary>
|
||||
public List<MobAbilityState> Abilities { get; set; } = new();
|
||||
|
||||
/// <summary>Last ability key used by this mob (for anti-repeat selection).</summary>
|
||||
public string? LastUsedAbilityKey { get; set; }
|
||||
|
||||
/// <summary>How many times in a row the same ability has been used.</summary>
|
||||
public int ConsecutiveAbilityUses { get; set; }
|
||||
|
||||
/// <summary>Currently casting ability (null if not casting)</summary>
|
||||
public MobAbilityState? CastingAbility { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user