diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 94d0178a660..7a6d8e686ef 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -300,6 +300,8 @@ GLOBAL_LIST_INIT(mining_suit_allowed, list( /obj/item/pickaxe, /obj/item/resonator, /obj/item/spear, + /obj/item/forging/reagent_weapon, // NOVA EDIT ADDITION + /obj/item/gun/ballistic/bow, // NOVA EDIT ADDITION )) /// String for items placed into the left pocket. diff --git a/code/__DEFINES/~nova_defines/colony_fabricator_misc.dm b/code/__DEFINES/~nova_defines/colony_fabricator_misc.dm index 5e741ddfa69..313c2477cb4 100644 --- a/code/__DEFINES/~nova_defines/colony_fabricator_misc.dm +++ b/code/__DEFINES/~nova_defines/colony_fabricator_misc.dm @@ -40,4 +40,5 @@ GLOBAL_LIST_INIT(colonist_suit_allowed, list( /obj/item/analyzer, /obj/item/storage/medkit, /obj/item/fireaxe/metal_h2_axe, + /obj/item/forging/reagent_weapon, )) diff --git a/code/datums/storage/subtypes/pockets.dm b/code/datums/storage/subtypes/pockets.dm index 4e0e233121a..66b90630f1d 100644 --- a/code/datums/storage/subtypes/pockets.dm +++ b/code/datums/storage/subtypes/pockets.dm @@ -87,6 +87,7 @@ . = ..() set_holdable(list( /obj/item/knife, + /obj/item/forging/reagent_weapon/dagger, // NOVA EDIT ADDITION /obj/item/spess_knife, /obj/item/switchblade, /obj/item/boxcutter, @@ -140,6 +141,7 @@ /obj/item/holochip, /obj/item/implanter, /obj/item/knife, + /obj/item/forging/reagent_weapon/dagger, // NOVA EDIT ADDITION /obj/item/lighter, /obj/item/lipstick, /obj/item/match, diff --git a/modular_nova/modules/reagent_forging/code/forge_weapons.dm b/modular_nova/modules/reagent_forging/code/forge_weapons.dm index aa892a711db..0147ff48c46 100644 --- a/modular_nova/modules/reagent_forging/code/forge_weapons.dm +++ b/modular_nova/modules/reagent_forging/code/forge_weapons.dm @@ -1,94 +1,101 @@ +#define FAUNA_MULTIPLIER 1 +#define MEGAFAUNA_MULTIPLIER 1 + /obj/item/forging/reagent_weapon icon = 'modular_nova/modules/reagent_forging/icons/obj/forge_items.dmi' lefthand_file = 'modular_nova/modules/reagent_forging/icons/mob/forge_weapon_l.dmi' righthand_file = 'modular_nova/modules/reagent_forging/icons/mob/forge_weapon_r.dmi' worn_icon = 'modular_nova/modules/reagent_forging/icons/mob/forge_weapon_worn.dmi' material_flags = MATERIAL_EFFECTS | MATERIAL_ADD_PREFIX | MATERIAL_GREYSCALE | MATERIAL_COLOR - obj_flags = UNIQUE_RENAME + obj_flags = UNIQUE_RENAME | CONDUCTS_ELECTRICITY obj_flags_nova = ANVIL_REPAIR - toolspeed = 0.9 //Slightly better than avg. - A forged hammer or knife is probably better than a standard one + resistance_flags = FIRE_PROOF | LAVA_PROOF + toolspeed = 0.9 + throwforce = 5 + throw_speed = 3 + throw_range = 7 + var/static/list/nemesis = MOB_BEAST /obj/item/forging/reagent_weapon/Initialize(mapload) . = ..() AddComponent(/datum/component/reagent_weapon) + AddElement(/datum/element/bane, mob_biotypes = MOB_BEAST, damage_multiplier = FAUNA_MULTIPLIER, requires_combat_mode = FALSE) + AddElement(/datum/element/bane, target_type = /mob/living/simple_animal/hostile/megafauna, damage_multiplier = MEGAFAUNA_MULTIPLIER, requires_combat_mode = FALSE) /obj/item/forging/reagent_weapon/examine(mob/user) . = ..() . += span_notice("Using a hammer on [src] will repair its damage!") -//vanilla sword with no quirks, at least it's good versus other melees :) /obj/item/forging/reagent_weapon/sword name = "forged sword" desc = "A sharp, one-handed sword most adept at blocking opposing melee strikes." force = 20 - armour_penetration = 10 + armour_penetration = 20 + demolition_mod = 1.2 icon_state = "sword" inhand_icon_state = "sword" worn_icon_state = "sword_back" belt_icon_state = "sword_belt" hitsound = 'sound/weapons/bladeslice.ogg' - throwforce = 10 - block_chance = 25 + block_chance = 20 slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY - resistance_flags = FIRE_PROOF attack_verb_continuous = list("attacks", "slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts") attack_verb_simple = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut") sharpness = SHARP_EDGED max_integrity = 150 -//katana, one which shall cut through your puny armour /obj/item/forging/reagent_weapon/katana name = "forged katana" desc = "A katana sharp enough to penetrate body armor, but not quite million-times-folded sharp." force = 20 - armour_penetration = 25 + armour_penetration = 40 icon_state = "katana" inhand_icon_state = "katana" worn_icon_state = "katana_back" belt_icon_state = "katana_belt" hitsound = 'sound/weapons/bladeslice.ogg' - throwforce = 10 - block_chance = 20 + block_chance = 10 slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY - resistance_flags = FIRE_PROOF attack_verb_continuous = list("attacks", "slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts") attack_verb_simple = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut") sharpness = SHARP_EDGED -//quirky knife that lets you click fast /obj/item/forging/reagent_weapon/dagger name = "forged dagger" - desc = "A lightweight dagger with an extremely quick swing!" + desc = "A lightweight dagger that seems ideal for butchering and surviving!" force = 13 icon_state = "dagger" inhand_icon_state = "dagger" worn_icon_state = "dagger_back" belt_icon_state = "dagger_belt" hitsound = 'sound/weapons/bladeslice.ogg' - throw_speed = 4 embed_type = /datum/embed_data/forged_dagger - throwforce = 15 + throwforce = 17 + throw_speed = 4 + demolition_mod = 0.75 slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK w_class = WEIGHT_CLASS_SMALL - resistance_flags = FIRE_PROOF attack_verb_continuous = list("attacks", "slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts") attack_verb_simple = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut") sharpness = SHARP_EDGED tool_behaviour = TOOL_KNIFE +/obj/item/forging/reagent_weapon/dagger/Initialize(mapload) + . = ..() + AddComponent(/datum/component/butchering, \ + speed = 8 SECONDS, \ + effectiveness = 100, \ + bonus_modifier = force + 7, \ + ) + /datum/embed_data/forged_dagger embed_chance = 50 - fall_chance = 1 - pain_mult = 2 - -//what a cute gimmick -/obj/item/forging/reagent_weapon/dagger/attack(mob/living/M, mob/living/user, params) - . = ..() - user.changeNext_move(CLICK_CD_RANGE) + fall_chance = 10 + pain_mult = 4 + ignore_throwspeed_threshold = TRUE -//this isnt a weapon... /obj/item/forging/reagent_weapon/staff name = "forged staff" desc = "A staff most notably capable of being imbued with reagents, especially useful alongside its otherwise harmless nature." @@ -99,100 +106,81 @@ throwforce = 0 slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_NORMAL - resistance_flags = FIRE_PROOF attack_verb_continuous = list("bonks", "bashes", "whacks", "pokes", "prods") attack_verb_simple = list("bonk", "bash", "whack", "poke", "prod") -//omg, two tile range! surely i wont lose a fight now... /obj/item/forging/reagent_weapon/spear name = "forged spear" desc = "A long spear that can be wielded in two hands to boost damage at the cost of single-handed versatility." force = 13 armour_penetration = 15 + demolition_mod = 0.75 icon_state = "spear" inhand_icon_state = "spear" worn_icon_state = "spear_back" - throwforce = 22 + throwforce = 24 throw_speed = 4 - embed_data = /datum/embed_data/forged_spear + embed_data = /datum/embed_data/spear slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY - resistance_flags = FIRE_PROOF hitsound = 'sound/weapons/bladeslice.ogg' attack_verb_continuous = list("attacks", "pokes", "jabs", "tears", "lacerates", "gores") attack_verb_simple = list("attack", "poke", "jab", "tear", "lacerate", "gore") wound_bonus = -15 bare_wound_bonus = 15 reach = 2 - sharpness = SHARP_EDGED + sharpness = SHARP_POINTY -/datum/embed_data/forged_spear - embed_chance = 75 - fall_chance = 0 - pain_mult = 6 - -//this is 1:1 with the bonespear, lets use this as a 'balance anchor'. weapons that blatantly outclass this are powercrept. /obj/item/forging/reagent_weapon/spear/Initialize(mapload) . = ..() AddComponent(/datum/component/two_handed, force_unwielded = 13, force_wielded = 23) -//throwing weapons, what a fun gimmick. lets make them actually worth using /obj/item/forging/reagent_weapon/axe name = "forged axe" - desc = "An axe especially balanced for throwing and embedding into fleshy targets. Nonetheless useful as a traditional melee tool." - force = 13 + desc = "An axe especially balanced for throwing. Nonetheless useful as a traditional melee tool." + force = 15 armour_penetration = 10 + demolition_mod = 1.2 icon_state = "axe" inhand_icon_state = "axe" worn_icon_state = "axe_back" - throwforce = 18 + throwforce = 20 throw_speed = 4 embed_type = /datum/embed_data/forged_axe slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_NORMAL - resistance_flags = FIRE_PROOF attack_verb_continuous = list("slashes", "bashes") attack_verb_simple = list("slash", "bash") sharpness = SHARP_EDGED /datum/embed_data/forged_axe - embed_chance = 65 + embed_chance = 40 fall_chance = 10 - pain_mult = 4 + pain_mult = 2 -//Boring option for doing the most raw damage /obj/item/forging/reagent_weapon/hammer name = "forged hammer" desc = "A heavy, weighted hammer that packs an incredible punch but can prove to be unwieldy. Useful for forging!" - force = 24 //Requires wielding + force = 10 armour_penetration = 10 + demolition_mod = 2 icon_state = "crush_hammer" inhand_icon_state = "crush_hammer" worn_icon_state = "hammer_back" throwforce = 10 + throw_speed = 2 + throw_range = 5 slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY - resistance_flags = FIRE_PROOF attack_verb_continuous = list("bashes", "whacks") attack_verb_simple = list("bash", "whack") tool_behaviour = TOOL_HAMMER - ///the list of things that, if attacked, will set the attack speed to rapid - var/static/list/fast_attacks = list( - /obj/structure/reagent_anvil, - /obj/structure/reagent_crafting_bench - ) /obj/item/forging/reagent_weapon/hammer/Initialize(mapload) . = ..() - AddComponent(/datum/component/two_handed, force_unwielded = 24, force_wielded = 24, require_twohands = TRUE) + AddComponent(/datum/component/two_handed, force_unwielded = 10, force_wielded = 25, require_twohands = TRUE) AddElement(/datum/element/kneejerk) -/obj/item/forging/reagent_weapon/hammer/attack_atom(atom/attacked_atom, mob/living/user, params) - . = ..() - if(!is_type_in_list(attacked_atom, fast_attacks)) - return - user.changeNext_move(CLICK_CD_RAPID) - /obj/item/shield/buckler/reagent_weapon name = "forged buckler shield" desc = "A small, round shield best used in tandem with a melee weapon in close-quarters combat." @@ -204,19 +192,21 @@ lefthand_file = 'modular_nova/modules/reagent_forging/icons/mob/forge_weapon_l.dmi' righthand_file = 'modular_nova/modules/reagent_forging/icons/mob/forge_weapon_r.dmi' custom_materials = list(/datum/material/iron=HALF_SHEET_MATERIAL_AMOUNT) - resistance_flags = FIRE_PROOF block_chance = 30 transparent = FALSE - max_integrity = 150 //over double that of a wooden one + max_integrity = 150 w_class = WEIGHT_CLASS_NORMAL material_flags = MATERIAL_EFFECTS | MATERIAL_ADD_PREFIX | MATERIAL_GREYSCALE | MATERIAL_AFFECT_STATISTICS obj_flags_nova = ANVIL_REPAIR + resistance_flags = FIRE_PROOF | LAVA_PROOF shield_break_sound = 'sound/effects/bang.ogg' shield_break_leftover = /obj/item/forging/complete/plate /obj/item/shield/buckler/reagent_weapon/Initialize(mapload) . = ..() AddComponent(/datum/component/reagent_weapon) + AddElement(/datum/element/bane, mob_biotypes = MOB_BEAST, damage_multiplier = FAUNA_MULTIPLIER, requires_combat_mode = FALSE) + AddElement(/datum/element/bane, target_type = /mob/living/simple_animal/hostile/megafauna, damage_multiplier = MEGAFAUNA_MULTIPLIER, requires_combat_mode = FALSE) /obj/item/shield/buckler/reagent_weapon/examine(mob/user) . = ..() @@ -233,40 +223,43 @@ return var/fixing_amount = min(max_integrity - atom_integrity, 5) atom_integrity += fixing_amount - user.mind.adjust_experience(/datum/skill/smithing, 5) //useful heating means you get some experience + user.mind.adjust_experience(/datum/skill/smithing, 5) balloon_alert(user, "partially repaired!") return return ..() -/obj/item/shield/buckler/reagent_weapon/pavise //similar to the adamantine shield. Huge, slow, lets you soak damage and packs a wallop. +/obj/item/shield/buckler/reagent_weapon/pavise name = "forged pavise shield" desc = "An oblong shield used by ancient crossbowmen as cover while reloading. Probably just as useful with an actual gun." icon_state = "pavise" inhand_icon_state = "pavise" worn_icon_state = "pavise_back" - block_chance = 75 + block_chance = 50 + force = 12 item_flags = SLOWS_WHILE_IN_HAND w_class = WEIGHT_CLASS_HUGE slot_flags = ITEM_SLOT_BACK max_integrity = 300 //tanky -/obj/item/shield/buckler/reagent_weapon/pavise/Initialize(mapload) - . = ..() - AddComponent(/datum/component/two_handed, require_twohands = TRUE, force_wielded = 15) - /obj/item/pickaxe/reagent_weapon name = "forged pickaxe" + toolspeed = 0.75 /obj/item/pickaxe/reagent_weapon/Initialize(mapload) . = ..() AddComponent(/datum/component/reagent_weapon) + AddElement(/datum/element/bane, mob_biotypes = MOB_BEAST, damage_multiplier = FAUNA_MULTIPLIER, requires_combat_mode = FALSE) + AddElement(/datum/element/bane, target_type = /mob/living/simple_animal/hostile/megafauna, damage_multiplier = MEGAFAUNA_MULTIPLIER, requires_combat_mode = FALSE) /obj/item/shovel/reagent_weapon name = "forged shovel" + toolspeed = 0.75 /obj/item/shovel/reagent_weapon/Initialize(mapload) . = ..() AddComponent(/datum/component/reagent_weapon) + AddElement(/datum/element/bane, mob_biotypes = MOB_BEAST, damage_multiplier = FAUNA_MULTIPLIER, requires_combat_mode = FALSE) + AddElement(/datum/element/bane, target_type = /mob/living/simple_animal/hostile/megafauna, damage_multiplier = MEGAFAUNA_MULTIPLIER, requires_combat_mode = FALSE) /obj/item/ammo_casing/arrow/attackby(obj/item/attacking_item, mob/user, params) var/spawned_item @@ -292,52 +285,49 @@ user.put_in_hands(converted_arrow) qdel(src) -#define INCREASE_BLOCK_CHANCE 2 - /obj/item/forging/reagent_weapon/bokken name = "bokken" - desc = "A bokken that is capable of blocking attacks when wielding in two hands, possibly including bullets should the user be brave enough." - force = 20 + desc = "A wooden sword that is capable of wielded in two hands. It seems to be made to prevent permanent injuries." + force = 15 + armour_penetration = 40 icon_state = "bokken" inhand_icon_state = "bokken" worn_icon_state = "bokken_back" - throwforce = 10 block_chance = 20 - slot_flags = ITEM_SLOT_BACK + block_sound = 'sound/weapons/parry.ogg' + damtype = STAMINA + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY - resistance_flags = FIRE_PROOF + resistance_flags = FLAMMABLE attack_verb_continuous = list("bonks", "bashes", "whacks", "pokes", "prods") attack_verb_simple = list("bonk", "bash", "whack", "poke", "prod") - ///whether the bokken is being wielded or not var/wielded = FALSE - -/obj/item/forging/reagent_weapon/bokken/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage, attack_type) - if(wielded) - final_block_chance *= INCREASE_BLOCK_CHANCE - if(prob(final_block_chance)) - if(attack_type == PROJECTILE_ATTACK) - owner.visible_message(span_danger("[owner] deflects [attack_text] with [src]!")) - playsound(src, pick('sound/weapons/effects/ric1.ogg', 'sound/weapons/effects/ric2.ogg', 'sound/weapons/effects/ric3.ogg', 'sound/weapons/effects/ric4.ogg', 'sound/weapons/effects/ric5.ogg'), 100, TRUE) - else - playsound(src, 'sound/weapons/parry.ogg', 75, TRUE) - owner.visible_message(span_danger("[owner] parries [attack_text] with [src]!")) - var/owner_turf = get_turf(owner) - new block_effect(owner_turf, COLOR_YELLOW) - return TRUE - return FALSE - -#undef INCREASE_BLOCK_CHANCE + var/unwielded_block_chance = 20 + var/wielded_block_chance = 40 /obj/item/forging/reagent_weapon/bokken/Initialize(mapload) . = ..() RegisterSignal(src, COMSIG_TWOHANDED_WIELD, PROC_REF(on_wield)) RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, PROC_REF(on_unwield)) - AddComponent(/datum/component/two_handed, force_unwielded = 20, force_wielded = 10) + AddComponent(/datum/component/two_handed, force_unwielded = 15, force_wielded = 25) /obj/item/forging/reagent_weapon/bokken/proc/on_wield() SIGNAL_HANDLER wielded = TRUE + block_chance = wielded_block_chance /obj/item/forging/reagent_weapon/bokken/proc/on_unwield() SIGNAL_HANDLER wielded = FALSE + block_chance = unwielded_block_chance + +/obj/item/forging/reagent_weapon/bokken/attack(mob/living/carbon/target_mob, mob/living/user, params) + . = ..() + if(!iscarbon(target_mob)) + user.visible_message(span_warning("The [src] seems to be ineffective against the [target_mob]!")) + playsound(src, 'sound/weapons/genhit.ogg', 75, TRUE) + return + playsound(src, pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'), 100, TRUE) + +#undef FAUNA_MULTIPLIER +#undef MEGAFAUNA_MULTIPLIER