First Examples: Added FireBurn effect,
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# EditorConfig for .NET template
|
# EditorConfig for .NET template
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
<Solution>
|
<Solution>
|
||||||
<Project Path="Demo/Demo.csproj" />
|
<Project Path="Demo/Demo.csproj"/>
|
||||||
<Project Path="EoM_Redux.Tests/EoM_Redux.Tests.csproj" />
|
<Project Path="EoM_Redux.Tests/EoM_Redux.Tests.csproj"/>
|
||||||
<Project Path="EoM_Redux/EoM_Redux.csproj" />
|
<Project Path="EoM_Redux/EoM_Redux.csproj"/>
|
||||||
</Solution>
|
</Solution>
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
namespace EoM_Redux;
|
||||||
|
|
||||||
|
public class FireBurn : IOvertEffect
|
||||||
|
{
|
||||||
|
public FireBurn(int damage = 0, int duration = 3)
|
||||||
|
{
|
||||||
|
Damage = damage;
|
||||||
|
Duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Name { get; } = "Burning";
|
||||||
|
public int Damage { get; }
|
||||||
|
public int Duration { get; }
|
||||||
|
|
||||||
|
public void ApplyEffect()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,10 +2,13 @@ namespace EoM_Redux;
|
|||||||
|
|
||||||
public class Fire : IElement
|
public class Fire : IElement
|
||||||
{
|
{
|
||||||
public int Damage { get; set; }
|
|
||||||
|
|
||||||
public Fire(int damage)
|
public Fire(int damage)
|
||||||
{
|
{
|
||||||
Damage = damage;
|
Damage = damage;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public int Damage { get; set; }
|
||||||
|
|
||||||
|
public List<ISubtleEffect> ISubtleEffects { get; }
|
||||||
|
public List<IOvertEffect> IOvertEffects { get; }
|
||||||
|
}
|
||||||
@@ -2,5 +2,7 @@
|
|||||||
|
|
||||||
public class FireBall : ISpell
|
public class FireBall : ISpell
|
||||||
{
|
{
|
||||||
|
public IOvertEffect OvertEffect => new FireBurn(10);
|
||||||
public SpellType Type => SpellType.Overt;
|
public SpellType Type => SpellType.Overt;
|
||||||
|
public IElement Element => new Fire(10);
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,6 @@ namespace EoM_Redux;
|
|||||||
|
|
||||||
public interface IElement
|
public interface IElement
|
||||||
{
|
{
|
||||||
}
|
List<ISubtleEffect> ISubtleEffects { get; }
|
||||||
|
List<IOvertEffect> IOvertEffects { get; }
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ namespace EoM_Redux;
|
|||||||
public interface IOvertEffect
|
public interface IOvertEffect
|
||||||
{
|
{
|
||||||
void ApplyEffect();
|
void ApplyEffect();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -3,4 +3,5 @@ namespace EoM_Redux;
|
|||||||
public interface ISpell
|
public interface ISpell
|
||||||
{
|
{
|
||||||
public SpellType Type { get; }
|
public SpellType Type { get; }
|
||||||
}
|
public IElement Element { get; }
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ namespace EoM_Redux;
|
|||||||
public interface ISubtleEffect
|
public interface ISubtleEffect
|
||||||
{
|
{
|
||||||
void ApplyEffect();
|
void ApplyEffect();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ public enum SpellType
|
|||||||
{
|
{
|
||||||
Subtle,
|
Subtle,
|
||||||
Overt
|
Overt
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user