Skip to content

Commit

Permalink
10% crit chance for crossbows!
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Nov 16, 2014
1 parent c5dff65 commit 16138a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/tconstruct/weaponry/weapons/Crossbow.java
@@ -1,5 +1,6 @@
package tconstruct.weaponry.weapons;

import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.weaponry.TinkerWeaponry;
import tconstruct.weaponry.ammo.BoltAmmo;
Expand Down Expand Up @@ -267,6 +268,10 @@ protected Entity createProjectile(ItemStack ammo, World world, EntityPlayer play
if(player.capabilities.isCreativeMode)
arrow.canBePickedUp = 2;

// 10% crit hit chance!
if(!world.isRemote && TConstruct.random.nextFloat() < 0.1f)
arrow.setIsCritical(true);

return arrow;
}

Expand Down

0 comments on commit 16138a8

Please sign in to comment.