diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..ffeb8c0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "port": 8684, + "name": "Run PokemonScriptTester", + "request": "attach", + "type": "angelscript", + "scriptPath": "/home/nathan/Projects/PokemonLibraries/Gen7Data/%s" + } + ] +} \ No newline at end of file diff --git a/Scripts/Interfaces/BaseTurnChoice.as b/Scripts/Interfaces/BaseTurnChoice.as deleted file mode 100644 index 4f87f10..0000000 --- a/Scripts/Interfaces/BaseTurnChoice.as +++ /dev/null @@ -1,7 +0,0 @@ -shared interface BaseTurnChoice { - TurnChoiceKind Kind { get const; } - const Pokemon@ User { get const; } - MoveTurnChoice@ opCast(); - SwitchTurnChoice@ opCast(); - FleeTurnChoice@ opCast(); -} diff --git a/Scripts/Interfaces/BaseTurnChoice.astypedef b/Scripts/Interfaces/BaseTurnChoice.astypedef new file mode 100644 index 0000000..eb77972 --- /dev/null +++ b/Scripts/Interfaces/BaseTurnChoice.astypedef @@ -0,0 +1,7 @@ +type BaseTurnChoice { + TurnChoiceKind Kind { get const; }; + const Pokemon@ User { get const; }; + MoveTurnChoice@ opCast(); + SwitchTurnChoice@ opCast(); + FleeTurnChoice@ opCast(); +} diff --git a/Scripts/Interfaces/Battle.as b/Scripts/Interfaces/Battle.as deleted file mode 100644 index 7383ad9..0000000 --- a/Scripts/Interfaces/Battle.as +++ /dev/null @@ -1,16 +0,0 @@ -shared interface Battle { - const BattleLibrary@ Library { get const; } - bool CanUse(BaseTurnChoice@ choice); - bool CanFlee { get const; } - uint CurrentTurn { get const; } - BattleRandom@ Random { get const; } - ChoiceQueue@ TurnQueue { get const; } - ref AddVolatile(const constString &in name); - void RemoveVolatile(const constString &in name) const; - void SetWeather(const constString &in name) const; - void ClearWeather(const constString &in name) const; - const constString& GetWeatherName() const; - BattleSide@ GetBattleSide(uint8 index); - BattleParty@ GetParty(uint8 index); - BattleParty@ FindPartyForPokemon(Pokemon@ pokemon); -} diff --git a/Scripts/Interfaces/Battle.astypedef b/Scripts/Interfaces/Battle.astypedef new file mode 100644 index 0000000..25c0bf1 --- /dev/null +++ b/Scripts/Interfaces/Battle.astypedef @@ -0,0 +1,18 @@ +type Battle { + const BattleLibrary@ Library { get const; }; + bool CanFlee { get const; }; + uint CurrentTurn { get const; }; + BattleRandom@ Random { get const; }; + ChoiceQueue@ TurnQueue { get const; }; + narray@ Sides { get const; }; + narray@ Parties { get const; }; + bool CanUse(BaseTurnChoice@ choice); + ref@ AddVolatile(const constString &in name); + void RemoveVolatile(const constString &in name) const; + void SetWeather(const constString &in name) const; + void ClearWeather(const constString &in name) const; + const constString& GetWeatherName() const; + BattleSide@ GetBattleSide(uint8 index); + BattleParty@ GetParty(uint8 index); + BattleParty@ FindPartyForPokemon(Pokemon@ pokemon); +} diff --git a/Scripts/Interfaces/BattleItemCategory.as b/Scripts/Interfaces/BattleItemCategory.astypedef similarity index 52% rename from Scripts/Interfaces/BattleItemCategory.as rename to Scripts/Interfaces/BattleItemCategory.astypedef index e8a04e5..713df08 100644 --- a/Scripts/Interfaces/BattleItemCategory.as +++ b/Scripts/Interfaces/BattleItemCategory.astypedef @@ -1,7 +1,7 @@ -shared enum BattleItemCategory { +enum BattleItemCategory { None = 0, Healing = 1, StatusHealing = 2, - CaptureDevice = 3, + Pokeball = 3, Misc = 4, } diff --git a/Scripts/Interfaces/BattleLibrary.as b/Scripts/Interfaces/BattleLibrary.as deleted file mode 100644 index 141eb33..0000000 --- a/Scripts/Interfaces/BattleLibrary.as +++ /dev/null @@ -1,8 +0,0 @@ -shared interface BattleLibrary { - const LibrarySettings@ Settings { get const; } - const StaticLibrary@ StaticLibrary { get const; } - const SpeciesLibrary@ SpeciesLibrary { get const; } - const MoveLibrary@ MoveLibrary { get const; } - const ItemLibrary@ ItemLibrary { get const; } - const DamageLibrary@ DamageLibrary { get const; } -} diff --git a/Scripts/Interfaces/BattleLibrary.astypedef b/Scripts/Interfaces/BattleLibrary.astypedef new file mode 100644 index 0000000..a1ec733 --- /dev/null +++ b/Scripts/Interfaces/BattleLibrary.astypedef @@ -0,0 +1,8 @@ +type BattleLibrary { + const LibrarySettings@ Settings { get const; }; + const StaticLibrary@ StaticLibrary { get const; }; + const SpeciesLibrary@ SpeciesLibrary { get const; }; + const MoveLibrary@ MoveLibrary { get const; }; + const ItemLibrary@ ItemLibrary { get const; }; + const DamageLibrary@ DamageLibrary { get const; }; +} diff --git a/Scripts/Interfaces/BattleParty.as b/Scripts/Interfaces/BattleParty.as deleted file mode 100644 index a784edd..0000000 --- a/Scripts/Interfaces/BattleParty.as +++ /dev/null @@ -1,3 +0,0 @@ -shared interface BattleParty { - Party@ Party { get const; } -} diff --git a/Scripts/Interfaces/BattleParty.astypedef b/Scripts/Interfaces/BattleParty.astypedef new file mode 100644 index 0000000..3cca44b --- /dev/null +++ b/Scripts/Interfaces/BattleParty.astypedef @@ -0,0 +1,3 @@ +type BattleParty { + Party@ Party { get const; }; +} diff --git a/Scripts/Interfaces/BattleRandom.as b/Scripts/Interfaces/BattleRandom.as deleted file mode 100644 index 5d222d4..0000000 --- a/Scripts/Interfaces/BattleRandom.as +++ /dev/null @@ -1,6 +0,0 @@ -shared interface BattleRandom { - bool EffectChance(float chance, ExecutingMove@ move, Pokemon@ target); - int Get(); - int Get(int max); - int Get(int min, int max); -} diff --git a/Scripts/Interfaces/BattleRandom.astypedef b/Scripts/Interfaces/BattleRandom.astypedef new file mode 100644 index 0000000..e941f60 --- /dev/null +++ b/Scripts/Interfaces/BattleRandom.astypedef @@ -0,0 +1,6 @@ +type BattleRandom { + bool EffectChance(float chance, ExecutingMove@ move, Pokemon@ target); + int Get(); + int Get(int max); + int Get(int min, int max); +} diff --git a/Scripts/Interfaces/BattleSide.as b/Scripts/Interfaces/BattleSide.as deleted file mode 100644 index f7e30e1..0000000 --- a/Scripts/Interfaces/BattleSide.as +++ /dev/null @@ -1,6 +0,0 @@ -shared interface BattleSide { - bool SwapPositions(uint8 a, uint8 b); - uint8 SideIndex { get const; } - uint8 GetPokemonIndex(const Pokemon@ pokemon) const; - Pokemon@ GetPokemon(uint8 index) const; -} diff --git a/Scripts/Interfaces/BattleSide.astypedef b/Scripts/Interfaces/BattleSide.astypedef new file mode 100644 index 0000000..2c6622f --- /dev/null +++ b/Scripts/Interfaces/BattleSide.astypedef @@ -0,0 +1,6 @@ +type BattleSide { + bool SwapPositions(uint8 a, uint8 b); + uint8 SideIndex { get const; }; + uint8 GetPokemonIndex(const Pokemon@ pokemon) const; + Pokemon@ GetPokemon(uint8 index) const; +} diff --git a/Scripts/Interfaces/ChoiceQueue.as b/Scripts/Interfaces/ChoiceQueue.as deleted file mode 100644 index 9944500..0000000 --- a/Scripts/Interfaces/ChoiceQueue.as +++ /dev/null @@ -1,4 +0,0 @@ -shared interface ChoiceQueue { - bool MovePokemonChoiceNext(Pokemon@ target); - const BaseTurnChoice@ Peek() const; -} diff --git a/Scripts/Interfaces/ChoiceQueue.astypedef b/Scripts/Interfaces/ChoiceQueue.astypedef new file mode 100644 index 0000000..392cce1 --- /dev/null +++ b/Scripts/Interfaces/ChoiceQueue.astypedef @@ -0,0 +1,4 @@ +type ChoiceQueue { + bool MovePokemonChoiceNext(Pokemon@ target); + const BaseTurnChoice@ Peek() const; +} diff --git a/Scripts/Interfaces/DamageLibrary.as b/Scripts/Interfaces/DamageLibrary.as deleted file mode 100644 index 8e2502f..0000000 --- a/Scripts/Interfaces/DamageLibrary.as +++ /dev/null @@ -1,3 +0,0 @@ -shared interface DamageLibrary { - int GetDamage() const; -} diff --git a/Scripts/Interfaces/DamageLibrary.astypedef b/Scripts/Interfaces/DamageLibrary.astypedef new file mode 100644 index 0000000..c35ff2e --- /dev/null +++ b/Scripts/Interfaces/DamageLibrary.astypedef @@ -0,0 +1,2 @@ +type DamageLibrary { +} diff --git a/Scripts/Interfaces/DamageSource.as b/Scripts/Interfaces/DamageSource.astypedef similarity index 57% rename from Scripts/Interfaces/DamageSource.as rename to Scripts/Interfaces/DamageSource.astypedef index ad889f0..c3415ac 100644 --- a/Scripts/Interfaces/DamageSource.as +++ b/Scripts/Interfaces/DamageSource.astypedef @@ -1,4 +1,4 @@ -shared enum DamageSource { +enum DamageSource { AttackDamage = 0, Struggle = 1, } diff --git a/Scripts/Interfaces/EffectParameter.as b/Scripts/Interfaces/EffectParameter.as deleted file mode 100644 index 6861c80..0000000 --- a/Scripts/Interfaces/EffectParameter.as +++ /dev/null @@ -1,7 +0,0 @@ -shared interface EffectParameter { - EffectParameterType GetType() const; - bool AsBool() const; - int64 AsInt() const; - float AsFloat() const; - const constString& AsString() const; -} diff --git a/Scripts/Interfaces/EffectParameter.astypedef b/Scripts/Interfaces/EffectParameter.astypedef new file mode 100644 index 0000000..49ceb6f --- /dev/null +++ b/Scripts/Interfaces/EffectParameter.astypedef @@ -0,0 +1,7 @@ +type EffectParameter { + EffectParameterType GetType() const; + bool AsBool() const; + int64 AsInt() const; + float AsFloat() const; + const constString& AsString() const; +} diff --git a/Scripts/Interfaces/EffectParameterType.as b/Scripts/Interfaces/EffectParameterType.astypedef similarity index 63% rename from Scripts/Interfaces/EffectParameterType.as rename to Scripts/Interfaces/EffectParameterType.astypedef index 25edbe5..808a2da 100644 --- a/Scripts/Interfaces/EffectParameterType.as +++ b/Scripts/Interfaces/EffectParameterType.astypedef @@ -1,4 +1,4 @@ -shared enum EffectParameterType { +enum EffectParameterType { None = 0, Bool = 1, Int = 2, diff --git a/Scripts/Interfaces/EvolutionData.as b/Scripts/Interfaces/EvolutionData.as deleted file mode 100644 index 93f7f74..0000000 --- a/Scripts/Interfaces/EvolutionData.as +++ /dev/null @@ -1,6 +0,0 @@ -shared interface EvolutionData { - const Species& NewSpecies { get const; } - EvolutionMethod Method { get const; } - uint64 DataCount { get const; } - EffectParameter@ GetData(uint64 index) const; -} diff --git a/Scripts/Interfaces/EvolutionData.astypedef b/Scripts/Interfaces/EvolutionData.astypedef new file mode 100644 index 0000000..d422548 --- /dev/null +++ b/Scripts/Interfaces/EvolutionData.astypedef @@ -0,0 +1,7 @@ +type EvolutionData { + const Species& NewSpecies { get const; }; + EvolutionMethod Method { get const; }; + uint64 DataCount { get const; }; + const narray@ Data { get const; }; + EffectParameter@ GetDataAt(uint64 index) const; +} diff --git a/Scripts/Interfaces/EvolutionMethod.as b/Scripts/Interfaces/EvolutionMethod.astypedef similarity index 91% rename from Scripts/Interfaces/EvolutionMethod.as rename to Scripts/Interfaces/EvolutionMethod.astypedef index 9b71c13..f43b609 100644 --- a/Scripts/Interfaces/EvolutionMethod.as +++ b/Scripts/Interfaces/EvolutionMethod.astypedef @@ -1,4 +1,4 @@ -shared enum EvolutionMethod { +enum EvolutionMethod { Level = 0, HighFriendship = 1, HighFriendshipTime = 2, diff --git a/Scripts/Interfaces/ExecutingMove.as b/Scripts/Interfaces/ExecutingMove.as deleted file mode 100644 index ab03631..0000000 --- a/Scripts/Interfaces/ExecutingMove.as +++ /dev/null @@ -1,7 +0,0 @@ -shared interface ExecutingMove { - HitData@ GetHitData(Pokemon@ target, uint8 hit) const; - bool IsPokemonTarget(Pokemon@ pkmn) const; - Pokemon@ User { get const; } - LearnedMove@ Move { get const; } - MoveData@ UseMove { get const; } -} diff --git a/Scripts/Interfaces/ExecutingMove.astypedef b/Scripts/Interfaces/ExecutingMove.astypedef new file mode 100644 index 0000000..470e47f --- /dev/null +++ b/Scripts/Interfaces/ExecutingMove.astypedef @@ -0,0 +1,7 @@ +type ExecutingMove { + Pokemon@ User { get const; }; + LearnedMove@ Move { get const; }; + MoveData@ UseMove { get const; }; + HitData@ GetHitData(Pokemon@ target, uint8 hit) const; + bool IsPokemonTarget(Pokemon@ pkmn) const; +} diff --git a/Scripts/Interfaces/FleeTurnChoice.as b/Scripts/Interfaces/FleeTurnChoice.as deleted file mode 100644 index 93ef53b..0000000 --- a/Scripts/Interfaces/FleeTurnChoice.as +++ /dev/null @@ -1,5 +0,0 @@ -shared interface FleeTurnChoice { - TurnChoiceKind Kind { get const; } - const Pokemon@ User { get const; } - BaseTurnChoice@ opImplCast(); -} diff --git a/Scripts/Interfaces/FleeTurnChoice.astypedef b/Scripts/Interfaces/FleeTurnChoice.astypedef new file mode 100644 index 0000000..2d8693c --- /dev/null +++ b/Scripts/Interfaces/FleeTurnChoice.astypedef @@ -0,0 +1,5 @@ +type FleeTurnChoice { + TurnChoiceKind Kind { get const; }; + const Pokemon@ User { get const; }; + BaseTurnChoice@ opImplCast(); +} diff --git a/Scripts/Interfaces/Forme.as b/Scripts/Interfaces/Forme.as deleted file mode 100644 index a19c741..0000000 --- a/Scripts/Interfaces/Forme.as +++ /dev/null @@ -1,10 +0,0 @@ -shared interface Forme { - const constString& Name { get const; } - float Weight { get const; } - float Height { get const; } - uint BaseExperience { get const; } - int TypeCount { get const; } - uint8 GetType(int index) const; - uint GetStatistic(Statistic stat) const; - const constString& GetAbility(bool hidden, uint8 index) const; -} diff --git a/Scripts/Interfaces/Forme.astypedef b/Scripts/Interfaces/Forme.astypedef new file mode 100644 index 0000000..351baed --- /dev/null +++ b/Scripts/Interfaces/Forme.astypedef @@ -0,0 +1,10 @@ +type Forme { + const constString& Name { get const; }; + float Weight { get const; }; + float Height { get const; }; + uint BaseExperience { get const; }; + int TypeCount { get const; }; + uint8 GetType(int index) const; + uint GetStatistic(Statistic stat) const; + const constString& GetAbility(bool hidden, uint8 index) const; +} diff --git a/Scripts/Interfaces/Gender.as b/Scripts/Interfaces/Gender.astypedef similarity index 67% rename from Scripts/Interfaces/Gender.as rename to Scripts/Interfaces/Gender.astypedef index 33165ca..a39d241 100644 --- a/Scripts/Interfaces/Gender.as +++ b/Scripts/Interfaces/Gender.astypedef @@ -1,4 +1,4 @@ -shared enum Gender { +enum Gender { Male = 0, Female = 1, Genderless = 2, diff --git a/Scripts/Interfaces/GrowthRate.as b/Scripts/Interfaces/GrowthRate.as deleted file mode 100644 index 9432742..0000000 --- a/Scripts/Interfaces/GrowthRate.as +++ /dev/null @@ -1,4 +0,0 @@ -shared interface GrowthRate { - uint8 CalculateLevel(uint experience) const; - uint CalculateExperience(uint8 level) const; -} diff --git a/Scripts/Interfaces/GrowthRate.astypedef b/Scripts/Interfaces/GrowthRate.astypedef new file mode 100644 index 0000000..af09cc8 --- /dev/null +++ b/Scripts/Interfaces/GrowthRate.astypedef @@ -0,0 +1,4 @@ +type GrowthRate { + uint8 CalculateLevel(uint experience) const; + uint CalculateExperience(uint8 level) const; +} diff --git a/Scripts/Interfaces/GrowthRateLibrary.as b/Scripts/Interfaces/GrowthRateLibrary.as deleted file mode 100644 index 5263b2f..0000000 --- a/Scripts/Interfaces/GrowthRateLibrary.as +++ /dev/null @@ -1,4 +0,0 @@ -shared interface GrowthRateLibrary { - uint8 CalculateLevel(const constString &in growthRate, uint experience) const; - uint CalculateExperience(const constString &in growthRate, uint8 experience) const; -} diff --git a/Scripts/Interfaces/GrowthRateLibrary.astypedef b/Scripts/Interfaces/GrowthRateLibrary.astypedef new file mode 100644 index 0000000..62e5b68 --- /dev/null +++ b/Scripts/Interfaces/GrowthRateLibrary.astypedef @@ -0,0 +1,4 @@ +type GrowthRateLibrary { + uint8 CalculateLevel(const constString &in growthRate, uint experience) const; + uint CalculateExperience(const constString &in growthRate, uint8 experience) const; +} diff --git a/Scripts/Interfaces/HitData.as b/Scripts/Interfaces/HitData.as deleted file mode 100644 index f2d4279..0000000 --- a/Scripts/Interfaces/HitData.as +++ /dev/null @@ -1,9 +0,0 @@ -shared interface HitData { - bool IsCritical { get const; } - uint8 BasePower { get const; } - float Effectiveness { get const; } - uint Damage { get const; } - uint8 Type { get const; } - bool HasFailed { get const; } - void Fail(); -} diff --git a/Scripts/Interfaces/HitData.astypedef b/Scripts/Interfaces/HitData.astypedef new file mode 100644 index 0000000..1143c79 --- /dev/null +++ b/Scripts/Interfaces/HitData.astypedef @@ -0,0 +1,9 @@ +type HitData { + bool IsCritical { get const; }; + uint8 BasePower { get const; }; + float Effectiveness { get const; }; + uint Damage { get const; }; + uint8 Type { get const; }; + bool HasFailed { get const; }; + void Fail(); +} diff --git a/Scripts/Interfaces/Item.as b/Scripts/Interfaces/Item.as deleted file mode 100644 index 2b84e35..0000000 --- a/Scripts/Interfaces/Item.as +++ /dev/null @@ -1,7 +0,0 @@ -shared interface Item { - const constString& Name { get const; } - ItemCategory Category { get const; } - BattleItemCategory BattleCategory { get const; } - int Price { get const; } - bool HasFlag(const constString &in flag) const; -} diff --git a/Scripts/Interfaces/Item.astypedef b/Scripts/Interfaces/Item.astypedef new file mode 100644 index 0000000..0e6eed5 --- /dev/null +++ b/Scripts/Interfaces/Item.astypedef @@ -0,0 +1,7 @@ +type Item { + const constString& Name { get const; }; + ItemCategory Category { get const; }; + BattleItemCategory BattleCategory { get const; }; + int Price { get const; }; + bool HasFlag(const constString &in flag) const; +} diff --git a/Scripts/Interfaces/ItemCategory.as b/Scripts/Interfaces/ItemCategory.astypedef similarity index 80% rename from Scripts/Interfaces/ItemCategory.as rename to Scripts/Interfaces/ItemCategory.astypedef index b4b8834..9e18906 100644 --- a/Scripts/Interfaces/ItemCategory.as +++ b/Scripts/Interfaces/ItemCategory.astypedef @@ -1,4 +1,4 @@ -shared enum ItemCategory { +enum ItemCategory { Misc = 0, Pokeball = 1, Medicine = 2, diff --git a/Scripts/Interfaces/ItemLibrary.as b/Scripts/Interfaces/ItemLibrary.as deleted file mode 100644 index f32aa2d..0000000 --- a/Scripts/Interfaces/ItemLibrary.as +++ /dev/null @@ -1,3 +0,0 @@ -shared interface ItemLibrary { - const Item@ Get(const constString &in name) const; -} diff --git a/Scripts/Interfaces/ItemLibrary.astypedef b/Scripts/Interfaces/ItemLibrary.astypedef new file mode 100644 index 0000000..4f036f8 --- /dev/null +++ b/Scripts/Interfaces/ItemLibrary.astypedef @@ -0,0 +1,3 @@ +type ItemLibrary { + const Item@ Get(const constString &in name) const; +} diff --git a/Scripts/Interfaces/ItemUseScript.as b/Scripts/Interfaces/ItemUseScript.as index 469bf84..3eccb19 100644 --- a/Scripts/Interfaces/ItemUseScript.as +++ b/Scripts/Interfaces/ItemUseScript.as @@ -1,9 +1,9 @@ shared abstract class ItemUseScript { - void OnInitialize(const EffectParameter@[] &in){}; - bool IsItemUsable(){}; - bool IsPokemonUseItem(){}; - bool IsUseValidForPokemon(Pokemon@){}; - bool IsHoldable(){}; + void OnInitialize(const narray@){}; + bool IsItemUsable(){ return false; }; + bool IsPokemonUseItem(){ return false; }; + bool IsUseValidForPokemon(Pokemon@){ return false; }; + bool IsHoldable(){ return false; }; void OnUse(){}; void OnPokemonUse(Pokemon@){}; } diff --git a/Scripts/Interfaces/LearnedMove.as b/Scripts/Interfaces/LearnedMove.as deleted file mode 100644 index 7ef07a4..0000000 --- a/Scripts/Interfaces/LearnedMove.as +++ /dev/null @@ -1,6 +0,0 @@ -shared interface LearnedMove { - const MoveData@ MoveData { get const; } - uint8 MaxUses { get const; } - uint8 RemainingUses { get const; } - Gender LearnMethod { get const; } -} diff --git a/Scripts/Interfaces/LearnedMove.astypedef b/Scripts/Interfaces/LearnedMove.astypedef new file mode 100644 index 0000000..a3c67e6 --- /dev/null +++ b/Scripts/Interfaces/LearnedMove.astypedef @@ -0,0 +1,6 @@ +type LearnedMove { + const MoveData@ MoveData { get const; }; + uint8 MaxUses { get const; }; + uint8 RemainingUses { get const; }; + Gender LearnMethod { get const; }; +} diff --git a/Scripts/Interfaces/LibrarySettings.as b/Scripts/Interfaces/LibrarySettings.as deleted file mode 100644 index a97552a..0000000 --- a/Scripts/Interfaces/LibrarySettings.as +++ /dev/null @@ -1,5 +0,0 @@ -shared interface LibrarySettings { - uint8 MaximalLevel { get const; } - uint8 MaximalMoves { get const; } - uint16 ShinyRate { get const; } -} diff --git a/Scripts/Interfaces/LibrarySettings.astypedef b/Scripts/Interfaces/LibrarySettings.astypedef new file mode 100644 index 0000000..3882e46 --- /dev/null +++ b/Scripts/Interfaces/LibrarySettings.astypedef @@ -0,0 +1,5 @@ +type LibrarySettings { + uint8 MaximalLevel { get const; }; + uint8 MaximalMoves { get const; }; + uint16 ShinyRate { get const; }; +} diff --git a/Scripts/Interfaces/MoveCategory.as b/Scripts/Interfaces/MoveCategory.astypedef similarity index 61% rename from Scripts/Interfaces/MoveCategory.as rename to Scripts/Interfaces/MoveCategory.astypedef index 07abd93..359a537 100644 --- a/Scripts/Interfaces/MoveCategory.as +++ b/Scripts/Interfaces/MoveCategory.astypedef @@ -1,4 +1,4 @@ -shared enum MoveCategory { +enum MoveCategory { Physical = 0, Special = 1, Status = 2, diff --git a/Scripts/Interfaces/MoveData.as b/Scripts/Interfaces/MoveData.as deleted file mode 100644 index e69d2d6..0000000 --- a/Scripts/Interfaces/MoveData.as +++ /dev/null @@ -1,11 +0,0 @@ -shared interface MoveData { - const constString& Name { get const; } - uint8 Type { get const; } - MoveCategory Category { get const; } - uint8 BasePower { get const; } - uint8 Accuracy { get const; } - uint8 BaseUsages { get const; } - MoveTarget Target { get const; } - int8 Priority { get const; } - bool HasFlag(const constString &in flag) const; -} diff --git a/Scripts/Interfaces/MoveData.astypedef b/Scripts/Interfaces/MoveData.astypedef new file mode 100644 index 0000000..44bc53c --- /dev/null +++ b/Scripts/Interfaces/MoveData.astypedef @@ -0,0 +1,11 @@ +type MoveData { + const constString& Name { get const; }; + uint8 Type { get const; }; + MoveCategory Category { get const; }; + uint8 BasePower { get const; }; + uint8 Accuracy { get const; }; + uint8 BaseUsages { get const; }; + MoveTarget Target { get const; }; + int8 Priority { get const; }; + bool HasFlag(const constString &in flag) const; +} diff --git a/Scripts/Interfaces/MoveLearnMethod.as b/Scripts/Interfaces/MoveLearnMethod.as deleted file mode 100644 index a64b74a..0000000 --- a/Scripts/Interfaces/MoveLearnMethod.as +++ /dev/null @@ -1,4 +0,0 @@ -shared enum MoveLearnMethod { - Unknown = 0, - Level = 1, -} diff --git a/Scripts/Interfaces/MoveLearnMethod.astypedef b/Scripts/Interfaces/MoveLearnMethod.astypedef new file mode 100644 index 0000000..8828d05 --- /dev/null +++ b/Scripts/Interfaces/MoveLearnMethod.astypedef @@ -0,0 +1,4 @@ +enum MoveLearnMethod { + Unknown = 0, + Level = 1, +} diff --git a/Scripts/Interfaces/MoveLibrary.as b/Scripts/Interfaces/MoveLibrary.as deleted file mode 100644 index c32311e..0000000 --- a/Scripts/Interfaces/MoveLibrary.as +++ /dev/null @@ -1,3 +0,0 @@ -shared interface MoveLibrary { - const MoveData@ Get(const constString &in name) const; -} diff --git a/Scripts/Interfaces/MoveLibrary.astypedef b/Scripts/Interfaces/MoveLibrary.astypedef new file mode 100644 index 0000000..45a051f --- /dev/null +++ b/Scripts/Interfaces/MoveLibrary.astypedef @@ -0,0 +1,3 @@ +type MoveLibrary { + const MoveData@ Get(const constString &in name) const; +} diff --git a/Scripts/Interfaces/MoveTarget.as b/Scripts/Interfaces/MoveTarget.astypedef similarity index 89% rename from Scripts/Interfaces/MoveTarget.as rename to Scripts/Interfaces/MoveTarget.astypedef index ab70902..4bddefb 100644 --- a/Scripts/Interfaces/MoveTarget.as +++ b/Scripts/Interfaces/MoveTarget.astypedef @@ -1,4 +1,4 @@ -shared enum MoveTarget { +enum MoveTarget { Adjacent = 0, AdjacentAlly = 1, AdjacentAllySelf = 2, diff --git a/Scripts/Interfaces/MoveTurnChoice.as b/Scripts/Interfaces/MoveTurnChoice.as deleted file mode 100644 index 8716d38..0000000 --- a/Scripts/Interfaces/MoveTurnChoice.as +++ /dev/null @@ -1,7 +0,0 @@ -shared interface MoveTurnChoice { - TurnChoiceKind Kind { get const; } - Pokemon@ User { get const; } - LearnedMove@ Move { get const; } - int8 Priority { get const; } - BaseTurnChoice@ opImplCast(); -} diff --git a/Scripts/Interfaces/MoveTurnChoice.astypedef b/Scripts/Interfaces/MoveTurnChoice.astypedef new file mode 100644 index 0000000..0b0f0f7 --- /dev/null +++ b/Scripts/Interfaces/MoveTurnChoice.astypedef @@ -0,0 +1,7 @@ +type MoveTurnChoice { + TurnChoiceKind Kind { get const; }; + Pokemon@ User { get const; }; + LearnedMove@ Move { get const; }; + int8 Priority { get const; }; + BaseTurnChoice@ opImplCast(); +} diff --git a/Scripts/Interfaces/Party.as b/Scripts/Interfaces/Party.as deleted file mode 100644 index 9d8f3a7..0000000 --- a/Scripts/Interfaces/Party.as +++ /dev/null @@ -1,4 +0,0 @@ -shared interface Party { - Pokemon@ GetAtIndex(int index) const; - int Length { get const; } -} diff --git a/Scripts/Interfaces/Party.astypedef b/Scripts/Interfaces/Party.astypedef new file mode 100644 index 0000000..6e32cd8 --- /dev/null +++ b/Scripts/Interfaces/Party.astypedef @@ -0,0 +1,5 @@ +type Party { + const narray@ Pokemon { get const; }; + uint64 Length { get const; }; + Pokemon@ GetAtIndex(int index) const; +} diff --git a/Scripts/Interfaces/PkmnScript.as b/Scripts/Interfaces/PkmnScript.as index 2c9061b..650373e 100644 --- a/Scripts/Interfaces/PkmnScript.as +++ b/Scripts/Interfaces/PkmnScript.as @@ -1,5 +1,5 @@ shared abstract class PkmnScript { - void OnInitialize(const EffectParameter@[] &in){}; + void OnInitialize(const narray@){}; void Stack(){}; void OnRemove(){}; void OnBeforeTurn(BaseTurnChoice@){}; diff --git a/Scripts/Interfaces/Pokemon.as b/Scripts/Interfaces/Pokemon.as deleted file mode 100644 index bd88c29..0000000 --- a/Scripts/Interfaces/Pokemon.as +++ /dev/null @@ -1,37 +0,0 @@ -shared interface Pokemon { - const Species@ Species { get const; } - const Forme@ Forme { get const; } - uint8 Level { get const; } - uint Experience { get const; } - Gender Gender { get const; } - uint8 Coloring { get const; } - bool Shiny { get const; } - const Item@ HeldItem { get const; } - bool HasHeldItem(const constString &in name) const; - void SetHeldItem(const constString &in name); - void SetHeldItem(const Item@ item); - uint CurrentHealth { get const; } - const string& Nickname { get const; } - const constString& ActiveAbility { get const; } - bool IsFainted { get const; } - bool HasType(uint8 type) const; - uint MaxHealth { get const; } - void Damage(uint type, DamageSource source); - void Heal(uint type); - void OverrideActiveAbility(const string &in ability); - LearnedMove@[]@ GetMoves() const; - void ChangeStatBoost(Statistic stat, int8 amount); - const Species@ DisplaySpecies { get const; } - const Species@ DisplayForme { get const; } - uint GetFlatStat(Statistic stat) const; - uint GetBoostedStat(Statistic stat) const; - uint GetBaseStat(Statistic stat) const; - int8 GetStatBoost(Statistic stat) const; - ref AddVolatile(const constString &in name); - void RemoveVolatile(const constString &in name) const; - Battle@ Battle { get const; } - BattleSide@ BattleSide { get const; } - const constString& Status { get const; } - void ClearStatus() const; - void SetStatus(const constString &inout name); -} diff --git a/Scripts/Interfaces/Pokemon.astypedef b/Scripts/Interfaces/Pokemon.astypedef new file mode 100644 index 0000000..b8241a6 --- /dev/null +++ b/Scripts/Interfaces/Pokemon.astypedef @@ -0,0 +1,37 @@ +type Pokemon { + const Species@ Species { get const; }; + const Forme@ Forme { get const; }; + uint8 Level { get const; }; + uint Experience { get const; }; + Gender Gender { get const; }; + uint8 Coloring { get const; }; + bool Shiny { get const; }; + const Item@ HeldItem { get const; }; + uint CurrentHealth { get const; }; + const constString& ActiveAbility { get const; }; + bool IsFainted { get const; }; + uint MaxHealth { get const; }; + const Species@ DisplaySpecies { get const; }; + const Forme@ DisplayForme { get const; }; + Battle@ Battle { get const; }; + BattleSide@ BattleSide { get const; }; + const constString& Status { get const; }; + const narray@ Moves { get const; }; + bool HasHeldItem(const constString &in name) const; + void SetHeldItem(const constString &in name); + void SetHeldItem(const Item@ item); + string Nickname { get const; }; + bool HasType(uint8 type) const; + void Damage(uint type, DamageSource source); + void Heal(uint type); + void OverrideActiveAbility(const string &in ability); + void ChangeStatBoost(Statistic stat, int8 amount); + uint GetFlatStat(Statistic stat) const; + uint GetBoostedStat(Statistic stat) const; + uint GetBaseStat(Statistic stat) const; + int8 GetStatBoost(Statistic stat) const; + ref@ AddVolatile(const constString &in name); + void RemoveVolatile(const constString &in name) const; + void ClearStatus() const; + void SetStatus(const constString &inout name); +} diff --git a/Scripts/Interfaces/Species.as b/Scripts/Interfaces/Species.as deleted file mode 100644 index bc87d23..0000000 --- a/Scripts/Interfaces/Species.as +++ /dev/null @@ -1,9 +0,0 @@ -shared interface Species { - const constString& Name { get const; } - uint16 Id { get const; } - float GenderRate { get const; } - uint8 CaptureRate { get const; } - Gender GetRandomGender() const; - const Forme@ GetForme(string key) const; - const Forme@ DefaultForme { get const; } -} diff --git a/Scripts/Interfaces/Species.astypedef b/Scripts/Interfaces/Species.astypedef new file mode 100644 index 0000000..0c9431f --- /dev/null +++ b/Scripts/Interfaces/Species.astypedef @@ -0,0 +1,9 @@ +type Species { + const constString& Name { get const; }; + uint16 Id { get const; }; + float GenderRate { get const; }; + uint8 CaptureRate { get const; }; + const Forme@ DefaultForme { get const; }; + Gender GetRandomGender() const; + const Forme@ GetForme(string key) const; +} diff --git a/Scripts/Interfaces/SpeciesLibrary.as b/Scripts/Interfaces/SpeciesLibrary.as deleted file mode 100644 index 84c0de3..0000000 --- a/Scripts/Interfaces/SpeciesLibrary.as +++ /dev/null @@ -1,3 +0,0 @@ -shared interface SpeciesLibrary { - const Species@ Get(const constString &in name) const; -} diff --git a/Scripts/Interfaces/SpeciesLibrary.astypedef b/Scripts/Interfaces/SpeciesLibrary.astypedef new file mode 100644 index 0000000..e13e429 --- /dev/null +++ b/Scripts/Interfaces/SpeciesLibrary.astypedef @@ -0,0 +1,3 @@ +type SpeciesLibrary { + const Species@ Get(const constString &in name) const; +} diff --git a/Scripts/Interfaces/StaticLibrary.as b/Scripts/Interfaces/StaticLibrary.as deleted file mode 100644 index 774ef36..0000000 --- a/Scripts/Interfaces/StaticLibrary.as +++ /dev/null @@ -1,8 +0,0 @@ -shared interface StaticLibrary { - const LibrarySettings@ Settings { get const; } - const SpeciesLibrary@ SpeciesLibrary { get const; } - const MoveLibrary@ MoveLibrary { get const; } - const ItemLibrary@ ItemLibrary { get const; } - const GrowthRateLibrary@ GrowthRateLibrary { get const; } - const TypeLibrary@ TypeLibrary { get const; } -} diff --git a/Scripts/Interfaces/StaticLibrary.astypedef b/Scripts/Interfaces/StaticLibrary.astypedef new file mode 100644 index 0000000..3e46ff7 --- /dev/null +++ b/Scripts/Interfaces/StaticLibrary.astypedef @@ -0,0 +1,8 @@ +type StaticLibrary { + const LibrarySettings@ Settings { get const; }; + const SpeciesLibrary@ SpeciesLibrary { get const; }; + const MoveLibrary@ MoveLibrary { get const; }; + const ItemLibrary@ ItemLibrary { get const; }; + const GrowthRateLibrary@ GrowthRateLibrary { get const; }; + const TypeLibrary@ TypeLibrary { get const; }; +} diff --git a/Scripts/Interfaces/Statistic.as b/Scripts/Interfaces/Statistic.astypedef similarity index 79% rename from Scripts/Interfaces/Statistic.as rename to Scripts/Interfaces/Statistic.astypedef index 2999436..7341aee 100644 --- a/Scripts/Interfaces/Statistic.as +++ b/Scripts/Interfaces/Statistic.astypedef @@ -1,4 +1,4 @@ -shared enum Statistic { +enum Statistic { HP = 0, Attack = 1, Defense = 2, diff --git a/Scripts/Interfaces/SwitchTurnChoice.as b/Scripts/Interfaces/SwitchTurnChoice.as deleted file mode 100644 index 09aff2f..0000000 --- a/Scripts/Interfaces/SwitchTurnChoice.as +++ /dev/null @@ -1,6 +0,0 @@ -shared interface SwitchTurnChoice { - TurnChoiceKind Kind { get const; } - const Pokemon@ User { get const; } - Pokemon@ NewPokemon { get const; } - BaseTurnChoice@ opImplCast(); -} diff --git a/Scripts/Interfaces/SwitchTurnChoice.astypedef b/Scripts/Interfaces/SwitchTurnChoice.astypedef new file mode 100644 index 0000000..8d5507b --- /dev/null +++ b/Scripts/Interfaces/SwitchTurnChoice.astypedef @@ -0,0 +1,6 @@ +type SwitchTurnChoice { + TurnChoiceKind Kind { get const; }; + const Pokemon@ User { get const; }; + Pokemon@ NewPokemon { get const; }; + BaseTurnChoice@ opImplCast(); +} diff --git a/Scripts/Interfaces/Testing.as b/Scripts/Interfaces/Testing.as deleted file mode 100644 index 261fd47..0000000 --- a/Scripts/Interfaces/Testing.as +++ /dev/null @@ -1,13 +0,0 @@ -Party@ CreateSimpleParty(const array&in species, uint8 level); - -Battle@ CreateSimpleBattle(uint seed, const constString&in species1, const constString&in species2, uint8 level); -Battle@ CreateSimpleBattle(uint seed, Party@ p1, Party@ p2); - -// Note that this returns a ref handle, and therefore should be cast first. -ref@ CreateMoveScript(const constString&in name); -ExecutingMove@ CreateExecutingMove(const constString&in moveName, Pokemon@ user, Pokemon@ target); -MoveTurnChoice@ CreateMoveTurnChoice(const constString&in moveName, Pokemon@ user, uint8 targetSide, uint8 target); - -bool Require(bool expression); -bool RequireEquals(int expected, int actual); -bool RequireEquals(const string &in expected, const string &in actual); \ No newline at end of file diff --git a/Scripts/Interfaces/TurnChoiceKind.as b/Scripts/Interfaces/TurnChoiceKind.astypedef similarity index 67% rename from Scripts/Interfaces/TurnChoiceKind.as rename to Scripts/Interfaces/TurnChoiceKind.astypedef index 3d40a64..ab20def 100644 --- a/Scripts/Interfaces/TurnChoiceKind.as +++ b/Scripts/Interfaces/TurnChoiceKind.astypedef @@ -1,4 +1,4 @@ -shared enum TurnChoiceKind { +enum TurnChoiceKind { Pass = 0, Attack = 1, Item = 2, diff --git a/Scripts/Interfaces/TypeLibrary.as b/Scripts/Interfaces/TypeLibrary.as deleted file mode 100644 index 566d623..0000000 --- a/Scripts/Interfaces/TypeLibrary.as +++ /dev/null @@ -1,4 +0,0 @@ -shared interface TypeLibrary { - uint8 GetTypeId(const constString &in name) const; - float GetSingleEffectiveness(uint8 attacking, uint8 defensive) const; -} diff --git a/Scripts/Interfaces/TypeLibrary.astypedef b/Scripts/Interfaces/TypeLibrary.astypedef new file mode 100644 index 0000000..5c41e26 --- /dev/null +++ b/Scripts/Interfaces/TypeLibrary.astypedef @@ -0,0 +1,4 @@ +type TypeLibrary { + uint8 GetTypeId(const constString &in name) const; + float GetSingleEffectiveness(uint8 attacking, uint8 defensive) const; +} diff --git a/Scripts/Interfaces/constString.as b/Scripts/Interfaces/constString.as deleted file mode 100644 index 2c0ba79..0000000 --- a/Scripts/Interfaces/constString.as +++ /dev/null @@ -1,6 +0,0 @@ -shared interface constString { - bool opEquals(const constString &in) const; - bool opEquals(const string &in) const; - uint opImplConv(); - string opImplConv(); -} diff --git a/Scripts/Interfaces/constString.astypedef b/Scripts/Interfaces/constString.astypedef new file mode 100644 index 0000000..c876d7e --- /dev/null +++ b/Scripts/Interfaces/constString.astypedef @@ -0,0 +1,11 @@ +valuetype constString { + behave 2 void f(); + behave 0 void f(); + behave 0 void f(const string&in s); + behave 0 void f(const constString&in); + constString& opAssign(const constString &in); + bool opEquals(const constString &in) const; + bool opEquals(const string &in) const; + uint opImplConv(); + string opImplConv(); +} diff --git a/Scripts/Interfaces/dictionary.as b/Scripts/Interfaces/dictionary.as deleted file mode 100644 index a75362b..0000000 --- a/Scripts/Interfaces/dictionary.as +++ /dev/null @@ -1,16 +0,0 @@ -shared interface dictionary { - void set(const string &in, const ?&in); - bool get(const string &in, ? &out) const; - void set(const string &in, const int64&in); - bool get(const string &in, int64 &out) const; - void set(const string &in, const double&in); - bool get(const string &in, double &out) const; - bool exists(const string &in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string &in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string &in); - const dictionaryValue& opIndex(const string &in) const; -} diff --git a/Scripts/Interfaces/dictionary.astypedef b/Scripts/Interfaces/dictionary.astypedef new file mode 100644 index 0000000..1bcdce3 --- /dev/null +++ b/Scripts/Interfaces/dictionary.astypedef @@ -0,0 +1,18 @@ +type dictionary { + behave 4 dictionary@ f(int&in) { repeat { string, ? } }; + dictionary& opAssign(const dictionary &in); + void set(const string &in, const ?&in); + bool get(const string &in, ? &out) const; + void set(const string &in, const int64&in); + bool get(const string &in, int64 &out) const; + void set(const string &in, const double&in); + bool get(const string &in, double &out) const; + bool exists(const string &in) const; + bool isEmpty() const; + uint getSize() const; + bool delete(const string &in); + void deleteAll(); + string[]@ getKeys() const; + dictionaryValue& opIndex(const string &in); + const dictionaryValue& opIndex(const string &in) const; +} diff --git a/Scripts/Interfaces/dictionaryValue.as b/Scripts/Interfaces/dictionaryValue.as deleted file mode 100644 index 562b0fe..0000000 --- a/Scripts/Interfaces/dictionaryValue.as +++ /dev/null @@ -1,8 +0,0 @@ -shared interface dictionaryValue { - dictionaryValue& opHndlAssign(const ? &in); - dictionaryValue& opHndlAssign(const dictionaryValue &in); - void opCast(? &out); - void opConv(? &out); - int64 opConv(); - double opConv(); -} diff --git a/Scripts/Interfaces/dictionaryValue.astypedef b/Scripts/Interfaces/dictionaryValue.astypedef new file mode 100644 index 0000000..b4cc9e6 --- /dev/null +++ b/Scripts/Interfaces/dictionaryValue.astypedef @@ -0,0 +1,12 @@ +type dictionaryValue { + dictionaryValue& opAssign(const dictionaryValue &in); + dictionaryValue& opHndlAssign(const ? &in); + dictionaryValue& opHndlAssign(const dictionaryValue &in); + dictionaryValue& opAssign(const ? &in); + dictionaryValue& opAssign(double); + dictionaryValue& opAssign(int64); + void opCast(? &out); + void opConv(? &out); + int64 opConv(); + double opConv(); +} diff --git a/Scripts/Interfaces/globals.astypedef b/Scripts/Interfaces/globals.astypedef new file mode 100644 index 0000000..1355951 --- /dev/null +++ b/Scripts/Interfaces/globals.astypedef @@ -0,0 +1,10 @@ +func string formatInt(int64 val, const string&in options = "", uint width = 0); +func string formatUInt(uint64 val, const string&in options = "", uint width = 0); +func string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); +func int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); +func uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); +func double parseFloat(const string&in, uint&out byteCount = 0); +func void print(const string&in); +func void print(const constString&in); +func void throw(const string&in); +func string getExceptionInfo(); diff --git a/Scripts/Interfaces/narray.astypedef b/Scripts/Interfaces/narray.astypedef new file mode 100644 index 0000000..2ca4be8 --- /dev/null +++ b/Scripts/Interfaces/narray.astypedef @@ -0,0 +1,5 @@ +type narray { + uint64 Length { get const; }; + const T@ At(uint64 index) const; + const T@ opIndex(uint64) const; +} diff --git a/Scripts/Interfaces/ref.astypedef b/Scripts/Interfaces/ref.astypedef new file mode 100644 index 0000000..4074dd1 --- /dev/null +++ b/Scripts/Interfaces/ref.astypedef @@ -0,0 +1,7 @@ +type ref { + void opCast(? &out); + ref@& opHndlAssign(const ref &in); + ref@& opHndlAssign(const ? &in); + bool opEquals(const ref@ &in) const; + bool opEquals(const ? &in) const; +} diff --git a/Scripts/Items/heal_item.as b/Scripts/Items/heal_item.as index c029687..ceb3638 100644 --- a/Scripts/Items/heal_item.as +++ b/Scripts/Items/heal_item.as @@ -3,7 +3,7 @@ namespace Pokemon{ class HealItem : ItemUseScript { uint _amount; - void OnInitialize(const array &in parameters) override { + void OnInitialize(const narray@ parameters) override { _amount = uint(parameters[0].AsInt()); } diff --git a/Scripts/Moves/Assist.as b/Scripts/Moves/Assist.as index 900020c..b0349a8 100644 --- a/Scripts/Moves/Assist.as +++ b/Scripts/Moves/Assist.as @@ -1,5 +1,3 @@ -#include "Utilities/CopyableMoves.as" - namespace Gen7 { [Move effect=Assist] class Assist : PkmnScript { @@ -8,19 +6,19 @@ namespace Gen7 { auto battle = user.Battle; auto party = battle.FindPartyForPokemon(user).Party; array possibleMoves; - for (int i = 0; i < party.Length; i++){ + for (uint64 i = 0; i < party.Length; i++){ auto mon = party.GetAtIndex(i); if (mon is null){ continue; } if (mon is user){ continue; } - auto moves = mon.GetMoves(); - for (uint j = 0; j < moves.length; j++){ + auto moves = mon.Moves; + for (uint64 j = 0; j < moves.Length; j++){ auto m = moves[j]; if (m is null){ continue; } if (CopyableMoves::CanCopyMove(m.MoveData)){ possibleMoves.insertLast(m.MoveData); } } - } + } if (possibleMoves.length == 0){ // TODO: Log failure. return; diff --git a/Scripts/Moves/ChangeAllTargetStats.as b/Scripts/Moves/ChangeAllTargetStats.as index 4a3d100..f71ca62 100644 --- a/Scripts/Moves/ChangeAllTargetStats.as +++ b/Scripts/Moves/ChangeAllTargetStats.as @@ -3,7 +3,7 @@ namespace Gen7 { class ChangeAllTargetStats : PkmnScript{ int8 _amount; - void OnInitialize(const EffectParameter@[] &in parameters) override{ + void OnInitialize(const narray@ parameters) override{ _amount = int8(parameters[0].AsInt()); } diff --git a/Scripts/Moves/ChangeTargetAtt.as b/Scripts/Moves/ChangeTargetAtt.as index 689b82f..0767cfd 100644 --- a/Scripts/Moves/ChangeTargetAtt.as +++ b/Scripts/Moves/ChangeTargetAtt.as @@ -3,7 +3,7 @@ namespace Gen7 { class ChangeTargetAttack : PkmnScript{ int8 _amount; - void OnInitialize(const EffectParameter@[] &in parameters) override{ + void OnInitialize(const narray@ parameters) override{ _amount = int8(parameters[0].AsInt()); } diff --git a/Scripts/Moves/ChangeTargetDef.as b/Scripts/Moves/ChangeTargetDef.as index 3f196b4..d57f0fe 100644 --- a/Scripts/Moves/ChangeTargetDef.as +++ b/Scripts/Moves/ChangeTargetDef.as @@ -3,7 +3,7 @@ namespace Gen7 { shared class ChangeTargetDefense : PkmnScript{ int8 _amount; - void OnInitialize(const EffectParameter@[] &in parameters) override{ + void OnInitialize(const narray@ parameters) override{ _amount = int8(parameters[0].AsInt()); } diff --git a/Scripts/Moves/ChangeTargetSpDef.as b/Scripts/Moves/ChangeTargetSpDef.as index b402860..2d3e3f0 100644 --- a/Scripts/Moves/ChangeTargetSpDef.as +++ b/Scripts/Moves/ChangeTargetSpDef.as @@ -3,7 +3,7 @@ namespace Gen7 { shared class ChangeTargetSpecialDefense : PkmnScript{ int8 _amount; - void OnInitialize(const array &in parameters) override{ + void OnInitialize(const narray@ parameters) override{ _amount = int8(parameters[0].AsInt()); } diff --git a/Scripts/Moves/ChangeTargetSpeed.as b/Scripts/Moves/ChangeTargetSpeed.as index 265a970..08e8d90 100644 --- a/Scripts/Moves/ChangeTargetSpeed.as +++ b/Scripts/Moves/ChangeTargetSpeed.as @@ -3,7 +3,7 @@ namespace Gen7 { shared class ChangeTargetSpeed : PkmnScript{ int8 _amount; - void OnInitialize(const array &in parameters) override{ + void OnInitialize(const narray@ parameters) override{ _amount = int8(parameters[0].AsInt()); } diff --git a/Scripts/Moves/CurePartyStatus.as b/Scripts/Moves/CurePartyStatus.as index 22040e4..467930f 100644 --- a/Scripts/Moves/CurePartyStatus.as +++ b/Scripts/Moves/CurePartyStatus.as @@ -7,9 +7,9 @@ namespace Gen7 { auto battleParty = user.Battle.FindPartyForPokemon(user); if (battleParty !is null){ - auto party = battleParty.Party; - for (int i = 0; i < party.Length; i++){ - auto m = party.GetAtIndex(i); + auto party = battleParty.Party.Pokemon; + for (uint64 i = 0; i < party.Length; i++){ + auto m = party[i]; if (m !is null){ m.ClearStatus(); } diff --git a/Scripts/Moves/Drain.as b/Scripts/Moves/Drain.as index 3ae9b62..ecd5edb 100644 --- a/Scripts/Moves/Drain.as +++ b/Scripts/Moves/Drain.as @@ -3,7 +3,7 @@ namespace Gen7 { shared class DrainMove : PkmnScript{ private float _healModifier = 0; - void OnInitialize(const array &in parameters) override { + void OnInitialize(const narray@ parameters) override { _healModifier = parameters[0].AsFloat(); } diff --git a/Scripts/Moves/HealEachEndOfTurn.as b/Scripts/Moves/HealEachEndOfTurn.as index cfb2e0f..edfbd93 100644 --- a/Scripts/Moves/HealEachEndOfTurn.as +++ b/Scripts/Moves/HealEachEndOfTurn.as @@ -3,7 +3,7 @@ namespace Gen7 { shared class HealEachEndOfTurn : PkmnScript { float _amount; - void OnInitialize(const EffectParameter@[] &in parameters) override{ + void OnInitialize(const narray@ parameters) override{ _amount = float(parameters[0].AsFloat()) / 100; } diff --git a/Scripts/Utilities/CopyableMoves.as b/Scripts/Utilities/CopyableMoves.as index 125ea82..d781f1d 100644 --- a/Scripts/Utilities/CopyableMoves.as +++ b/Scripts/Utilities/CopyableMoves.as @@ -1,6 +1,6 @@ namespace Gen7 { namespace CopyableMoves{ - dictionary _nonCopyableMoves = { + dictionary@ _nonCopyableMoves = { {"assist", true}, {"baneful_bunker", true}, {"beak_blast", true},