Skip to content

Commit

Permalink
close #45
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellobaka committed Nov 7, 2024
1 parent 6ed2c7a commit ec5b4b6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public virtual (double, double) Attack(double source, double target, (double, do
double random = CommonHelper.Random.NextDouble(AppConfig.ValueAttackWeightMinimumDecrement / 100.0, AppConfig.ValueAttackWeightMaximumDecrement / 100.0);
double decrement = random * diff;
double value = source * decrement;// 造成的伤害
value = Math.Min(value, target);
double increment = value / source;// 攻方的增百分比
decrement = value / target; // 被攻方的减百分比
Logger.Info($"倍率随机数={random},被攻击方损失倍率={decrement},攻击方增加倍率={increment}");
Expand Down

0 comments on commit ec5b4b6

Please sign in to comment.