From 28368ec205f05293d8d1d3633838921484662b37 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 1 Apr 2016 16:20:58 +0200 Subject: [PATCH] Fixed negative remainder closes #170 fixed steeltype numType, ref #169 --- NadekoBot/Modules/Pokemon/PokemonModule.cs | 2 +- NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NadekoBot/Modules/Pokemon/PokemonModule.cs b/NadekoBot/Modules/Pokemon/PokemonModule.cs index 9b62dd0e..aace2e4f 100644 --- a/NadekoBot/Modules/Pokemon/PokemonModule.cs +++ b/NadekoBot/Modules/Pokemon/PokemonModule.cs @@ -49,7 +49,7 @@ namespace NadekoBot.Modules.Pokemon return PokemonTypesMain.IntToPokeType(setTypes[(long)id]); } - int remainder = (int)id % 16; + int remainder = Math.Abs((int)(id % 16)); return PokemonTypesMain.IntToPokeType(remainder); } diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs index 40dd08c4..73427039 100644 --- a/NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs @@ -6,7 +6,7 @@ namespace NadekoBot.Modules.Pokemon.PokemonTypes class SteelType : PokeType { static readonly string name = "STEEL"; - public static int numType = -1; + public static int numType = 16; public double Multiplier(PokeType target) {