This commit is contained in:
@@ -189,7 +189,8 @@ public static class MoveTurnExecutor
|
||||
var basePower = battle.Library.DamageCalculator.GetBasePower(executingMove, target, hitIndex, hitData);
|
||||
hitData.BasePower = basePower;
|
||||
|
||||
hitData.Damage = battle.Library.DamageCalculator.GetDamage(executingMove, target, hitIndex, hitData);
|
||||
hitData.Damage = battle.Library.DamageCalculator.GetDamage(executingMove, executingMove.UseMove.Category,
|
||||
executingMove.User, target, executingMove.TargetCount, hitIndex, hitData);
|
||||
|
||||
var accuracy = useMove.Accuracy;
|
||||
// If the accuracy is 255, the move should always hit, and as such we should not allow
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Static.Moves;
|
||||
|
||||
namespace PkmnLib.Dynamic.Libraries;
|
||||
|
||||
@@ -10,7 +11,8 @@ public interface IDamageCalculator
|
||||
/// <summary>
|
||||
/// Calculate the damage for a given hit on a Pokemon.
|
||||
/// </summary>
|
||||
uint GetDamage(IExecutingMove executingMove, IPokemon target, byte hitNumber, IHitData hitData);
|
||||
uint GetDamage(IExecutingMove? executingMove, MoveCategory category, IPokemon user, IPokemon target,
|
||||
int targetCount, byte hitNumber, IHitData hitData);
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the base power for a given hit on a Pokemon.
|
||||
|
||||
Reference in New Issue
Block a user