Merge remote-tracking branch 'upstream/dev-freeze' into dev

Conflicts:
	code/game/gamemodes/cult/runes.dm
	code/game/objects/items/weapons/implants/implantcase.dm
	code/game/objects/items/weapons/melee/energy.dm
	code/modules/mob/living/carbon/human/emote.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/mob/living/carbon/human/human_attackhand.dm
	code/modules/mob/living/silicon/robot/drone/drone.dm
	code/modules/mob/living/silicon/robot/emote.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/nano/modules/crew_monitor.dm
	code/modules/organs/organ_internal.dm
This commit is contained in:
GinjaNinja32
2015-08-11 18:47:05 +01:00
60 changed files with 714 additions and 580 deletions
@@ -1,27 +0,0 @@
/spell/targeted/disintegrate
name = "Disintegrate"
desc = "This spell instantly kills somebody adjacent to you with the vilest of magick."
school = "evocation"
charge_max = 600
spell_flags = NEEDSCLOTHES
invocation = "EI NATH"
invocation_type = SpI_SHOUT
range = 1
cooldown_min = 200 //100 deciseconds reduction per rank
sparks_spread = 1
sparks_amt = 4
hud_state = "wiz_disint"
/spell/targeted/disintegrate/cast(var/list/targets)
..()
for(var/mob/living/target in targets)
if(ishuman(target))
var/mob/living/carbon/C = target
if(!C.has_brain()) // Their brain is already taken out
var/obj/item/organ/brain/B = new(C.loc)
B.transfer_identity(C)
target.gib()
return
@@ -0,0 +1,40 @@
//You can set duration to 0 to have the items last forever
/spell/targeted/equip_item
name = "equipment spell"
var/list/equipped_summons = list() //assoc list of text ids and paths to spawn
var/list/summoned_items = list() //list of items we summoned and will dispose when the spell runs out
var/delete_old = 1 //if the item previously in the slot is deleted - otherwise, it's dropped
/spell/targeted/equip_item/cast(list/targets, mob/user = usr)
..()
for(var/mob/living/L in targets)
for(var/slot_id in equipped_summons)
var/to_create = equipped_summons[slot_id]
slot_id = text2num(slot_id) //because the index is text, we access this instead
var/obj/item/new_item = summon_item(to_create)
var/obj/item/old_item = L.get_equipped_item(slot_id)
L.equip_to_slot(new_item, slot_id)
if(old_item)
L.remove_from_mob(old_item)
if(delete_old)
qdel(old_item)
else
old_item.loc = L.loc
if(duration)
summoned_items += new_item //we store it in a list to remove later
if(duration)
spawn(duration)
for(var/obj/item/to_remove in summoned_items)
if(istype(to_remove.loc, /mob))
var/mob/M = to_remove.loc
M.remove_from_mob(to_remove)
qdel(to_remove)
/spell/targeted/equip_item/proc/summon_item(var/newtype)
return new newtype
@@ -1,35 +1,39 @@
/spell/targeted/horsemask
name = "Curse of the Horseman"
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
school = "transmutation"
charge_type = Sp_RECHARGE
charge_max = 150
charge_counter = 0
spell_flags = 0
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
invocation_type = SpI_SHOUT
range = 7
max_targets = 1
cooldown_min = 30 //30 deciseconds reduction per rank
selection_type = "range"
compatible_mobs = list(/mob/living/carbon/human)
hud_state = "wiz_horse"
/spell/targeted/horsemask/cast(list/targets, mob/user = usr)
..()
for(var/mob/living/target in targets)
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.canremove = 0 //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
var/obj/old_mask = target.wear_mask
if(old_mask)
target.drop_from_inventory(old_mask)
qdel(old_mask) //get rid of this shit
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
flick("e_flash", target.flash)
/spell/targeted/equip_item/horsemask
name = "Curse of the Horseman"
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
school = "transmutation"
charge_type = Sp_RECHARGE
charge_max = 150
charge_counter = 0
spell_flags = 0
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
invocation_type = SpI_SHOUT
range = 7
max_targets = 1
cooldown_min = 30 //30 deciseconds reduction per rank
selection_type = "range"
compatible_mobs = list(/mob/living/carbon/human)
hud_state = "wiz_horse"
/spell/targeted/equip_item/horsemask/New()
..()
equipped_summons = list("[slot_wear_mask]" = /obj/item/clothing/mask/horsehead)
/spell/targeted/equip_item/horsemask/cast(list/targets, mob/user = usr)
..()
for(var/mob/living/target in targets)
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
flick("e_flash", target.flash)
/spell/targeted/equip_item/horsemask/summon_item(var/new_type)
var/obj/item/new_item = new new_type
new_item.canremove = 0 //curses!
new_item.unacidable = 1
if(istype(new_item, /obj/item/clothing/mask/horsehead))
var/obj/item/clothing/mask/horsehead/magichead = new_item
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
return new_item
@@ -1,21 +0,0 @@
/spell/targeted/flesh_to_stone
name = "Flesh to Stone"
desc = "This spell turns a single person into an inert statue for a long period of time."
school = "transmutation"
charge_max = 600
spell_flags = NEEDSCLOTHES
range = 3
max_targets = 1
invocation = "STAUN EI"
invocation_type = SpI_SHOUT
amt_stunned = 5//just exists to make sure the statue "catches" them
cooldown_min = 200 //100 deciseconds reduction per rank
hud_state = "wiz_statue"
/spell/targeted/flesh_to_stone/cast(var/list/targets, mob/user)
..()
for(var/mob/living/target in targets)
new /obj/structure/closet/statue(target.loc, target) //makes the statue
return
+1 -1
View File
@@ -57,7 +57,7 @@ code\game\dna\genes\goon_powers.dm
spell_flags = Z2NOCAST | NEEDSCLOTHES | INCLUDEUSER
invocation = "BIRUZ BENNAR"
invocation_type = SpI_SHOUT
message = "\blue You feel strong! You feel a pressure building behind your eyes!"
message = "<span class='notice'>You feel strong! You feel a pressure building behind your eyes!</span>"
range = 0
max_targets = 1
@@ -51,7 +51,10 @@
ghost.spell_list = victim.spell_list//If they have spells, transfer them. Now we basically have a backup mob.
caster.mind.transfer_to(victim)
victim.spell_list = caster.spell_list//Now they are inside the victim's body.
victim.spell_list = list() //clear those out
for(var/spell/S in caster.spell_list)
victim.add_spell(S) //Now they are inside the victim's body - this also generates the HUD
caster.spell_list = list() //clean that out as well
if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster.
for(var/V in caster.mind.special_verbs)//Not too important but could come into play.
@@ -59,7 +62,9 @@
ghost.mind.transfer_to(caster)
caster.key = ghost.key //have to transfer the key since the mind was not active
caster.spell_list = ghost.spell_list
for(var/spell/S in ghost.spell_list)
caster.add_spell(S)
ghost.spell_list = list()
if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here.
for(var/V in caster.mind.special_verbs)
@@ -71,4 +76,4 @@
//After a certain amount of time the victim gets a message about being in a different body.
spawn(msg_wait)
caster << "\red You feel woozy and lightheaded. <b>Your body doesn't seem like your own.</b>"
caster << "<span class='danger'>You feel woozy and lightheaded. Your body doesn't seem like your own.</span>"
+144 -144
View File
@@ -1,145 +1,145 @@
/*
Targeted spells (with the exception of dumbfire) select from all the mobs in the defined range
Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are explained in setup.dm
*/
/spell/targeted //can mean aoe for mobs (limited/unlimited number) or one target mob
var/max_targets = 1 //leave 0 for unlimited targets in range, more for limited number of casts (can all target one guy, depends on target_ignore_prev) in range
var/target_ignore_prev = 1 //only important if max_targets > 1, affects if the spell can be cast multiple times at one person from one cast
var/amt_weakened = 0
var/amt_paralysis = 0
var/amt_stunned = 0
var/amt_dizziness = 0
var/amt_confused = 0
var/amt_stuttering = 0
//set to negatives for healing
var/amt_dam_fire = 0
var/amt_dam_brute = 0
var/amt_dam_oxy = 0
var/amt_dam_tox = 0
var/amt_eye_blind = 0
var/amt_eye_blurry = 0
var/list/compatible_mobs = list()
/spell/targeted/choose_targets(mob/user = usr)
var/list/targets = list()
if(max_targets == 0) //unlimited
if(range == -2)
targets = living_mob_list
else
for(var/mob/living/target in view_or_range(range, user, selection_type))
targets += target
else if(max_targets == 1) //single target can be picked
if((range == 0 || range == -1) && spell_flags & INCLUDEUSER)
targets += user
else
var/list/possible_targets = list()
var/list/starting_targets
if(range == -2)
starting_targets = living_mob_list
else
starting_targets = view_or_range(range, user, selection_type)
for(var/mob/living/M in starting_targets)
if(!(spell_flags & INCLUDEUSER) && M == user)
continue
if(compatible_mobs && compatible_mobs.len)
if(!is_type_in_list(M, compatible_mobs)) continue
if(compatible_mobs && compatible_mobs.len && !is_type_in_list(M, compatible_mobs))
continue
possible_targets += M
if(possible_targets.len)
if(spell_flags & SELECTABLE) //if we are allowed to choose. see setup.dm for details
var/mob/temp_target = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
if(temp_target)
targets += temp_target
else
targets += pick(possible_targets)
//Adds a safety check post-input to make sure those targets are actually in range.
else
var/list/possible_targets = list()
var/list/starting_targets
if(range == -2)
starting_targets = living_mob_list
else
starting_targets = view_or_range(range, user, selection_type)
for(var/mob/living/target in starting_targets)
if(!(spell_flags & INCLUDEUSER) && target == user)
continue
if(compatible_mobs && !is_type_in_list(target, compatible_mobs))
continue
possible_targets += target
if(spell_flags & SELECTABLE)
for(var/i = 1; i<=max_targets, i++)
if(!possible_targets.len)
break
var/mob/M = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
if(!M)
break
if(range != -2)
if(!(M in view_or_range(range, user, selection_type)))
continue
targets += M
possible_targets -= M
else
for(var/i=1,i<=max_targets,i++)
if(!possible_targets.len)
break
if(target_ignore_prev)
var/target = pick(possible_targets)
possible_targets -= target
targets += target
else
targets += pick(possible_targets)
if(!(spell_flags & INCLUDEUSER) && (user in targets))
targets -= user
if(compatible_mobs && compatible_mobs.len)
for(var/mob/living/target in targets) //filters out all the non-compatible mobs
if(!is_type_in_list(target, compatible_mobs))
targets -= target
return targets
/spell/targeted/cast(var/list/targets, mob/user)
for(var/mob/living/target in targets)
if(range >= 0)
if(!(target in view_or_range(range, user, selection_type))) //filter at time of casting
targets -= target
continue
apply_spell_damage(target)
/spell/targeted/proc/apply_spell_damage(mob/living/target)
target.adjustBruteLoss(amt_dam_brute)
target.adjustFireLoss(amt_dam_fire)
target.adjustToxLoss(amt_dam_tox)
target.adjustOxyLoss(amt_dam_oxy)
//disabling
target.Weaken(amt_weakened)
target.Paralyse(amt_paralysis)
target.Stun(amt_stunned)
if(amt_weakened || amt_paralysis || amt_stunned)
if(target.buckled)
target.buckled = null
target.eye_blind += amt_eye_blind
target.eye_blurry += amt_eye_blurry
target.dizziness += amt_dizziness
target.confused += amt_confused
/*
Targeted spells (with the exception of dumbfire) select from all the mobs in the defined range
Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are explained in setup.dm
*/
/spell/targeted //can mean aoe for mobs (limited/unlimited number) or one target mob
var/max_targets = 1 //leave 0 for unlimited targets in range, more for limited number of casts (can all target one guy, depends on target_ignore_prev) in range
var/target_ignore_prev = 1 //only important if max_targets > 1, affects if the spell can be cast multiple times at one person from one cast
var/amt_weakened = 0
var/amt_paralysis = 0
var/amt_stunned = 0
var/amt_dizziness = 0
var/amt_confused = 0
var/amt_stuttering = 0
//set to negatives for healing
var/amt_dam_fire = 0
var/amt_dam_brute = 0
var/amt_dam_oxy = 0
var/amt_dam_tox = 0
var/amt_eye_blind = 0
var/amt_eye_blurry = 0
var/list/compatible_mobs = list()
/spell/targeted/choose_targets(mob/user = usr)
var/list/targets = list()
if(max_targets == 0) //unlimited
if(range == -2)
targets = living_mob_list
else
for(var/mob/living/target in view_or_range(range, holder, selection_type))
targets += target
else if(max_targets == 1) //single target can be picked
if((range == 0 || range == -1) && spell_flags & INCLUDEUSER)
targets += user
else
var/list/possible_targets = list()
var/list/starting_targets
if(range == -2)
starting_targets = living_mob_list
else
starting_targets = view_or_range(range, holder, selection_type)
for(var/mob/living/M in starting_targets)
if(!(spell_flags & INCLUDEUSER) && M == user)
continue
if(compatible_mobs && compatible_mobs.len)
if(!is_type_in_list(M, compatible_mobs)) continue
if(compatible_mobs && compatible_mobs.len && !is_type_in_list(M, compatible_mobs))
continue
possible_targets += M
if(possible_targets.len)
if(spell_flags & SELECTABLE) //if we are allowed to choose. see setup.dm for details
var/mob/temp_target = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
if(temp_target)
targets += temp_target
else
targets += pick(possible_targets)
//Adds a safety check post-input to make sure those targets are actually in range.
else
var/list/possible_targets = list()
var/list/starting_targets
if(range == -2)
starting_targets = living_mob_list
else
starting_targets = view_or_range(range, holder, selection_type)
for(var/mob/living/target in starting_targets)
if(!(spell_flags & INCLUDEUSER) && target == user)
continue
if(compatible_mobs && !is_type_in_list(target, compatible_mobs))
continue
possible_targets += target
if(spell_flags & SELECTABLE)
for(var/i = 1; i<=max_targets, i++)
if(!possible_targets.len)
break
var/mob/M = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
if(!M)
break
if(range != -2)
if(!(M in view_or_range(range, holder, selection_type)))
continue
targets += M
possible_targets -= M
else
for(var/i=1,i<=max_targets,i++)
if(!possible_targets.len)
break
if(target_ignore_prev)
var/target = pick(possible_targets)
possible_targets -= target
targets += target
else
targets += pick(possible_targets)
if(!(spell_flags & INCLUDEUSER) && (user in targets))
targets -= user
if(compatible_mobs && compatible_mobs.len)
for(var/mob/living/target in targets) //filters out all the non-compatible mobs
if(!is_type_in_list(target, compatible_mobs))
targets -= target
return targets
/spell/targeted/cast(var/list/targets, mob/user)
for(var/mob/living/target in targets)
if(range >= 0)
if(!(target in view_or_range(range, holder, selection_type))) //filter at time of casting
targets -= target
continue
apply_spell_damage(target)
/spell/targeted/proc/apply_spell_damage(mob/living/target)
target.adjustBruteLoss(amt_dam_brute)
target.adjustFireLoss(amt_dam_fire)
target.adjustToxLoss(amt_dam_tox)
target.adjustOxyLoss(amt_dam_oxy)
//disabling
target.Weaken(amt_weakened)
target.Paralyse(amt_paralysis)
target.Stun(amt_stunned)
if(amt_weakened || amt_paralysis || amt_stunned)
if(target.buckled)
target.buckled = null
target.eye_blind += amt_eye_blind
target.eye_blurry += amt_eye_blurry
target.dizziness += amt_dizziness
target.confused += amt_confused
target.stuttering += amt_stuttering