コード例 #1
0
def register_fire_gauntlet_item():
    item_type = ItemType.FIRE_GAUNTLET
    register_randomized_stat_modifying_item(
        item_type=item_type,
        item_level=6,
        ui_icon_sprite=UiIconSprite.ITEM_FIRE_GAUNTLET,
        sprite=Sprite.ITEM_FIRE_GAUNTLET,
        image_file_path="resources/graphics/item_fire_gauntlet.png",
        item_equipment_category=ItemEquipmentCategory.OFF_HAND,
        name="Fire gauntlet",
        stat_modifier_intervals=[StatModifierInterval(HeroStat.DAMAGE, interval(0.15, 0.2, 0.01)),
                                 StatModifierInterval(HeroStat.HEALTH_REGEN, interval(0.2, 0.4, 0.1))]
    )
コード例 #2
0
def register_desert_blade_item():
    register_randomized_stat_modifying_item(
        item_level=7,
        item_type=ItemType.DESERT_BLADE,
        ui_icon_sprite=UiIconSprite.ITEM_DESERT_BLADE,
        sprite=Sprite.ITEM_DESERT_BLADE,
        image_file_path="resources/graphics/item_desert_blade.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Desert blade",
        stat_modifier_intervals={
            HeroStat.PHYSICAL_DAMAGE: interval(0.4, 0.45, 0.01),
            HeroStat.DODGE_CHANCE: interval(0.03, 0.06, 0.01)
        })
コード例 #3
0
def register_skull_staff_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.SKULL_STAFF,
        item_level=4,
        ui_icon_sprite=UiIconSprite.ITEM_SKULL_STAFF,
        sprite=Sprite.ITEM_SKULL_STAFF,
        image_file_path="resources/graphics/item_skullstaff.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Skull staff",
        stat_modifier_intervals={
            HeroStat.DAMAGE: interval(0.08, 0.14, 0.01),
            HeroStat.LIFE_STEAL: interval(0.07, 0.1, 0.01)
        })
コード例 #4
0
def register_skull_sword_item():
    item_type = ItemType.SKULL_SWORD
    register_randomized_stat_modifying_item(
        item_type=item_type,
        item_level=8,
        ui_icon_sprite=UiIconSprite.ITEM_SKULL_SWORD,
        sprite=Sprite.ITEM_SKULL_SWORD,
        image_file_path="resources/graphics/item_skull_sword.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Skull sword",
        stat_modifier_intervals=[StatModifierInterval(HeroStat.PHYSICAL_DAMAGE, interval(0.4, 0.5, 0.01)),
                                 StatModifierInterval(HeroStat.LIFE_STEAL, interval(0.10, 0.15, 0.01))]
    )
コード例 #5
0
def register_ring_of_power_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.RING_OF_POWER,
        item_level=5,
        ui_icon_sprite=UiIconSprite.ITEM_RING_OF_POWER,
        sprite=Sprite.ITEM_RING_OF_POWER,
        image_file_path="resources/graphics/item_ring_of_power.png",
        item_equipment_category=ItemEquipmentCategory.RING,
        name="Force ring",
        stat_modifier_intervals={HeroStat.DAMAGE: interval(0.1, 0.2, 0.01)})
コード例 #6
0
def register_molten_axe_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.MOLTEN_AXE,
        item_level=7,
        ui_icon_sprite=UiIconSprite.ITEM_MOLTEN_AXE,
        sprite=Sprite.ITEM_MOLTEN_AXE,
        image_file_path="resources/graphics/item_molten_axe.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Molten axe",
        stat_modifier_intervals={HeroStat.PHYSICAL_DAMAGE: interval(0.5, 0.7, 0.01)}
    )
コード例 #7
0
def register_fire_wand_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.FIRE_WAND,
        item_level=4,
        ui_icon_sprite=UiIconSprite.ITEM_FIRE_WAND,
        sprite=Sprite.ITEM_FIRE_WAND,
        image_file_path="resources/graphics/item_fire_wand.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Fire wand",
        stat_modifier_intervals={
            HeroStat.MAGIC_DAMAGE: interval(0.15, 0.3, 0.01)
        })
コード例 #8
0
def register_wooden_sword_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.WOODEN_SWORD,
        item_level=1,
        ui_icon_sprite=UiIconSprite.ITEM_WOODEN_SWORD,
        sprite=Sprite.ITEM_WOODEN_SWORD,
        image_file_path="resources/graphics/item_wooden_sword.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Wooden sword",
        stat_modifier_intervals={
            HeroStat.PHYSICAL_DAMAGE: interval(0.06, 0.1, 0.01)
        })
コード例 #9
0
ファイル: item_hatchet.py プロジェクト: qqbc1/python-2d-game
def register_hatchet_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.HATCHET,
        item_level=2,
        ui_icon_sprite=UiIconSprite.ITEM_HATCHET,
        sprite=Sprite.ITEM_HATCHET,
        image_file_path="resources/graphics/item_hatchet.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Hatchet",
        stat_modifier_intervals={
            HeroStat.PHYSICAL_DAMAGE: interval(0.1, 0.15, 0.01)
        })
コード例 #10
0
def register_royal_sword_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.ROYAL_SWORD,
        item_level=5,
        ui_icon_sprite=UiIconSprite.ITEM_ROYAL_SWORD,
        sprite=Sprite.ITEM_ROYAL_SWORD,
        image_file_path="resources/graphics/item_royal_sword.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Royal sword",
        stat_modifier_intervals=[StatModifierInterval(HeroStat.PHYSICAL_DAMAGE, interval(0.25, 0.35, 0.01)),
                                 StatModifierInterval(HeroStat.ARMOR, [1])]
    )
コード例 #11
0
def register_royal_dagger_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.ROYAL_DAGGER,
        item_level=4,
        ui_icon_sprite=UiIconSprite.ITEM_ROYAL_DAGGER,
        sprite=Sprite.ITEM_ROYAL_DAGGER,
        image_file_path="resources/graphics/item_royal_dagger.png",
        item_equipment_category=ItemEquipmentCategory.MAIN_HAND,
        name="Royal dagger",
        stat_modifier_intervals={
            HeroStat.PHYSICAL_DAMAGE: interval(0.25, 0.35, 0.01)
        })
コード例 #12
0
def register_sorceress_robe_item():
    register_randomized_stat_modifying_item(
        item_type=ItemType.SORCERESS_ROBE,
        item_level=7,
        ui_icon_sprite=UiIconSprite.ITEM_SORCERESS_ROBE,
        sprite=Sprite.ITEM_SORCERESS_ROBE,
        image_file_path="resources/graphics/item_sorceress_robe.png",
        item_equipment_category=ItemEquipmentCategory.CHEST,
        name="Spell robe",
        stat_modifier_intervals={
            HeroStat.ARMOR: [1],
            HeroStat.MAGIC_DAMAGE: interval(0.15, 0.25, 0.01)
        })
コード例 #13
0
def register_gladiator_armor():
    register_randomized_stat_modifying_item(
        item_type=ItemType.GLADIATOR_ARMOR,
        item_level=6,
        ui_icon_sprite=UiIconSprite.ITEM_GLADIATOR_ARMOR,
        sprite=Sprite.ITEM_GLADIATOR_ARMOR,
        image_file_path="resources/graphics/item_gladiator_armor.png",
        item_equipment_category=ItemEquipmentCategory.CHEST,
        name="Gladiator armor",
        stat_modifier_intervals={
            HeroStat.ARMOR: [2],
            HeroStat.DAMAGE: interval(0.07, 0.15, 0.01)
        })