initial commit
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user