Removed remnants in games.cs
This commit is contained in:
parent
8b3355f8c7
commit
f7807d0b9a
@ -54,40 +54,6 @@ namespace NadekoBot.Modules {
|
||||
} catch { }
|
||||
});
|
||||
|
||||
cgb.CreateCommand(Prefix + "attack")
|
||||
.Description("Attack a person. Supported attacks: 'splash', 'strike', 'burn', 'surge'.\n**Usage**: >attack strike @User")
|
||||
.Parameter("attack_type", Discord.Commands.ParameterType.Required)
|
||||
.Parameter("target", Discord.Commands.ParameterType.Required)
|
||||
.Do(async e => {
|
||||
var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault();
|
||||
if (usr == null) {
|
||||
await e.Channel.SendMessage("No such person.");
|
||||
return;
|
||||
}
|
||||
var usrType = GetType(usr.Id);
|
||||
var response = "";
|
||||
var dmg = GetDamage(usrType, e.GetArg("attack_type").ToLowerInvariant());
|
||||
response = e.GetArg("attack_type") + (e.GetArg("attack_type") == "splash" ? "es " : "s ") + $"{usr.Mention}{GetImage(usrType)} for {dmg}\n";
|
||||
if (dmg >= 65) {
|
||||
response += "It's super effective!";
|
||||
} else if (dmg <= 35) {
|
||||
response += "Ineffective!";
|
||||
}
|
||||
await e.Channel.SendMessage($"{ e.User.Mention }{GetImage(GetType(e.User.Id))} {response}");
|
||||
});
|
||||
|
||||
cgb.CreateCommand(Prefix + "poketype")
|
||||
.Parameter("target", Discord.Commands.ParameterType.Required)
|
||||
.Description("Gets the users element type. Use this to do more damage with strike!")
|
||||
.Do(async e => {
|
||||
var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault();
|
||||
if (usr == null) {
|
||||
await e.Channel.SendMessage("No such person.");
|
||||
return;
|
||||
}
|
||||
var t = GetType(usr.Id);
|
||||
await e.Channel.SendMessage($"{usr.Name}'s type is {GetImage(t)} {t}");
|
||||
});
|
||||
cgb.CreateCommand(Prefix + "rps")
|
||||
.Description("Play a game of rocket paperclip scissors with nadkeo.\n**Usage**: >rps scissors")
|
||||
.Parameter("input", ParameterType.Required)
|
||||
@ -145,91 +111,6 @@ There really is a {loonix}, and these people are using it, but it is just a part
|
||||
});
|
||||
});
|
||||
}
|
||||
/*
|
||||
|
||||
🌿 or 🍃 or 🌱 Grass
|
||||
⚡ Electric
|
||||
❄ Ice
|
||||
☁ Fly
|
||||
🔥 Fire
|
||||
💧 or 💦 Water
|
||||
⭕ Normal
|
||||
🐛 Insect
|
||||
🌟 or 💫 or ✨ Fairy
|
||||
*/
|
||||
|
||||
private string GetImage(PokeType t) {
|
||||
switch (t) {
|
||||
case PokeType.WATER:
|
||||
return "💦";
|
||||
case PokeType.GRASS:
|
||||
return "🌿";
|
||||
case PokeType.FIRE:
|
||||
return "🔥";
|
||||
case PokeType.ELECTRICAL:
|
||||
return "⚡️";
|
||||
default:
|
||||
return "⭕️";
|
||||
}
|
||||
}
|
||||
|
||||
private int GetDamage(PokeType targetType, string v) {
|
||||
var rng = new Random();
|
||||
switch (v) {
|
||||
case "splash": //water
|
||||
if (targetType == PokeType.FIRE)
|
||||
return rng.Next(65, 100);
|
||||
else if (targetType == PokeType.ELECTRICAL)
|
||||
return rng.Next(0, 35);
|
||||
else
|
||||
return rng.Next(40, 60);
|
||||
case "strike": //grass
|
||||
if (targetType == PokeType.ELECTRICAL)
|
||||
return rng.Next(65, 100);
|
||||
else if (targetType == PokeType.FIRE)
|
||||
return rng.Next(0, 35);
|
||||
else
|
||||
return rng.Next(40, 60);
|
||||
case "burn": //fire
|
||||
case "flame":
|
||||
if (targetType == PokeType.GRASS)
|
||||
return rng.Next(65, 100);
|
||||
else if (targetType == PokeType.WATER)
|
||||
return rng.Next(0, 35);
|
||||
else
|
||||
return rng.Next(40, 60);
|
||||
case "surge": //electrical
|
||||
case "electrocute":
|
||||
if (targetType == PokeType.WATER)
|
||||
return rng.Next(65, 100);
|
||||
else if (targetType == PokeType.GRASS)
|
||||
return rng.Next(0, 35);
|
||||
else
|
||||
return rng.Next(40, 60);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private PokeType GetType(ulong id) {
|
||||
if (id == 113760353979990024)
|
||||
return PokeType.FIRE;
|
||||
|
||||
var remainder = id % 10;
|
||||
if (remainder < 3)
|
||||
return PokeType.WATER;
|
||||
else if (remainder >= 3 && remainder < 5) {
|
||||
return PokeType.GRASS;
|
||||
} else if (remainder >= 5 && remainder < 8) {
|
||||
return PokeType.FIRE;
|
||||
} else {
|
||||
return PokeType.ELECTRICAL;
|
||||
}
|
||||
}
|
||||
|
||||
private enum PokeType {
|
||||
WATER, GRASS, FIRE, ELECTRICAL
|
||||
}
|
||||
|
||||
private string GetRPSPick(int i) {
|
||||
if (i == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user