Add pet action management and update requests
This commit is contained in:
@@ -11,56 +11,55 @@ namespace pet_companion_api.Models
|
||||
public int Strength { get; set; }
|
||||
public int Charisma { get; set; }
|
||||
|
||||
public PetStats(PetClass petClass)
|
||||
public static PetStats BuildFromClass(PetClass petClass)
|
||||
{
|
||||
BuildFromClass(petClass);
|
||||
}
|
||||
var stats = new PetStats();
|
||||
|
||||
public void BuildFromClass(PetClass petClass)
|
||||
{
|
||||
switch (petClass)
|
||||
{
|
||||
case PetClass.FOREST_SPIRIT:
|
||||
Intelligence = 10;
|
||||
Strength = 5;
|
||||
Charisma = 5;
|
||||
stats.Intelligence = 10;
|
||||
stats.Strength = 5;
|
||||
stats.Charisma = 5;
|
||||
break;
|
||||
case PetClass.OCEAN_GUARDIAN:
|
||||
Intelligence = 5;
|
||||
Strength = 10;
|
||||
Charisma = 5;
|
||||
stats.Intelligence = 5;
|
||||
stats.Strength = 10;
|
||||
stats.Charisma = 5;
|
||||
break;
|
||||
case PetClass.FIRE_ELEMENTAL:
|
||||
Intelligence = 5;
|
||||
Strength = 5;
|
||||
Charisma = 10;
|
||||
stats.Intelligence = 5;
|
||||
stats.Strength = 5;
|
||||
stats.Charisma = 10;
|
||||
break;
|
||||
case PetClass.MYTHICAL_BEAST:
|
||||
Intelligence = 7;
|
||||
Strength = 7;
|
||||
Charisma = 7;
|
||||
stats.Intelligence = 7;
|
||||
stats.Strength = 7;
|
||||
stats.Charisma = 7;
|
||||
break;
|
||||
case PetClass.SHADOW_WALKER:
|
||||
Intelligence = 8;
|
||||
Strength = 6;
|
||||
Charisma = 6;
|
||||
stats.Intelligence = 8;
|
||||
stats.Strength = 6;
|
||||
stats.Charisma = 6;
|
||||
break;
|
||||
case PetClass.CYBER_PET:
|
||||
Intelligence = 8;
|
||||
Strength = 8;
|
||||
Charisma = 6;
|
||||
stats.Intelligence = 8;
|
||||
stats.Strength = 8;
|
||||
stats.Charisma = 6;
|
||||
break;
|
||||
case PetClass.BIO_MECHANICAL:
|
||||
Intelligence = 8;
|
||||
Strength = 6;
|
||||
Charisma = 8;
|
||||
stats.Intelligence = 8;
|
||||
stats.Strength = 6;
|
||||
stats.Charisma = 8;
|
||||
break;
|
||||
default:
|
||||
Intelligence = 5;
|
||||
Strength = 5;
|
||||
Charisma = 5;
|
||||
stats.Intelligence = 5;
|
||||
stats.Strength = 5;
|
||||
stats.Charisma = 5;
|
||||
break;
|
||||
}
|
||||
|
||||
return stats;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user