The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

Not enough ratings
!Critical Hit [Lib]
   
Award
Favorite
Favorited
Unfavorite
Tags: Lua
File Size
Posted
Updated
16.855 KB
10 Apr, 2022 @ 7:18pm
29 Aug, 2022 @ 8:13pm
5 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
!Critical Hit [Lib]

Description
Critical Hit is a library that adds two new stats.
Critical Chance
and
Critical Multiplier

Critical Chance is a value between 0 and 1, where 1 is 100% chance to crit
Critical multiplier is a value between 0.01 and inf, so yes this means you can have a crit that actually reduces your dmg.

Defaults:
Crit Chance - 0% (yes this means you need something that uses the API to actually crit)
Crit Damage - 2x

Info:
CriticalHit:AddCallback(fn) - Add a callback function that goes off anytime something crits - Passes in Entity (the entity that did the crit), and the CritMultiplier they have. CriticalHit:AddCacheCallback(fn) - Add a callback function for your character/item to check if someone is using the API do: if CriticalHit then -- code end

two debug commands exist
criticalhit stat <chance, damage> <number> -- to manually set your stat (until next evaluation)
criticalhit get -- prints the stats as they are in the background (rather than the formatted form of the missing hud)

TODO:
Documentation
Example Mod

Credits:

BogdanRudyka: Made the crit chance icon for missing hud
Crabby: Made the crit damage icon for missing hud.

[ko-fi.com]
Popular Discussions View All (3)
1
25 Apr, 2022 @ 1:20pm
Mods that use this LIB
manaphoenix
0
10 Apr, 2022 @ 7:32pm
Suggestions
manaphoenix
0
10 Apr, 2022 @ 7:32pm
Bugs
manaphoenix
10 Comments
Crowd 11 Apr, 2022 @ 12:36pm 
I didn't know that there was already hud functionality, Neat!
JudeInutil 11 Apr, 2022 @ 12:33pm 
@manaphoenix Makes sense
manaphoenix  [author] 11 Apr, 2022 @ 12:32pm 
@crowd Sorry I don't understand, as long as you have the stats HUD showing there is a UI element for what your crit damage and crit chance are.
manaphoenix  [author] 11 Apr, 2022 @ 12:11pm 
@jude this is intended to be a dependancy style mod, not something you just add into your own mod files.
Crowd 11 Apr, 2022 @ 7:22am 
I meant like a UI element for what you're crit damage and crit chance were
JudeInutil 11 Apr, 2022 @ 2:37am 
@manaphoenix oh nice, i really like crits so this sounds fun to have. Is this a dependency i need to have if i want my mods to have this or is it something i can install and put in my own mod?
manaphoenix  [author] 11 Apr, 2022 @ 1:54am 
@jude it does show on the HUD already tho :P
JudeInutil 11 Apr, 2022 @ 1:31am 
@manaphoenix Perhaps they meant the actual stats hud
manaphoenix  [author] 10 Apr, 2022 @ 8:12pm 
`maybe a nice UI complement` what do you mean Crowd?
Crowd 10 Apr, 2022 @ 8:04pm 
This mod definitely show potential, maybe a nice UI complement would be cool, looks cool so far