56 Commits

Author SHA1 Message Date
1800334bb7 Fix buffs applying to non-COMBAT, non-ROAMING mobs 2023-09-13 03:01:18 +02:00
gsemaj
ea033a97dd
reduce drain tickrate 2023-09-09 11:59:13 -07:00
gsemaj
0eff236512
Fix corruption reflection 2023-08-19 16:19:36 -07:00
gsemaj
0fcf41cbfe
Fix guard FOR REAL 2023-08-19 15:03:16 -07:00
gsemaj
efb3887e3e
Fix corruption attack rebound 2023-08-19 14:54:18 -07:00
gsemaj
874bdefb13
Fix passive powers 2023-08-19 14:46:35 -07:00
gsemaj
94b08659d2
Fix battery drain block 2023-08-19 14:21:04 -07:00
gsemaj
d416763ae0 Move eruption attacks to new system 2023-08-19 20:46:41 +00:00
gsemaj
ff74c8ede1 Implement leech 2023-08-19 20:46:41 +00:00
gsemaj
36b6aeeb00 Fix segv: Halt buff iteration if mob is dead 2023-08-19 20:46:41 +00:00
gsemaj
c1aff8d3c3 Move drain to new system
TODO
- There is a seg fault that happens when drain kills the mob
- leech unimplemented
- mob skills unimplemented
2023-08-19 20:46:41 +00:00
gsemaj
1cf2be9968 reorder some stuff 2023-08-19 20:46:41 +00:00
gsemaj
dd4063e416 Fix icon not disappearing for debuffs 2023-08-19 20:46:41 +00:00
gsemaj
464d18820b Tick 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
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
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
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
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
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
04221f1c5f (WIP) TODO ABILITIES 2023-08-19 20:46:41 +00:00
gsemaj
f6094fde58 EntityType -> EntityKind 2023-08-19 20:46:41 +00:00
gsemaj
35e938b8c6 ope 2023-08-19 20:46:41 +00:00
gsemaj
45742e90a2 (WIP) Add src param to transition + certain hooks
Should all hooks have src? I think not
2023-08-19 20:46:41 +00:00
gsemaj
69a478b777 (WIP) Transitions + hook definitions + onRetreat hook implementation 2023-08-19 20:46:41 +00:00
gsemaj
c32e5b2d5e (WIP) Point 2: Generalization 2023-08-19 20:46:41 +00:00
gsemaj
0c4cdaeabf (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-08-19 20:46:41 +00:00
gsemaj
32fad56d38 [WIP] Stub power handler 2023-08-19 20:46:41 +00:00
gsemaj
efc00e63b3 [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-08-19 20:46:41 +00:00
gsemaj
7ab01b098d [WIP] Rename Entity.type -> Entity.kind 2023-08-19 20:46:41 +00:00
gsemaj
32db574700 [WIP] Fix Nanos -> Abilities namespace calls 2023-08-19 20:46:41 +00:00