![]() |
|
|||||||
| King`s Bounty: Warriors of the North Next game in the award-winning King’s Bounty series |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Code:
iskrit = ( kritProbRnd < kritProb )
if iskrit then
if receiver_human and not receiver_glot then
kritProb = kritProb - skill_power("weakness_lore", 2)
if kritProbRnd < kritProb then
iskrit = true
else
iskrit = false
is_weakness_lore = true
end
end
end
|
|
#2
|
||||
|
||||
|
Nice, Zechnophobe. I'll link to it once it's confirmed and Bhruic adds it to the summary. Too bad getting crit isn't easy to test. You almost need to keep a save near a hero who casts doom.
|
|
#3
|
|||
|
|||
|
Quote:
Your code does mostly fix it, but I already posted a different fix in the main post. Both do roughly the same thing but different ways. The main point is that it should be working correctly now. |
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
Quote:
I wasn't optimizing for speed, since that is no doubt a non-issue with something like this. More just for how clarity and ease of debugging. Calling in additional functions to do your logic like that makes the code slightly weightier. And then, any edit to an external source should generally be simple so as a diff is easy to understand. Seeing: Code:
Blah blah < bleh bleh Code:
Blah blah >= bleh bleh Er, not that any of this really matters... I've just been doing code reviews at work recently and it has me thinking about Ivory Tower code production stuff. |
|
#7
|
|||
|
|||
|
Quote:
|
![]() |
|
|