Initializes move effect script
This commit is contained in:
parent
213dfdb69e
commit
257c04c98b
@ -42,6 +42,16 @@ public class MoveChoice : TurnChoice, IMoveChoice
|
|||||||
ChosenMove = usedMove;
|
ChosenMove = usedMove;
|
||||||
TargetSide = targetSide;
|
TargetSide = targetSide;
|
||||||
TargetPosition = targetPosition;
|
TargetPosition = targetPosition;
|
||||||
|
|
||||||
|
var secondaryEffect = usedMove.MoveData.SecondaryEffect;
|
||||||
|
if (secondaryEffect != null)
|
||||||
|
{
|
||||||
|
if (user.Library.ScriptResolver.TryResolve(ScriptCategory.Move, secondaryEffect.Name, out var script))
|
||||||
|
{
|
||||||
|
Script.Set(script);
|
||||||
|
script.OnInitialize(user.Library, secondaryEffect.Parameters);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
@ -312,33 +312,33 @@ public interface IPokemon : IScriptSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The data of the Pokemon related to being in a battle.
|
/// The data of the Pokémon related to being in a battle.
|
||||||
/// This is only set when the Pokemon is on the field in a battle.
|
/// This is only set when the Pokémon is on the field in a battle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPokemonBattleData
|
public interface IPokemonBattleData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The battle the Pokemon is in.
|
/// The battle the Pokémon is in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IBattle Battle { get; internal set; }
|
IBattle Battle { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The index of the side of the Pokemon
|
/// The index of the side of the Pokémon
|
||||||
/// </summary>
|
/// </summary>
|
||||||
byte SideIndex { get; internal set; }
|
byte SideIndex { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The index of the position of the Pokemon on the field
|
/// The index of the position of the Pokémon on the field
|
||||||
/// </summary>
|
/// </summary>
|
||||||
byte Position { get; internal set; }
|
byte Position { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of opponents the Pokemon has seen this battle.
|
/// A list of opponents the Pokémon has seen this battle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IReadOnlyList<IPokemon> SeenOpponents { get; }
|
IReadOnlyList<IPokemon> SeenOpponents { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the Pokemon is on the battlefield.
|
/// Whether the Pokémon is on the battlefield.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool IsOnBattlefield { get; set; }
|
bool IsOnBattlefield { get; set; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user