This commit is contained in:
@@ -12,11 +12,11 @@ public class FusionFlare : Script, IScriptChangeDamageModifier
|
||||
|
||||
// Grab the choices for the current turn, that have been executed before this move.
|
||||
var choice = battleData.Battle.PreviousTurnChoices.Last().TakeWhile(x => !Equals(x, move.MoveChoice))
|
||||
// Of these, find the move choice that used Fusion Bolt.
|
||||
.OfType<MoveChoice>().FirstOrDefault(x => x.ChosenMove.MoveData.Name == "fusion_bolt");
|
||||
// Of these, find the last successfully executed move. Failed moves don't break the combination.
|
||||
.OfType<MoveChoice>().LastOrDefault(x => !x.HasFailed);
|
||||
|
||||
// If Fusion Bolt was used, Fusion Flare's power is doubled.
|
||||
if (choice != null)
|
||||
// If Fusion Bolt was used immediately preceding, Fusion Flare's power is doubled.
|
||||
if (choice is not null && choice.ChosenMove.MoveData.Name == "fusion_bolt")
|
||||
{
|
||||
modifier *= 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user