-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
201 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace Lib9c.Tests.Model | ||
{ | ||
using Nekoyume; | ||
using Nekoyume.Model.Buff; | ||
using Nekoyume.Model.Stat; | ||
using Nekoyume.TableData; | ||
using Xunit; | ||
|
||
public class CharacterStatsTest | ||
{ | ||
private readonly TableSheets _tableSheets; | ||
|
||
public CharacterStatsTest() | ||
{ | ||
_tableSheets = new TableSheets(TableSheetsImporter.ImportSheets()); | ||
} | ||
|
||
[Fact] | ||
public void DeBuffLimit() | ||
{ | ||
var stats = | ||
new CharacterStats( | ||
_tableSheets.CharacterSheet[GameConfig.DefaultAvatarCharacterId], | ||
1); | ||
var deBuffLimitSheet = new DeBuffLimitSheet(); | ||
deBuffLimitSheet.Set("id,stat_type,percentage\n1,DEF,-50"); | ||
var def = stats.DEF; | ||
var deBuff = new StatBuff(_tableSheets.StatBuffSheet[503012]); | ||
stats.AddBuff(deBuff, deBuffLimitSheet: deBuffLimitSheet); | ||
var limitModifier = | ||
new StatModifier(StatType.DEF, StatModifier.OperationType.Percentage, -50); | ||
Assert.Equal(limitModifier.GetModifiedAll(def), stats.DEF); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.