Commit Graph

1110 Commits

Author SHA1 Message Date
gsemaj
288a4a3da5 Fix infinite slowdown with snare 2023-08-19 20:46:41 +00:00
gsemaj
807e182407 Implement buff handling for CombatNPC 2023-08-19 20:46:41 +00:00
gsemaj
0dd628717d Move buffs from Mob to CombatNPC 2023-08-19 20:46:41 +00:00
gsemaj
c70205a15b Implement buffs for mobs 2023-08-19 20:46:41 +00:00
gsemaj
8062e52c55 Damage n debuff handler 2023-08-19 20:46:41 +00:00
gsemaj
3b5f6c0fe7 Fix trailing structs
The change to allow flexible trailing struct sizes broke
`attachSkillResults` oops
2023-08-19 20:46:41 +00:00
gsemaj
e9cd5db8a2 Get rid of cbf 2023-08-19 20:46:41 +00:00
gsemaj
e7450b974c Add clearBuffs 2023-08-19 20:46:41 +00:00
gsemaj
13e71de785 Make skill result size check an assertion 2023-08-19 20:46:41 +00:00
gsemaj
e3c3da87b2 Oops 2023-08-19 20:46:41 +00:00
gsemaj
4bc53b2e7e Change SkillResult size validation
Since leech uses trailing structs of two different sizes, just use the max SkillResult size in validation/zeroing and then check for overflow in a couple extra places
2023-08-19 20:46:41 +00:00
gsemaj
03abb6f830 Reorder abilities to match client handling 2023-08-19 20:46:41 +00:00
gsemaj
bd1abcef72 Don't add buff if player dead 2023-08-19 20:46:41 +00:00
gsemaj
49fa6d65c4 Fix seg fault with egg powers 2023-08-19 20:46:41 +00:00
gsemaj
773e4b36e1 Reuse useNanoSkill codepath for passive powers 2023-08-19 20:46:41 +00:00
gsemaj
945599f93c Fix recall 2023-08-19 20:46:41 +00:00
gsemaj
78c15e2899 Make SkillType an enum class 2023-08-19 20:46:41 +00:00
gsemaj
eaebe3ba4c Fix self recall 2023-08-19 20:46:41 +00:00
gsemaj
9312706524 [WIP] Fix targeting for groups 2023-08-19 20:46:41 +00:00
gsemaj
80dd6b5479 [WIP] Active power handling
TODO:
- recall (self and group) is broken
- revive (only group) is broken
- damage + debuff is unimplemented
2023-08-19 20:46:41 +00:00
gsemaj
751fd4fd9d Sync with master 2023-08-19 20:46:41 +00:00
gsemaj
ec71fd8f46 Add overload to remove specific class of buff
I initially added this because, despite the higher tickrate for
composite condition calculations thanks to the last commit, there is
still a slight status icon delay when rapidly switching nanos. I
attempted to use this to make that problem go away and for whatever
reason it wasn't effective, but I figure it would be useful to have
anyway so I'm keeping it.
2023-08-19 20:46:41 +00:00
gsemaj
f0bb90b547 Move some stuff from playerTick to player combat step 2023-08-19 20:46:41 +00:00
gsemaj
0dfcc928a9 Refactor group handling 2023-08-19 20:46:41 +00:00
gsemaj
dc6386131a Port egg buffs over to new system 2023-08-19 20:46:41 +00:00
gsemaj
9977907842 More skill handlers
Note: need to revisit these when active powers are implemented to make
sure they are correct. DamageNDebuff isn't even implemented yet.
2023-08-19 20:46:41 +00:00
gsemaj
723e455b1d Passive nano powers 2023-08-19 20:46:41 +00:00
gsemaj
ab4b763f00 YET ANOTHER ITERATION of the new ability system
I am very tired
2023-08-19 20:46:41 +00:00
gsemaj
8b94bcd5ca Passive nano powers pt 1 2023-08-19 20:46:41 +00:00
gsemaj
1637b8e789 Passive nano powers boilerplate 2023-08-19 20:46:41 +00:00
gsemaj
da38bbec29 Fix timed out buffs not calling onExpire 2023-08-19 20:46:41 +00:00
gsemaj
a07f36e379 Buff framework tweaks + polish 2023-08-19 20:46:41 +00:00
gsemaj
afc48b7676 Rework buff callbacks
The first implementation was way too complicated and prone to bugs.
This is much more simple flexible; first off, std::function is now used
instead of a raw function pointer, so lambdas and binds are fair game
which is great for scripting. Second, callbacks for all stacks are
executed. It is up to the callback target to ensure correct behavior.
2023-08-19 20:46:41 +00:00
gsemaj
15b6cd2fb4 oops 2023-08-19 20:46:41 +00:00
gsemaj
34669eb7b9 CRLF purge in Buffs.cpp 2023-08-19 20:46:41 +00:00
gsemaj
ded7462677 egg prep 2023-08-19 20:46:41 +00:00
gsemaj
704d6a2452 Move Buff implementation to Buffs.cpp 2023-08-19 20:46:41 +00:00
gsemaj
98634d5aa2 New buff framework (player implementation)
Get rid of `iConditionBitFlag` in favor of a system of individual buff
objects that get composited to a bitflag on-the-fly.
Buff objects can have callbacks for application, expiration, and tick,
making them pretty flexible. Scripting languages can eventually use
these for custom behavior, too.

TODO:
- Get rid of bitflag in BaseNPC
- Apply buffs from passive nano powers
- Apply buffs from active nano powers
- Move eggs to new system
- ???
2023-08-19 20:46:41 +00:00
gsemaj
306a75f469 The great re-#include
Was getting frustrated by the inconsistency in our include statements,
which were causing me problems. As a result, I went through and manually
re-organized every include statement in non-core files.

I'm just gonna copy my rant from Discord:
FOR HEADER FILES (.hpp):
- everything you use IN THE HEADER must be EXPLICITLY INCLUDED with the exception of things that fall under Core.hpp
- you may NOT include ANYTHING ELSE

FOR SOURCE FILES (.cpp):
- you can #include whatever you want as long as the partner header is included first
- anything that gets included by another include is fair game
- redundant includes are ok because they'll be harmless AS LONG AS our header files stay lean.

the point of this is NOT to optimize the number of includes used all around or make things more efficient necessarily. it's to improve readability & coherence and make it easier to avoid cyclical issues
2023-08-19 20:46:41 +00:00
gsemaj
e4e4a421f4 Get rid of player fire rate suspicion
This was super primitive & jank, and caused false positives.
Will replace with a polished system later on.
2023-08-19 20:46:41 +00:00
gsemaj
2f612ce0e1 Handle case where cmake is invoked outside root 2023-08-19 20:46:41 +00:00
gsemaj
760170af94 Start moving passive power processing to playerTick 2023-08-19 20:46:41 +00:00
gsemaj
2f4c8cdd60 Groundwork for new buff system 2023-08-19 20:46:41 +00:00
gsemaj
c8f5aab929 Active power classification 2023-08-19 20:46:41 +00:00
gsemaj
9f74b7decb some struct reorg 2023-08-19 20:46:41 +00:00
gsemaj
eea4107665 Replace group filter operator with function 2023-08-19 20:46:41 +00:00
gsemaj
ad53ec82af Ignore .bak files
for my local backups lol
2023-08-19 20:46:41 +00:00
gsemaj
22c93ac854 Refactor player groups
Group structures are used now. Adds more checks in some places but simplifies things overall.
We can expand this system to entities as well now pretty trivially.
2023-08-19 20:46:41 +00:00
gsemaj
710300c04c (WIP) EXPERIMENTAL GROUP CHANGES 2023-08-19 20:46:41 +00:00
gsemaj
04221f1c5f (WIP) TODO ABILITIES 2023-08-19 20:46:41 +00:00