Skip to content

Commit

Permalink
fix torpedo phase
Browse files Browse the repository at this point in the history
  • Loading branch information
myangelkamikaze committed Mar 1, 2024
1 parent d8d6b70 commit 783c6ae
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions ElectronicObserver/Data/Battle/Phase/PhaseTorpedo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,10 @@ public PhaseTorpedo(BattleData data, string title, int phaseID)
}


public override bool IsAvailable
{
get
{
if (phaseID == 0)
{
return IsOpeningTorpedoPhase;
}
else
{
return IsClosingTorpedoPhase;
}
}
}
public override bool IsAvailable => IsOpeningTorpedoPhase || IsClosingTorpedoPhase;

private bool IsOpeningTorpedoPhase => RawData.api_opening_flag() ? (int)RawData.api_opening_flag != 0 : false;
private bool IsClosingTorpedoPhase => (int)RawData.api_hourai_flag[phaseID - 1] != 0;
private bool IsOpeningTorpedoPhase => phaseID == 0 && (RawData.api_opening_flag() ? (int)RawData.api_opening_flag != 0 : false);
private bool IsClosingTorpedoPhase => phaseID != 0 && ((int)RawData.api_hourai_flag[phaseID - 1] != 0);


public override void EmulateBattle(int[] hps, int[] damages)
Expand Down

0 comments on commit 783c6ae

Please sign in to comment.