mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Adds modular changeling. Modular changeling means changelings now purchase the powers they want. Adds a few new powers as well as a framework for easily adding new ones.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3308 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
@@ -211,11 +210,17 @@
|
||||
var/list/absorbed_dna = list()
|
||||
var/changeling_fakedeath = 0
|
||||
var/chem_charges = 20.00
|
||||
var/chem_recharge_multiplier = 1
|
||||
var/chem_storage = 50
|
||||
var/sting_range = 1
|
||||
var/changelingID = "none"
|
||||
var/mob/living/host = null
|
||||
var/geneticdamage = 0.0
|
||||
var/isabsorbing = 0
|
||||
var/geneticpoints = 5
|
||||
var/purchasedpowers = list()
|
||||
|
||||
|
||||
|
||||
/datum/changeling/New()
|
||||
..()
|
||||
|
||||
@@ -2,14 +2,21 @@
|
||||
if(!changeling) changeling = new
|
||||
changeling.host = src
|
||||
|
||||
src.verbs += /client/proc/changeling_lesser_transform
|
||||
src.verbs += /client/proc/changeling_fakedeath
|
||||
src.verbs += /datum/changeling/proc/EvolutionMenu
|
||||
|
||||
for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
if(P.allowduringlesserform)
|
||||
if(!(P in src.verbs))
|
||||
src.verbs += P.verbpath
|
||||
|
||||
/* src.verbs += /client/proc/changeling_fakedeath
|
||||
src.verbs += /client/proc/changeling_lesser_transform
|
||||
src.verbs += /client/proc/changeling_blind_sting
|
||||
src.verbs += /client/proc/changeling_deaf_sting
|
||||
src.verbs += /client/proc/changeling_silence_sting
|
||||
src.verbs += /client/proc/changeling_unfat_sting
|
||||
|
||||
*/
|
||||
changeling.changeling_level = 1
|
||||
return
|
||||
|
||||
@@ -17,6 +24,14 @@
|
||||
if(!changeling) changeling = new
|
||||
changeling.host = src
|
||||
|
||||
src.verbs += /datum/changeling/proc/EvolutionMenu
|
||||
|
||||
for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
if(!(P in src.verbs))
|
||||
src.verbs += P.verbpath
|
||||
|
||||
/*
|
||||
src.verbs += /client/proc/changeling_absorb_dna
|
||||
src.verbs += /client/proc/changeling_transform
|
||||
src.verbs += /client/proc/changeling_lesser_form
|
||||
@@ -30,6 +45,7 @@
|
||||
src.verbs += /client/proc/changeling_unfat_sting
|
||||
src.verbs += /client/proc/changeling_boost_range
|
||||
|
||||
*/
|
||||
changeling.changeling_level = 2
|
||||
if (!changeling.absorbed_dna)
|
||||
changeling.absorbed_dna = list()
|
||||
@@ -43,6 +59,11 @@
|
||||
return
|
||||
|
||||
/mob/proc/remove_changeling_powers()
|
||||
|
||||
for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
src.verbs -= P.verbpath
|
||||
/*
|
||||
src.verbs -= /client/proc/changeling_absorb_dna
|
||||
src.verbs -= /client/proc/changeling_transform
|
||||
src.verbs -= /client/proc/changeling_lesser_form
|
||||
@@ -55,7 +76,7 @@
|
||||
src.verbs -= /client/proc/changeling_boost_range
|
||||
src.verbs -= /client/proc/changeling_transformation_sting
|
||||
src.verbs -= /client/proc/changeling_unfat_sting
|
||||
|
||||
*/
|
||||
/client/proc/changeling_absorb_dna()
|
||||
set category = "Changeling"
|
||||
set name = "Absorb DNA"
|
||||
@@ -127,12 +148,35 @@
|
||||
usr.changeling.absorbed_dna[T.real_name] = T.dna
|
||||
if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400)
|
||||
usr.changeling.chem_charges += 10
|
||||
usr.changeling.geneticpoints += 2
|
||||
if(T.changeling)
|
||||
if(T.changeling.absorbed_dna)
|
||||
usr.changeling.absorbed_dna |= T.changeling.absorbed_dna //steal all their loot
|
||||
|
||||
T.changeling.absorbed_dna = list()
|
||||
T.changeling.absorbed_dna[T.real_name] = T.dna
|
||||
|
||||
if(T.changeling.purchasedpowers)
|
||||
for(var/obj/effect/proc_holder/power/Tp in T.changeling.purchasedpowers)
|
||||
if(Tp in usr.changeling.purchasedpowers)
|
||||
continue
|
||||
else
|
||||
usr.changeling.purchasedpowers += Tp
|
||||
|
||||
if(!Tp.isVerb)
|
||||
call(Tp.verbpath)()
|
||||
|
||||
else
|
||||
if(usr.changeling.changeling_level == 1)
|
||||
usr.make_lesser_changeling()
|
||||
else
|
||||
usr.make_changeling()
|
||||
|
||||
|
||||
|
||||
|
||||
usr.changeling.chem_charges += T.changeling.chem_charges
|
||||
usr.changeling.geneticpoints += T.changeling.geneticpoints
|
||||
T.changeling.chem_charges = 0
|
||||
usr.changeling.isabsorbing = 0
|
||||
|
||||
@@ -261,7 +305,7 @@
|
||||
usr.mind.transfer_to(O)
|
||||
|
||||
O.make_lesser_changeling()
|
||||
|
||||
O.verbs += /client/proc/changeling_lesser_transform
|
||||
del(usr)
|
||||
return
|
||||
|
||||
@@ -711,4 +755,159 @@
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_unfat_sting
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
/client/proc/changeling_unstun()
|
||||
set category = "Changeling"
|
||||
set name = "Epinephrine Sacs (25)"
|
||||
set desc = "Removes all stuns"
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 25)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 25
|
||||
|
||||
var/mob/living/carbon/human/C = usr
|
||||
|
||||
if(C)
|
||||
C.stat = 0
|
||||
C.SetParalysis(0)
|
||||
C.SetStunned(0)
|
||||
C.SetWeakened(0)
|
||||
C.lying = 0
|
||||
C.canmove = 1
|
||||
|
||||
usr.verbs -= /client/proc/changeling_unstun
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_unstun
|
||||
|
||||
|
||||
|
||||
/client/proc/changeling_fastchemical()
|
||||
|
||||
usr.changeling.chem_recharge_multiplier = usr.changeling.chem_recharge_multiplier*2
|
||||
|
||||
/client/proc/changeling_engorgedglands()
|
||||
|
||||
usr.changeling.chem_storage = usr.changeling.chem_storage+25
|
||||
|
||||
/client/proc/changeling_digitalcamo()
|
||||
set category = "Changeling"
|
||||
set name = "Toggle Digital Camoflague (10)"
|
||||
set desc = "The AI can no longer track us, but we will look different if examined. Has a constant cost while active."
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 10)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 10
|
||||
|
||||
var/mob/living/carbon/human/C = usr
|
||||
|
||||
if(C)
|
||||
C << "[C.digitalcamo ? "We return to normal." : "We distort our form."]"
|
||||
C.digitalcamo = !C.digitalcamo
|
||||
spawn(0)
|
||||
while(C && C.digitalcamo)
|
||||
C.changeling.chem_charges -= 1/4
|
||||
sleep(10)
|
||||
|
||||
|
||||
usr.verbs -= /client/proc/changeling_digitalcamo
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_digitalcamo
|
||||
|
||||
|
||||
/client/proc/changeling_DEATHsting()
|
||||
set category = "Changeling"
|
||||
set name = "Death Sting (40)"
|
||||
set desc = "Causes spasms onto death."
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
var/list/victims = list()
|
||||
for(var/mob/living/carbon/C in oview(usr.changeling.sting_range))
|
||||
victims += C
|
||||
var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims
|
||||
|
||||
if(T && T in view(usr.changeling.sting_range))
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 40)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 40
|
||||
usr.changeling.sting_range = 1
|
||||
|
||||
usr << "\blue We stealthily sting [T]."
|
||||
|
||||
if(!T.changeling)
|
||||
T << "You feel a small prick and your chest becomes tight."
|
||||
|
||||
T.silent = (10)
|
||||
T.Paralyse(10)
|
||||
T.make_jittery(1000)
|
||||
|
||||
if (T.reagents)
|
||||
T.reagents.add_reagent("lexorin", 40)
|
||||
|
||||
else
|
||||
T << "You feel a small prick."
|
||||
|
||||
usr.verbs -= /client/proc/changeling_DEATHsting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_DEATHsting
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
/client/proc/changeling_rapidregen()
|
||||
set category = "Changeling"
|
||||
set name = "Rapid Regeneration (30)"
|
||||
set desc = "Begins rapidly regenerating. Does not effect stuns or chemicals."
|
||||
|
||||
if(!usr.changeling)
|
||||
usr << "\red You're not a changeling, something's wrong!"
|
||||
return
|
||||
|
||||
if(usr.changeling.chem_charges < 30)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
usr.changeling.chem_charges -= 30
|
||||
|
||||
var/mob/living/carbon/human/C = usr
|
||||
|
||||
spawn(0)
|
||||
for(var/i = 0, i<10,i++)
|
||||
if(C)
|
||||
C.adjustBruteLoss(-10)
|
||||
C.adjustToxLoss(-10)
|
||||
C.adjustOxyLoss(-10)
|
||||
C.adjustFireLoss(-10)
|
||||
sleep(10)
|
||||
|
||||
|
||||
usr.verbs -= /client/proc/changeling_rapidregen
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_rapidregen
|
||||
|
||||
@@ -0,0 +1,513 @@
|
||||
|
||||
var/list/powers = typesof(/obj/effect/proc_holder/power) //needed for the badmin verb for now
|
||||
var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
|
||||
/obj/effect/proc_holder/power
|
||||
name = "Power"
|
||||
desc = "Placeholder"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
var/helptext = ""
|
||||
|
||||
var/allowduringlesserform = 0
|
||||
var/isVerb = 1 // Is it an active power, or passive?
|
||||
var/verbpath = null // Path to a verb that contains the effects.
|
||||
var/genomecost = 500000 // Cost for the changling to evolve this power.
|
||||
|
||||
/obj/effect/proc_holder/power/absorb_dna
|
||||
name = "Absorb DNA"
|
||||
desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger."
|
||||
genomecost = 0
|
||||
|
||||
verbpath = /client/proc/changeling_absorb_dna
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/transform
|
||||
name = "Transform"
|
||||
desc = "We take on the apperance and voice of one we have absorbed."
|
||||
genomecost = 0
|
||||
|
||||
verbpath = /client/proc/changeling_transform
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/lesser_form
|
||||
name = "Lesser Form"
|
||||
desc = "We debase ourselves and become lesser. We become a monkey."
|
||||
genomecost = 1
|
||||
|
||||
verbpath = /client/proc/changeling_lesser_form
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/changeling_greater_form
|
||||
name = "Greater Form"
|
||||
desc = "We become the pinnicle of evolution. We will show the humans what happens when they leave their isle of ignorance."
|
||||
genomecost = 250
|
||||
|
||||
// doesn't happen lol. Yet!
|
||||
|
||||
/obj/effect/proc_holder/power/fakedeath
|
||||
name = "Fake Death"
|
||||
desc = "We fake our death while we heal."
|
||||
genomecost = 0
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_fakedeath
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/deaf_sting
|
||||
name = "Deaf Sting"
|
||||
desc = "We silently sting a human, completely silencing them for a short time."
|
||||
genomecost = 1
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_deaf_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/blind_sting
|
||||
name = "Blind Sting"
|
||||
desc = "We silently sting a human, completely deafening them for a short time."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_blind_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/paralysis_sting
|
||||
name = "Paralysis Sting"
|
||||
desc = "We silently sting a human, paralyzing them for a short time. We must be wary, they can still whisper."
|
||||
genomecost = 5
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_paralysis_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/silence_sting
|
||||
name = "Silence Sting"
|
||||
desc = "We silently sting a human, completely silencing them for a short time."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_silence_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/transformation_sting
|
||||
name = "Transformation Sting"
|
||||
desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another."
|
||||
genomecost = 2
|
||||
|
||||
verbpath = /client/proc/changeling_transformation_sting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/unfat_sting
|
||||
name = "Unfat Sting"
|
||||
desc = "We silently sting a human, forcing them to rapidly metobolize their fat."
|
||||
genomecost = 1
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_unfat_sting
|
||||
|
||||
/obj/effect/proc_holder/power/boost_range
|
||||
name = "Boost Range"
|
||||
desc = "We evolve the ability to shoot our stingers at humans, with some preperation."
|
||||
genomecost = 2
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_boost_range
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/Epinephrine
|
||||
name = "Epinephrine sacs"
|
||||
desc = "We evolve additional sacs of adrenaline throughout our body."
|
||||
helptext = "Gives the ability to instantly recover from stuns. High chemical cost."
|
||||
genomecost = 4
|
||||
|
||||
verbpath = /client/proc/changeling_unstun
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/ChemicalSynth
|
||||
name = "Rapid Chemical Synthesis"
|
||||
desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster."
|
||||
helptext = "Doubles the rate at which we naturally recharge chemicals."
|
||||
genomecost = 4
|
||||
isVerb = 0
|
||||
|
||||
verbpath = /client/proc/changeling_fastchemical
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/EngorgedGlands
|
||||
name = "Engorged Chemical Glands"
|
||||
desc = "Our chemical glands swell, permitting us to store more chemicals inside of them."
|
||||
helptext = "Allows us to store an extra 25 units of chemicals."
|
||||
genomecost = 4
|
||||
isVerb = 0
|
||||
|
||||
|
||||
verbpath = /client/proc/changeling_engorgedglands
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/DigitalCamoflague
|
||||
name = "Digital Camoflauge"
|
||||
desc = "We evolve the ability to distort our form and proprtions, defeating common altgorthms used to detect lifeforms on cameras."
|
||||
helptext = "We cannot be tracked by camera while using this skill. However, humans looking at us will find us.. uncanny. We must constantly expend chemicals to maintain our form like this."
|
||||
genomecost = 4
|
||||
allowduringlesserform = 1
|
||||
|
||||
verbpath = /client/proc/changeling_digitalcamo
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/DeathSting
|
||||
name = "Death Sting"
|
||||
desc = "We silently sting a human, filling him with potent chemicals. His rapid death is all but assured."
|
||||
genomecost = 10
|
||||
|
||||
verbpath = /client/proc/changeling_DEATHsting
|
||||
|
||||
|
||||
|
||||
/obj/effect/proc_holder/power/rapidregeneration
|
||||
name = "Rapid Regeneration"
|
||||
desc = "We evolve the ability to rapidly regenerate, negating the need for stasis."
|
||||
helptext = "Heals a moderate amount of damage every tick."
|
||||
genomecost = 8
|
||||
|
||||
verbpath = /client/proc/changeling_rapidregen
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Modularchangling, totally stolen from the new player panel. YAYY
|
||||
/datum/changeling/proc/EvolutionMenu()//The new one
|
||||
set category = "Changeling"
|
||||
set desc = "Level up!"
|
||||
if (!usr.changeling)
|
||||
return
|
||||
|
||||
src = usr.changeling
|
||||
|
||||
if(!powerinstances.len)
|
||||
for(var/P in powers)
|
||||
var/obj/effect/proc_holder/power/nP = new P
|
||||
if (nP.desc == "Placeholder")
|
||||
del(nP)
|
||||
continue
|
||||
powerinstances += nP
|
||||
|
||||
var/dat = "<html><head><title>Changling Evolution Menu</title></head>"
|
||||
|
||||
//javascript, the part that does most of the work~
|
||||
dat += {"
|
||||
|
||||
<head>
|
||||
<script type='text/javascript'>
|
||||
|
||||
var locked_tabs = new Array();
|
||||
|
||||
function updateSearch(){
|
||||
|
||||
|
||||
var filter_text = document.getElementById('filter');
|
||||
var filter = filter_text.value.toLowerCase();
|
||||
|
||||
if(complete_list != null && complete_list != ""){
|
||||
var mtbl = document.getElementById("maintable_data_archive");
|
||||
mtbl.innerHTML = complete_list;
|
||||
}
|
||||
|
||||
if(filter.value == ""){
|
||||
return;
|
||||
}else{
|
||||
|
||||
var maintable_data = document.getElementById('maintable_data');
|
||||
var ltr = maintable_data.getElementsByTagName("tr");
|
||||
for ( var i = 0; i < ltr.length; ++i )
|
||||
{
|
||||
try{
|
||||
var tr = ltr\[i\];
|
||||
if(tr.getAttribute("id").indexOf("data") != 0){
|
||||
continue;
|
||||
}
|
||||
var ltd = tr.getElementsByTagName("td");
|
||||
var td = ltd\[0\];
|
||||
var lsearch = td.getElementsByTagName("b");
|
||||
var search = lsearch\[0\];
|
||||
//var inner_span = li.getElementsByTagName("span")\[1\] //Should only ever contain one element.
|
||||
//document.write("<p>"+search.innerText+"<br>"+filter+"<br>"+search.innerText.indexOf(filter))
|
||||
if ( search.innerText.toLowerCase().indexOf(filter) == -1 )
|
||||
{
|
||||
//document.write("a");
|
||||
//ltr.removeChild(tr);
|
||||
td.innerHTML = "";
|
||||
i--;
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
}
|
||||
|
||||
var count = 0;
|
||||
var index = -1;
|
||||
var debug = document.getElementById("debug");
|
||||
|
||||
locked_tabs = new Array();
|
||||
|
||||
}
|
||||
|
||||
function expand(id,name,desc,helptext,power,ownsthis){
|
||||
|
||||
clearAll();
|
||||
|
||||
var span = document.getElementById(id);
|
||||
|
||||
body = "<table><tr><td>";
|
||||
|
||||
body += "</td><td align='center'>";
|
||||
|
||||
body += "<font size='2'><b>"+desc+"</b></font> <BR>"
|
||||
|
||||
body += "<font size='2'><font color = 'red'><b>"+helptext+"</b></font> <BR>"
|
||||
|
||||
if(!ownsthis)
|
||||
{
|
||||
body += "<a href='?src=\ref[src];P="+power+"'>Evolve</a>"
|
||||
}
|
||||
|
||||
body += "</td><td align='center'>";
|
||||
|
||||
body += "</td></tr></table>";
|
||||
|
||||
|
||||
span.innerHTML = body
|
||||
}
|
||||
|
||||
function clearAll(){
|
||||
var spans = document.getElementsByTagName('span');
|
||||
for(var i = 0; i < spans.length; i++){
|
||||
var span = spans\[i\];
|
||||
|
||||
var id = span.getAttribute("id");
|
||||
|
||||
if(!(id.indexOf("item")==0))
|
||||
continue;
|
||||
|
||||
var pass = 1;
|
||||
|
||||
for(var j = 0; j < locked_tabs.length; j++){
|
||||
if(locked_tabs\[j\]==id){
|
||||
pass = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(pass != 1)
|
||||
continue;
|
||||
|
||||
|
||||
|
||||
|
||||
span.innerHTML = "";
|
||||
}
|
||||
}
|
||||
|
||||
function addToLocked(id,link_id,notice_span_id){
|
||||
var link = document.getElementById(link_id);
|
||||
var decision = link.getAttribute("name");
|
||||
if(decision == "1"){
|
||||
link.setAttribute("name","2");
|
||||
}else{
|
||||
link.setAttribute("name","1");
|
||||
removeFromLocked(id,link_id,notice_span_id);
|
||||
return;
|
||||
}
|
||||
|
||||
var pass = 1;
|
||||
for(var j = 0; j < locked_tabs.length; j++){
|
||||
if(locked_tabs\[j\]==id){
|
||||
pass = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!pass)
|
||||
return;
|
||||
locked_tabs.push(id);
|
||||
var notice_span = document.getElementById(notice_span_id);
|
||||
notice_span.innerHTML = "<font color='red'>Locked</font> ";
|
||||
//link.setAttribute("onClick","attempt('"+id+"','"+link_id+"','"+notice_span_id+"');");
|
||||
//document.write("removeFromLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
|
||||
//document.write("aa - "+link.getAttribute("onClick"));
|
||||
}
|
||||
|
||||
function attempt(ab){
|
||||
return ab;
|
||||
}
|
||||
|
||||
function removeFromLocked(id,link_id,notice_span_id){
|
||||
//document.write("a");
|
||||
var index = 0;
|
||||
var pass = 0;
|
||||
for(var j = 0; j < locked_tabs.length; j++){
|
||||
if(locked_tabs\[j\]==id){
|
||||
pass = 1;
|
||||
index = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!pass)
|
||||
return;
|
||||
locked_tabs\[index\] = "";
|
||||
var notice_span = document.getElementById(notice_span_id);
|
||||
notice_span.innerHTML = "";
|
||||
//var link = document.getElementById(link_id);
|
||||
//link.setAttribute("onClick","addToLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
|
||||
}
|
||||
|
||||
function selectTextField(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
filter_text.focus();
|
||||
filter_text.select();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
"}
|
||||
|
||||
//body tag start + onload and onkeypress (onkeyup) javascript event calls
|
||||
dat += "<body onload='selectTextField(); updateSearch();' onkeyup='updateSearch();'>"
|
||||
|
||||
//title + search bar
|
||||
dat += {"
|
||||
|
||||
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable'>
|
||||
<tr id='title_tr'>
|
||||
<td align='center'>
|
||||
<font size='5'><b>Changling Evolution Menu</b></font><br>
|
||||
Hover over a power to see more information<br>
|
||||
Current genomes left to evolve with: [usr.changeling.geneticpoints]
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='search_tr'>
|
||||
<td align='center'>
|
||||
<b>Search:</b> <input type='text' id='filter' value='' style='width:300px;'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
"}
|
||||
|
||||
//player table header
|
||||
dat += {"
|
||||
<span id='maintable_data_archive'>
|
||||
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable_data'>"}
|
||||
|
||||
var/i = 1
|
||||
for(var/obj/effect/proc_holder/power/P in powerinstances)
|
||||
var/ownsthis = 0
|
||||
|
||||
if(P in usr.changeling.purchasedpowers)
|
||||
ownsthis = 1
|
||||
|
||||
|
||||
var/color = "#e6e6e6"
|
||||
if(i%2 == 0)
|
||||
color = "#f2f2f2"
|
||||
|
||||
|
||||
dat += {"
|
||||
|
||||
<tr id='data[i]' name='[i]' onClick="addToLocked('item[i]','data[i]','notice_span[i]')">
|
||||
<td align='center' bgcolor='[color]'>
|
||||
<span id='notice_span[i]'></span>
|
||||
<a id='link[i]'
|
||||
onmouseover='expand("item[i]","[P.name]","[P.desc]","[P.helptext]","[P]",[ownsthis])'
|
||||
>
|
||||
<b id='search[i]'>Evolve [P] - Cost: [ownsthis ? "Purchased" : P.genomecost]</b>
|
||||
</a>
|
||||
<br><span id='item[i]'></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
"}
|
||||
|
||||
i++
|
||||
|
||||
|
||||
//player table ending
|
||||
dat += {"
|
||||
</table>
|
||||
</span>
|
||||
|
||||
<script type='text/javascript'>
|
||||
var maintable = document.getElementById("maintable_data_archive");
|
||||
var complete_list = maintable.innerHTML;
|
||||
</script>
|
||||
</body></html>
|
||||
"}
|
||||
|
||||
usr << browse(dat, "window=powers;size=900x480")
|
||||
|
||||
|
||||
/datum/changeling/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if(href_list["P"])
|
||||
usr.changeling.purchasePower(href_list["P"])
|
||||
call(/datum/changeling/proc/EvolutionMenu)()
|
||||
|
||||
|
||||
|
||||
/datum/changeling/proc/purchasePower(var/obj/effect/proc_holder/power/Pname)
|
||||
if (!usr.changeling)
|
||||
return
|
||||
|
||||
var/obj/effect/proc_holder/power/Thepower = null
|
||||
|
||||
for (var/obj/effect/proc_holder/power/P in powerinstances)
|
||||
if(P.name == Pname)
|
||||
Thepower = P
|
||||
break
|
||||
|
||||
if(Thepower == null)
|
||||
usr << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
return
|
||||
|
||||
if(Thepower in usr.changeling.purchasedpowers)
|
||||
usr << "We have already evolved this ability!"
|
||||
return
|
||||
|
||||
|
||||
if(usr.changeling.geneticpoints < Thepower.genomecost)
|
||||
usr << "We cannot evolve this... yet. We must acquire more DNA."
|
||||
return
|
||||
|
||||
usr.changeling.geneticpoints -= Thepower.genomecost
|
||||
|
||||
usr.changeling.purchasedpowers += Thepower
|
||||
|
||||
if(!Thepower.isVerb)
|
||||
call(Thepower.verbpath)()
|
||||
|
||||
else
|
||||
if(usr.changeling.changeling_level == 1)
|
||||
usr.make_lesser_changeling()
|
||||
else
|
||||
usr.make_changeling()
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
continue
|
||||
else if (M == usr)
|
||||
continue
|
||||
if(M.digitalcamo)
|
||||
continue
|
||||
|
||||
var/name = M.name
|
||||
if (name in names)
|
||||
@@ -105,6 +107,11 @@
|
||||
usr << "Follow camera mode terminated."
|
||||
usr:cameraFollow = null
|
||||
return
|
||||
if(target.digitalcamo)
|
||||
usr << "Follow camera mode terminated."
|
||||
usr:cameraFollow = null
|
||||
return
|
||||
|
||||
else if(istype(target.loc,/obj/effect/dummy))
|
||||
usr << "Follow camera mode ended."
|
||||
usr:cameraFollow = null
|
||||
|
||||
@@ -211,6 +211,9 @@
|
||||
if (!src.client)
|
||||
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
|
||||
|
||||
if (src.digitalcamo)
|
||||
msg += "[t_He] looks replusingly uncanny!\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
|
||||
@@ -1096,7 +1096,7 @@
|
||||
handle_changeling()
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
changeling.chem_charges = between(0, (max((0.9 - (changeling.chem_charges / 50)), 0.1) + changeling.chem_charges), 50)
|
||||
changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage)
|
||||
if ((changeling.geneticdamage > 0))
|
||||
changeling.geneticdamage = changeling.geneticdamage-1
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
msg += "It isn't responding to anything around it; it seems to be asleep.\n"
|
||||
msg += "</span>"
|
||||
|
||||
if (src.digitalcamo)
|
||||
msg += "It looks replusingly uncanny!\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
|
||||
@@ -629,6 +629,6 @@
|
||||
handle_changeling()
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
changeling.chem_charges = between(0, (max((0.9 - (changeling.chem_charges / 50)), 0.1) + changeling.chem_charges), 50)
|
||||
changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage)
|
||||
if ((changeling.geneticdamage > 0))
|
||||
changeling.geneticdamage = changeling.geneticdamage-1
|
||||
@@ -213,6 +213,9 @@
|
||||
//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button
|
||||
var/obj/effect/proc_holder/spell/list/spell_list = list()
|
||||
|
||||
//Changlings, but can be used in other modes
|
||||
var/obj/effect/proc_holder/changpower/list/power_list = list()
|
||||
|
||||
//List of active diseases
|
||||
|
||||
var/viruses = list() // replaces var/datum/disease/virus
|
||||
@@ -263,4 +266,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
var/canweaken = 1 // determines if this mob can be weakened/knocked down by things
|
||||
var/nopush = 0 //Can they be shoved?
|
||||
|
||||
var/area/lastarea = null
|
||||
var/area/lastarea = null
|
||||
|
||||
var/digitalcamo = 0 // Can they be tracked by the AI?
|
||||
@@ -92,6 +92,15 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">3/16/2010</h2>
|
||||
<h3 class="author">PolymorphBlue updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Modular changeling added! Changelings now purchase the powers they want. Balancing still underway, but should be playable.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">14 March 2012</h2>
|
||||
<h3 class="author">Carn updated:</h3>
|
||||
|
||||
@@ -381,6 +381,7 @@
|
||||
#include "code\game\gamemodes\blob\theblob.dm"
|
||||
#include "code\game\gamemodes\changeling\changeling.dm"
|
||||
#include "code\game\gamemodes\changeling\changeling_powers.dm"
|
||||
#include "code\game\gamemodes\changeling\modularchangling.dm"
|
||||
#include "code\game\gamemodes\changeling\traitor_chan.dm"
|
||||
#include "code\game\gamemodes\cult\cult.dm"
|
||||
#include "code\game\gamemodes\cult\cult_items.dm"
|
||||
|
||||
Reference in New Issue
Block a user