Added items, inventory, basic inv mechanics and art, added item comparison, v1.3.0
This commit is contained in:
@@ -18,10 +18,11 @@ namespace Assets.Scripts.Slimes
|
||||
protected int intelligence;
|
||||
protected int level;
|
||||
protected int experience;
|
||||
protected Item item;
|
||||
|
||||
public BasicSlime(Player player)
|
||||
{
|
||||
// { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence, playerlevel};
|
||||
//health,maxHealth,secondary,maxSecondary,strength,dexterity,intelligence,level,experience,maxExperience,points,luck
|
||||
int[] playerStats = player.getStats();
|
||||
maxHealth = playerStats[1];
|
||||
health = maxHealth;
|
||||
@@ -32,6 +33,10 @@ namespace Assets.Scripts.Slimes
|
||||
intelligence = playerStats[6];
|
||||
experience = (int)(10 + playerStats[7] * 2.5f);
|
||||
level = playerStats[7];
|
||||
if (new System.Random().Next(100) + 1 < 1000)//50 + playerStats[11])
|
||||
{
|
||||
item = new Item(playerStats[11]);
|
||||
}
|
||||
}
|
||||
|
||||
public BasicSlime(JToken json)
|
||||
@@ -95,6 +100,11 @@ namespace Assets.Scripts.Slimes
|
||||
return experience;
|
||||
}
|
||||
|
||||
public Item getItem()
|
||||
{
|
||||
return item;
|
||||
}
|
||||
|
||||
public string saveSlime()
|
||||
{
|
||||
string result = "";
|
||||
|
||||
Reference in New Issue
Block a user