Merge pull request #1792 from Neerti/5/28/2016_ling_changes

Some Changeling Changes
This commit is contained in:
Yoshax
2016-05-30 13:53:18 +01:00
3 changed files with 77 additions and 52 deletions

View File

@@ -6,10 +6,10 @@
Shocking someone costs ten chemicals per use." Shocking someone costs ten chemicals per use."
enhancedtext = "Shocking biologicals without grabbing only requires five chemicals, and has more disabling power." enhancedtext = "Shocking biologicals without grabbing only requires five chemicals, and has more disabling power."
genomecost = 2 genomecost = 2
verbpath = /mob/proc/changeling_bioelectrogenesis verbpath = /mob/living/carbon/human/proc/changeling_bioelectrogenesis
//Recharge whatever's in our hand, or shock people. //Recharge whatever's in our hand, or shock people.
/mob/proc/changeling_bioelectrogenesis() /mob/living/carbon/human/proc/changeling_bioelectrogenesis()
set category = "Changeling" set category = "Changeling"
set name = "Bioelectrogenesis (20 + 10/shock)" set name = "Bioelectrogenesis (20 + 10/shock)"
set desc = "Recharges anything in your hand, or shocks people." set desc = "Recharges anything in your hand, or shocks people."
@@ -33,19 +33,28 @@
return 0 return 0
else else
// Handle glove conductivity.
var/obj/item/clothing/gloves/gloves = src.gloves
var/siemens = 1
if(gloves)
siemens = gloves.siemens_coefficient
//If we're grabbing someone, electrocute them. //If we're grabbing someone, electrocute them.
if(istype(held_item,/obj/item/weapon/grab)) if(istype(held_item,/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = held_item var/obj/item/weapon/grab/G = held_item
if(G.affecting) if(G.affecting)
G.affecting.electrocute_act(10,src,1.0,BP_TORSO) G.affecting.electrocute_act(10 * siemens,src,1.0,BP_TORSO)
var/agony = 80 //Does more than if hit with an electric hand, since grabbing is slower. var/agony = 80 * siemens //Does more than if hit with an electric hand, since grabbing is slower.
G.affecting.stun_effect_act(0, agony, BP_TORSO, src) G.affecting.stun_effect_act(0, agony, BP_TORSO, src)
msg_admin_attack("[key_name(src)] shocked [key_name(G.affecting)] with the [src].") msg_admin_attack("[key_name(src)] shocked [key_name(G.affecting)] with the [src].")
if(siemens)
visible_message("<span class='warning'>Arcs of electricity strike [G.affecting]!</span>", visible_message("<span class='warning'>Arcs of electricity strike [G.affecting]!</span>",
"<span class='warning'>Our hand channels raw electricity into [G.affecting].</span>", "<span class='warning'>Our hand channels raw electricity into [G.affecting].</span>",
"<span class='italics'>You hear sparks!</span>") "<span class='italics'>You hear sparks!</span>")
else
src << "<span class='warning'>Our gloves block us from shocking \the [G.affecting].</span>"
src.mind.changeling.chem_charges -= 10 src.mind.changeling.chem_charges -= 10
return 1 return 1
@@ -69,11 +78,13 @@
"<span class='warning'>Our hand channels raw electricity into \the [held_item].</span>", "<span class='warning'>Our hand channels raw electricity into \the [held_item].</span>",
"<span class='italics'>You hear sparks!</span>") "<span class='italics'>You hear sparks!</span>")
var/i = 10 var/i = 10
if(siemens)
while(i) while(i)
cell.charge += 100 //This should be a nice compromise between recharging guns and other batteries. cell.charge += 100 * siemens //This should be a nice compromise between recharging guns and other batteries.
if(cell.charge > cell.maxcharge) if(cell.charge > cell.maxcharge)
cell.charge = cell.maxcharge cell.charge = cell.maxcharge
break break
if(siemens)
var/T = get_turf(src) var/T = get_turf(src)
new /obj/effect/effect/sparks(T) new /obj/effect/effect/sparks(T)
held_item.update_icon() held_item.update_icon()
@@ -113,11 +124,18 @@
if(src) if(src)
qdel(src) qdel(src)
/obj/item/weapon/electric_hand/afterattack(var/atom/target, var/mob/living/user, proximity) /obj/item/weapon/electric_hand/afterattack(var/atom/target, var/mob/living/carbon/human/user, proximity)
if(!target) if(!target)
return return
if(!proximity) if(!proximity)
return return
// Handle glove conductivity.
var/obj/item/clothing/gloves/gloves = user.gloves
var/siemens = 1
if(gloves)
siemens = gloves.siemens_coefficient
//Excuse the copypasta. //Excuse the copypasta.
if(istype(target,/mob/living/carbon)) if(istype(target,/mob/living/carbon))
var/mob/living/carbon/C = target var/mob/living/carbon/C = target
@@ -126,14 +144,17 @@
src << "<span class='warning'>We require more chemicals to electrocute [C]!</span>" src << "<span class='warning'>We require more chemicals to electrocute [C]!</span>"
return 0 return 0
C.electrocute_act(electrocute_amount,src,1.0,BP_TORSO) C.electrocute_act(electrocute_amount * siemens,src,1.0,BP_TORSO)
C.stun_effect_act(0, agony_amount, BP_TORSO, src) C.stun_effect_act(0, agony_amount * siemens, BP_TORSO, src)
msg_admin_attack("[key_name(user)] shocked [key_name(C)] with the [src].") msg_admin_attack("[key_name(user)] shocked [key_name(C)] with the [src].")
if(siemens)
visible_message("<span class='warning'>Arcs of electricity strike [C]!</span>", visible_message("<span class='warning'>Arcs of electricity strike [C]!</span>",
"<span class='warning'>Our hand channels raw electricity into [C]</span>", "<span class='warning'>Our hand channels raw electricity into [C]</span>",
"<span class='italics'>You hear sparks!</span>") "<span class='italics'>You hear sparks!</span>")
else
src << "<span class='warning'>Our gloves block us from shocking \the [C].</span>"
//qdel(src) //Since we're no longer a one hit stun, we need to stick around. //qdel(src) //Since we're no longer a one hit stun, we need to stick around.
user.mind.changeling.chem_charges -= shock_cost user.mind.changeling.chem_charges -= shock_cost
return 1 return 1
@@ -145,7 +166,8 @@
src << "<span class='warning'>We require more chemicals to electrocute [S]!</span>" src << "<span class='warning'>We require more chemicals to electrocute [S]!</span>"
return 0 return 0
S.electrocute_act(60,src,1.0) //If only they had surge protectors. S.electrocute_act(60 * siemens,src,1.0) //If only they had surge protectors.
if(siemens)
visible_message("<span class='warning'>Arcs of electricity strike [S]!</span>", visible_message("<span class='warning'>Arcs of electricity strike [S]!</span>",
"<span class='warning'>Our hand channels raw electricity into [S]</span>", "<span class='warning'>Our hand channels raw electricity into [S]</span>",
"<span class='italics'>You hear sparks!</span>") "<span class='italics'>You hear sparks!</span>")
@@ -164,13 +186,15 @@
"<span class='warning'>Our hand channels raw electricity into \the [target].</span>", "<span class='warning'>Our hand channels raw electricity into \the [target].</span>",
"<span class='italics'>You hear sparks!</span>") "<span class='italics'>You hear sparks!</span>")
var/i = 10 var/i = 10
if(siemens)
while(i) while(i)
cell.charge += 100 //This should be a nice compromise between recharging guns and other batteries. cell.charge += 100 * siemens //This should be a nice compromise between recharging guns and other batteries.
if(cell.charge > cell.maxcharge) if(cell.charge > cell.maxcharge)
cell.charge = cell.maxcharge cell.charge = cell.maxcharge
break //No point making sparks if the cell's full. break //No point making sparks if the cell's full.
// if(!Adjacent(T)) // if(!Adjacent(T))
// break // break
if(siemens)
var/Turf = get_turf(src) var/Turf = get_turf(src)
new /obj/effect/effect/sparks(Turf) new /obj/effect/effect/sparks(Turf)
T.update_icon() T.update_icon()

View File

@@ -18,14 +18,13 @@
var/mob/living/carbon/C = src var/mob/living/carbon/C = src
if(changeling.max_geneticpoints < 0) //Absorbed by another ling if(changeling.max_geneticpoints < 0) //Absorbed by another ling
src << "<span class='danger'>You have no genomes, not even your own, and cannot regenerate.</span>" src << "<span class='danger'>We have no genomes, not even our own, and cannot regenerate.</span>"
return 0 return 0
if(!C.stat && alert("Are we sure we wish to fake our death?",,"Yes","No") == "No")//Confirmation for living changelings if they want to fake their death if(!C.stat && alert("Are we sure we wish to regenerate? We will appear to be dead while doing so.","Revival","Yes","No") == "No")
return return
C << "<span class='notice'>We will attempt to regenerate our form.</span>" C << "<span class='notice'>We will attempt to regenerate our form.</span>"
C.status_flags |= FAKEDEATH //play dead
C.update_canmove() C.update_canmove()
C.remove_changeling_powers() C.remove_changeling_powers()
@@ -33,13 +32,12 @@
C.suiciding = 0 C.suiciding = 0
if(C.stat != DEAD) if(C.stat != DEAD)
C.emote("deathgasp") C.adjustOxyLoss(C.maxHealth * 2)
C.tod = worldtime2text()
spawn(rand(800,2000)) spawn(rand(800,2000))
//The ling will now be able to choose when to revive //The ling will now be able to choose when to revive
src.verbs += /mob/proc/changeling_revive src.verbs += /mob/proc/changeling_revive
src << "<span class='notice'>We are ready to rise. Use the Revive verb when you are ready.</span>" src << "<span class='notice'><font size='5'>We are ready to rise. Use the <b>Revive</b> verb when you are ready.</font></span>"
feedback_add_details("changeling_powers","FD") feedback_add_details("changeling_powers","FD")
return 1 return 1

View File

@@ -25,8 +25,6 @@
C.SetStunned(0) C.SetStunned(0)
C.SetWeakened(0) C.SetWeakened(0)
C.radiation = 0 C.radiation = 0
C.halloss = 0
C.shock_stage = 0 //Pain
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss()) C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
C.reagents.clear_reagents() C.reagents.clear_reagents()
C.restore_all_organs(ignore_prosthetic_prefs=1) //Covers things like fractures and other things not covered by the above. C.restore_all_organs(ignore_prosthetic_prefs=1) //Covers things like fractures and other things not covered by the above.
@@ -36,8 +34,13 @@
H.mutations.Remove(HUSK) H.mutations.Remove(HUSK)
H.status_flags -= DISFIGURED H.status_flags -= DISFIGURED
H.update_body(1) H.update_body(1)
for(var/limb in H.organs_by_name)
var/obj/item/organ/external/current_limb = H.organs_by_name[limb]
current_limb.undislocate()
C.halloss = 0
C.shock_stage = 0 //Pain
C << "<span class='notice'>We have regenerated.</span>" C << "<span class='notice'>We have regenerated.</span>"
C.status_flags &= ~FAKEDEATH
C.update_canmove() C.update_canmove()
C.mind.changeling.purchased_powers -= C C.mind.changeling.purchased_powers -= C
feedback_add_details("changeling_powers","CR") feedback_add_details("changeling_powers","CR")