Skip to content

Commit

Permalink
Unsafe Cannon
Browse files Browse the repository at this point in the history
  • Loading branch information
Limiana committed Aug 1, 2024
1 parent 02d8d28 commit aa4f107
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions SplatoonScripts/Duties/Dawntrail/R4S Unsafe Cannon.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using ECommons;
using ECommons.DalamudServices;
using ECommons.GameHelpers;
using Splatoon.SplatoonScripting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SplatoonScriptsOfficial.Duties.Dawntrail;
public class R4S_Unsafe_Cannon : SplatoonScript
{
public override HashSet<uint>? ValidTerritories { get; } = [1232];
public override Metadata? Metadata => new(1, "NightmareXIV");
uint DebuffYellow = 4000;
uint DebuffBlue = 4001;

public override void OnSetup()
{
Controller.RegisterElementFromCode("Yellow", "{\"Name\":\"yellow\",\"type\":3,\"refY\":20.0,\"radius\":5.0,\"color\":3355508223,\"fillIntensity\":0.5,\"originFillColor\":1157628159,\"endFillColor\":1157628159,\"refActorName\":\"*\",\"refActorRequireCast\":true,\"refActorCastId\":[38360],\"includeRotation\":true,\"refActorTetherTimeMin\":0.0,\"refActorTetherTimeMax\":0.0,\"refActorTetherConnectedWithPlayer\":[]}");
Controller.RegisterElementFromCode("Blue", "{\"Name\":\"blue\",\"type\":3,\"refY\":20.0,\"radius\":5.0,\"color\":3372218624,\"fillIntensity\":0.5,\"originFillColor\":1157628159,\"endFillColor\":1157628159,\"refActorName\":\"*\",\"refActorRequireCast\":true,\"refActorCastId\":[38361],\"includeRotation\":true,\"refActorTetherTimeMin\":0.0,\"refActorTetherTimeMax\":0.0,\"refActorTetherConnectedWithPlayer\":[]}");
}

public override void OnUpdate()
{
Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false);
if(Player.Object.StatusList.Any(x => x.StatusId == DebuffYellow))
{
Controller.GetElementByName("Yellow")!.Enabled = true;
}
if(Player.Object.StatusList.Any(x => x.StatusId == DebuffBlue))
{
Controller.GetElementByName("Blue")!.Enabled = true;
}
}
}

0 comments on commit aa4f107

Please sign in to comment.