Major Player refactor

This commit is contained in:
2025-02-07 02:29:50 -08:00
parent 0cdae88952
commit fe1a1e61ef
132 changed files with 2554 additions and 2478 deletions

View File

@@ -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();
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1 @@
uid://bv7j01sfam7l5

View File

@@ -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; }
}