public int Resistance(int i) { while (stats.resistance.Length < ReferenceData.DmgType.Length) { stats.resistance = ArrayM.AddItem(stats.resistance, 0); } return(equipment.Resistance(i) + stats.resistance[i]); }
public long Damage(int i) { while (stats.damage.Length < ReferenceData.DmgType.Length) { stats.damage = ArrayM.AddItem(stats.damage, 0); } if (i == 0) { return(Convert.ToInt32((equipment.Damage(i) + stats.damage[i]) * stats.PhysicalDMG())); } return(equipment.Damage(i) + stats.damage[i]); }
public async Task CratesListUI(ISocketMessageChannel chan) { if (ResourceCrates == null) { ResourceCrates = new int[5]; } while (ResourceCrates.Length < 5) { ResourceCrates = ArrayM.AddItem(ResourceCrates, 0); } EmbedBuilder em = AMYPrototype.Commands.DUtils.BuildEmbed("Resource Crates", "Select a Crate type to open." + Environment.NewLine + $"{EUI.GetNum(0)} {ResourceCrates[0]} x Wooden Crates" + Environment.NewLine + $"{EUI.GetNum(1)} {ResourceCrates[1]} x Bronze Crates" + Environment.NewLine + $"{EUI.GetNum(2)} {ResourceCrates[2]} x Silver Crates" + Environment.NewLine + $"{EUI.GetNum(3)} {ResourceCrates[3]} x Golden Crates" + Environment.NewLine + $"{EUI.GetNum(4)} {ResourceCrates[4]} x Platinum Crates"); NewUI(await chan.SendMessageAsync(embed: em.Build()), MsgType.ResourceCrateList); }
/// <summary> /// Calculates the total Damage /// </summary> /// <param name="i">index of damage type</param> /// <param name="b">User Base stat</param> /// <param name="e">User Efficiency</param> /// <returns></returns> public long Damage(int i, double b, double e) { while (damage.Length < ReferenceData.DmgType.Length) { damage = ArrayM.AddItem(damage, 0); } switch (type) { case AType.Martial: return(Convert.ToInt32(damage[i] + b)); case AType.Enchantment: return(Convert.ToInt32(((1 + (damage[i] / 100.00)) * b) * e)); case AType.Elemental: return(Convert.ToInt32(damage[i] * e)); case AType.Tactical: case AType.Defensive: default: return(0); } }
public async Task NewVote() { if (ResourceCrates == null) { ResourceCrates = new int[5]; } while (ResourceCrates.Length < 5) { ResourceCrates = ArrayM.AddItem(ResourceCrates, 0); } string rewards = null; int amount = Program.dblAPI.CrateAmount() * ReferenceData.CrateRate; rewards += ProcessVotes(amount); Save(); await SendMessageToDM($"Your vote was registered." + $" You've received: {Environment.NewLine + rewards} with a current streak of **{voteStreak}**." + Environment.NewLine + "Use command `Crates` to open resource crates." ); }