Skip to content

Commit

Permalink
Merge pull request #2204 from TheOneAndOnlyCreeperJoe/patch-16
Browse files Browse the repository at this point in the history
Adds Cluwnes as a Wizard Spell and Cluwne Bans
  • Loading branch information
doobiedoo23 committed Apr 27, 2016
2 parents 2440975 + 024df3e commit adaa12b
Show file tree
Hide file tree
Showing 28 changed files with 210 additions and 19 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/genetics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define COUGH "Cough"
#define DWARFISM "Dwarfism"
#define CLOWNMUT "Clumsiness"
#define CLUWNEMUT "Cluwne"
#define TOURETTES "Tourettes Syndrome"
#define DEAFMUT "Deafness"
#define BLINDMUT "Blindness"
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ var/datum/subsystem/job/SSjob
HandleFeedbackGathering()

for(var/mob/new_player/player in unassigned)
if(jobban_isbanned(player, "catban"))
if(jobban_isbanned(player, "catban" || jobban_isbanned(player, "cluwneban")))
AssignRole(player, "Assistant")

//People who wants to be assistants, sure, go on.
Expand Down Expand Up @@ -446,4 +446,4 @@ var/datum/subsystem/job/SSjob
Debug("Popcap overflow Check observer located, Player: [player]")
player << "<b>You have failed to qualify for any job you desired.</b>"
unassigned -= player
player.ready = 0
player.ready = 0
50 changes: 49 additions & 1 deletion code/datums/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,54 @@ var/thanks_tobba = 'icons/fonts/runescape_uf.ttf'
return
owner.disabilities &= ~CLUMSY

/datum/mutation/human/cluwne

name = "Cluwne"
quality = NEGATIVE
text_gain_indication = "<span class='danger'>You feel like your brain is tearing itself apart.</span>"

/datum/mutation/human/cluwne/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.disabilities |= CLUMSY
owner.adjustBrainLoss(200)

var/mob/living/carbon/human/H = owner

if(!istype(H.wear_mask, /obj/item/clothing/mask/gas/clown_hat/cluwne))
if(!H.unEquip(H.wear_mask))
qdel(H.wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat/cluwne(H), slot_wear_mask)
if(!istype(H.wear_mask, /obj/item/clothing/under/rank/clown/cluwne))
if(!H.unEquip(H.w_uniform))
qdel(H.w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown/cluwne(H), slot_w_uniform)
if(!istype(H.shoes, /obj/item/clothing/shoes/clown_shoes/cluwne))
if(!H.unEquip(H.shoes))
qdel(H.shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes/cluwne(H), slot_shoes)

owner.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/white(owner), slot_gloves) // this is purely for cosmetic purposes incase they aren't wearing anything in that slot
owner.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(owner), slot_back) // ditto

/datum/mutation/human/cluwne/on_life(mob/living/carbon/human/owner)
if((prob(15) && owner.paralysis <= 1))
owner.adjustBrainLoss(200) // don't want to code special manitol snowflake interactions
switch(rand(1, 6))
if(1)
owner.say("HONK")
if(2 to 5)
owner.emote("scream")
if(6)
owner.Stun(1)
owner.Weaken(1)
owner.Jitter(500)

/datum/mutation/human/cluwne/on_losing(mob/living/carbon/human/owner)
owner.adjust_fire_stacks(1)
owner.IgniteMob()
owner.dna.add_mutation(CLUWNEMUT)

/datum/mutation/human/tourettes

name = "Tourettes Syndrome"
Expand Down Expand Up @@ -620,4 +668,4 @@ var/thanks_tobba = 'icons/fonts/runescape_uf.ttf'
mut_overlay.Remove(I)
mut_overlay |= V
overlays_standing[CM.layer_used] = mut_overlay
apply_overlay(CM.layer_used)
apply_overlay(CM.layer_used)
43 changes: 43 additions & 0 deletions code/datums/spells/barnyard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,46 @@
playsound(get_turf(target), mSounds[randM], 50, 1)

flick("e_flash", target.flash)

/obj/effect/proc_holder/spell/targeted/cluwnecurse
name = "Curse of the Cluwne"
desc = "This spell dooms the fate of any unlucky soul to the live of a pitiful cluwne, a terrible creature that is hunted for fun."
school = "transmutation"
charge_type = "recharge"
charge_max = 600
charge_counter = 0
clothes_req = 1
stat_allowed = 0
invocation = "CLU WO'NIS CA'TE'BEST'IS MAXIMUS!"
invocation_type = "shout"
range = 7
cooldown_min = 75
selection_type = "range"
var/list/compatible_mobs = list(/mob/living/carbon/human)

action_icon_state = "barn"

/obj/effect/proc_holder/spell/targeted/cluwnecurse/cast(list/targets, mob/user = usr)
if(!targets.len)
user << "<span class='notice'>No target found in range.</span>"
return

var/mob/living/carbon/target = targets[1]

if(!(target.type in compatible_mobs))
user << "<span class='notice'>You are unable to curse [target]!</span>"
return

if(!(target in oview(range)))
user << "<span class='notice'>They are too far away!</span>"
return

// here begins the cluwning

target.dna.add_mutation(CLUWNEMUT)
target.emote("scream")

target.visible_message("<span class='danger'>[target]'s body glows green, the glow dissipating only to leave behind a cluwne formerly known as [target]!</span>", \
"<span class='danger'>Your brain feels like it's being torn apart, and after a short while, you notice that you've become a cluwne!</span>")

flick("e_flash", target.flash)
1 change: 1 addition & 0 deletions code/game/gamemodes/cult/cult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
if(!istype(mind.current, /mob/living/carbon)) return 0
if(istype(mind.current, /mob/living/carbon/human) && (mind.assigned_role in list("Captain", "Chaplain"))) return 0
if(jobban_isbanned(mind.current, "catban")) return 0
if(jobban_isbanned(mind.current, "cluwneban")) return 0
if(isloyal(mind.current))
return 0
if (ticker.mode.name == "cult") //redundent?
Expand Down
6 changes: 4 additions & 2 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@
var/list/antag_canadates = list()

for(var/mob/living/carbon/human/H in living_crew)
if(H.client && H.client.prefs.allow_midround_antag && !jobban_isbanned(H, "catban"))
antag_canadates += H
if(H.client && H.client.prefs.allow_midround_antag)
if(!jobban_isbanned(H, "catban"))
if(!jobban_isbanned(H, "cluwneban"))
antag_canadates += H

if(!antag_canadates)
message_admins("Convert_roundtype failed due to no antag canadates.")
Expand Down
3 changes: 2 additions & 1 deletion code/game/gamemodes/shadowling/shadowling_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
listclearnulls(ticker.mode.thralls)
if(!(user.mind in ticker.mode.shadows)) return
if(jobban_isbanned(usr, "catban")) return
if(jobban_isbanned(usr, "cluwneban")) return
if(user.dna.species.id != "shadowling")
if(ticker.mode.thralls.len >= 5)
revert_cast()
Expand Down Expand Up @@ -891,4 +892,4 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
for(var/mob/M in mob_list)
if(is_shadow_or_thrall(M) || (M in dead_mob_list))
M << "<span class='shadowling'><b>\[Ascendant\]<i> [user.real_name]</i>: [text]</b></span>" //Bigger text for ascendants.
log_say("[user.real_name]/[user.key] : [text]")
log_say("[user.real_name]/[user.key] : [text]")
6 changes: 6 additions & 0 deletions code/game/gamemodes/wizard/spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@
name = "Barnyard Curse"
spell_type = /obj/effect/proc_holder/spell/targeted/barnyardcurse
log_name = "BC"
cost = 1

/datum/spellbook_entry/cluwnecurse
name = "Clown Curse"
spell_type = /obj/effect/proc_holder/spell/targeted/cluwnecurse
log_name = "CC"

/datum/spellbook_entry/charge
name = "Charge"
Expand Down
5 changes: 4 additions & 1 deletion code/game/verbs/suicide.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,7 @@
if(!canmove || restrained()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))"
return
return 1
if((src.dna.check_mutation(CLUWNEMUT)))
src << "Cluwnes cannot suicide! Find a natural means of death!"
return
return 1
4 changes: 4 additions & 0 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,10 @@
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=catban;jobban4=\ref[M]'><font color=red>[replacetext("Cat Ban", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=catban;jobban4=\ref[M]'>[replacetext("Cat Ban", " ", "&nbsp")]</a></td>"
if(jobban_isbanned(M, "cluwneban"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=cluwneban;jobban4=\ref[M]'><font color=red>[replacetext("Cluwne Ban", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=cluwneban;jobban4=\ref[M]'>[replacetext("Cluwne Ban", " ", "&nbsp")]</a></td>"
/* //Malfunctioning AI //Removed Malf-bans because they're a pain to impliment
if(jobban_isbanned(M, "malf AI") || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=malf AI;jobban4=\ref[M]'><font color=red>[replacetext("Malf AI", " ", "&nbsp")]</font></a></td>"
Expand Down
17 changes: 11 additions & 6 deletions code/modules/assembly/flash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,17 @@
if(M.stat == CONSCIOUS)
M.mind_initialize() //give them a mind datum if they don't have one.
var/resisted
if(!isloyal(M) && !jobban_isbanned(M, "catban"))
if(user.mind in ticker.mode.head_revolutionaries)
if(ticker.mode.add_revolutionary(M.mind))
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
else
resisted = 1
if(!isloyal(M))
if(jobban_isbanned(M, "catban"))
resisted = 1
if(jobban_isbanned(M, "cluwneban"))
resisted = 1
else
if(user.mind in ticker.mode.head_revolutionaries)
if(ticker.mode.add_revolutionary(M.mind))
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
else
resisted = 1
else
resisted = 1

Expand Down
11 changes: 9 additions & 2 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ var/list/preferences_datums = list()
for (var/i in special_roles)
if(jobban_isbanned(user, "catban"))
dat += "<b>Be [capitalize(i)]:</b> <font color=red>CAT-BANNED</font><br>"
if(jobban_isbanned(user, "cluwneban"))
dat += "<b>Be [capitalize(i)]:</b> <font color=red>CLUWNE-BANNED</font><br>"
else
if(jobban_isbanned(user, i))
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;jobbancheck=[i]'>BANNED</a><br>"
Expand Down Expand Up @@ -427,9 +429,12 @@ var/list/preferences_datums = list()
HTML += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
var/rank = job.title
lastJob = job
if(jobban_isbanned(user, "catban") && rank != "Assistant")
if(jobban_isbanned(user, "catban") && rank != "Assistant")
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[CAT-BANNED\]</b></font></td></tr>"
continue
if(jobban_isbanned(user, "cluwneban") && rank != "Assistant")
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[CLUWNE-BANNED\]</b></font></td></tr>"
continue
if(jobban_isbanned(user, rank))
HTML += "<font color=red>[rank]</font></td><td><a href='?_src_=prefs;jobbancheck=[rank]'> BANNED</a></td></tr>"
continue
Expand Down Expand Up @@ -485,6 +490,8 @@ var/list/preferences_datums = list()
if(rank == "Assistant")//Assistant is special
if(jobban_isbanned(user, "catban"))
HTML += "<font color=orange>Mandatory</font>"
if(jobban_isbanned(user, "cluwneban"))
HTML += "<font color=orange>Mandatory</font>"
else
if(job_civilian_low & ASSISTANT)
HTML += "<font color=green>Yes</font>"
Expand Down Expand Up @@ -1091,4 +1098,4 @@ var/list/preferences_datums = list()
if(icon_updates)
character.update_body()
character.update_hair()
character.update_mutcolor()
character.update_mutcolor()
20 changes: 19 additions & 1 deletion code/modules/clothing/masks/gasmask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,24 @@
M << "Your Clown Mask has now morphed into [choice], all praise the Honk Mother!"
return 1

/obj/item/clothing/mask/gas/clown_hat/cluwne
icon_state = "cluwne"
item_state = "cluwne"
unacidable = 1
burn_state = -1
flags = NODROP | MASKINTERNALS

/obj/item/clothing/mask/gas/clown_hat/cluwne/equipped(mob/user, slot)
if(!ishuman(user))
return
if(slot == slot_wear_mask)
var/mob/living/carbon/human/H = user
H.dna.add_mutation(CLUWNEMUT)
return

/obj/item/clothing/mask/gas/clown_hat/cluwnee/dropped(mob/user)
qdel(src)

/obj/item/clothing/mask/gas/sexyclown
name = "sexy-clown wig and mask"
desc = "A feminine clown mask for the dabbling crossdressers or female entertainers."
Expand Down Expand Up @@ -172,4 +190,4 @@ obj/item/clothing/mask/gas/tiki_mask/attack_self(mob/user)
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
M << "The Tiki Mask has now changed into the [choice] Mask!"
return 1
return 1
12 changes: 11 additions & 1 deletion code/modules/clothing/shoes/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@
else
footstep++

/obj/item/clothing/shoes/clown_shoes/cluwne
icon_state = "cluwne"
item_state = "cluwne"
unacidable = 1
burn_state = -1
flags = NODROP

/obj/item/clothing/shoes/clown_shoes/cluwne/dropped(mob/user)
qdel(src)

/obj/item/clothing/shoes/jackboots
name = "jackboots"
desc = "Nanotrasen-issue Security combat boots for combat scenarios or combat situations. All combat, all the time."
Expand Down Expand Up @@ -174,4 +184,4 @@
desc = "A pair of roller skates, syndicate style. Will make you go faster."
icon_state = "magboots-old1"
item_state = "magboots-old1"
slowdown = -1
slowdown = -1
26 changes: 25 additions & 1 deletion code/modules/clothing/under/jobs/civilian.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,30 @@
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1)
return 0

/obj/item/clothing/under/rank/clown/cluwne
alternate_screams = list('sound/voice/cluwnelaugh1.ogg','sound/voice/cluwnelaugh2.ogg','sound/voice/cluwnelaugh3.ogg')
icon_state = "cluwne"
item_state = "cluwne"
item_color = "cluwne"
unacidable = 1
burn_state = -1
flags = NODROP

/obj/item/clothing/under/rank/clown/cluwne/equipped(mob/living/carbon/user, slot)
if(slot == slot_w_uniform)
user.add_screams(src.alternate_screams) // using src to clarify which list we want
else
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.reindex_screams() // Use the more robust version
else
user.reindex_screams()

return ..()

/obj/item/clothing/under/rank/clown/cluwne/dropped(mob/user)
qdel(src)

/obj/item/clothing/under/rank/head_of_personnel
desc = "It's a jumpsuit worn by someone who works in the position of \"Head of Personnel\"."
name = "head of personnel's jumpsuit"
Expand Down Expand Up @@ -168,4 +192,4 @@
name = "shaft miner's jumpsuit"
icon_state = "miner"
item_state = "miner"
item_color = "miner"
item_color = "miner"
7 changes: 6 additions & 1 deletion code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Ghost"
set desc = "Relinquish your life and enter the land of the dead."

var/mob/living/carbon/H = src

if(stat != DEAD)
succumb()
if(stat == DEAD)
ghostize(1)
if((H.dna.check_mutation(CLUWNEMUT)) & !(stat == DEAD))
H << "Cluwnes cannot ghost until they've died! Find a natural means of death!"
return
else
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost") return //didn't want to ghost after-all
Expand Down Expand Up @@ -394,4 +399,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//We don't want to update the current var
//But we will still carry a mind.
/mob/dead/observer/mind_initialize()
return
return
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
if(jobban_isbanned(src, "catban") && src.dna.species.name != "Tarajan")
src.set_species(/datum/species/cat, icon_update=1)

if(jobban_isbanned(src, "cluwneban" && !src.dna.check_mutation(CLUWNEMUT)))
src.dna.add_mutation(CLUWNEMUT)

tinttotal = tintcheck() //here as both hud updates and status updates call it

if(..())
Expand Down
Loading

0 comments on commit adaa12b

Please sign in to comment.