namespace PkmnLib.Plugin.Gen7.Scripts.Moves; [Script(ScriptCategory.Move, "flying_press")] public class FlyingPress : Script { /// public override void ChangeEffectiveness(IExecutingMove move, IPokemon target, byte hit, ref float effectiveness) { var battleData = move.User.BattleData; if (battleData == null) return; var typeLibrary = battleData.Battle.Library.StaticLibrary.Types; // If flying type is not found, return if (!typeLibrary.TryGetTypeIdentifier("flying", out var flyingType)) return; var flyingEffectiveness = typeLibrary.GetEffectiveness(flyingType, target.Types); effectiveness *= flyingEffectiveness; } }