TeamREPENTOGON / TeamREPENTOGON/REPENTOGON
New callback to add and modify player contact damage
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 345
- Forks
- 51
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 4
Description
As of right now, it's quite hard to make the player deal contact damage that properly stacks with items such as Mom's Heels or Little Horn, simply damaging enemies on collision either cancels the damage from those items or cancels your damage if you want to use damage countdown.
A ModCallbacks.MC_PRE/POST_PLAYER_DEAL_COLLISION_DAMAGE callback would be quite handy, allowing stacking with the previously mentioned items or modifying their damage output aswell!
mod:AddCallback(ModCallbacks.MC_PRE_PLAYER_DEAL_COLLISION_DAMAGE, function(_, player. damage, countdown)
if player:HasCollectible(myCoolItem) then
return damage + 12
end
end)
The code above would simply deal 12 contact damage to enemies per tick (or whatever countdown the game uses for the other damaging items), returning a table like this return {Damage = damage + 12, Countdown = 3} could overwrite how much damage is dealt per tick!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file or test is named. Start by locating the player collision-damage handling and existing ModCallbacks definitions, then compare how PRE and POST callbacks expose damage and countdown. Done means the requested player collision-damage callbacks support stacking or modifying damage and countdown as described, with coverage for the Lua return behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100