Commit Graph

56 Commits

Author SHA1 Message Date
2e860192c7 Support for blocking a creature from gaining experience, don't give experience when a creature is fainted.
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-20 15:18:27 +02:00
864a9d933d Inlined get stats from Creature. These are frequently called one line methods.
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-25 16:15:27 +02:00
734d056449 Performance improvement for collecting scripts, by reserving size in ScriptSource.
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-25 11:33:25 +02:00
dd668f2b1c Cleanup of ScriptAggregator class.
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-23 23:23:58 +02:00
97fa37ea7d Implements clamped statistics for stat boost.
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-22 21:48:00 +02:00
75baf19ebd Cleanup 2020-04-22 21:20:07 +02:00
83f427368e Pass LearnedAttack list to creature by reference.
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-21 14:44:57 +02:00
2e5d463e45 Throw clean exception when no volatile script is found when adding one.
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-11 00:22:08 +02:00
3dd5aeffd8 C interface for Battle Side.
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-04 17:03:06 +02:00
1e0d00d3b7 Revert "Use smart pointers for basic libraries."
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit 214ff819
2020-04-04 13:37:06 +02:00
214ff81992 Use smart pointers for basic libraries.
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-26 22:46:14 +01:00
7ce3e6940d Rework for C Interfaces to handle exceptions a bit better.
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-25 19:09:17 +01:00
27288563cd Replace most collections with Arbutils collections for more safety.
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-22 19:21:40 +01:00
899e432271 Added lots of security using asserts.
Some checks failed
continuous-integration/drone/push Build is failing
2020-03-22 13:42:26 +01:00
a7b87ab4f8 Merge Core library into Library, as with its utility functionality merged into Arbutils, it's becoming less and less useful.
Some checks failed
continuous-integration/drone/push Build is failing
2020-03-22 10:11:53 +01:00
06336c64cd Added canRevive parameter to Heal function, added Faint event. 2020-03-09 16:29:41 +01:00
e990c13109 Added Creature C Interface, misc fixes and changes for Creature.
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-05 11:25:41 +01:00
0c1580ade6 Reworked retrieving talent, new method is cleaner and harder to misunderstand.
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-03-02 13:59:49 +01:00
5a05a2f4d3 Add ConstString to several other places where context isn't changed much during runtime.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-28 19:23:24 +01:00
412e0a4d63 Implements ConstString in several core places in the library, improving performance.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-27 18:23:23 +01:00
3802587313 Added HasVolatileScript function to Creature and Battle.
Some checks failed
continuous-integration/drone/push Build is failing
2020-02-23 16:17:57 +01:00
5f891cd4ed Added Remove Volatile functions for battle and creatures.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-23 11:11:47 +01:00
645ba95bbc Performance improvements for battle and creature AddVolatileScript methods when passing a string as parameter.
All checks were successful
continuous-integration/drone/push Build is passing
Instead of loading a script, then passing it to the ScriptSet class and checking if it already exists before invoking stack, we now check whether the ScriptSet has that script. If one already exists we just invoke stack on it, if not we continue to the process of creating a new script instance.
2020-02-22 16:01:01 +01:00
142889ad8a Add functions to add volatile scripts to Creature.cpp.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-22 15:53:51 +01:00
d4fd7282f5 Move ScriptCategory enum outside of class scope of ScriptResolver.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-20 13:05:15 +01:00
f22c23d593 Make ScriptMacro a header instead of source file.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-19 15:32:43 +01:00
ce31309b2a Functions to set Creature Held Item, and helper function to check whether Creature is holding a specific held item.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-17 17:16:28 +01:00
da90c3d59e Reset active scripts on Creature when battle is set.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-17 10:05:32 +01:00
17552c33ca Only get active scripts from side if side exists.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-17 09:57:15 +01:00
8d4860f553 Support for Heal function for Creatures.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-13 14:48:09 +01:00
e45a36d78e Move Script ownership to script holder, added OnRemove script hook.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-05 14:52:50 +01:00
c4d0a73df6 Remove display script hook functions, replace them with easy to use interface on Creature class.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-03 16:49:28 +01:00
fc5826edb1 Check whether a battle has been set when calling Damage function.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-02 12:34:02 +01:00
dba271681d Change LibrarySettings to be a pointer instead of value, to allow for overriding in implementations.
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-01 13:30:51 +01:00
b02577554f Remove GetProperty macro, as it wasn't that intuitive, and caused issues later.
All checks were successful
continuous-integration/drone/push Build is passing
2020-01-12 17:04:42 +01:00
144d17d859 Fixed changing stat boost by negative actually increasing it.
All checks were successful
continuous-integration/drone/push Build is passing
2020-01-05 14:57:17 +01:00
568232c7a5 Split off initialization of Creature into new function that's not called in the constructor.
All checks were successful
continuous-integration/drone/push Build is passing
This has to do with specific implementations of stat calculator requiring an inherited type of the Creature class, and by calling it in the constructor casting to this inherited type will fail.
2020-01-05 13:43:47 +01:00
ae4d8f5e12 Removes some variables that are better handled in implementations.
Some checks failed
continuous-integration/drone/push Build is failing
2019-12-27 12:19:38 +01:00
8e53ffb53d Implements functions for getting display species and variant.
All checks were successful
continuous-integration/drone/push Build is passing
2019-12-21 14:32:45 +01:00
410487c86b Initial support for Event Hooks.
Some checks failed
continuous-integration/drone/push Build is failing
2019-12-15 12:24:08 +01:00
649de39571 Implements experience gain on opponent faint.
Some checks failed
continuous-integration/drone/push Build is failing
2019-12-14 13:28:23 +01:00
c25d7b865e Implements creature switching as turn choice.
All checks were successful
continuous-integration/drone/push Build is passing
2019-12-14 12:15:30 +01:00
dc9296194e Fixed battle ending after any faint.
Some checks failed
continuous-integration/drone/push Build is failing
2019-12-07 22:52:43 +01:00
262279bd2c Support for ending battles when only one side has creatures that are available for battle. 2019-12-07 21:56:29 +01:00
6f32d1245b Implemented and fixed all code required to run at least a single turn.
All checks were successful
continuous-integration/drone/push Build is passing
2019-12-05 12:56:41 +01:00
a8730d983f Used ClangFormat style guide I'm happy with.
All checks were successful
continuous-integration/drone/push Build is passing
2019-11-28 12:55:22 +01:00
49bd4813f6 Initialize Creature talent script when battle library is set, allow talent overriding
All checks were successful
continuous-integration/drone/push Build is passing
2019-11-18 18:41:55 +01:00
86f8a1e37b Adds talent script to Creature class
All checks were successful
continuous-integration/drone/push Build is passing
2019-11-17 11:25:52 +01:00
d8332f9e40 Another rework for scripthooks, for better performance.
All checks were successful
continuous-integration/drone/push Build is passing
This new version caches pointers to the pointers to scripts, so that we can build the data once and then simply iterate over it whenever we want to run a hook.
2019-11-10 17:08:42 +01:00
3488784409 Furter rework on script hooks, simplifying required logic. 2019-11-10 14:32:05 +01:00