Improved plugins and added new

This commit is contained in:
Andrej Stojkovikj committed 2026-10-18 01:38:52 +02:00
1 parent 9f4f8bf523
commit a740fec7c8
149 files changed
+4383 -199

No files matched your search

+58 -6
View File
@@ -193,7 +193,7 @@ namespace Skopje.BossHealth
{
_nextReadTime = Time.unscaledTime + FightReadSeconds;
if (_fights[0].StillGoing(out float ratio))
Present(_fights[0].Name, ratio);
Present(_fights[0].Name, ratio, _fights[0].IsImmune());
}
else
{
@@ -223,10 +223,10 @@ namespace Skopje.BossHealth
}
if (_fights[0].StillGoing(out float ratio))
Present(_fights[0].Name, ratio);
Present(_fights[0].Name, ratio, _fights[0].IsImmune());
}
void Present(string bossName, float ratio)
void Present(string bossName, float ratio, bool immune)
{
EnsureBar();
if (!_hasSample || _bossName != bossName)
@@ -255,9 +255,15 @@ namespace Skopje.BossHealth
if (_label != null)
_label.text = bossName;
if (_healthImage != null)
{
_healthImage.color = immune ? BossBarStyle.ImmuneColor : BossBarStyle.HealthColor;
_healthImage.fillAmount = _health;
}
if (_delayImage != null)
{
_delayImage.color = immune ? BossBarStyle.ImmuneDelayColor : BossBarStyle.DelayColor;
_delayImage.fillAmount = _delay;
}
}
void AnimateDelay()
@@ -443,9 +449,8 @@ namespace Skopje.BossHealth
{
XpProgressBar xpBar = FindXpBar();
Image xpImage = xpBar != null ? xpBar.ProgressBar : null;
Sprite xpSprite = xpImage != null ? xpImage.sprite : null;
Sprite healthSprite = ResolveSprite(BossBarStyle.HealthSpriteName, xpSprite) ?? SolidSprite();
Sprite delaySprite = ResolveSprite(BossBarStyle.DelaySpriteName, healthSprite) ?? healthSprite;
Sprite healthSprite = ResolveSprite(BossBarStyle.HealthSpriteName, null) ?? SolidSprite();
Sprite delaySprite = ResolveSprite(BossBarStyle.DelaySpriteName, null) ?? healthSprite;
Sprite backgroundSprite = ResolveSprite(BossBarStyle.BackgroundSpriteName, FrameSprite(xpImage, healthSprite));
_barRoot = new GameObject("BossHealthBar");
@@ -846,6 +851,18 @@ namespace Skopje.BossHealth
return obj != null;
}
static bool SafeDamageable(MetalskyBoss boss)
{
try
{
return boss.IsDamageable;
}
catch (Exception)
{
return true;
}
}
static bool SafeDead(MetalskyBoss boss)
{
try
@@ -875,6 +892,7 @@ namespace Skopje.BossHealth
public string Name;
public abstract bool StillGoing(out float ratio);
public abstract bool IsImmune();
}
sealed class AnaFight : Fight
@@ -904,6 +922,11 @@ namespace Skopje.BossHealth
return false;
return TryRatio(_boss.EnemyControl, out ratio);
}
public override bool IsImmune()
{
return !IsTrue(_boss.IsVulnerable);
}
}
sealed class VesnaFight : Fight
@@ -931,6 +954,11 @@ namespace Skopje.BossHealth
return false;
return TryRatio(_boss.EnemyControl, out ratio);
}
public override bool IsImmune()
{
return !IsTrue(_boss.Visibility);
}
}
sealed class MetalskyFight : Fight
@@ -950,6 +978,11 @@ namespace Skopje.BossHealth
return false;
return TryRatio(_boss.PawnStatus, out ratio);
}
public override bool IsImmune()
{
return !SafeDamageable(_boss);
}
}
sealed class TeofanFight : Fight
@@ -975,6 +1008,25 @@ namespace Skopje.BossHealth
control = _brain.GetComponentInChildren<EnemyControlAStar>(true);
return TryRatio(control, out ratio);
}
public override bool IsImmune()
{
try
{
if (_brain.blockHelper != null && _brain.blockHelper.IsBlocking)
return true;
TeofanBossState state = _brain.CurrentState;
return state == TeofanBossState.DissolveIn
|| state == TeofanBossState.FallenInteract
|| state == TeofanBossState.EndPhase
|| state == TeofanBossState.Despawned;
}
catch (Exception)
{
return false;
}
}
}
}
}