initial commit
This commit is contained in:
16
Models/Pet.cs
Normal file
16
Models/Pet.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace pet_companion_api.Models
|
||||
{
|
||||
public class Pet
|
||||
{
|
||||
[Key]
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public PetClass Class { get; set; }
|
||||
public PetStats Stats { get; set; }
|
||||
public Resources Resources { get; set; }
|
||||
public int Level { get; set; }
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
13
Models/PetClass.cs
Normal file
13
Models/PetClass.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace pet_companion_api.Models
|
||||
{
|
||||
public enum PetClass
|
||||
{
|
||||
FOREST_SPIRIT,
|
||||
OCEAN_GUARDIAN,
|
||||
FIRE_ELEMENTAL,
|
||||
MYTHICAL_BEAST,
|
||||
SHADOW_WALKER,
|
||||
CYBER_PET,
|
||||
BIO_MECHANICAL
|
||||
}
|
||||
}
|
12
Models/PetClassInfo.cs
Normal file
12
Models/PetClassInfo.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
namespace pet_companion_api.Models
|
||||
{
|
||||
public class PetClassInfo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string[] Modifiers { get; set; }
|
||||
public string Color { get; set; }
|
||||
public string Emoji { get; set; }
|
||||
}
|
||||
}
|
66
Models/PetStats.cs
Normal file
66
Models/PetStats.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace pet_companion_api.Models
|
||||
{
|
||||
public class PetStats
|
||||
{
|
||||
[Key, ForeignKey("Pet")]
|
||||
public string PetId { get; set; }
|
||||
public int Intelligence { get; set; }
|
||||
public int Strength { get; set; }
|
||||
public int Charisma { get; set; }
|
||||
|
||||
public PetStats(PetClass petClass)
|
||||
{
|
||||
BuildFromClass(petClass);
|
||||
}
|
||||
|
||||
public void BuildFromClass(PetClass petClass)
|
||||
{
|
||||
switch (petClass)
|
||||
{
|
||||
case PetClass.FOREST_SPIRIT:
|
||||
Intelligence = 10;
|
||||
Strength = 5;
|
||||
Charisma = 5;
|
||||
break;
|
||||
case PetClass.OCEAN_GUARDIAN:
|
||||
Intelligence = 5;
|
||||
Strength = 10;
|
||||
Charisma = 5;
|
||||
break;
|
||||
case PetClass.FIRE_ELEMENTAL:
|
||||
Intelligence = 5;
|
||||
Strength = 5;
|
||||
Charisma = 10;
|
||||
break;
|
||||
case PetClass.MYTHICAL_BEAST:
|
||||
Intelligence = 7;
|
||||
Strength = 7;
|
||||
Charisma = 7;
|
||||
break;
|
||||
case PetClass.SHADOW_WALKER:
|
||||
Intelligence = 8;
|
||||
Strength = 6;
|
||||
Charisma = 6;
|
||||
break;
|
||||
case PetClass.CYBER_PET:
|
||||
Intelligence = 8;
|
||||
Strength = 8;
|
||||
Charisma = 6;
|
||||
break;
|
||||
case PetClass.BIO_MECHANICAL:
|
||||
Intelligence = 8;
|
||||
Strength = 6;
|
||||
Charisma = 8;
|
||||
break;
|
||||
default:
|
||||
Intelligence = 5;
|
||||
Strength = 5;
|
||||
Charisma = 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
15
Models/Resources.cs
Normal file
15
Models/Resources.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace pet_companion_api.Models
|
||||
{
|
||||
public class Resources
|
||||
{
|
||||
[Key, ForeignKey("Pet")]
|
||||
public string PetId { get; set; }
|
||||
public int Wisdom { get; set; }
|
||||
public int Gold { get; set; }
|
||||
public int Food { get; set; }
|
||||
public int Junk { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user