public EquipedItem(ParseEquippedItem parseItem)
	{
		UniqueItemId = parseItem.uniqueItemId;
		Level = parseItem.level;
		equipSlot = (EquipmentSlots)parseItem.slotIndex;
		LoadItem();
	}
Exemple #2
0
 public NecromancerUnique()
 {
     //Add a default right hand slot
     EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
     Unique     = true;
     UniqueName = "Vetna the Ever Living";
 }
Exemple #3
0
 public DragonUnique()
 {
     //Add a default right hand slot
     EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
     Unique     = true;
     UniqueName = "Fafir the Fiery";
 }
Exemple #4
0
        public ExplosiveBarrel()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            this.Passive = true;
        }
 public GoblinWitchdoctorUnique()
 {
     //Add a default right hand slot
     EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
     Unique     = true;
     UniqueName = "Damastrals the Goblin Witchdoctor";
 }
Exemple #6
0
        public RollingBomb()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            NormalSightRadius = 8;
        }
        protected override void DoBehaviour(HashSet <GameObject> changedObjects)
        {
            //TODO: replace by closest player.
            Player player = GameWorld.Find(Player.LocalPlayerName) as Player;

            if (player.Tile.SeenBy.ContainsKey(this))
            {
                bool ableToHit = AttackEvent.AbleToHit(this, player.Tile, Reach);
                if (ableToHit)
                {
                    Attack(player);
                    changedObjects.Add(player);

                    int cost = BaseActionCost;
                    if ((EquipmentSlots.Find("bodySlot") as RestrictedItemSlot).SlotItem != null)
                    {
                        cost = (int)(cost * ((EquipmentSlots.Find("bodySlot") as RestrictedItemSlot).SlotItem as BodyEquipment).WalkCostMod);
                    }
                    actionPoints -= cost;
                }
                else
                {
                    GoTo(changedObjects, player);
                }
            }
            else
            {
                Idle();
            }
        }
	public EquipedItem(string id, int lvl, RPGArmor armor)
	{
		UniqueItemId = id;
		Level = lvl;
		equipSlot = armor.EquipmentSlotIndex;
		rpgArmor = armor;
	}
Exemple #9
0
 public MaleficarumUnique()
 {
     //Add a default right hand slot
     EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
     Unique     = true;
     UniqueName = "Alcelchior the Thrice Damned";
 }
Exemple #10
0
        public HeavyTurret()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            NormalSightRadius = 10;
        }
	public EquipedItem(string id, int lvl, EquipmentSlots slot)
	{
		UniqueItemId = id;
		Level = lvl;
		equipSlot = slot;
		LoadItem();
	}
Exemple #12
0
    public void EquipBodyPart(string objectpath, EquipmentSlots slot)
    {
        switch (slot)
        {
        case EquipmentSlots.Head:
            SpawnHead(objectpath);
            break;

        case EquipmentSlots.Body:
            SpawnBody(objectpath);
            break;

        case EquipmentSlots.ArmL:
            SpawnArmL(objectpath);
            break;

        case EquipmentSlots.ArmR:
            SpawnArmR(objectpath);
            break;

        case EquipmentSlots.Legs:
            SpawnLegs(objectpath);
            break;
        }
    }
Exemple #13
0
 public GhoulUnique()
 {
     //Add a default right hand slot
     EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
     Unique     = true;
     UniqueName = "Terrance the Brick";
 }
Exemple #14
0
        private static void unequipItem(Equipment item, EquipmentSlots slot)
        {
            equippedItems.Remove(item);
            setToNull(slot);

            inventory.Add(item);
        }
        public void EquipPC(PlayerCharacter pc, Item item, string slotName)
        {
            EquipmentSlot slot;

            if (item != null)
            {
                var validSlots = GetValidSlots(item);
                slot = validSlots.FirstOrDefault(
                    x => x.Name.Equals(slotName, StringComparison.OrdinalIgnoreCase))
                       ?? throw new InvalidOperationException($"Item {item.Name} is of type {item.ItemType} and cannot be equipped in slot {slotName}");

                Inventory.Remove(item);
            }
            else
            {
                slot = EquipmentSlots.FirstOrDefault(x => x.Name.Equals(slotName, StringComparison.OrdinalIgnoreCase))
                       ?? throw new ArgumentException($"Slot {slotName} does not exist.");
            }

            var existing = pc.Equipment[slot.Name];

            pc.Equipment[slot.Name] = item;

            if (existing != null)
            {
                Inventory.Add(existing);
            }
        }
 public InventoryWrapper(List <EquipmentEquipped> gear, EquipmentSlots upgrades)
 {
     Equipment    = gear;
     Stats        = new List <InventoryStats>();
     TotalEnchant = new Dictionary <string, double>();
     foreach (var x in gear)
     {
         var temp = new InventoryStats(x, upgrades);
         Stats.Add(temp);
         TotalTotalStats += temp.TotalStats;
         TotalDamage     += temp.Damage;
         TotalDefense    += temp.Defense;
         TotalStrength   += temp.Strength;
         TotalHealth     += temp.Health;
         TotalAgility    += temp.Agility;
         TotalDex        += temp.Dex;
         if (TotalEnchant.ContainsKey(temp.EnchantType))
         {
             TotalEnchant[temp.EnchantType] += temp.EnchantValue;
         }
         else if (temp.EnchantType != "")
         {
             TotalEnchant[temp.EnchantType] = temp.EnchantValue;
         }
     }
 }
Exemple #17
0
        public void ShowStats(int i)
        {
            //i = 0 hides stats, i = 1 shows stats
            if (i != 0)
            {
                i = 1;
                SetProgressBars();
            }
            else
            {
                Health.Text = "";
                Mana.Text   = "";
                LVL.Text    = "";
                XP.Text     = "";
            }
            Player.Opacity          = i;
            PlayerHealthBar.Opacity = i;
            PlayerImage.Opacity     = i;
            PlayerImageBox.Opacity  = i;
            PlayerManaBar.Opacity   = i;
            PlayerXPBar.Opacity     = i;
            EquipmentInfo.Opacity   = i;

            Atributes points = Stuff.FindCharacter(1).GetAtributes();

            if (i == 1)
            {
                InfoBox.Text = "Atributes:\n\nStrength: " + points.GetStrength()
                               + "\nVitality: " + points.GetVitality() + "\nAgility: " + points.GetAgility()
                               + "\nIntelligence: " + points.GetIntelligence() + "\nWillpower: " + points.GetWillpower()
                               + "\nLuck: " + points.GetLuck();
            }
            else
            {
                InfoBox.Text = "";
            }

            EquipmentSlots items = Stuff.FindCharacter(1).GetEquipment();

            for (int j = 1; j < 4; j++)
            {
                Image     itemImage = (Image)this.FindName("Item" + j);
                Rectangle rectangle = (Rectangle)this.FindName("Item" + j + "_Slot");
                if (j == 1)
                {
                    itemImage.Source = items.GetPrimary().GetSprite().Source;
                }
                else if (j == 2)
                {
                    itemImage.Source = items.GetSecondary().GetSprite().Source;
                }
                else
                {
                    itemImage.Source = items.GetArmor().GetSprite().Source;
                }
                itemImage.Opacity = i;
                rectangle.Opacity = i;
            }
        }
Exemple #18
0
        public Swarmer()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            //More fun to move these guys around with a lower radius
            NormalSightRadius = 5;
        }
Exemple #19
0
        public UrukUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
            Unique = true;

            UniqueName = "Halkot the Uruk";
        }
Exemple #20
0
        public BlackUnicornUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            Unique     = true;
            UniqueName = "Illustrous the Black Unicorn";
        }
Exemple #21
0
 public Item(string name, int value = 0, bool isequip = false, bool isconsumable = false, EquipmentSlots equipslot = EquipmentSlots.None)
 {
     Name         = name;
     Value        = value;
     isEquipable  = isequip;
     isConsumable = isconsumable;
     slotEquip    = equipslot;
 }
Exemple #22
0
        public OgreUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
            Unique = true;

            UniqueName = "Grug the ogre";
        }
Exemple #23
0
        public MaintBot()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            //Start in the passive state
            this.Passive = true;
        }
Exemple #24
0
        public SpiderUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
            Unique = true;

            UniqueName = "Kal'lot the Spider";
        }
Exemple #25
0
        public OverlordUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            Unique     = true;
            UniqueName = "Derang the Unkillable";
        }
Exemple #26
0
        public Player()
        {
            effects = new List <PlayerEffect>();

            //Add default equipment slots
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Body));
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.RightHand));
        }
 public InitialPlayerSyncProcessor(IPacketSender packetSender, BuildThrottlingQueue buildEventQueue, Vehicles vehicles, ItemContainers itemContainers, EquipmentSlots equipment)
 {
     this.packetSender    = packetSender;
     this.buildEventQueue = buildEventQueue;
     this.vehicles        = vehicles;
     this.itemContainers  = itemContainers;
     this.equipment       = equipment;
 }
Exemple #28
0
        public SkeletonUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            Unique     = true;
            UniqueName = "Daphill the Dry";
        }
Exemple #29
0
        public FaerieUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            Unique     = true;
            UniqueName = "Aerie the Faerie";
        }
Exemple #30
0
        public HeavyBotRanged()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
            NormalSightRadius = 8;

            this.Speed = 75;
        }
Exemple #31
0
        public OrcShamanUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));

            Unique = true;

            UniqueName = "Davos the Orc Shaman King";
        }
Exemple #32
0
        public Camera()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
            NormalSightRadius = 0;

            //Start in the passive state
            this.Passive = true;
        }
Exemple #33
0
        public PixieUnique()
        {
            //Add a default right hand slot
            EquipmentSlots.Add(new EquipmentSlotInfo(EquipmentSlot.Weapon));
            Speed = 200;

            Unique     = true;
            UniqueName = "Nixie the Pixie";
        }
Exemple #34
0
 public void EquipBodyPart(string objectpath, EquipmentSlots slot)
 {
     switch(slot)
     {
         case EquipmentSlots.Head:
         SpawnHead(objectpath);
             break;
         case EquipmentSlots.Body:
         SpawnBody(objectpath);
             break;
         case EquipmentSlots.ArmL:
         SpawnArmL(objectpath);
             break;
         case EquipmentSlots.ArmR:
         SpawnArmR(objectpath);
             break;
         case EquipmentSlots.Legs:
         SpawnLegs(objectpath);
         break;
     }
 }
	public void EquipBodyPart(string objectpath, EquipmentSlots slot)
	{
		switch(slot)
		{
		case EquipmentSlots.Head:
			NetworkSpawnHead(objectpath);
			//SpawnHead(objectpath);
			break;
		case EquipmentSlots.Body:
			//
			if(!body)
				StartCoroutine(SpawnBody(objectpath));
			else
				NetworkSpawnBody(objectpath);
			break;
		case EquipmentSlots.ArmL:
			//NetworkSpawnArmL(objectpath);
			StartCoroutine(SpawnArmL(objectpath));
			break;
		case EquipmentSlots.ArmR:
			//NetworkSpawnArmR(objectpath);
			StartCoroutine(SpawnArmR(objectpath));
			break;
		case EquipmentSlots.Legs:
			//NetworkSpawnLegs(objectpath);
			//SpawnLegs(objectpath);
			if(!legs)
				StartCoroutine(SpawnLegs(objectpath));
			else
				NetworkSpawnLegs(objectpath);
			break;
		case EquipmentSlots.Face:
			//SpawnFace(objectpath);
			StartCoroutine(SpawnFace(objectpath));
			break;
		}
	}
Exemple #36
0
	public List<InventoryItem> FilteredArmorBySlot(EquipmentSlots slot)
	{
		List<InventoryItem> result = new List<InventoryItem>();
		for (int i = 0; i < Items.Count; i++) {
			if(Items[i].rpgItem.EquipmentSlotIndex == slot)
				result.Add(Items[i]);
        }
        return result;
    }
Exemple #37
0
    /*public List<Effect> GetEffects()
     {
     List<Effect> effects = new List<Effect>();

     foreach(EquipedItem equiped in Items)
     {
         if (equiped.rpgItem is Equiped)
         {
             Equiped equip = (Equiped)equiped.rpgItem;
             foreach(Effect e in equip.WornEffects)
             {
                 effects.Add(e);
             }
         }
     }
     return effects;
     }*/
    /*    public void OnHitEffects(Enemy enemy, Player player)
     {
     foreach(EquipedItem equiped in Items)
     {
         if (equiped.rpgItem is RPGArmor)
         {
             RPGArmor armor = (RPGArmor)equiped.rpgItem;

             foreach(Effect effect in armor.EffectsOnHit)
             {
                 if (effect.Target == TargetType.Self)
                        player.Hero.Buffs.AddEffect(effect);
             }
         }
     }
     }*/
    /*public void HitEffects(Enemy enemy, Player player)
     {
     foreach(EquipedItem equiped in Items)
     {
         if (equiped.rpgItem is RPGWeapon)
         {
             RPGWeapon armor = (RPGWeapon)equiped.rpgItem;

             foreach(Effect effect in armor.EffectsHit)
             {
                 if (effect.Target == TargetType.Self)
                        player.Hero.Buffs.AddEffect(effect);
             }
         }
     }
     }*/
    private bool IsEquipmentSlotUsed(EquipmentSlots slot)
    {
        switch (slot)
        {
        case EquipmentSlots.Head:
            if(EquippedHead != null)
                return true;
            break;
        case EquipmentSlots.Body:
            if(EquippedBody != null)
                return true;
            break;
        case EquipmentSlots.ArmL:
            if(EquippedArmL != null)
                return true;
            break;
        case EquipmentSlots.ArmR:
            if(EquippedArmR != null)
                return true;
            break;
        case EquipmentSlots.Legs:
            if(EquippedLegs != null)
                return true;
            break;
        }
        return false;
    }
Exemple #38
0
    public void EquipBodyPart(string objectpath, EquipmentSlots slot)
    {
        switch(slot)
        {
            case EquipmentSlots.Head:
			StartCoroutine(SpawnHead(objectpath));
            //SpawnHead(objectpath);
                break;
            case EquipmentSlots.Body:
			StartCoroutine(SpawnBody(objectpath));
            //SpawnBody(objectpath);
                break;
            case EquipmentSlots.ArmL:
			StartCoroutine(SpawnArmL(objectpath));
            //SpawnArmL(objectpath);
                break;
            case EquipmentSlots.ArmR:
			StartCoroutine(SpawnArmR(objectpath));
            //SpawnArmR(objectpath);
                break;
            case EquipmentSlots.Legs:
			StartCoroutine(SpawnLegs(objectpath));
            //SpawnLegs(objectpath);
                break;
            case EquipmentSlots.Face:
			myPhotonView.RPC("SpawnFace", PhotonTargets.All, objectpath);
                break;
        }
    }