This commit is contained in:
@@ -136,7 +136,7 @@ public interface IBattle : IScriptSource, IDeepCloneable, IDisposable
|
||||
/// <summary>
|
||||
/// Sets the current weather for the battle. If null is passed, this clears the weather.
|
||||
/// A duration can be passed to set the duration of the weather in turns. This duration can be modified by
|
||||
/// other scripts before the weather is set through the <see cref="Script.ChangeWeatherDuration"/> script hook.
|
||||
/// other scripts before the weather is set through the <see cref="IScriptChangeWeatherDuration"/> script hook.
|
||||
/// </summary>
|
||||
bool SetWeather(StringKey? weatherName, int duration, EventBatchId batchId = default);
|
||||
|
||||
@@ -369,18 +369,18 @@ public class BattleImpl : ScriptSource, IBattle
|
||||
|
||||
return true;
|
||||
|
||||
bool IsValidForForcedTurn(ITurnChoice forcedChoice, ITurnChoice choiceToCheck)
|
||||
bool IsValidForForcedTurn(ITurnChoice forcedChoiceInner, ITurnChoice choiceToCheck)
|
||||
{
|
||||
// If the forced choice is a move choice, we can only use it if the move is the same
|
||||
if (forcedChoice is IMoveChoice forcedMove && choiceToCheck is IMoveChoice moveChoice)
|
||||
if (forcedChoiceInner is IMoveChoice forcedMove && choiceToCheck is IMoveChoice moveChoiceInner)
|
||||
{
|
||||
return forcedMove.ChosenMove.MoveData.Name == moveChoice.ChosenMove.MoveData.Name;
|
||||
return forcedMove.ChosenMove.MoveData.Name == moveChoiceInner.ChosenMove.MoveData.Name;
|
||||
}
|
||||
if (forcedChoice is IPassChoice && choiceToCheck is IPassChoice)
|
||||
if (forcedChoiceInner is IPassChoice && choiceToCheck is IPassChoice)
|
||||
{
|
||||
return true; // Both are pass choices, so they are valid
|
||||
}
|
||||
return forcedChoice.Equals(choiceToCheck);
|
||||
return forcedChoiceInner.Equals(choiceToCheck);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user