Commit Graph

714 Commits

Author SHA1 Message Date
Deukhoofd 53c27d35b6
Trigger OnRemove on Creature when it faints. 2021-11-19 13:52:18 +01:00
Deukhoofd 364bac7de7
Trigger OnRemove on a Creatures scripts when it gets switched out. 2021-11-19 13:49:19 +01:00
Deukhoofd a570e90f67
Adds GetLastUsedAttackOnTarget helper to BattleHistory
continuous-integration/drone/push Build is passing Details
2021-11-19 13:08:34 +01:00
Deukhoofd a89d79f8bc
Adds DamageSource::Misc.
continuous-integration/drone/push Build is passing Details
2021-11-19 12:51:51 +01:00
Deukhoofd c27b87b01a
Fixes build.
continuous-integration/drone/push Build is passing Details
2021-11-19 12:21:46 +01:00
Deukhoofd c6d814e886
Adds DamageSource to OnFaint script hook.
continuous-integration/drone/push Build is failing Details
2021-11-19 12:15:38 +01:00
Deukhoofd 2ea928e67b
Adds OnFaint script hook.
continuous-integration/drone/push Build is passing Details
2021-11-19 12:12:46 +01:00
Deukhoofd 59313e6da8
Breaking change: rework of talents.
continuous-integration/drone/push Build is passing Details
2021-11-15 12:04:58 +01:00
Deukhoofd 33d384c464
Support for failing an AttackTurnChoice.
continuous-integration/drone/push Build is passing Details
This is handled before the actual ExecutingAttack is created, so allows for failing a move a lot earlier than before.
2021-11-12 12:54:34 +01:00
Deukhoofd 1a3b7fe50a
Fixes build.
continuous-integration/drone/push Build is passing Details
2021-10-30 17:54:37 +02:00
Deukhoofd 2bd73bd4ef
Reset weight/height when variant changes, when a creature is moved out of the battle.
continuous-integration/drone/push Build is failing Details
2021-10-30 17:50:26 +02:00
Deukhoofd a12972472b
Adds Creature specific weight and height, which can be modified dynamically during battles.
continuous-integration/drone/push Build is passing Details
2021-10-30 17:07:13 +02:00
Deukhoofd 2e2abfe122
Reference Arbutils/Enum in ScriptCategory.hpp
continuous-integration/drone/push Build is passing Details
2021-10-30 14:31:43 +02:00
Deukhoofd e1d8348b2f
Fixes project being completely dirty every build requiring constant full rebuilds and slowing down tooling.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-30 14:24:38 +02:00
Deukhoofd d55b40f3d0
Adds newline for GCC.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-29 23:55:41 +02:00
Deukhoofd cb6725ab5e
Adds support for script owner to clone command.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-29 21:55:49 +02:00
Deukhoofd be7a5fe6bd
More work on setting owner of a script.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-29 21:40:10 +02:00
Deukhoofd 949fc67831
Add support for saving and getting the owner of a script in script.
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-29 21:31:01 +02: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 316ac12a01
Adds script hook for overriding incoming damage.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-29 18:24:46 +02:00
Deukhoofd 0b9028ea97
Fixes BattleSide AddVolatile using the wrong script category.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-29 18:12:35 +02:00
Deukhoofd b4ef1ea98e
Adds getter for Battle on BattleSide.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-28 15:01:31 +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 ff67ab9e00
Adds helper function to get last damage event on a creature.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-23 17:08:54 +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 1ed57e51af
Fixes make tool not being set.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-02 16:46:43 +02:00
Deukhoofd 1b08dbc365
Updates for new Windows CI
continuous-integration/drone/push Build is failing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-10-02 16:41:25 +02:00
Deukhoofd a361716233
Made Creature::GetStatusName const.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-09-21 22:19:26 +02:00
Deukhoofd ce30077a5d
Change Creature::Nickname to be an optional.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-09-19 11:40:18 +02:00
Deukhoofd 152ac7e407
Don't throw an exception when teaching an attack when we don't have the max amount of attacks yet.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-08-29 17:16:36 +02:00
Deukhoofd b84db6aa2d
Actually use the given libtype when building library
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-08-29 16:03:19 +02:00
Deukhoofd 512a39e158
Deal with Creatures being deleted before a battle they're part of.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-08-28 19:05:52 +02:00
Deukhoofd d89e0b0d77
Adds function on battleside to get a creature at an index.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-08-23 21:38:47 +02:00
Deukhoofd 9a72c1051e
fixes typo
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-07-09 15:53:24 +02:00
Deukhoofd 08120d5433
Adds status handling functions
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-07-09 15:33:30 +02:00
Deukhoofd 9303ec53e0
Adds C Interface for AllowedExperienceGain
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-06-26 11:48:13 +02:00
Deukhoofd 4274a44fa5
Fixes for GCC warnings
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-06-26 11:26:20 +02:00
Deukhoofd 762915b1f7
Add new Creature::IsUsable function, which replaces IsFainted functionality in several places.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-06-19 12:33:31 +02:00
Deukhoofd 8241a2d7b1
Check if target of attack is a valid target for that attack.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-24 10:57:17 +02:00
Deukhoofd 69dab061da
Further cleanup of TargetResolver.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-24 10:34:42 +02:00
Deukhoofd b036efaf18
Clean up TargetResolver.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-24 10:31:15 +02:00
Deukhoofd b48353822c
Change script when ChangeAttack script hook changes the used attack.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-14 10:42:05 +02:00
Deukhoofd 13153b3119
Support overriding attacks through script hooks.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-13 13:16:52 +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 305eb5efb2
Cleanup for Creature class battle data.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-08 11:26:35 +02:00
Deukhoofd be10b3515c
Reworks script aggregator. Cleans up API and code, and now handles scripts being removed from a set while we're iterating.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-04-18 12:50:48 +02:00
Deukhoofd 13df99a6cc
Try and catch more edge cases where setIndex would be invalid.
continuous-integration/drone/push Build is passing Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-04-17 16:31:03 +02:00