Commit Graph

78 Commits

Author SHA1 Message Date
Deukhoofd 6f0e664e74
Adds support for removing volatile script by its hash, checking if Creature has attack by hash.
continuous-integration/drone/push Build is failing Details
2022-05-28 11:24:16 +02:00
Deukhoofd 38a26888be
Fixes declaration of Battle::GetHistory
continuous-integration/drone/push Build is passing Details
2022-03-23 18:48:39 +01:00
Deukhoofd eccf2c9121
Add nullability to large parts of the codebase
continuous-integration/drone/push Build is passing Details
2022-03-23 18:30:35 +01:00
Deukhoofd 3cc19de61f
Update to latest Arbutils, use new integer defines 2022-03-23 13:56:45 +01:00
Deukhoofd 5fd8abb3a8
Reworks ScriptSources so we can get individual scripts on a source. Fixed OnEndTurn making no sense.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-29 19:31:08 +02:00
Deukhoofd 19375c2f87
Adds functions to add, remove, and get volatile scripts from a BattleSide.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-28 14:49:24 +02:00
Deukhoofd 47c3429295
Adds optional optimization to history helper functions to limit the max amount of turns searched through.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-24 11:10:30 +02:00
Deukhoofd 7354c835e6
Fixes memory leak.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-23 18:38:12 +02:00
Deukhoofd 51897e42da
Make HistoryHolder a pointer instead of value.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-23 17:17:34 +02:00
Deukhoofd 20b53833c4
Cleans up HistoryHolder to be a lot less complicated (although possibly a bit slower), adds DamageHistory.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-23 16:57:58 +02:00
Deukhoofd 188e88ab80
Store CreatureIndex on Creature, includes helper function to get a creatures party from a battle.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-08 11:53:32 +02:00
Deukhoofd 2b1a1792bf
Make Clone functions const.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-04-11 16:01:18 +02:00
Deukhoofd 84a14cff2b
Support for cloning battles for AI purposes.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-04-11 15:20:50 +02:00
Deukhoofd 1ddbfd2357
Fixes for ScriptSet throwing when adding a not yet found volatile script.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-03-27 20:20:49 +01:00
Deukhoofd bfe83ef271
When adding volatile script, return the script object.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-03-27 16:36:20 +01:00
Deukhoofd 5178d5dcc0
Renamed Script --> BattleScript, some cleanup on it.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-03-07 10:26:41 +01:00
Deukhoofd 3742e07b03
Rework clearing battle from creatures.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-12-28 15:10:49 +01:00
Deukhoofd a284641b5a
Fixes invalid pointers to a battle dangling when a battle is removed.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-12-28 13:40:39 +01:00
Deukhoofd e642f374b9
Update to latest Arbutils.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-12-13 12:15:40 +01:00
Deukhoofd 5c39694f19
Overhaul memory model to new Arbutils memory.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-12-12 12:22:48 +01:00
Deukhoofd 53bfbd36c2
Use a precompiled header.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-09-25 13:05:15 +02:00
Deukhoofd 32f75f4a47
Store time in turn execution on battle class.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-08-28 12:24:10 +02:00
Deukhoofd c921d3127b
Update to latest Arbutils, include stacktrace.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-08-15 15:10:48 +02:00
Deukhoofd cb4765e0cc
Adds support for History data, allowing us to store specific interesting occurrences in the data flow, and recall them later.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-08-14 15:18:00 +02:00
Deukhoofd 103c703208
Add cool new c++ 20 constraint to EventHook.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-08-14 14:10:13 +02:00
Deukhoofd 3d21b7c42d
Remove event hook threads, as it caused issues when being called from dotnet.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2020-08-07 20:11:03 +02:00
Deukhoofd fa5184ad77
Tweaks for EventHook.
continuous-integration/drone/push Build is passing Details
2020-07-31 19:52:12 +02:00
Deukhoofd c3de280ebb
Fixes for EventHook corruptions, unit tests for EventHooks.
continuous-integration/drone/push Build is passing Details
2020-07-31 18:39:47 +02:00
Deukhoofd 0eaae43444
Reworked event hook to a system with pre-allocated memory, owned by the battle. This deals with cleaning up event data memory.
continuous-integration/drone/push Build is passing Details
2020-07-31 16:19:39 +02:00
Deukhoofd 436e68293e
Support for passing a random seed.
continuous-integration/drone/push Build is passing Details
2020-07-26 10:16:25 +02:00
Deukhoofd 772619db0f
Changed LoadScript to StringView.
continuous-integration/drone/push Build is failing Details
2020-06-26 18:23:40 +02:00
Deukhoofd 48639eeee5
Update to new Arbutils
continuous-integration/drone/push Build is passing Details
2020-06-26 17:08:23 +02:00
Deukhoofd 66379bfa65
Initial support for handling multi target attacks.
continuous-integration/drone/push Build is failing Details
2020-06-05 15:32:05 +02:00
Deukhoofd 1ef50fd3a6
Use unique pointers in scriptset.
continuous-integration/drone/push Build is passing Details
2020-06-02 15:03:31 +02:00
Deukhoofd f898698f49
Use smart pointers for BattleSide.
continuous-integration/drone/push Build is failing Details
2020-06-02 13:06:24 +02:00
Deukhoofd 01f6e59cb6
Make battle class fields all smart pointers.
continuous-integration/drone/push Build is passing Details
2020-05-31 19:01:45 +02:00
Deukhoofd 29cb4eac37
Make ChoiceQueue use smart pointers.
continuous-integration/drone/push Build is passing Details
2020-05-31 18:00:39 +02:00
Deukhoofd 25f65eb47b
Update to newer Arbutils version.
continuous-integration/drone/push Build is passing Details
2020-05-26 18:31:06 +02:00
Deukhoofd c056ddc6b3
Adds getter for parties to battle.
continuous-integration/drone/push Build is passing Details
2020-05-24 12:57:12 +02:00
Deukhoofd 734d056449
Performance improvement for collecting scripts, by reserving size in ScriptSource.
continuous-integration/drone/push Build is passing Details
2020-04-25 11:33:25 +02:00
Deukhoofd 1eb751538d
Updated to latest Arbutils.
continuous-integration/drone/push Build is passing Details
2020-04-25 10:41:15 +02:00
Deukhoofd ddbf4c23b8
Fix for compilation issue when using NO_ASSERT.
continuous-integration/drone/push Build is passing Details
2020-04-22 12:54:11 +02:00
Deukhoofd a200c7cde8
Make Battle fields protected instead of private.
continuous-integration/drone/push Build is passing Details
2020-04-18 15:22:38 +02:00
Deukhoofd 7ce3e6940d
Rework for C Interfaces to handle exceptions a bit better.
continuous-integration/drone/push Build is passing Details
2020-03-25 19:09:17 +01:00
Deukhoofd 27288563cd
Replace most collections with Arbutils collections for more safety.
continuous-integration/drone/push Build is passing Details
2020-03-22 19:21:40 +01:00
Deukhoofd 475392f9b6
Fixed issue where base stats of a variant got corrupted.
continuous-integration/drone/push Build is passing Details
2020-03-22 15:25:38 +01:00
Deukhoofd 899e432271
Added lots of security using asserts.
continuous-integration/drone/push Build is failing Details
2020-03-22 13:42:26 +01:00
Deukhoofd 5a976e4031
Added display text event hook. 2020-03-09 17:43:36 +01:00
Deukhoofd ce2fc320bd
Tweaks for Battle and ScriptSet, added Battle C interface.
continuous-integration/drone/push Build is passing Details
2020-03-09 10:16:57 +01:00
Deukhoofd 1d18066bcc
Made Battle take battleparties as a pointer instead of value for external use.
continuous-integration/drone/push Build is passing Details
2020-03-07 11:00:48 +01:00