Skip to content

Instantly share code, notes, and snippets.

@Elmuti
Last active November 9, 2019 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elmuti/ddafde60fc00d64cbcdb02690c814eb5 to your computer and use it in GitHub Desktop.
Save Elmuti/ddafde60fc00d64cbcdb02690c814eb5 to your computer and use it in GitHub Desktop.
private AttackResult DecideAndPerform()
{
AttackResult res = new AttackResult();
if (ImpHawk && !HawkActive)
{
Random rand = new Random();
if (rand.NextDouble() <= 0.05)
{
DecreasedAttackSpeed -= 0.3;
HawkActive = true;
PreviousHawk = CurrentSimulatedTime;
}
}
if (ImpHawk && HawkActive)
{
if (CurrentSimulatedTime - PreviousHawk >= 12)
{
DecreasedAttackSpeed += 0.3;
HawkActive = false;
}
}
if ((CurrentSimulatedTime - PreviousFuriousHowl) >= 10)
{
FuriousHowlActive = true;
PreviousFuriousHowl = CurrentSimulatedTime;
}
if (UseCDs)
{
if ((CurrentSimulatedTime - PreviousRapidFire) >= 300)
CastRapidFire();
if (((CurrentSimulatedTime - PreviousBerserk) >= 180) && PlayerData.IsTroll)
CastBerserk();
}
if (((CurrentSimulatedTime - PreviousRapidFire) >= 15) && RapidFireActive)
{
DecreasedAttackSpeed += 0.4;
RapidFireActive = false;
}
if (((CurrentSimulatedTime - PreviousBerserk) >= 10) && BerserkActive)
{
DecreasedAttackSpeed += 0.1;
BerserkActive = false;
}
if ((CurrentSimulatedTime - PreviousAimedShot) >= 6)
res = CastAttack(3, 600);
else if ((CurrentSimulatedTime - PreviousMultiShot) >= 10)
res = CastAttack(AttackSpeed, 120);
else
res = CastAttack(AttackSpeed);
results.TimeTaken = CurrentSimulatedTime;
return res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment