Beispiel #1
0
        private static void LoadInventory(List <string> inventoryItemDetails, List <InventoryItem> tempInventory)
        {
            try
            {
                foreach (string iiDetails in inventoryItemDetails)
                {
                    string[] iiComponents = iiDetails.Split('|');
                    switch (iiComponents[0])
                    {
                    case "Armour":
                    {
                        tempInventory.Add(new InventoryItem(World.ArmourByID(Int32.Parse(iiComponents[1])), Int32.Parse(iiComponents[2])));
                        break;
                    }

                    case "Weapon":
                    {
                        tempInventory.Add(new InventoryItem(World.WeaponByID(Int32.Parse(iiComponents[1])), Int32.Parse(iiComponents[2])));
                        break;
                    }
                    }
                }
                return;
            }
            catch
            {
                loadSuccessfull = false;
                return;
            }
        }
Beispiel #2
0
 public Gladiator(string name, string nickname, string description, int exp, int weaponID, int ArmourID, int movementRange, int attackRange)
 {
     Name           = name;
     Nickname       = nickname;
     InPlayersTeam  = true;
     Description    = description;
     EXP            = exp;
     BaseDamage     = 3;
     BaseHP         = 10;
     WeaponEquipped = World.WeaponByID(weaponID);
     ArmourEquipped = World.ArmourByID(ArmourID);
     MovementRange  = movementRange;
     AttackRange    = attackRange;
     LevelUpGladiator();
 }
Beispiel #3
0
 public Gladiator(string name, string description)
 {
     Name           = name;
     Nickname       = null;
     InPlayersTeam  = false;
     Description    = description;
     EXP            = 0;
     BaseDamage     = 3;
     BaseHP         = 10;
     WeaponEquipped = World.WeaponByID(World.WEAPON_ID_DAGGER);
     ArmourEquipped = World.ArmourByID(World.ARMOUR_ID_RAGS);
     MovementRange  = 3;
     AttackRange    = 1;
     LevelUpGladiator();
 }