mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 03:04:44 +02:00
2.1.85
This commit is contained in:
@ -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()));
|
||||
|
Reference in New Issue
Block a user