Lucky chance calculation improvement.

This commit is contained in:
MobiusDev 2017-11-21 18:02:21 +00:00
parent 02d98d7647
commit b8c5f90abb
4 changed files with 4 additions and 4 deletions

View File

@ -13966,7 +13966,7 @@ public final class L2PcInstance extends L2Playable
public boolean tryLuck()
{
if ((Rnd.nextDouble() < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
if (((Rnd.nextDouble() * 100) < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
{
SkillCaster.triggerCast(this, this, CommonSkill.LUCKY_CLOVER.getSkill());
sendPacket(SystemMessageId.LADY_LUCK_SMILES_UPON_YOU);

View File

@ -13950,7 +13950,7 @@ public final class L2PcInstance extends L2Playable
public boolean tryLuck()
{
if ((Rnd.nextDouble() < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
if (((Rnd.nextDouble() * 100) < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
{
SkillCaster.triggerCast(this, this, CommonSkill.LUCKY_CLOVER.getSkill());
sendPacket(SystemMessageId.LADY_LUCK_SMILES_UPON_YOU);

View File

@ -14008,7 +14008,7 @@ public final class L2PcInstance extends L2Playable
public boolean tryLuck()
{
if ((Rnd.nextDouble() < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
if (((Rnd.nextDouble() * 100) < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
{
SkillCaster.triggerCast(this, this, CommonSkill.LUCKY_CLOVER.getSkill());
sendPacket(SystemMessageId.LADY_LUCK_SMILES_UPON_YOU);

View File

@ -14027,7 +14027,7 @@ public final class L2PcInstance extends L2Playable
public boolean tryLuck()
{
if ((Rnd.nextDouble() < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
if (((Rnd.nextDouble() * 100) < BaseStats.LUC.getValue(getLUC())) && !hasSkillReuse(CommonSkill.LUCKY_CLOVER.getSkill().getReuseHashCode()))
{
SkillCaster.triggerCast(this, this, CommonSkill.LUCKY_CLOVER.getSkill());
sendPacket(SystemMessageId.LADY_LUCK_SMILES_UPON_YOU);