コード例 #1
0
 protected PlayerPokemonData(SerializationInfo info, StreamingContext context)
 {
     isCaptured  = info.GetBoolean("isCapted");
     pokemonName = info.GetString("pokemonName");
     nickName    = info.GetString("nickName");
     isFromTrade = info.GetBoolean("isFromTrade");
     level       = info.GetInt32("level");
     gender      = (Pokemon.Genders)info.GetByte("sex");
     nature      = (Pokemon.Natures)info.GetByte("nature");
     curHP       = info.GetInt32("curHP");
     hpEV        = info.GetInt32("hpEV");
     atkEV       = info.GetInt32("atkEV");
     defEV       = info.GetInt32("defEV");
     spatkEV     = info.GetInt32("spatkEV");
     spdef_ev    = info.GetInt32("spdefEV");
     spdefEV     = info.GetInt32("spdEV");
     hpIV        = info.GetInt32("hpIV");
     atkIV       = info.GetInt32("atkIV");
     defIV       = info.GetInt32("defIV");
     spatkIV     = info.GetInt32("spatkIV");
     spdefIV     = info.GetInt32("spdefIV");
     spdIV       = info.GetInt32("spdIV");
     currentEXP  = info.GetInt32("currentEXP");
     //MovesToLearnNames = info.get
     //pokemonsMoves = info.
     equippedItemName = info.GetString("equippedItemName");
     origin           = info.GetInt32("origin");
 }
コード例 #2
0
 public PlayerPokemonData(bool newIsCaptured, string newPokemonName, string newNickName, bool newIsFromTrade,
                          int newLevel, Pokemon.Genders newSex, Pokemon.Natures newNature, int newCurHP, int newHpEV, int newAtkEV, int newDefEV,
                          int newSpatkEV, int newSpdefEV, int newSpdEV, int newHpIV, int newAtkIV, int newDefIV, int newSpatkIV, int newSpdefIV, int newSpdIV,
                          int newCurrentXP,
                          List <string> newMovesToLearn, List <string> newPokemonsMoves, string newEquippedItemName, int newOrigin)
 {
     isCaptured        = newIsCaptured;
     pokemonName       = newPokemonName;
     nickName          = newNickName;
     isFromTrade       = newIsFromTrade;
     level             = newLevel;
     gender            = newSex;
     nature            = newNature;
     curHP             = newCurHP;
     hpEV              = newHpEV;
     atkEV             = newAtkEV;
     defEV             = newDefEV;
     spatkEV           = newSpatkEV;
     spdef_ev          = newSpdefEV;
     spdefEV           = newSpdEV;
     spdEV             = newSpdEV;
     hpIV              = newHpIV;
     atkIV             = newAtkIV;
     defIV             = newDefIV;
     spatkIV           = newSpatkIV;
     spdefIV           = newSpdefIV;
     spdIV             = newSpdIV;
     currentEXP        = newCurrentXP;
     MovesToLearnNames = newMovesToLearn;
     KnownMovesNames   = newPokemonsMoves;
     equippedItemName  = newEquippedItemName;
     origin            = newOrigin;
 }
コード例 #3
0
 private void SetModifier(Pokemon.Natures nature, StatTypes statType)
 {
     if (nature == Pokemon.Natures.LONELY && statType == StatTypes.ATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.LONELY && statType == StatTypes.DEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.BRAVE && statType == StatTypes.ATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.BRAVE && statType == StatTypes.SPEED)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.ADAMANT && statType == StatTypes.ATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.ADAMANT && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.NAUGHTY && statType == StatTypes.ATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.NAUGHTY && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.BOLD && statType == StatTypes.DEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.BOLD && statType == StatTypes.ATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.RELAXED && statType == StatTypes.DEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.RELAXED && statType == StatTypes.SPEED)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.IMPISH && statType == StatTypes.DEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.IMPISH && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.LAX && statType == StatTypes.DEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.LAX && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.TIMID && statType == StatTypes.SPEED)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.TIMID && statType == StatTypes.ATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.HASTY && statType == StatTypes.SPEED)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.HASTY && statType == StatTypes.DEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.JOLLY && statType == StatTypes.SPEED)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.JOLLY && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.NAIVE && statType == StatTypes.SPEED)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.NAIVE && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.MODEST && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.MODEST && statType == StatTypes.ATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.MILD && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.MILD && statType == StatTypes.DEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.QUIET && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.QUIET && statType == StatTypes.SPEED)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.RASH && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.RASH && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.CALM && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.CALM && statType == StatTypes.ATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.GENTLE && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.GENTLE && statType == StatTypes.DEFENSE)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.SASSY && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.SASSY && statType == StatTypes.SPEED)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.CAREFUL && statType == StatTypes.SPECIALDEFENSE)
     {
         statModifier = natureIncreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.CAREFUL && statType == StatTypes.SPECIALATTACK)
     {
         statModifier = natureDecreaseModifier;
     }
     else
     {
         statModifier = natureNeutralModifier;
     }
     if (nature == Pokemon.Natures.BASHFUL || nature == Pokemon.Natures.DOCILE || nature == Pokemon.Natures.HARDY ||
         nature == Pokemon.Natures.QUIRKY || nature == Pokemon.Natures.SERIOUS)
     {
         statModifier = natureNeutralModifier;
     }
 }
コード例 #4
0
 public int CalculateStat(int baseStat, int level, int iv, int ev, Pokemon.Natures nature, StatTypes statType)
 {
     SetModifier(nature, statType);
     return((int)(((((iv + (2 * baseStat) + (ev / 4)) * level) / 100) + 5) * statModifier));
 }