Commit Graph

1087 Commits

Author SHA1 Message Date
gsemaj
2e572169c0
Move some stuff from playerTick to player combat step 2023-07-11 13:52:59 -04:00
gsemaj
b3e28ddea3
Refactor group handling 2023-07-11 13:52:58 -04:00
gsemaj
1670dfd830
Port egg buffs over to new system 2023-07-11 13:52:58 -04:00
gsemaj
e768ebcabe
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-07-11 13:52:58 -04:00
gsemaj
9bc7e8de62
Passive nano powers 2023-07-11 13:52:58 -04:00
gsemaj
f249599ab5
YET ANOTHER ITERATION of the new ability system
I am very tired
2023-07-11 13:52:57 -04:00
gsemaj
2901f5f285
Passive nano powers pt 1 2023-07-11 13:52:57 -04:00
gsemaj
36f329c302
Passive nano powers boilerplate 2023-07-11 13:52:57 -04:00
gsemaj
eb7daf8eaa
Fix timed out buffs not calling onExpire 2023-07-11 13:52:57 -04:00
gsemaj
0c5a9400ce
Buff framework tweaks + polish 2023-07-11 13:52:56 -04:00
gsemaj
f150595f70
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-07-11 13:52:56 -04:00
gsemaj
c6528eb2ac
oops 2023-07-11 13:52:56 -04:00
gsemaj
d631ca1aa1
CRLF purge in Buffs.cpp 2023-07-11 13:52:56 -04:00
gsemaj
a94fb0ed6d
egg prep 2023-07-11 13:52:55 -04:00
gsemaj
d48aa21135
Move Buff implementation to Buffs.cpp 2023-07-11 13:52:55 -04:00
gsemaj
c60c4dac38
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-07-11 13:52:55 -04:00
gsemaj
215da0130d
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-07-11 13:52:54 -04:00
gsemaj
0e8a4742eb
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-07-11 13:52:54 -04:00
gsemaj
85bb4d163e
Handle case where cmake is invoked outside root 2023-07-11 13:52:54 -04:00
gsemaj
09b74a5711
Start moving passive power processing to playerTick 2023-07-11 13:52:53 -04:00
gsemaj
90819bea8e
Groundwork for new buff system 2023-07-11 13:52:53 -04:00
gsemaj
3cc5c09a91
Active power classification 2023-07-11 13:52:53 -04:00
gsemaj
536d5fbcfa
some struct reorg 2023-07-11 13:52:53 -04:00
gsemaj
4ec3a3acb7
Replace group filter operator with function 2023-07-11 13:52:52 -04:00
gsemaj
89ed0b99a3
Ignore .bak files
for my local backups lol
2023-07-11 13:52:52 -04:00
gsemaj
db73b85bc8
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-07-11 13:52:52 -04:00
gsemaj
6cab203401
(WIP) EXPERIMENTAL GROUP CHANGES 2023-07-11 13:52:52 -04:00
gsemaj
92846e0eac
(WIP) TODO ABILITIES 2023-07-11 13:52:51 -04:00
gsemaj
5963ea06be
Move mob aggro logic into takeDamage override
God that feels good
2023-07-11 13:52:51 -04:00
gsemaj
c28970f2e1
(WIP) Move away from rigid states/transitions to allow custom behavior 2023-07-11 13:52:51 -04:00
gsemaj
8be853c2dc
EntityType -> EntityKind 2023-07-11 13:52:51 -04:00
gsemaj
a811e73fed
(WIP) onRoamStart hook implementation 2023-07-11 13:52:50 -04:00
gsemaj
a58971c270
(WIP) Remove BaseNPC::barkerType to save space 2023-07-11 13:52:50 -04:00
gsemaj
07429a0e51
ope 2023-07-11 13:52:50 -04:00
gsemaj
7c9038cf10
(WIP) onCombatStart hook implementation 2023-07-11 13:52:50 -04:00
gsemaj
c1e391d86a
(WIP) onDeath hook implementation 2023-07-11 13:52:49 -04:00
gsemaj
e23af08838
(WIP) Add src param to transition + certain hooks
Should all hooks have src? I think not
2023-07-11 13:52:49 -04:00
gsemaj
8a26ae2f01
(WIP) Transitions + hook definitions + onRetreat hook implementation 2023-07-11 13:52:49 -04:00
gsemaj
d17694e12e
(WIP) Point 2: Generalization 2023-07-11 13:52:48 -04:00
gsemaj
4b612f35d2
(WIP) Point 1: step functions 2023-07-11 13:52:48 -04:00
gsemaj
d9e0a4a281
(WIP) Start implementing ICombatant
Start by replacing `hitMob` with `takeDamage` interface function.
Simplify `pcAttackChars` a little by utilizing the new interface, then add more interface functions as needed.

A lot of the combat logic is tied to the `Mob` class. Need to start moving stuff over to CombatNPC.
2023-07-11 13:52:48 -04:00
gsemaj
dd9891f668
(WIP) Move ICombatant functions around a bit 2023-07-11 13:52:48 -04:00
gsemaj
962141e54f
(WIP) Initial ICombatant draft 2023-07-11 13:52:47 -04:00
bea41132b4
[refactor] Get rid of NPC.hpp
This file was already obsoleted at the start of the refactor, but seems
to have escaped notice until now.
2023-07-11 13:52:47 -04:00
f305d7252d
[refactor] Replace a few uses of magic numbers with enums 2023-07-11 13:52:47 -04:00
ff62129eec
[refactor] Cosmetic cleanup in Fuse fight functions 2023-07-11 13:52:47 -04:00
55f3ab8bad
[refactor] Remove redundant coord args from most entity constructors
Mobs and CombatNPCs still need theirs in order to properly set their
roaming and spawn coords. Assignment of the latter has been moved to the
CombatNPC constructor, where it should have already been.
2023-07-11 13:52:46 -04:00
gsemaj
a732cde117
[WIP] Stub power handler 2023-07-11 13:52:46 -04:00
gsemaj
703eaff2b4
[WIP] Use EntityRef instead of CNSocket in ability handler 2023-07-11 13:52:46 -04:00
gsemaj
f4f5f2e0bd
[WIP] Replace appearance data with individual fields
Storing certain things in appearance data and others in their own fields
was gross. Now everything is stored on the same level and functions have
been added to generate appearance data when it's needed by the client.
2023-07-11 13:52:45 -04:00