Skip to content

Commit

Permalink
Merge pull request #2292 from planetarium/release/1.6.0
Browse files Browse the repository at this point in the history
merge release/1.6.0 into development
  • Loading branch information
sonohoshi authored Dec 12, 2023
2 parents fca82d9 + 77ce2e2 commit 5c11d80
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .Lib9c.Tests/Model/PlayerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public void Vampiric(int duration, int percent)
{
var defaultAttack = SkillFactory.GetV1(
_tableSheets.SkillSheet.Values.First(r => r.Id == GameConfig.DefaultAttackId),
100,
int.MaxValue / 2,
100
);

Expand All @@ -604,7 +604,12 @@ public void Vampiric(int duration, int percent)
_tableSheets.MaterialItemSheet)
);
var player = simulator.Player;
var enemy = new Enemy(player, _tableSheets.CharacterSheet.Values.First(), 1);
var enemy = new Enemy(
player,
_tableSheets.CharacterSheet.Values.First(),
1,
new[] { new StatModifier(StatType.HP, StatModifier.OperationType.Add, int.MaxValue / 2), }
);
player.Targets.Add(enemy);
simulator.Characters = new SimplePriorityQueue<CharacterBase, decimal>();
simulator.Characters.Enqueue(enemy, 0);
Expand Down Expand Up @@ -648,7 +653,7 @@ public void Vampiric(int duration, int percent)
var prevAttack = logList.Take(i).OfType<Nekoyume.Model.BattleStatus.NormalAttack>()
.Last();
Assert.Equal(
(int)(prevAttack.SkillInfos.First().Effect * vampiric.BasisPoint / 10000m),
(int)(prevAttack.SkillInfos.First().Effect * (vampiric.BasisPoint / 10000m)),
healInfo.Effect);
}
}
Expand Down
3 changes: 0 additions & 3 deletions Lib9c.Policy/Policy/MaxTransactionsBytesPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ private MaxTransactionsBytesPolicy(
.Add(new SpannedSubPolicy<long>(
startIndex: 0L,
value: 1024L * 1024L * 15L)) // 15 MiB
.Add(new SpannedSubPolicy<long>(
startIndex: 1L,
value: 1024L * 100L)) // 100 KiB
.Add(new SpannedSubPolicy<long>(
startIndex: 2_000_001L,
value: 1024L * 1024L * 10L)) // 10 MiB
Expand Down
4 changes: 2 additions & 2 deletions Lib9c/Model/Buff/Vampiric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override object Clone()
public BattleStatus.Skill GiveEffect(CharacterBase affectedCharacter, BattleStatus.Skill.SkillInfo skillInfo, int simulatorWaveTurn, bool copyCharacter = true)
{
var target = copyCharacter ? (CharacterBase) affectedCharacter.Clone() : null;
var effect = (int)(skillInfo.Effect * BasisPoint / 10000m);
var effect = (int)(skillInfo.Effect * (BasisPoint / 10000m));
affectedCharacter.Heal(effect);
// Copy new Character with healed.
var infos = new List<BattleStatus.Skill.SkillInfo>
Expand All @@ -59,7 +59,7 @@ public BattleStatus.Skill GiveEffect(CharacterBase affectedCharacter, BattleStat
public ArenaSkill GiveEffectForArena(ArenaCharacter affectedCharacter, ArenaSkill.ArenaSkillInfo skillInfo, int simulatorWaveTurn)
{
var clone = (ArenaCharacter)affectedCharacter.Clone();
var effect = (int)(skillInfo.Effect * BasisPoint / 10000m);
var effect = (int)(skillInfo.Effect * (BasisPoint / 10000m));
affectedCharacter.Heal(effect);
// Copy new Character with healed.
var infos = new List<ArenaSkill.ArenaSkillInfo>
Expand Down

0 comments on commit 5c11d80

Please sign in to comment.