Added in MagicMove.
This commit is contained in:
parent
8a1aaf4bb7
commit
52cd80703c
6 changed files with 23 additions and 8 deletions
|
|
@ -13,7 +13,7 @@ using System.Reflection;
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("MiniRPG")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("MiniRPG")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[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.AssemblyProductAttribute("MiniRPG")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("MiniRPG")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("MiniRPG")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
d3a1cc43ff9983679cb5442bcc4c2923f62c186209b30538fb7445848d6c5fa5
|
b3ff75165a665e42eaab7a9cec8c80ff9f07f2f4c907de42340ef0e4d946bfda
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,11 @@ public class MoveConverter : JsonConverter<Move>
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case "PhysicalMove":
|
case "PhysicalMove":
|
||||||
move = new PhysicalMove("", "", 0, "");
|
move = new PhysicalMove("", "", 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "MagicMove":
|
||||||
|
move = new MagicMove("", "", 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,10 +2,8 @@ public class Move
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { 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 Type { get; set; }
|
||||||
public virtual string Action { get; set; }
|
|
||||||
|
|
||||||
public Move(string name, string description){
|
public Move(string name, string description){
|
||||||
Name = name;
|
Name = name;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
public class PhysicalMove : Move
|
public class PhysicalMove : Move
|
||||||
{
|
{
|
||||||
public override string Type => "PhysicalMove";
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue