This commit is contained in:
nossr50
2019-06-20 00:02:48 -07:00
parent 83636644b1
commit 5698d8282c
5 changed files with 23 additions and 10 deletions

View File

@ -115,21 +115,21 @@ public class SalvageManager extends SkillManager {
//Lottery on Salvageable Amount
int lotteryResults = 1;
int chanceOfSuccess = 80;
int chanceOfSuccess = 99;
for(int x = 1; x < salvageableAmount-1; x++) {
for(int x = 0; x < salvageableAmount-1; x++) {
if(RandomChanceUtil.rollDice(chanceOfSuccess, 100)) {
chanceOfSuccess-=20;
Math.max(chanceOfSuccess, 33);
chanceOfSuccess-=2;
Math.max(chanceOfSuccess, 95);
lotteryResults+=1;
}
}
if(lotteryResults == salvageableAmount) {
if(lotteryResults == salvageableAmount && salvageableAmount != 1) {
NotificationManager.sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Perfect", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
} else if(RankUtils.isPlayerMaxRankInSubSkill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE)) {
} else if(RankUtils.isPlayerMaxRankInSubSkill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE) || salvageableAmount == 1) {
NotificationManager.sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Normal", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
} else {
NotificationManager.sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Untrained", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));