mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-18 00:13:10 +00:00
f37a587a1c
move some pk3->pk4 stuff into object constructor annotate pk3->pk4 string buffer (trash) quirks split Heal into Party/PP method uses. Setting suggested stats no longer refreshes PP apply current level to Stat Level (wasn't being set previously)
41 lines
No EOL
1.1 KiB
C#
41 lines
No EOL
1.1 KiB
C#
using FluentAssertions;
|
|
using PKHeX.Core;
|
|
using Xunit;
|
|
|
|
namespace PKHeX.Tests.PKM
|
|
{
|
|
public class StatTest
|
|
{
|
|
[Fact]
|
|
public void CalcStatsGB()
|
|
{
|
|
var pk = new PK2
|
|
{
|
|
Species = (int) Species.Gyarados,
|
|
CurrentLevel = 38,
|
|
IV_HP = 0,
|
|
IV_ATK = 14,
|
|
IV_DEF = 10,
|
|
IV_SPC = 10,
|
|
IV_SPE = 10,
|
|
EV_HP = 5120, // 2 HP Ups
|
|
|
|
Move1 = 45, // Growl (PP 40)
|
|
Move2 = 45, // Growl (PP 40)
|
|
Move3 = 45, // Growl (PP 40)
|
|
Move1_PPUps = 1,
|
|
Move2_PPUps = 2,
|
|
Move3_PPUps = 3,
|
|
};
|
|
|
|
pk.ResetPartyStats();
|
|
pk.Stat_Level.Should().Be(pk.CurrentLevel, "stat level");
|
|
pk.Stat_HPCurrent.Should().Be(127, "stat re-calculation");
|
|
|
|
pk.HealPP();
|
|
pk.Move1_PP.Should().Be(47, "pp calc oddity");
|
|
pk.Move2_PP.Should().Be(54, "pp calc oddity");
|
|
pk.Move3_PP.Should().Be(61, "pp calc oddity");
|
|
}
|
|
}
|
|
} |