fix vbi, fish progress

added fish placeholders, changed vbi display, refined legendary fish droprates
master
Lan 4 years ago
parent be54570899
commit e0d81edf49
  1. 4
      Kehyeedra3/Commands/Admin.cs
  2. 98
      Kehyeedra3/Commands/Economy.cs
  3. 86
      Kehyeedra3/Services/Models/Fishing.cs

@ -102,11 +102,11 @@ namespace Kehyeedra3.Commands
await Database.SaveChangesAsync();
if (difference > 0)
{
await Context.Channel.SendMessageAsync($"Economy has been stabilized by adding {difference / 10000d} to bank");
await Context.Channel.SendMessageAsync($"Economy has been stabilized by adding {difference / 10000d}% to bank");
}
else
{
await Context.Channel.SendMessageAsync($"Economy has been stabilized by removing {0-difference / 10000d} from bank");
await Context.Channel.SendMessageAsync($"Economy has been stabilized by removing {0-difference / 10000d}% from bank");
}
}
}

@ -248,20 +248,28 @@ namespace Kehyeedra3.Commands
Fish fish;
if (rarity == 777 || (rarity > 2060 && rarity <= 2070) || (rarity > 2760 && rarity <= 2770))
if (rarity == 777 || (rarity > 2060 && rarity <= 2070) || (rarity >= 2765 && rarity <= 2767))
{
if (rod == 1)
int tierRoll = SRandom.Next(0, 101);
if (rod >= 3 && tierRoll > 60)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T2Legendary).ToList();
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T4Legendary).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 15;
xp = 25;
}
else if (rod == 1)
else if (rod >= 2 && tierRoll > 40)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T3Legendary).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 20;
}
else if (rod >= 1 && tierRoll > 20)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T2Legendary).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 15;
}
else
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.Legendary).ToList();
@ -276,27 +284,55 @@ namespace Kehyeedra3.Commands
else if (rarity > 1700)
{
int tierRoll = SRandom.Next(0, 101);
rarity = Convert.ToUInt64(SRandom.Next(1750, 2801));
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.Uncommon).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 10;
if (rod >= 3 && tierRoll > 60)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T4Uncommon).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 20;
}
else if (rod >= 2 && tierRoll > 40)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T3Uncommon).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 16;
}
else if (rod >= 1 && tierRoll > 20)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T2Uncommon).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 13;
}
else
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.Uncommon).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 10;
}
if (rarity > 2600)
{
if (rod == 1)
if (rod >= 3 && tierRoll > 60)
{
possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T2Rare).ToList();
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T4Rare).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 25;
xp = 35;
}
else if (rod == 2)
else if (rod >= 2 && tierRoll > 40)
{
possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T3Rare).ToList();
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T3Rare).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 30;
}
else if (rod >= 1 && tierRoll > 20)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T2Rare).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 25;
}
else
{
possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.Rare).ToList();
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.Rare).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 20;
}
@ -305,14 +341,36 @@ namespace Kehyeedra3.Commands
}
else
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.Common).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 5;
int tierRoll = SRandom.Next(0, 101);
if (rod >= 3 && tierRoll > 60)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T4Common).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 10;
}
else if (rod >= 2 && tierRoll > 40)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T3Common).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 8;
}
else if (rod >= 1 && tierRoll >= 20)
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.T2Common).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 6;
}
else
{
List<Fish> possibleFishes = fishes.Where(f => (int)f.Rarity == (int)FishRarity.Common).ToList();
fish = possibleFishes[SRandom.Next(possibleFishes.Count)];
xp = 5;
}
}
FishSize size;
if (fish.Rarity == FishRarity.Legendary || fish.Rarity == FishRarity.T2Legendary || fish.Rarity == FishRarity.T3Legendary)
if (fish.Rarity == FishRarity.Legendary || fish.Rarity == FishRarity.T2Legendary || fish.Rarity == FishRarity.T3Legendary || fish.Rarity == FishRarity.T4Legendary )
{
weight = 1000;
}
@ -325,7 +383,7 @@ namespace Kehyeedra3.Commands
weight = SRandom.Next(10, 2001) + Convert.ToInt32(level * 5);
}
if (fish.Rarity == FishRarity.Legendary)
if (fish.Rarity == FishRarity.Legendary || fish.Rarity == FishRarity.T2Legendary || fish.Rarity == FishRarity.T3Legendary || fish.Rarity == FishRarity.T4Legendary)
{
weight = SRandom.Next(2000 + Convert.ToInt32(level * 20), 40001);
}
@ -333,7 +391,7 @@ namespace Kehyeedra3.Commands
if (weight >= 1000)
{
xp = Convert.ToUInt64(Math.Round((xp * w / 1000), 0, MidpointRounding.ToEven));
if (fish.Rarity == FishRarity.Legendary || fish.Rarity == FishRarity.T2Legendary || fish.Rarity == FishRarity.T3Legendary)
if (fish.Rarity == FishRarity.Legendary || fish.Rarity == FishRarity.T2Legendary || fish.Rarity == FishRarity.T3Legendary || fish.Rarity == FishRarity.T4Legendary)
{
if (xp < 100)
{

@ -13,8 +13,9 @@ namespace Kehyeedra3.Services.Models
public enum FishRarity
{
Common, Uncommon, Rare, Legendary,
T2Rare, T2Legendary,
T3Rare, T3Legendary
T2Rare, T2Legendary, T2Uncommon, T2Common,
T3Rare, T3Legendary, T3Uncommon, T3Common,
T4Rare, T4Legendary, T4Uncommon, T4Common
}
public class Fish
{
@ -190,7 +191,7 @@ namespace Kehyeedra3.Services.Models
Rarity = FishRarity.Common
},
new Fish()
new Fish() //// Tier 2
{
Id = FishSpecies.T2Circusfish,
Name = "Circusfish",
@ -205,6 +206,21 @@ namespace Kehyeedra3.Services.Models
Rarity = FishRarity.T2Rare
},
new Fish()
{
Id = FishSpecies.T2Gunfish,
Name = "Gunfish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T2Uncommon
},
new Fish()
{
Id = FishSpecies.T2Com,
Name = "Missing T2 Common Fish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T2Common
},
new Fish() //// Tier 3
{
Id = FishSpecies.T3Doomfish,
Name = "Spectral Doomfish",
@ -217,6 +233,49 @@ namespace Kehyeedra3.Services.Models
Name = "Revenant Crab",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T3Rare
},
new Fish()
{
Id = FishSpecies.T3Unc,
Name = "Spectral Flameworm",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T3Uncommon
},
new Fish()
{
Id = FishSpecies.T3Com,
Name = "Spectral Shrimp",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T3Common
},
new Fish() //// Tier 4
{
Id = FishSpecies.T4Leg,
Name = "Missing T4 Legendary Fish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T4Legendary
},
new Fish()
{
Id = FishSpecies.T4Rar,
Name = "Missing T4 Rare Fish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T4Rare
},
new Fish()
{
Id = FishSpecies.T4Unc,
Name = "Missing T4 Uncommon Fish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T4Uncommon
},
new Fish()
{
Id = FishSpecies.T4Com,
Name = "Missing T4 Common Fish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.T4Common
}
};
@ -252,15 +311,26 @@ namespace Kehyeedra3.Services.Models
T2Circusfish = 20,
//T2 Rare
T2Swolefish = 21,
//T2 Uncommon
T2Gunfish = 22,
//T2 Common
T2Com = 23,
//T3 Legendary
T3Doomfish = 22,
T3Doomfish = 24,
//T3 Rare
T3Crab = 23,
T3Crab = 25,
//T3 Uncommon
T3Unc = 26,
//T3 Common
T3Com = 27,
//T4 Legendary
T4Leg = 28,
//T4 Rare
T4Rar = 29,
//T4 Uncommon
T4Unc = 30,
//T4 Common
T4Com = 31
}
public class FishingInventorySlot
{

Loading…
Cancel
Save