This commit is contained in:
@@ -403,6 +403,12 @@ public interface IPokemon : IScriptSource, IDeepCloneable
|
||||
/// </summary>
|
||||
void ChangeAbility(IAbility ability);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the Pokémon is levitating. This is used for moves like Magnet Rise, and abilities such as
|
||||
/// Levitate.
|
||||
/// </summary>
|
||||
bool IsFloating { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Converts the data structure to a serializable format.
|
||||
/// </summary>
|
||||
@@ -1206,6 +1212,17 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsFloating
|
||||
{
|
||||
get
|
||||
{
|
||||
var isFloating = Types.Any(x => x.Name == "flying");
|
||||
this.RunScriptHook(x => x.IsFloating(this, ref isFloating));
|
||||
return isFloating;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public SerializedPokemon Serialize() => new(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user