mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Fishing in the rain gives you a higher chance of getting magical items!
This commit is contained in:
parent
6f29e475ee
commit
54ef85e1a3
@ -16,6 +16,7 @@ public class FishingCommand extends SkillCommand {
|
||||
private int lootTier;
|
||||
private String magicChance;
|
||||
private String magicChanceLucky;
|
||||
private String chanceRaining;
|
||||
private int shakeUnlockLevel;
|
||||
private String shakeChance;
|
||||
private String shakeChanceLucky;
|
||||
@ -30,6 +31,7 @@ public class FishingCommand extends SkillCommand {
|
||||
private boolean canShake;
|
||||
private boolean canFishermansDiet;
|
||||
private boolean lucky;
|
||||
private boolean raining;
|
||||
|
||||
public FishingCommand() {
|
||||
super(SkillType.FISHING);
|
||||
@ -37,9 +39,15 @@ public class FishingCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
raining = player.getWorld().hasStorm();
|
||||
chanceRaining = "";
|
||||
//Treasure Hunter
|
||||
lootTier = Fishing.getFishingLootTier(profile);
|
||||
int magicChanceInt = (lootTier * magicHunterMultiplier);
|
||||
if (raining) {
|
||||
chanceRaining = LocaleLoader.getString("Fishing.Chance.Raining");
|
||||
magicChanceInt = (int) (magicChanceInt * 1.1D);
|
||||
}
|
||||
magicChance = percent.format(magicChanceInt / 100D);
|
||||
if (magicChanceInt + (magicChanceInt * 0.3333D) >= 100D) magicChanceLucky = percent.format(1D);
|
||||
else magicChanceLucky = percent.format((magicChanceInt + (magicChanceInt * 0.3333D)) / 100D);
|
||||
@ -107,9 +115,9 @@ public class FishingCommand extends SkillCommand {
|
||||
|
||||
if (canMagicHunt) {
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", new Object[] { magicChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { magicChanceLucky }));
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", new Object[] { magicChance}) + chanceRaining + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { magicChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", new Object[] { magicChance }));
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", new Object[] { magicChance}) + chanceRaining);
|
||||
}
|
||||
|
||||
if (canShake) {
|
||||
|
@ -150,6 +150,10 @@ public class Fishing {
|
||||
randomChance = (int) (randomChance * 0.75);
|
||||
}
|
||||
|
||||
if (player.getWorld().hasStorm()) {
|
||||
randomChance = (int) (randomChance * 0.909);
|
||||
}
|
||||
|
||||
/* CHANCE OF ITEM BEING ENCHANTED
|
||||
* 5% - Tier 1
|
||||
* 10% - Tier 2
|
||||
|
@ -113,6 +113,7 @@ Fishing.Effect.5=Shake items off of mobs w/ fishing pole
|
||||
Fishing.Effect.6=Fisherman's Diet
|
||||
Fishing.Effect.7=Improves hunger restored from fished foods
|
||||
Fishing.Enchant.Chance=[[RED]]Magic Hunter Chance: [[YELLOW]]{0}
|
||||
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
Fishing.Listener=Fishing:
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
|
Loading…
Reference in New Issue
Block a user