>>103218129
This seems horribly written just from a naming perspective:
-What the fuck is base? I guess something that has a parent with presumably UI access but then why not this.owner.breakDetail? The name should be more informative
-I guess a nitpick but that double float cast is fucky to me, could neither of those values be float by default?
-That card data type is way too fucking long, should be something like UnitModelData if that's what it's supposed to be. If it's a card then just call it like CardBaseData or similar, don't use a fucking sentence for a class name.
-The stupidly long class type is being used to store a "card" but then literally beneath it is an if checking that this.behavior.card is null which is apparently a separate card reference? Fucking why? Also given that's the first time that this.behaviour.card even occurs in the function it should be at the top of the function because otherwise you are wasting time doing assignments and calculations even if the card is null
-For some reason you're repeating a threshold check over and over, just make it a function with threshold and dmgRate parameters
-Also zero comments of any kind other than what I assume is a pregenerated nonsense comment.
-Finally unless I'm missing something, will the function ever even resolve? you call base.BeforeRollDice at the start of the function so what actually prevents an infinite loop?
3/10 learn to prompt better or read the damn docs and watch a video on best practices or something