def new_trident(game_state): """ A composite component representing a Sword item. """ c = Composite() set_item_components(c, game_state) set_melee_weapon_component(c) c.set_child( Description( "Trident", "A long stick with a with three sharp points at one end." "It's a useful weapon when you want to keep danger at bay.")) c.set_child(GraphicChar(None, colors.ORANGE_D, icon.TRIDENT)) c.set_child(DataPoint(DataTypes.WEIGHT, 8)) c.set_child(accuracy_item_stat(10)) c.set_child(damage_item_stat(1, 5)) c.set_child(CritChanceBonusEffect(0.15)) c.set_child(crit_multiplier_item_stat(2.5)) c.set_child(DefenciveAttackEffect(0.75)) c.set_child(BleedAttackEffect(0.20)) return c
def new_kris(game_state): """ A composite component representing a Knife item. """ c = Composite() set_item_components(c, game_state) set_melee_weapon_component(c) c.set_child( Description( "Kris", "A dagger with a wavy blade, its sharp end can cause major damage." )) c.set_child(GraphicChar(None, colors.GRAY_D, icon.KRIS)) c.set_child(DataPoint(DataTypes.WEIGHT, 5)) c.set_child(DamageType(DamageTypes.CUTTING)) c.set_child(damage_item_stat(1, 3)) c.set_child(accuracy_item_stat(15)) c.set_child(CritChanceBonusEffect(0.20)) c.set_child(crit_multiplier_item_stat(3.5)) c.set_child(ExtraSwingAttackEffect(0.2)) c.set_child(BleedAttackEffect(0.2)) return c
def new_morning_star(game_state): """ A composite component representing a Sword item. """ mace = Composite() set_item_components(mace, game_state) set_melee_weapon_component(mace) mace.set_child( Description( "Morning Star", "This old club has an lump of iron with rusty spikes at one end.")) mace.set_child(GraphicChar(None, colors.GRAY, icon.MORNING_STAR)) mace.set_child(DataPoint(DataTypes.WEIGHT, 8)) mace.set_child(accuracy_item_stat(8)) mace.set_child(damage_item_stat(1, 6)) mace.set_child(CritChanceBonusEffect(0.1)) mace.set_child(crit_multiplier_item_stat(2)) mace.set_child(StunAttackEffect(0.2)) mace.set_child(IgnoreArmorAttackEffect(0.2)) mace.set_child(BleedAttackEffect(0.1)) return mace
def new_dagger(game_state): """ A composite component representing a Knife item. """ c = Composite() set_item_components(c, game_state) set_melee_weapon_component(c) c.set_child( Description( "Dagger", "A trusty dagger, small and precise but will only inflict small wounds." )) c.set_child(GraphicChar(None, colors.GRAY, icon.DAGGER)) c.set_child(DataPoint(DataTypes.WEIGHT, 5)) c.set_child(DamageType(DamageTypes.CUTTING)) c.set_child(damage_item_stat(1, 3)) c.set_child(accuracy_item_stat(15)) c.set_child(CritChanceBonusEffect(0.2)) c.set_child(crit_multiplier_item_stat(3.5)) c.set_child(ExtraSwingAttackEffect(0.20)) c.set_child(BleedAttackEffect(0.10)) return c
def new_gun(game_state): gun = Composite() set_item_components(gun, game_state) set_ranged_weapon_components(gun) gun.set_child(RangeWeaponType(RangeWeaponType.GUN)) gun.set_child( Description( "Gun", "This was once a fine weapon, \ but age has torn it real bad.\n\ The wooden handle is dry and gray, \ you see rust eating into the iron pipe.")) gun.set_child(GraphicChar(None, colors.WHITE, icon.GUN)) gun.set_child(DataPoint(DataTypes.WEAPON_RANGE, 15)) gun.set_child(accuracy_item_stat(13)) gun.set_child(damage_item_stat(5, 25)) gun.set_child(BleedAttackEffect(1)) gun.set_child(CritChanceBonusEffect(0.3)) gun.set_child(crit_multiplier_item_stat(2.0)) gun.set_child(DataPoint(DataTypes.WEIGHT, 5)) return gun
def new_claw(game_state): c = Composite() set_item_components(c, game_state) set_melee_weapon_component(c) c.set_child( Description("Claws", "A pair of gloves with sharp blades attached to them,")) c.set_child(GraphicChar(None, colors.CHAMPAGNE, icon.CLAWS)) c.set_child(DataPoint(DataTypes.WEIGHT, 5)) c.set_child(DamageType(DamageTypes.BLUNT)) c.set_child(damage_item_stat(1, 3)) c.set_child(accuracy_item_stat(17)) c.set_child(CritChanceBonusEffect(0.10)) c.set_child(crit_multiplier_item_stat(2)) c.set_child(ExtraSwingAttackEffect(0.15)) c.set_child(CounterAttackEffect(0.20)) c.set_child(BleedAttackEffect(0.30)) return c
def new_axe(game_state): """ A composite component representing a Sword item. """ c = Composite() set_item_components(c, game_state) set_melee_weapon_component(c) c.set_child( Description( "Axe", "This old axe has seen many battles, but age hasn't dulled the blade." )) c.set_child(GraphicChar(None, colors.GRAY, icon.AXE)) c.set_child(DataPoint(DataTypes.WEIGHT, 10)) c.set_child(damage_item_stat(3, 5)) c.set_child(accuracy_item_stat(8)) c.set_child(CritChanceBonusEffect(0.1)) c.set_child(crit_multiplier_item_stat(2)) c.set_child(OffenciveAttackEffect(0.75)) c.set_child(BleedAttackEffect(0.1)) return c
def new_sword(game_state): """ A composite component representing a Sword item. """ sword = Composite() set_item_components(sword, game_state) set_melee_weapon_component(sword) sword.set_child( Description( "Iron Sword", "This old blade has seen some better days, it's as sharp as ever tough." )) sword.set_child(GraphicChar(None, colors.GRAY, icon.SWORD)) sword.set_child(DataPoint(DataTypes.WEIGHT, 10)) sword.set_child(damage_item_stat(2, 5)) sword.set_child(accuracy_item_stat(10)) sword.set_child(CritChanceBonusEffect(0.1)) sword.set_child(crit_multiplier_item_stat(2)) sword.set_child(ExtraSwingAttackEffect(0.1)) sword.set_child(BleedAttackEffect(0.1)) return sword