Major Player refactor
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
namespace GameJamDungeon
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public interface IHasPrimaryAttack
|
||||
{
|
||||
public interface IHasPrimaryAttack
|
||||
{
|
||||
public ElementType PrimaryAttackElementalType { set; }
|
||||
public double PrimaryAttackElementalDamageBonus { set; }
|
||||
public ElementType PrimaryAttackElementalType { set; }
|
||||
public double PrimaryAttackElementalDamageBonus { set; }
|
||||
|
||||
public void PrimaryAttack();
|
||||
}
|
||||
|
||||
public interface IHasSecondaryAttack
|
||||
{
|
||||
public ElementType SecondaryAttackElementalType { set; }
|
||||
public double SecondaryAttackElementalDamageBonus { set; }
|
||||
|
||||
public void SecondaryAttack();
|
||||
}
|
||||
|
||||
public interface IHasPrimarySkill
|
||||
{
|
||||
public void PrimarySkill();
|
||||
}
|
||||
public void PrimaryAttack();
|
||||
}
|
||||
|
||||
public interface IHasSecondaryAttack
|
||||
{
|
||||
public ElementType SecondaryAttackElementalType { set; }
|
||||
public double SecondaryAttackElementalDamageBonus { set; }
|
||||
|
||||
public void SecondaryAttack();
|
||||
}
|
||||
|
||||
public interface IHasPrimarySkill
|
||||
{
|
||||
public void PrimarySkill();
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
using Godot;
|
||||
|
||||
namespace GameJamDungeon
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public static class BattleExtensions
|
||||
{
|
||||
public static class BattleExtensions
|
||||
public static bool IsCriticalHit(double luckStat)
|
||||
{
|
||||
public static bool IsCriticalHit(double luckStat)
|
||||
{
|
||||
var rng = new RandomNumberGenerator();
|
||||
rng.Randomize();
|
||||
var roll = rng.Randf();
|
||||
var isCriticalHit = roll <= luckStat;
|
||||
return isCriticalHit;
|
||||
}
|
||||
var rng = new RandomNumberGenerator();
|
||||
rng.Randomize();
|
||||
var roll = rng.Randf();
|
||||
var isCriticalHit = roll <= luckStat;
|
||||
return isCriticalHit;
|
||||
}
|
||||
}
|
||||
|
||||
1
src/system/stats/BattleExtensions.cs.uid
Normal file
1
src/system/stats/BattleExtensions.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bv7j01sfam7l5
|
||||
@@ -1,21 +1,20 @@
|
||||
using Chickensoft.Collections;
|
||||
|
||||
namespace GameJamDungeon
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public interface ICharacterStats
|
||||
{
|
||||
public interface ICharacterStats
|
||||
{
|
||||
public IAutoProp<double> CurrentHP { get; }
|
||||
public IAutoProp<double> CurrentHP { get; }
|
||||
|
||||
public IAutoProp<double> MaximumHP { get; }
|
||||
public IAutoProp<double> MaximumHP { get; }
|
||||
|
||||
public IAutoProp<int> CurrentAttack { get; }
|
||||
public IAutoProp<int> CurrentAttack { get; }
|
||||
|
||||
public IAutoProp<int> CurrentDefense { get; }
|
||||
public IAutoProp<int> CurrentDefense { get; }
|
||||
|
||||
public IAutoProp<int> MaxAttack { get; }
|
||||
public IAutoProp<int> MaxAttack { get; }
|
||||
|
||||
public IAutoProp<int> MaxDefense { get; }
|
||||
public IAutoProp<int> MaxDefense { get; }
|
||||
|
||||
public IAutoProp<double> Luck { get; }
|
||||
}
|
||||
public IAutoProp<double> Luck { get; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user