Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Limiana committed Dec 28, 2024
1 parent 7fc15fb commit 3daf39b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class FRU_Target_Enforcer : SplatoonScript
{

public override HashSet<uint>? ValidTerritories { get; } = [1238];
public override Metadata? Metadata => new(4, "NightmareXIV");
public override Metadata? Metadata => new(5, "NightmareXIV");
Config C => Controller.GetConfig<Config>();

public static class Enemies
Expand Down Expand Up @@ -71,7 +71,7 @@ public override void OnUpdate()
IBattleNpc? GetTargetToSet()
{
var sortedObj = Svc.Objects.OfType<IBattleNpc>().OrderBy(Player.DistanceTo);
if(C.EnableCrystals != CrystalDirection.Disabled)
if(C.EnableCrystals != CrystalDirection.Disabled && EzThrottler.Check("CrystalDeny"))
{
//special handling for crystals of light
var priorityCrystal = sortedObj.Where(x => x.NameId == Enemies.CrystalOfLight && x.IsTargetable && !x.IsDead && x.CurrentHp > 0).OrderBy(x => Vector2.Distance(x.Position.ToVector2(), CrystalPositions[C.EnableCrystals]));
Expand All @@ -86,6 +86,10 @@ public override void OnUpdate()
{
return veil;
}
else
{
EzThrottler.Throttle("CrystalDeny", 200, true);
}
}
}
if(C.EnableFatebreaker)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public enum Action
public enum Clockwise
{
Clockwise,
CounterClockwise
CounterClockwise,
Do_not_display
}

public enum Direction
Expand Down Expand Up @@ -57,7 +58,7 @@ public enum State

private State _state = State.None;
public override HashSet<uint>? ValidTerritories => [1238];
public override Metadata? Metadata => new(2, "Garume");
public override Metadata? Metadata => new(3, "Garume");

public Config C => Controller.GetConfig<Config>();

Expand All @@ -67,7 +68,7 @@ public override void OnStartingCast(uint source, uint castId)
if (castId == 40179) _state = State.Casting;
if (_state == State.FirstAction)
{
if (castId == 40205)
if(castId == 40205)
{
var closestDirection = _redMirrorDirections
.OrderBy(dir => Math.Min(
Expand Down Expand Up @@ -131,7 +132,7 @@ public override void OnActionEffectEvent(ActionEffectSet set)

public override void OnUpdate()
{
if (_state is State.End or State.None) Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false);
if (_state.EqualsAny(State.End, State.None) || (_state == State.SecondAction && C.Clockwise == Clockwise.Do_not_display)) Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false);
}

public void ApplyElement(Direction direction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ namespace SplatoonScriptsOfficial.Duties.Dawntrail.The_Futures_Rewritten;
public class P3_Apocalypse : SplatoonScript
{
public override HashSet<uint>? ValidTerritories => [1238];
public override Metadata? Metadata => new(5, "Errer, NightmareXIV");
public override Metadata? Metadata => new(6, "Errer, NightmareXIV");
public long StartTime = 0;
bool IsAdjust = false;
long Phase => Environment.TickCount64 - StartTime;

public override Dictionary<int, string> Changelog => new()
{
[6] = "Temporarily disabled spread grid, has some issues"
};

public int NumDebuffs => Svc.Objects.OfType<IPlayerCharacter>().Count(x => x.StatusList.Any(s => s.StatusId == 2461));

List<Vector2> Spreads = [new(106, 81.5f), new(100, 90.5f), new(96, 81), new(93, 93.5f)];
Expand Down Expand Up @@ -216,12 +221,12 @@ public override void OnUpdate()
var adjustAngle = MathHelper.GetRelativeAngle(new Vector2(100f, 100f), pos.ToVector2());
for(int s = 0; s < this.Spreads.Count; s++)
{
if(Controller.TryGetElementByName($"Spreads{s}", out var e))
/*if(Controller.TryGetElementByName($"Spreads{s}", out var e))
{
e.Enabled = true;
var adjPos = MathHelper.RotateWorldPoint(new(100, 0, 100), adjustAngle.DegreesToRadians(), Spreads[s].ToVector3(0));
e.SetRefPosition(adjPos);
}
}*/
}
}

Expand Down

0 comments on commit 3daf39b

Please sign in to comment.