コード例 #1
0
ファイル: WeaponFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createSworm()
        {
            Item item = new Item("Epée", 5, (uint)ListWeapon.SWORM, Stuff.TypeStuff.WEAPON);
            item.addStats(new Stats(70, Stuff.TypeStats.CHANCE_HIT));

            return item;
        }
コード例 #2
0
ファイル: WeaponFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createFilet()
        {
            Item item = new Item("Filet", 3, (uint)ListWeapon.FILET, Stuff.TypeStuff.WEAPON);
            item.addStats(new Stats(30, Stuff.TypeStats.CHANCE_HIT));

            return item;
        }
コード例 #3
0
ファイル: WeaponFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createSpear()
        {
            Item item = new Item("Lance", 7, (uint)ListWeapon.SPEAR, Stuff.TypeStuff.WEAPON);
            item.addStats(new Stats(50, Stuff.TypeStats.CHANCE_HIT));

            return item;
        }
コード例 #4
0
ファイル: ArmorFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createTallShield()
        {
            Item armor = new Item("Bouclier rectangulaire", 8, (uint)ListArmor.TALL_SHIELD, Stuff.TypeStuff.ARMOR);
            armor.addStats(new Stats(30, Stuff.TypeStats.CHANCE_PARRY));

            return armor;
        }
コード例 #5
0
ファイル: WeaponFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createDagger()
        {
            Item item = new Item("Dague", 2, (uint)ListWeapon.DAGGER, Stuff.TypeStuff.WEAPON);
            item.addStats(new Stats(60, Stuff.TypeStats.CHANCE_HIT));

            return item;
        }
コード例 #6
0
ファイル: ArmorFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createSmallShield()
        {
            Item armor = new Item("Petit boucler rond", 5, (uint)ListArmor.SMALL_SHIELD, Stuff.TypeStuff.ARMOR);
            armor.addStats(new Stats(20, Stuff.TypeStats.CHANCE_PARRY));

            return armor;
        }
コード例 #7
0
ファイル: ArmorFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createHelmet()
        {
            Item armor = new Item("Casque", 2, (uint)ListArmor.HELMET, Stuff.TypeStuff.ARMOR);
            armor.addStats(new Stats(10, Stuff.TypeStats.CHANCE_PARRY));

            return armor;
        }
コード例 #8
0
ファイル: WeaponFactory.cs プロジェクト: Eraac/TP-Gladiator
        private Item createTrident()
        {
            Item item = new Item("Trident", 7, (uint)ListWeapon.TRIDENT, Stuff.TypeStuff.WEAPON);
            item.addStats(new Stats(30, Stuff.TypeStats.CHANCE_HIT));
            item.addStats(new Stats(10, Stuff.TypeStats.CHANCE_PARRY));

            return item;
        }
コード例 #9
0
        private bool checkCost(Gladiator gladiator, Item item, SlotStuff slotStuff)
        {
            uint newCost = gladiator.stuff.getCostAllStuff() + item.cost - gladiator.stuff.getCostItem(slotStuff);
            //		Le total actuel de l'équipement + coût nouveau item - l'item qui sera ramplacé

            if (newCost > MAX_COST_STUFF) {
                return false;
            }

            return true;
        }
コード例 #10
0
        private bool checkSlot(Item item, SlotStuff slotStuff)
        {
            switch (item.typeStuff)
            {
            case TypeStuff.ARMOR:
                return this.equipArmorOnSlot(slotStuff);

            case TypeStuff.WEAPON:
                return this.equipWeaponOnSlot(slotStuff);
            }

            return false;
        }
コード例 #11
0
 public bool canEquip(Gladiator gladiator, Item item, SlotStuff slotStuff)
 {
     return this.checkSlot(item, slotStuff) && this.checkCost(gladiator, item, slotStuff);
 }