Merge pull request #171 from LawlyPopz/master

Added fairy, fixed poketype generator, changed psychic icon, closes #169
This commit is contained in:
Master Kwoth 2016-04-01 17:39:19 +02:00
commit 488b897690
11 changed files with 49 additions and 5 deletions

View File

@ -79,7 +79,11 @@ namespace NadekoBot.Modules.Pokemon
{"bullet punch",16}, {"bullet punch",16},
{"metal burst",16}, {"metal burst",16},
{"gear grind",16}, {"gear grind",16},
{"magnet bomb",16} {"magnet bomb",16},
{"fairy wind",17},
{"draining kiss",17},
{"dazzling gleam",17},
{"play rough",17}
}; };

View File

@ -49,7 +49,7 @@ namespace NadekoBot.Modules.Pokemon
return PokemonTypesMain.IntToPokeType(setTypes[(long)id]); return PokemonTypesMain.IntToPokeType(setTypes[(long)id]);
} }
int remainder = Math.Abs((int)(id % 16)); int remainder = Math.Abs((int)(id % 18));
return PokemonTypesMain.IntToPokeType(remainder); return PokemonTypesMain.IntToPokeType(remainder);
} }

View File

@ -18,8 +18,10 @@ namespace NadekoBot.Modules.Pokemon.PokemonTypes
case "FIGHTING": return 0.5; case "FIGHTING": return 0.5;
case "POISON": return 0.5; case "POISON": return 0.5;
case "FLYING": return 0.5; case "FLYING": return 0.5;
case "GHOST": return 0.5;
case "PSYCHIC": return 2; case "PSYCHIC": return 2;
case "ROCK": return 0.5; case "ROCK": return 0.5;
case "FAIRY": return 0.5;
case "DARK": return 2; case "DARK": return 2;
case "STEEL": return 0.5; case "STEEL": return 0.5;
default: return 1; default: return 1;

View File

@ -17,7 +17,7 @@ namespace NadekoBot.Modules.Pokemon.PokemonTypes
case "PSYCHIC": return 2; case "PSYCHIC": return 2;
case "GHOST": return 2; case "GHOST": return 2;
case "DARK": return 0.5; case "DARK": return 0.5;
case "STEEL": return 0.5; case "FAIRY": return 0.5;
default: return 1; default: return 1;
} }
} }

View File

@ -15,6 +15,7 @@ namespace NadekoBot.Modules.Pokemon.PokemonTypes
case "DRAGON": return 2; case "DRAGON": return 2;
case "STEEL": return 0.5; case "STEEL": return 0.5;
case "FAIRY": return 0;
default: return 1; default: return 1;
} }
} }

View File

@ -0,0 +1,33 @@
using NadekoBot.Modules.Pokemon.PokeTypes;
using System.Collections.Generic;
namespace NadekoBot.Modules.Pokemon.PokemonTypes
{
class FairyType : PokeType
{
static readonly string name = "FAIRY";
public static int numType = 17;
public double Multiplier(PokeType target)
{
switch (target.Name)
{
case "FIGHTING": return 2;
case "FIRE": return 0.5;
case "DARK": return 0.5;
case "POISON": return 0.5;
case "STEEL": return 2;
case "DRAGON": return 2;
default: return 1;
}
}
List<string> moves = new List<string>();
public string Name => name;
public string Image => "💫";
public int Num => numType;
}
}

View File

@ -23,6 +23,7 @@ namespace NadekoBot.Modules.Pokemon.PokemonTypes
case "GHOST": return 0; case "GHOST": return 0;
case "DARK": return 2; case "DARK": return 2;
case "STEEL": return 2; case "STEEL": return 2;
case "FAIRY": return 0.5;
default: return 1; default: return 1;
} }
} }

View File

@ -19,6 +19,7 @@ namespace NadekoBot.Modules.Pokemon.PokemonTypes
case "ROCK": return 0.5; case "ROCK": return 0.5;
case "GHOST": return 0.5; case "GHOST": return 0.5;
case "STEEL": return 0; case "STEEL": return 0;
case "FAIRY": return 2;
default: return 1; default: return 1;
} }
} }

View File

@ -45,7 +45,8 @@ namespace NadekoBot.Modules.Pokemon.PokeTypes
new GhostType(), new GhostType(),
new DragonType(), new DragonType(),
new DarkType(), new DarkType(),
new SteelType() new SteelType(),
new FairyType()
}; };
public static PokeType IntToPokeType(int id) public static PokeType IntToPokeType(int id)

View File

@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Pokemon.PokemonTypes
public string Name => name; public string Name => name;
public string Image => "💫"; public string Image => "🔮";
public int Num => numType; public int Num => numType;
} }

View File

@ -194,6 +194,7 @@
<Compile Include="Modules\Administration\Commands\RatelimitCommand.cs" /> <Compile Include="Modules\Administration\Commands\RatelimitCommand.cs" />
<Compile Include="Modules\Pokemon\DefaultMoves.cs" /> <Compile Include="Modules\Pokemon\DefaultMoves.cs" />
<Compile Include="Modules\Pokemon\PokemonModule.cs" /> <Compile Include="Modules\Pokemon\PokemonModule.cs" />
<Compile Include="Modules\Pokemon\PokemonTypes\FairyType.cs" />
<Compile Include="Modules\Pokemon\PokemonTypes\IPokeTypeExtensions.cs" /> <Compile Include="Modules\Pokemon\PokemonTypes\IPokeTypeExtensions.cs" />
<Compile Include="Modules\Pokemon\PokemonTypes\PokeType.cs" /> <Compile Include="Modules\Pokemon\PokemonTypes\PokeType.cs" />
<Compile Include="Modules\Pokemon\PokemonTypes\PsychicType.cs" /> <Compile Include="Modules\Pokemon\PokemonTypes\PsychicType.cs" />