Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sun Branch #5938

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ avoid code duplication. This includes items that may sometimes act as a standard
playsound(loc, 'sound/effects/swoosh.ogg', 50, 1, -1)
switch(holdinghand)
if(slot_l_hand)
flick("left_swing", S)
flick("left_swing[swing_icon_mod]", S)
var/dmg_modifier = 1
dmg_modifier = tileattack(user, L, modifier = 1)
dmg_modifier = tileattack(user, C, modifier = dmg_modifier, original_target = A)
tileattack(user, R, modifier = dmg_modifier)
QDEL_IN(S, 2 SECONDS)
if(slot_r_hand)
flick("right_swing", S)
flick("right_swing[swing_icon_mod]", S)
var/dmg_modifier = 1
dmg_modifier = tileattack(user, R, modifier = 1)
dmg_modifier = tileattack(user, C, modifier = dmg_modifier, original_target = A)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/autolathe/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@
name = "Ballistic Mask"
build_path = /obj/item/clothing/head/helmet/faceshield/bmask

//Sun Branch
/datum/design/autolathe/clothing/firefly_glasses
name = "\"Firefly\" Glasses"
build_path = /obj/item/clothing/glasses/firefly_glasses
13 changes: 13 additions & 0 deletions code/datums/autolathe/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,16 @@
/datum/design/autolathe/tool/rpd
name = "rapid piping device"
build_path = /obj/item/rpd

//Sun Branch
/datum/design/autolathe/tool/dawn
name = "\"Crack of Dawn\""
build_path = /obj/item/tool/sword/dawn

/datum/design/autolathe/tool/midday
name = "\"Sunup\""
build_path = /obj/item/tool/sword/midday

/datum/design/autolathe/tool/sun_set
name = "\"Sunset\""
build_path = /obj/item/tool/sword/sun_set
2 changes: 2 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@
var/alt_mode_lossrate = 0.5
var/alt_mode_sharp = FALSE

var/swing_icon_mod = "" //Used for when you make a swing attack, some items may get fancy icons for it

/obj/item/Initialize()

for (var/upgrade_typepath in initialized_upgrades)
Expand Down
14 changes: 14 additions & 0 deletions code/game/objects/items/weapons/autolathe_disk/exoidic.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

//Exoidic disks from random other places.

//Sun Branch
/obj/item/computer_hardware/hard_drive/portable/design/sun_branch
disk_name = "Sun Branch Armerments"
icon_state = "sun_branch_disk"
license = 3
designs = list(
/datum/design/autolathe/clothing/firefly_glasses,
/datum/design/autolathe/tool/dawn = 2,
/datum/design/autolathe/tool/midday,
/datum/design/autolathe/tool/sun_set,
)
126 changes: 126 additions & 0 deletions code/game/objects/items/weapons/tools/cheap_weapons.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
//Shitty loadout weapons
/obj/item/tool/cheap
name = "cheap sword"
desc = "A sword of acceptable quality, mass-produced by Lonestar. It's no work art, but it's sharp enough to get the job done."
icon = 'icons/obj/weapons.dmi'
icon_state = "cheap_sword"
item_state = "cheap_sword"
matter = list(MATERIAL_STEEL = 10, MATERIAL_PLASTIC = 5)
sharp = TRUE
edge = TRUE
w_class = ITEM_SIZE_NORMAL
slot_flags = SLOT_BELT
worksound = WORKSOUND_HARD_SLASH
force = WEAPON_FORCE_ROBUST
armor_divisor = ARMOR_PEN_DEEP

throwforce = WEAPON_FORCE_NORMAL
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
tool_qualities = list(QUALITY_CUTTING = 10, QUALITY_SAWING = 10)
structure_damage_factor = STRUCTURE_DAMAGE_BLADE
w_class = ITEM_SIZE_NORMAL
price_tag = 100

has_alt_mode = TRUE
alt_mode_damagetype = HALLOSS
alt_mode_sharp = FALSE
alt_mode_verbs = list("bashes", "stunts", "wacks", "blunts")
alt_mode_toggle = "switches their stance to avoid using the blade of their weapon"
alt_mode_lossrate = 0.9 //Little loss so people can use these in real gimmics

/obj/item/tool/cheap/axe
name = "cheap tomahawk"
desc = "A tomahawk of acceptable quality, mass-produced by Lonestar. Just expensive enough to be called tactical."
icon_state = "cheap_axe"
item_state = "cheap_axe"
structure_damage_factor = STRUCTURE_DAMAGE_WEAK
attack_verb = list("attacked", "slashed", "chopped", "sliced", "torn", "ripped", "diced", "cut")

/obj/item/tool/cheap/katana
name = "cheap katana"
desc = "A katana of acceptable quality, mass-produced by Lonestar. Easily their best-selling product from this lineup."
icon_state = "katana_old"
item_state = "katana"
force = WEAPON_FORCE_DANGEROUS
armor_divisor = ARMOR_PEN_EXTREME

/obj/item/tool/cheap/spear
name = "cheap spear"
desc = "A spear of acceptable quality, mass-produced by Lonestar. Place sharp end towards enemy."
icon_state = "cheap_spear"
item_state = "cheap_spear"
w_class = ITEM_SIZE_HUGE
slot_flags = SLOT_BACK|SLOT_BELT
throwforce = WEAPON_FORCE_BRUTAL
throw_speed = 3
embed_mult = 1.5
structure_damage_factor = STRUCTURE_DAMAGE_WEAK
tool_qualities = list(QUALITY_CUTTING = 15, QUALITY_WIRE_CUTTING = 10, QUALITY_SCREW_DRIVING = 10)
hitsound = 'sound/weapons/slice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
item_icons = list(
slot_back_str = 'icons/inventory/back/mob.dmi')
item_state_slots = list(
slot_back_str = "cheap_spear"
)
alt_mode_toggle = "switches their stance to strike at targets with the shaft"
alt_mode_lossrate = 0.4
extended_reach = TRUE

/obj/item/tool/cheap/saber
name = "cheap saber"
desc = "A saber of acceptable quality, mass-produced by Lonestar. Probably not fit for parrying, but why not give it a try?"
icon_state = "cheap_saber"
item_state = "cutlass"

//Complex cheap weapon arts
/obj/item/tool/cheap/rapier
name = "cheap cinq rapier"
desc = "A mass-produced copy of a cinq rapier by Lonestar. Is unable to be used for parrying but has some techniques."
icon_state = "cheap_rapier"
item_state = "katana"
force = WEAPON_FORCE_NORMAL
armor_divisor = ARMOR_PEN_EXTREME
clickdelay_offset = -2 //DEFAULT_QUICK_COOLDOWN = 4 so we offset are weapon to quick
var/coin_tracker = 0 //Used to track hits used in fancy modes
alt_mode_toggle = "switches their stance to strike without stabbing"
alt_mode_lossrate = 0.4

/obj/item/tool/cheap/rapier/resolve_attackby(atom/target, mob/user)
clickdelay_offset = -2 //Resets

if(coin_tracker >= 10)
force += 5
icon_state = "cheap_rapier_form_two"
if(coin_tracker >= 20)
if(prob(coin_tracker))
force += 3 //20% more base damage rounded up
clickdelay_offset = -3 //slightly faster attacking

if(coin_tracker >= 25)
coin_tracker = 0
clickdelay_offset = -8 //Refund that click
icon_state = "cheap_rapier"


if(ismob(target))
var/mob/living/M = target
if(M.stat != DEAD)
coin_tracker += 1

.=..()
refresh_upgrades()

//So this is a bit missleading, reach attacks do *not* chain themselfs so you must range one attack folks
if(coin_tracker >= 5 && coin_tracker <= 10)
extended_reach = TRUE
icon_state = "cheap_rapier_form_one"


/obj/item/tool/cheap/rapier/dropped()
coin_tracker = 0
refresh_upgrades()
update_icon()
icon_state = "cheap_rapier"
..()
Loading
Loading