The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

评价数不足
!Critical Hit [Lib]
   
奖励
收藏
已收藏
取消收藏
Tags: Lua
文件大小
发表于
更新日期
16.855 KB
2022 年 4 月 10 日 下午 7:18
2022 年 8 月 29 日 下午 8:13
5 项改动说明 ( 查看 )
您需要 DLC 才能使用该物品。

订阅以下载
!Critical Hit [Lib]

描述
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]
热门讨论 查看全部(3)
1
2022 年 4 月 25 日 下午 1:20
Mods that use this LIB
manaphoenix
0
2022 年 4 月 10 日 下午 7:32
Suggestions
manaphoenix
0
2022 年 4 月 10 日 下午 7:32
Bugs
manaphoenix
10 条留言
Crowd 2022 年 4 月 11 日 下午 12:36 
I didn't know that there was already hud functionality, Neat!
JudeInutil 2022 年 4 月 11 日 下午 12:33 
@manaphoenix Makes sense
manaphoenix  [作者] 2022 年 4 月 11 日 下午 12:32 
@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  [作者] 2022 年 4 月 11 日 下午 12:11 
@jude this is intended to be a dependancy style mod, not something you just add into your own mod files.
Crowd 2022 年 4 月 11 日 上午 7:22 
I meant like a UI element for what you're crit damage and crit chance were
JudeInutil 2022 年 4 月 11 日 上午 2:37 
@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  [作者] 2022 年 4 月 11 日 上午 1:54 
@jude it does show on the HUD already tho :P
JudeInutil 2022 年 4 月 11 日 上午 1:31 
@manaphoenix Perhaps they meant the actual stats hud
manaphoenix  [作者] 2022 年 4 月 10 日 下午 8:12 
`maybe a nice UI complement` what do you mean Crowd?
Crowd 2022 年 4 月 10 日 下午 8:04 
This mod definitely show potential, maybe a nice UI complement would be cool, looks cool so far