diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 92eb0e7f112..573e498aa4a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -25,6 +25,7 @@ var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants. var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" var/force = 0 + var/can_cleave = FALSE // If true, a 'cleaving' attack will occur. var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm index 4f9bc00e0f3..290925a3665 100644 --- a/code/game/objects/items/weapons/material/twohanded.dm +++ b/code/game/objects/items/weapons/material/twohanded.dm @@ -145,7 +145,6 @@ base_icon = "spearglass" name = "spear" desc = "A haphazardly-constructed yet still deadly weapon of ancient design." - description_info = "This weapon can strike from two tiles away, and over certain objects such as tables, or other people." force = 10 w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 04ed3f14112..92234d4da01 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -2,11 +2,12 @@ var/active = 0 var/active_force var/active_throwforce + var/active_armourpen var/active_w_class var/active_embed_chance = 0 //In the off chance one of these is supposed to embed, you can just tweak this var sharp = FALSE edge = FALSE - armor_penetration = 50 + armor_penetration = 0 flags = NOCONDUCT | NOBLOODY var/lrange = 2 var/lpower = 2 @@ -54,6 +55,7 @@ embed_chance = active_embed_chance force = active_force throwforce = active_throwforce + armor_penetration = active_armourpen sharp = TRUE edge = TRUE w_class = active_w_class @@ -70,6 +72,7 @@ embed_chance = initial(embed_chance) force = initial(force) throwforce = initial(throwforce) + armor_penetration = initial(armor_penetration) sharp = initial(sharp) edge = initial(edge) w_class = initial(w_class) @@ -192,7 +195,8 @@ /obj/item/weapon/melee/energy/examine(mob/user) . = ..() - . += "Alt-click to recolor it." + if(colorable) + . += "Alt-click to recolor it." /* * Energy Axe @@ -206,11 +210,13 @@ lcolor = null //active_force = 150 //holy... active_force = 60 + active_armourpen = 65 active_throwforce = 35 active_w_class = ITEMSIZE_HUGE //force = 40 //throwforce = 25 force = 20 + armor_penetration = 20 throwforce = 10 throw_speed = 1 throw_range = 5 @@ -236,6 +242,7 @@ desc = "An energised axe." active_force = 35 active_throwforce = 20 + active_armourpen = 30 force = 15 use_cell = TRUE @@ -255,6 +262,7 @@ icon_state = "esword" item_state = "esword" active_force = 30 + active_armourpen = 50 active_throwforce = 20 active_w_class = ITEMSIZE_LARGE force = 3 @@ -264,8 +272,6 @@ w_class = ITEMSIZE_SMALL flags = NOBLOODY origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4) - sharp = TRUE - edge = TRUE colorable = TRUE drop_sound = 'sound/items/drop/sword.ogg' pickup_sound = 'sound/items/pickup/sword.ogg' @@ -344,6 +350,7 @@ icon_state = "ionrapier" item_state = "ionrapier" active_force = 5 + active_armourpen = 80 active_throwforce = 3 active_embed_chance = 0 sharp = TRUE @@ -383,7 +390,7 @@ name = "zero-point lance" desc = "Designed specifically for disrupting electronics at relatively close range, however it is still capable of dealing some damage to living beings." active_force = 20 - armor_penetration = 15 + active_armourpen = 15 reach = 2 /* @@ -395,7 +402,7 @@ desc = "A small, handheld device which emits a high-energy 'blade'." origin_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 3, TECH_ILLEGAL = 4) active_force = 25 - armor_penetration = 25 + active_armourpen = 25 projectile_parry_chance = 40 colorable = TRUE @@ -501,7 +508,7 @@ name = "energy spear" desc = "Concentrated energy forming a sharp tip at the end of a long rod." icon_state = "espear" - armor_penetration = 75 + armor_penetration = 0 sharp = TRUE edge = TRUE force = 5 @@ -511,6 +518,7 @@ reach = 2 w_class = ITEMSIZE_LARGE active_force = 25 + active_armourpen = 75 active_throwforce = 30 active_w_class = ITEMSIZE_HUGE colorable = TRUE diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index cd0190c71e2..cc9e2fa5c78 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -2,7 +2,6 @@ name = "weapon" icon = 'icons/obj/weapons.dmi' hitsound = "swing_hit" - var/can_cleave = FALSE // If true, a 'cleaving' attack will occur. var/cleaving = FALSE // Used to avoid infinite cleaving. /obj/item/weapon/Bump(mob/M as mob) diff --git a/code/modules/examine/descriptions/items.dm b/code/modules/examine/descriptions/items.dm new file mode 100644 index 00000000000..b3004df8cb7 --- /dev/null +++ b/code/modules/examine/descriptions/items.dm @@ -0,0 +1,75 @@ +/obj/item/proc/describe_power() + switch(force) + if(1 to 2) + return "a very small amount of" + if(3 to 5) + return "a small amount of" + if(6 to 10) + return "a modest amount of" + if(11 to 15) + return "a respectable amount of" + if(16 to 20) + return "a serious amount of" + if(21 to 100) + return "a lot of" + +/obj/item/proc/describe_throwpower() + switch(throwforce) + if(1 to 2) + return "a very small amount of" + if(3 to 5) + return "a small amount of" + if(6 to 10) + return "a modest amount of" + if(11 to 15) + return "a respectable amount of" + if(16 to 20) + return "a serious amount of" + if(21 to 100) + return "a lot of" + +/obj/item/proc/describe_penetration() + switch(armor_penetration) + if(0) + return "cannot pierce armor" + if(1 to 20) + return "barely pierces armor" + if(21 to 30) + return "slightly pierces armor" + if(31 to 40) + return "reliably pierces lighter armors" + if(41 to 50) + return "pierces standard-issue armor reliably" + if(51 to 60) + return "pierces most armor reliably" + if(61 to 70) + return "pierces a great deal of armor" + if(71 to 80) + return "pierces the vast majority of armor" + if(81 to 99) + return "almost completely pierces all armor" + if(100) + return "completely and utterly pierces all armor" + +/obj/item/proc/describe_speed() + if(attackspeed > DEFAULT_ATTACK_COOLDOWN) + return "a slow attack speed" + else if(attackspeed < DEFAULT_ATTACK_COOLDOWN) + return "a high attack speed" + else + return "an average attack speed" + +/obj/item/get_description_info() + var/weapon_stats = description_info + "\ +
" + + if(force) + weapon_stats += "\nIf used in melee, it deals [describe_power()] [sharp ? "sharp" : "blunt"] damage, [describe_penetration()], and has [describe_speed()]." + if(throwforce) + weapon_stats += "\nIf thrown, it would deal [describe_throwpower()] [sharp ? "sharp" : "blunt"] damage." + if(can_cleave) + weapon_stats += "\nIt is capable of hitting multiple targets with a single swing." + if(reach > 1) + weapon_stats += "\nIt can attack targets up to [reach] tiles away, and can attack over certain objects." + + return weapon_stats \ No newline at end of file diff --git a/code/modules/examine/descriptions/weapons.dm b/code/modules/examine/descriptions/weapons.dm index 747fa0f75f6..7016d84a9a4 100644 --- a/code/modules/examine/descriptions/weapons.dm +++ b/code/modules/examine/descriptions/weapons.dm @@ -77,6 +77,30 @@ //******* //*Melee* //******* +/* +/obj/item/weapon/melee/baton/proc/describe_agonypower() + switch(agonyforce) + if(1 to 20) + return "a mild amount of" + if(21 to 40) + return "a modest amount of" + if(41 to 60) + return "a moderate amount of" + if(61 to 80) + return "a serious amount of" + if(81 to 100) + return "a significant amount of" + +/obj/item/weapon/melee/baton/get_description_info() + . = ..() + var/baton_stats = description_info + "\ +
" + + if(agonyforce) + baton_stats += "\nIt also inflicts [describe_agonypower()] pain, if charged and active." + + return baton_stats +*/ /obj/item/weapon/melee/baton description_info = "The baton needs to be turned on to apply the stunning effect. Use it in your hand to toggle it on or off. If your intent is \ diff --git a/code/modules/projectiles/guns/energy/gunsword_vr.dm b/code/modules/projectiles/guns/energy/gunsword_vr.dm index cd28874afb4..66efaabfc0a 100644 --- a/code/modules/projectiles/guns/energy/gunsword_vr.dm +++ b/code/modules/projectiles/guns/energy/gunsword_vr.dm @@ -45,12 +45,13 @@ var/active = 0 var/active_force = 30 + var/active_armourpen = 50 var/active_throwforce = 20 var/active_w_class = ITEMSIZE_LARGE var/active_embed_chance = 0 //In the off chance one of these is supposed to embed, you can just tweak this var sharp = FALSE edge = FALSE - armor_penetration = 50 + armor_penetration = 0 flags = NOBLOODY var/lrange = 2 var/lpower = 2 @@ -65,6 +66,7 @@ active = 1 embed_chance = active_embed_chance force = active_force + armor_penetration = active_armourpen throwforce = active_throwforce sharp = TRUE edge = TRUE @@ -84,6 +86,7 @@ active = 0 embed_chance = initial(embed_chance) force = initial(force) + armor_penetration = initial(armor_penetration) throwforce = initial(throwforce) sharp = initial(sharp) edge = initial(edge) diff --git a/vorestation.dme b/vorestation.dme index a045d90495b..440d96e33a1 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2269,6 +2269,7 @@ #include "code\modules\examine\descriptions\containers.dm" #include "code\modules\examine\descriptions\devices.dm" #include "code\modules\examine\descriptions\engineering.dm" +#include "code\modules\examine\descriptions\items.dm" #include "code\modules\examine\descriptions\machines.dm" #include "code\modules\examine\descriptions\medical.dm" #include "code\modules\examine\descriptions\mobs.dm"