Commit Graph

389 Commits

Author SHA1 Message Date
Deukhoofd af50f1cc74
Adds support for Angelscript debugger. 2021-10-22 15:11:52 +02:00
Deukhoofd accf582a51
Style fixes. 2021-09-26 10:53:26 +02:00
Deukhoofd 4841590c17
Fixes windows build. 2021-09-26 10:45:37 +02:00
Deukhoofd 1e10d25dbd
Fixes narray::Length not being a property in angelscript. 2021-09-25 18:33:12 +02:00
Deukhoofd 9fd88f6192
Readds missing function. 2021-09-25 18:27:27 +02:00
Deukhoofd 8005ad1232
Large cleanup of type registration, added new "NativeArray" (or narray in angelscript) type that simply holds a pointer to a native list, to prevent copies we don't need 2021-09-25 17:56:45 +02:00
Deukhoofd e5ea2bbc90
Adds caching for expensive type resolution. 2021-09-22 19:02:01 +02:00
Deukhoofd 7e9e574577
Fixes invalid angelscript declaration for Pokemon::get_DisplayForme. 2021-09-21 23:20:28 +02:00
Deukhoofd 29fe82f04d
More using the getter macro, adds support for non const getter functions. 2021-09-21 23:14:26 +02:00
Deukhoofd 2e8cf4379b
Implements new standard macro/function for registering getters in Angelscript, to reduce the amount of errors there. 2021-09-21 22:37:13 +02:00
Deukhoofd a43dc45665
Fixes Pokemon::get_DisplaySpecies and get_DisplayForme segfaulting in angelscript. 2021-09-19 13:02:24 +02:00
Deukhoofd 3a5fa268dd
Fixes Pokemon::get_Nickname in angelscript. 2021-09-19 12:57:11 +02:00
Deukhoofd 728bc13ac1
Update to new CreatureLib nickname handling 2021-09-19 11:43:02 +02:00
Deukhoofd a6771353b0
Fixes BattleParty::GetParty not returning valid value in AngelScript 2021-08-29 17:45:27 +02:00
Deukhoofd bb4fd8456c
Fixes CreatePokemon initializing invalid moves. 2021-08-29 17:06:45 +02:00
Deukhoofd e323b62250
Damage calculation can only return 0 if effectiveness is 0. 2021-08-28 12:20:22 +02:00
Deukhoofd aee0f04d9c
Further fixes for rounding errors in damage calculations. 2021-08-28 12:16:01 +02:00
Deukhoofd 037ff590f0
Fixes for damage calculation: Adds missing + 2, and handles rounding correctly. 2021-08-28 12:04:18 +02:00
Deukhoofd 7fe7c8becf
Add support for turning off the random damage modifier. 2021-08-24 20:57:45 +02:00
Deukhoofd dfcdfd8343
Further fixes for setting pokemon held items from angelscript. 2021-08-24 20:43:01 +02:00
Deukhoofd 249584bfc8
Fixes angelscript interface for SetHeldItem. 2021-08-24 20:37:17 +02:00
Deukhoofd 0eb2cb0ed0
Adds OverrideBasePower script hook. 2021-08-24 20:28:27 +02:00
Deukhoofd 7fcc4a63c5
Adds get function to angelscript to get a pokemon at index. 2021-08-23 21:40:20 +02:00
Deukhoofd e320e32226
Adds angelscript getter for current turn of battle. 2021-08-23 21:26:48 +02:00
Deukhoofd 8919ae4b02
Rework metadata to have a standard handling. 2021-08-22 15:01:51 +02:00
Deukhoofd cf01511cfb
Fixes issue with getting builder from AngelScriptResolver 2021-08-22 13:27:54 +02:00
Deukhoofd 91a87af6b5
Adds getter for retrieving script builder from AngelScriptResolver. 2021-08-22 13:01:42 +02:00
Deukhoofd b3d0e8b0cf
Adds support for setting define hooks. 2021-08-22 12:51:00 +02:00
Deukhoofd 592552cb72
Resolve issue with multithreading when trying to get a base type from Angelscript. 2021-08-22 11:16:42 +02:00
Deukhoofd b5ea856443
Remove status handling, as its already in CreatureLib 2021-07-09 15:37:44 +02:00
Deukhoofd 2e2dfbaf1d
Adds missing references for EvolutionScript 2021-07-09 14:57:20 +02:00
Deukhoofd 5a082c5995
Style Fixes 2021-07-09 14:36:14 +02:00
Deukhoofd d5ef7a33f8
Adds newlines at the end of HelperFile for gcc 2021-07-09 14:32:21 +02:00
Deukhoofd 4c9d472f10
Several fixes for binary stream 2021-07-09 14:18:26 +02:00
Deukhoofd 9424a209ec
Adds a bunch of helpers for evolution, as well as custom script evolution methods. 2021-07-09 13:54:42 +02:00
Deukhoofd 3d3bff3772
Work on evolution helpers 2021-06-27 17:11:37 +02:00
Deukhoofd 4633c6beef
Adds function to set IsEgg on Pokemon 2021-06-27 12:21:02 +02:00
Deukhoofd 68e7dd5f08
Adds a bunch of new evolution methods. 2021-06-26 16:20:25 +02:00
Deukhoofd 1f298cef08
Fixes for FindPreEvolution from C Interface 2021-06-26 13:36:21 +02:00
Deukhoofd 94de55f933
Adds Pokemon::IsEgg function, make eggs not usable in battle. 2021-06-19 12:44:05 +02:00
Deukhoofd d779c7cbfe
Adds implicit conversion from constString -> String in angelscript. 2021-05-13 14:05:14 +02:00
Deukhoofd 3fb32c33ec
Fix MoveTurnChoice.GetUser returning a const in angelscript. 2021-05-13 13:51:21 +02:00
Deukhoofd 59a092a06e
Use GetUseAttack for executingmove 2021-05-13 13:25:08 +02:00
Deukhoofd d8eac290cf
Fix Windows Build. 2021-05-13 13:19:01 +02:00
Deukhoofd 109042ff52
Adds support for including angelscript files using #include pragma, as long as they're within a set source directory. 2021-05-13 12:47:02 +02:00
Deukhoofd 5c6bbf485f
Fix Angelscript battle returning normal Party instead of BattleParty. 2021-05-08 12:28:50 +02:00
Deukhoofd de82bbecf4
Adds angelscript wrappers for getting, setting, and clearing status. 2021-05-08 12:21:25 +02:00
Deukhoofd 6def68cf72
Adds Angelscript wrappers for Party. 2021-05-08 12:12:36 +02:00
Deukhoofd 1c66aa8696
Return optional pointer instead of raw pointers in Pokemon::GetMoves 2021-04-23 11:53:00 +02:00
Deukhoofd 939cf4e328
Update CreatureLib. 2021-04-18 12:56:46 +02:00
Deukhoofd a8f3e30049
Work on making Angelscript work threaded 2021-04-17 13:50:43 +02:00
Deukhoofd 7dff0c90bc
Update to latest CreatureLib. 2021-04-13 22:48:38 +02:00
Deukhoofd 44c47d64bd
When cloning a battle, ensure the old battle data is always cleared from the cloned party. 2021-04-13 18:33:10 +02:00
Deukhoofd 5b9bb68682
Update to latest CreatureLib. 2021-04-11 23:46:09 +02:00
Deukhoofd e8b86a20d1
Add support for creating pokemon with passed Random parameter. 2021-04-11 17:50:47 +02:00
Deukhoofd a88719e2b3
Supports cloning battles for AI purposes. 2021-04-11 16:27:21 +02:00
Deukhoofd 14016837d9
Adds ModifyNumberOfHits Angelscript script hook. 2021-03-28 19:58:08 +02:00
Deukhoofd c89c572aa2
Adds new Angelscript script hooks. 2021-03-28 18:53:08 +02:00
Deukhoofd 4e215895b7
Adds proper AddVolatile wrapper for battle. 2021-03-28 17:55:45 +02:00
Deukhoofd 76053af77f
Use borrowedPtr helpers in AngelScript turn choices. 2021-03-28 17:35:00 +02:00
Deukhoofd 514de9a2ba
Adds helper function for printing constString. 2021-03-28 17:15:06 +02:00
Deukhoofd f8c3e92769
Fixes type causing PreventOpponentRunAway to not work. 2021-03-28 16:54:41 +02:00
Deukhoofd 515446bf20
Fixes GetPokemonIndex on BattleSide, adds unit test for it. 2021-03-28 16:16:47 +02:00
Deukhoofd acf7d1cc6e
Fixes unused variable in scriptdictionary.cpp 2021-03-27 22:57:05 +01:00
Deukhoofd 78268c51c0
Style fixes. 2021-03-27 22:40:16 +01:00
Deukhoofd e748f6e96f
Updates Angelscript addons, adds angelscript dictionary addon. 2021-03-27 22:39:25 +01:00
Deukhoofd e361507ec9
Adds support for modifying volatile scripts after adding them. 2021-03-27 22:19:18 +01:00
Deukhoofd 5cfa174396
Adds new run prevention script hooks. 2021-03-27 15:34:04 +01:00
Deukhoofd 793daeae80
Adds missing scripts. 2021-03-27 13:51:06 +01:00
Deukhoofd 9b4cb06641
Style fixes. 2021-03-27 13:46:34 +01:00
Deukhoofd af559f757c
Support for new move fail handling. 2021-03-27 13:33:56 +01:00
Deukhoofd 301c28d7a7
Make Battle and Battleside getters on Pokemon in Angelscript not const. 2021-03-27 10:06:23 +01:00
Deukhoofd bee9170603
Adds some more Angelscript functionality for the BattleSide. 2021-03-26 23:05:51 +01:00
Deukhoofd 41475fcb2f
Style fixes. 2021-03-26 19:14:22 +01:00
Deukhoofd 4ade8f0dca
Adds Angelscript functions for getting a battle side, and swapping positions on it. 2021-03-26 15:28:24 +01:00
Deukhoofd 9f973c53df
Fixes IsUseValidForCreature Angelscript function calling wrong function. 2021-03-13 14:22:56 +01:00
Deukhoofd 1540009912
Adds initialization from parameters to ItemUseScript. 2021-03-07 20:03:07 +01:00
Deukhoofd 090b77ff2b
Fixes error on reading compiled scripts. 2021-03-07 19:35:38 +01:00
Deukhoofd 20f90222d1
Fix memory issues. 2021-03-07 18:20:42 +01:00
Deukhoofd 7216d9d71b
Support serializing item use scripts. 2021-03-07 18:11:18 +01:00
Deukhoofd 27dd8a8202
Initial support for item use scripts in angelscript. 2021-03-07 17:09:30 +01:00
Deukhoofd 18cebe842a
Updates to newer CreatureLib. 2021-03-07 11:12:18 +01:00
Deukhoofd f8427fa594
Many fixes for script handling. 2021-01-22 14:11:03 +01:00
Deukhoofd 5e6892ac58
Clearer code for resolving to nullptr script. 2021-01-16 18:14:08 +01:00
Deukhoofd 03c364765e
Fixes issue where resolving script could segfault. 2020-12-28 18:04:04 +01:00
Deukhoofd 31008c0107
Several fixes and improvements. 2020-12-28 15:11:06 +01:00
Deukhoofd bbb2691b91
Update to latest Arbutils. 2020-12-13 12:32:52 +01:00
Deukhoofd ecf8582c59
Fixes ItemLibrary compilation error in GCC. 2020-12-12 14:46:27 +01:00
Deukhoofd 53bd6e7a94
Update to new Arbutils memory model. 2020-12-12 14:25:27 +01:00
Deukhoofd b6a5e41b51
Style fixes. 2020-12-11 14:08:13 +01:00
Deukhoofd fff926b617
Mark several classes as final for devirtualization performance benefits. 2020-10-15 18:13:00 +02:00
Deukhoofd f816975b63
Fix for Pokemon::ClearStatus crashing when a Pokemon does not have a status. Now will just do nothing. 2020-10-02 17:43:16 +02:00
Deukhoofd 1686434440
Use lld for Clang. 2020-09-29 18:28:54 +02:00
Deukhoofd 2ce766f589
Adds precompiled header. 2020-09-29 17:51:11 +02:00
Deukhoofd fda3c8f86d
Support not including standard angelscript libraries such as string and array. 2020-09-19 15:57:20 +02:00
Deukhoofd f073e951b1
Removed invalid angelscript registering. 2020-09-19 14:10:46 +02:00
Deukhoofd 6f17cb046e
Add getter for as module in angelscriptresolver. 2020-09-19 13:53:56 +02:00
Deukhoofd 9e507d5c3f
Handling for Library being passed to AngelscriptResolver being nullptr, for testing purposes. 2020-09-19 13:33:17 +02:00
Deukhoofd 8f73a9a43a
Several fixes. 2020-08-30 13:53:15 +02:00
Deukhoofd c6e2de6156
Use level_int_t for levels. 2020-08-22 12:24:52 +02:00
Deukhoofd cc92cf1491
Defensive programming. 2020-08-17 18:23:25 +02:00
Deukhoofd f3721ad2a5
Fixes damage calculation, 2020-08-17 18:23:13 +02:00
Deukhoofd 3baabe6d79
Update tp latest CreatureLib. 2020-08-17 12:36:21 +02:00
Deukhoofd cd4893936e
Link to library we use for stacktraces. 2020-08-16 11:22:43 +02:00
Deukhoofd b5a1d74bdb
Update to latest CreatureLib 2020-08-16 11:12:04 +02:00
Deukhoofd 3477de14cb
Update to latest CreatureLib. 2020-08-14 15:26:44 +02:00
Deukhoofd 77eae12326
Fixes for new CreatureLib. 2020-08-12 18:09:24 +02:00
Deukhoofd ece07f5648
Defensive programming in DamageLibrary, ensuring the final damage is between 0 and uint32 max. 2020-08-11 21:47:05 +02:00
Deukhoofd 5e917b7047
Support for finding the previous evolution step of a Pokemon. 2020-08-11 21:46:22 +02:00
Deukhoofd 9274b675e9
SUpport for EggMoves 2020-08-11 19:36:18 +02:00
Deukhoofd badfccf440
Style fixes. 2020-08-10 18:09:32 +02:00
Deukhoofd 88971dce37
Support flags for species and formes. 2020-08-10 18:03:01 +02:00
Deukhoofd de3ad4a9c8
Support for getting natures by index for iterating purposes. 2020-08-09 11:31:22 +02:00
Deukhoofd ca087a7ed8
Add support for Egg Groups. 2020-08-08 18:41:27 +02:00
Deukhoofd 2a884a0a8b
Setters for IVs and EVs. 2020-08-08 17:52:57 +02:00
Deukhoofd 2fa59b9ea9
Update to new CreatureLib. 2020-08-08 13:06:08 +02:00
Deukhoofd 0ace5798f8
Update to new Arbutils. 2020-08-08 12:35:57 +02:00
Deukhoofd 683f3ad08b
Add Pokemon Status. 2020-08-08 12:01:05 +02:00
Deukhoofd 8290bf546a
Pass back CreatePokemon by reference. 2020-08-04 17:19:14 +02:00
Deukhoofd 6ffcd4dcbc
Fixed Angelscript ExecutingAttack::GetHitData function. 2020-08-04 13:08:43 +02:00
Deukhoofd efbb9429d7
Update to CreatureLib changes in event triggers. 2020-07-31 16:30:06 +02:00
Deukhoofd 15db2b4ea0
Make nickname string instead of string_view. 2020-07-26 10:50:52 +02:00
Deukhoofd c86d35619e
Added random seed to battle constructor 2020-07-26 10:50:39 +02:00
Deukhoofd 723eb953a1
Fixed gcc still erroring on warning, added newline after macro file. 2020-07-18 14:08:08 +02:00
Deukhoofd 3235a99ff6
Fixed issue on build with gcc. 2020-07-18 13:19:35 +02:00
Deukhoofd dc3630b171
Cleanup cmake file. 2020-07-18 12:42:54 +02:00
Deukhoofd 41b15dc693
Update to newer CreatureLib. 2020-07-12 15:53:27 +02:00
Deukhoofd 1f81d857ac
Make LearnedMove->GetMoveData use a ForceAs, to reduce overhead. 2020-07-04 19:33:26 +02:00
Deukhoofd 7c65bd084a
Fixes issue with constString in AngelScript. 2020-07-04 19:17:45 +02:00
Deukhoofd 45f80444b9
Fixed issue where using operator->() function directly in Angelscript threw an exception if the pointer was null. 2020-07-04 18:56:49 +02:00
Deukhoofd 665c47aa91
Add angelscript implicit conversion from string to constString. 2020-07-04 16:13:26 +02:00
Deukhoofd 7f1bc252ba
Update to newer CreatureLib. 2020-07-04 15:50:30 +02:00
Deukhoofd 698bc62b47
Update CreatureLib. 2020-06-10 14:53:03 +02:00
Deukhoofd 9e587b3d0b
Support for evolving a mon. 2020-06-10 12:33:51 +02:00
Deukhoofd bb90d3db87
Update CreatureLib. 2020-06-05 18:19:28 +02:00
Deukhoofd 34fb528da4
Update CreatureLib. 2020-06-05 16:54:57 +02:00
Deukhoofd 12066e1dfe
Implements most of the Damage Modifier calculation. 2020-06-05 13:49:12 +02:00
Deukhoofd ce54861966
Fix Angelscript mishandling several smart pointers. 2020-06-02 21:52:34 +02:00
Deukhoofd 64a22324c7
Mark LearnedAttack in ExecutingAttack as smart pointer 2020-06-02 21:29:01 +02:00
Deukhoofd 6225ed19fa
Mark user in ExecutingAttack as smart pointer 2020-06-02 21:26:57 +02:00
Deukhoofd 2d3a2fc63b
Smart pointers for most library and battle classes. 2020-06-02 20:37:21 +02:00
Deukhoofd 1d1dc877a0
Minor performance improvements. 2020-05-27 18:39:46 +02:00
Deukhoofd 58bf1032f2
Fix PokemonParty. 2020-05-27 17:40:26 +02:00
Deukhoofd f42ce8865d
Update CreatureLib. 2020-05-27 17:26:25 +02:00
Deukhoofd 0d111739f4
Support for experience sharing. 2020-05-24 13:36:45 +02:00
Deukhoofd d6792635f9
Don't calculate experience gained if the Pokemon is not allowed to receive experience. 2020-05-22 14:17:19 +02:00
Deukhoofd 92135a88eb
Move experience gain from species to forme. 2020-05-22 13:43:02 +02:00
Deukhoofd 6c7c460640
Support Pokemon style experience gain. 2020-05-20 16:05:52 +02:00
Deukhoofd a19965c1c3
C Interface for PokemonLibrary. 2020-05-04 18:07:39 +02:00
Deukhoofd e17a8e016b
Implements support for registering types and functions in AngelScript externally. 2020-05-02 11:53:12 +02:00