Added in MagicMove.

This commit is contained in:
Tanner Van Teeffelen 2025-07-15 16:04:10 +00:00
parent 8a1aaf4bb7
commit 52cd80703c
6 changed files with 23 additions and 8 deletions

View file

@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("MiniRPG")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+53b53fc57d953f8a3b8a97ed56e18ac682c4379a")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8a1aaf4bb73910751276d15c02e7085f16bb6ab7")]
[assembly: System.Reflection.AssemblyProductAttribute("MiniRPG")]
[assembly: System.Reflection.AssemblyTitleAttribute("MiniRPG")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View file

@ -1 +1 @@
d3a1cc43ff9983679cb5442bcc4c2923f62c186209b30538fb7445848d6c5fa5
b3ff75165a665e42eaab7a9cec8c80ff9f07f2f4c907de42340ef0e4d946bfda

View file

@ -19,7 +19,11 @@ public class MoveConverter : JsonConverter<Move>
switch (type)
{
case "PhysicalMove":
move = new PhysicalMove("", "", 0, "");
move = new PhysicalMove("", "", 0);
break;
case "MagicMove":
move = new MagicMove("", "", 0, 0);
break;
default:

View file

@ -0,0 +1,12 @@
public class MagicMove : Move
{
public override string Type => "MagicMove";
public int AttackPower;
public int MPCost;
public MagicMove(string name, string description, int attackpower, int mpcost) : base(name, description)
{
AttackPower = attackpower;
MPCost = mpcost;
}
}

View file

@ -2,10 +2,8 @@ public class Move
{
public string Name { get; set; }
public string Description { get; set; }
public virtual int Power { get; set; }
public virtual int MPCost { get; set; }
public virtual string Type { get; set; }
public virtual string Action { get; set; }
public Move(string name, string description){
Name = name;

View file

@ -1,9 +1,10 @@
public class PhysicalMove : Move
{
public override string Type => "PhysicalMove";
public int AttackPower;
public PhysicalMove(string name, string description, int power, string action) : base(name, description)
public PhysicalMove(string name, string description, int attackpower) : base(name, description)
{
Action = action;
AttackPower = attackpower;
}
}