Skip to content

Commit

Permalink
Merge pull request #3247 from OverDriveZ/kelpmagic-trait
Browse files Browse the repository at this point in the history
WANDerful: Quirk to use wands, creatures don't need the quirk to use them [ready to merge]
  • Loading branch information
Tk420634 authored Oct 3, 2023
2 parents 586ecfa + 34ddfa4 commit 9d4eaec
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
#define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing.
#define TRAIT_FAST_PUMP "fast_pump"
#define TRAIT_WAND_PROFICIENT "wand_proficient"
#define TRAIT_AUTO_DRAW "auto_draw" //can use bows good
#define TRAIT_PLAY_DEAD "play_dead" // gives 10u ghoul powder every *deathgasp
#define TRAIT_NO_PROCESS_FOOD "no-process-food" // You don't get benefits from nutriment, nor nutrition from reagent consumables
Expand Down
13 changes: 13 additions & 0 deletions code/datums/traits/good.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,19 @@ GLOBAL_LIST_INIT(weapons_of_texarkana, list(
lose_text = span_danger("After picking some 250 year old cosmoline out from under one of your nails you realize that... Uh, no, the Mosin Nagant is a piece of shit.")
locked = FALSE

/datum/quirk/wandproficient
name = "Wand Proficient"
desc = "You know how to use magic wands!"
value = 0
category = "Ranged Quirks"
mechanics = "You can use magic wands, but the cost for such is to not being able to learn a martial art. The moment you'll learn one, you'll never be able to use wands!"
// conflicts = list(
// )
mob_trait = TRAIT_WAND_PROFICIENT
gain_text = span_notice("You feel magic flowing through your veins!")
lose_text = span_danger("The magic within you fades away.")
locked = FALSE

/datum/quirk/playdead
name = "Play Dead"
desc = "You're good at acting!"
Expand Down
14 changes: 14 additions & 0 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ ATTACHMENTS
var/prefered_power
/// Does the gun use the bullet's sounds, instead of its own?
var/use_casing_sounds
/// Is one of Kelp's wands?
var/is_kelpwand = FALSE
/// Cooldown between times the gun will tell you it shot, 0.5 seconds cus its not super duper important
COOLDOWN_DECLARE(shoot_message_antispam)

Expand Down Expand Up @@ -552,6 +554,18 @@ ATTACHMENTS
if(on_cooldown(user))
return
clear_cooldown_mods()

if(is_kelpwand)
if(iscarbon(user))
if(type == /obj/item/gun/magic/wand/kelpmagic/magicmissile)
if(HAS_TRAIT(user, TRAIT_NOGUNS))
to_chat(user, span_danger("You don't know how to use magic wands!"))
return
else
if(HAS_TRAIT(user, TRAIT_NOGUNS) || !HAS_TRAIT(user, TRAIT_WAND_PROFICIENT))
to_chat(user, span_danger("You don't know how to use magic wands!"))
return

if(safety)
to_chat(user, span_danger("The gun's safety is on!"))
shoot_with_empty_chamber(user)
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/magic/wand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
throwforce = 10 // Same.
fire_sound = 'sound/weapons/pulse2.ogg'
draw_time = GUN_DRAW_QUICK
is_kelpwand = TRUE
init_firemodes = list(
/datum/firemode/semi_auto/slow
)
Expand Down

0 comments on commit 9d4eaec

Please sign in to comment.