Skip to content

Commit 17dae66

Browse files
authored
Merge pull request #202 from theraot/bugfix
Use drop chance correctly
2 parents eac5d44 + c87a824 commit 17dae66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

godot/src/combat/Rewards.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func _add_reward(battler: Battler):
2424
# Appends dictionaries with the form { 'item': Item.tres, 'amount': amount } of dropped items to the drops array.
2525
experience_earned += battler.drops.experience
2626
for drop in battler.drops.get_drops():
27-
if drop.chance - randf() > drop.chance:
27+
if drop.chance < 1 and randf() >= drop.chance:
2828
continue
2929
var amount: int = (
3030
1

0 commit comments

Comments
 (0)