From 28a04fbb9d6cf71a9315fd3fcefdb53f2a72a799 Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Wed, 24 Oct 2012 16:39:46 +0000 Subject: [PATCH] -Aliens can acid turf. The only turf they cannot acid are r_walls. I just used a typecheck because I didn't see the need for types of turf needing to be unacidable, but if so I'll make a variable for it. -Made a proc which will select active candidates. BALANCE STUFF -Acid is less random. -Humans being disarmed by Aliens is no longer a random duration, instead it is a constant 10, instead of the random 10 to 15. -Facehugger throw range was reduced to 5. -Laying eggs costs 75 plasma (from 50) and secreting resin costs 75 plasma (from 100). -Reduced stun duration of Alien disarm to Cyborgs. From 10 to 7. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4949 316c924e-a436-60f5-8080-3fe189b3f50e --- code/__HELPERS/game.dm | 29 +++++++++++++ code/datums/diseases/alien_embryo.dm | 22 +--------- code/game/gamemodes/events.dm | 12 +----- code/game/objects/effects/aliens.dm | 19 ++++++--- .../carbon/alien/humanoid/alien_powers.dm | 41 ++++++++++++------- .../mob/living/carbon/alien/humanoid/queen.dm | 6 +-- .../living/carbon/alien/special/facehugger.dm | 1 + .../living/carbon/human/human_attackalien.dm | 2 +- .../mob/living/carbon/monkey/monkey.dm | 2 +- .../modules/mob/living/silicon/robot/robot.dm | 2 +- html/changelog.html | 12 ++++++ 11 files changed, 92 insertions(+), 56 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 0ad5ac0217f..e662ac0258e 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -280,3 +280,32 @@ proc/isInSight(var/atom/A, var/atom/B) if(M.ckey == lowertext(key)) return M return null + +// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer. + +/proc/get_active_candidates(var/buffer = 1) + + var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn + var/i = 0 + while(candidates.len <= 0 && i < 5) + for(var/mob/dead/observer/G in player_list) + if(((G.client.inactivity/10)/60) <= buffer + i) // the most active players are more likely to become an alien + if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) + candidates += G.key + i++ + return candidates + +// Same as above but for alien candidates. + +/proc/get_alien_candidates() + + var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn + var/i = 0 + while(candidates.len <= 0 && i < 5) + for(var/mob/dead/observer/G in player_list) + if(G.client.be_alien) + if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien + if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) + candidates += G.key + i++ + return candidates \ No newline at end of file diff --git a/code/datums/diseases/alien_embryo.dm b/code/datums/diseases/alien_embryo.dm index 4bf249b43d3..1e01cffe970 100644 --- a/code/datums/diseases/alien_embryo.dm +++ b/code/datums/diseases/alien_embryo.dm @@ -43,16 +43,7 @@ /datum/disease/alien_embryo/stage_act() ..() switch(stage) - if(2) - if(prob(1)) - affected_mob.emote("sneeze") - if(prob(1)) - affected_mob.emote("cough") - if(prob(1)) - affected_mob << "\red Your throat feels sore." - if(prob(1)) - affected_mob << "\red Mucous runs down the back of your throat." - if(3) + if(2, 3) if(prob(1)) affected_mob.emote("sneeze") if(prob(1)) @@ -81,16 +72,7 @@ affected_mob.updatehealth() if(prob(50)) if(gibbed != 0) return 0 - var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn - var/i = 0 - while(candidates.len <= 0 && i < 5) - for(var/mob/dead/observer/G in player_list) - if(G.client.be_alien) - if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - i++ - + var/list/candidates = get_alien_candidates() var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc) if(candidates.len) new_xeno.key = pick(candidates) diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 84d27760515..031f638fb10 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -269,17 +269,9 @@ if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = list() //List of candidate KEYs to control the new larvae. ~Carn - var/i = 0 - while(candidates.len <= 0 && i < 5) - for(var/mob/dead/observer/G in player_list) - if(G.client.be_alien) - if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - i++ + var/list/candidates = get_alien_candidates() - if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one + if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one while((spawncount >= 1) && vents.len && candidates.len) var/obj/vent = pick(vents) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 8d33898f600..38f53a7e4da 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -299,24 +299,31 @@ Alien plants should do something if theres a lot of poison opacity = 0 anchored = 1 - var/obj/target + var/atom/target var/ticks = 0 /obj/effect/alien/acid/proc/tick() if(!target) del(src) + ticks += 1 + for(var/mob/O in hearers(src, null)) O.show_message("\green [src.target] sizzles and begins to melt under the bubbling mess of acid!", 1) - if(prob(ticks*10)) + + if(ticks >= 3) + for(var/mob/O in hearers(src, null)) O.show_message("\green [src.target] collapses under its own weight into a puddle of goop and undigested debris!", 1) -// if(target.occupant) //I tried to fix mechas-with-humans-getting-deleted. Made them unacidable for now. -// target.ex_act(1) - del(target) + + if(istype(target, /turf/simulated/wall)) // I hate turf code. + var/turf/simulated/wall/W = target + W.dismantle_wall(1) + else + del(target) del(src) return - spawn(rand(200, 400)) tick() + spawn(rand(100, 150)) tick() /* * Egg diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 79baa0eeae8..9c0f181f42f 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -80,25 +80,38 @@ Doesn't work on other aliens/AI.*/ The first proc defines the acid throw function while the other two work in the game itself. Probably a good idea to revise this later. I kind of like the right click only--the window version can get a little confusing. Perhaps something telling the alien they need to right click? /N*/ -/obj/proc/acid(user as mob) - var/obj/effect/alien/acid/A = new(src.loc) - A.target = src + +/proc/acid(user as mob, var/atom/O as obj|turf) + var/obj/effect/alien/acid/A = new(get_turf(O)) + A.target = O for(var/mob/M in viewers(src, null)) - M.show_message(text("\green [user] vomits globs of vile stuff all over [src]. It begins to sizzle and melt under the bubbling mess of acid!"), 1) + M.show_message(text("\green [user] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!"), 1) A.tick() -/mob/living/carbon/alien/humanoid/proc/corrosive_acid(obj/O as obj in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N +/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N set name = "Corrossive Acid (200)" set desc = "Drench an object in acid, destroying it over time." set category = "Alien" if(powerc(200)) if(O in oview(1)) - if(O.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid. - src << "\green You cannot dissolve this object." - else - adjustToxLoss(-200) - O.acid(src) + // OBJ CHECK + if(isobj(O)) + var/obj/I = O + if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid. + src << "\green You cannot dissolve this object." + return + // TURF CHECK + else if(isturf(O)) + var/turf/T = O + if(istype(T, /turf/simulated/wall/r_wall)) + src << "\green You cannot dissolve this object." + return + else// Not a type we can acid. + return + + adjustToxLoss(-200) + acid(src, O) else src << "\green Target is too far away." return @@ -143,14 +156,14 @@ I kind of like the right click only--the window version can get a little confusi return /mob/living/carbon/alien/humanoid/proc/resin() // -- TLE - set name = "Secrete Resin (100)" + set name = "Secrete Resin (75)" set desc = "Secrete tough malleable resin." set category = "Alien" - if(powerc(100)) + if(powerc(75)) var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist - if(!choice || !powerc(100)) return - adjustToxLoss(-100) + if(!choice || !powerc(75)) return + adjustToxLoss(-75) src << "\green You shape a [choice]." for(var/mob/O in viewers(src, null)) O.show_message(text("\red [src] vomits up a thick purple substance and begins to shape it!"), 1) diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index b4722e4e34a..644eee5e818 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -56,7 +56,7 @@ //Queen verbs /mob/living/carbon/alien/humanoid/queen/verb/lay_egg() - set name = "Lay Egg (50)" + set name = "Lay Egg (75)" set desc = "Lay an egg to produce huggers to impregnate prey with." set category = "Alien" @@ -64,8 +64,8 @@ src << "There's already an egg here." return - if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly. - adjustToxLoss(-50) + if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly. + adjustToxLoss(-75) for(var/mob/O in viewers(src, null)) O.show_message(text("\green [src] has laid an egg!"), 1) new /obj/effect/alien/egg(loc) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 909bf25219a..aea090fb685 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -16,6 +16,7 @@ var/const/MAX_ACTIVE_TIME = 400 item_state = "facehugger" w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4 flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH|MASKCOVERSEYES + throw_range = 5 var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case diff --git a/code/modules/mob/living/carbon/human/human_attackalien.dm b/code/modules/mob/living/carbon/human/human_attackalien.dm index 5c35fe9bb72..74880c98d91 100644 --- a/code/modules/mob/living/carbon/human/human_attackalien.dm +++ b/code/modules/mob/living/carbon/human/human_attackalien.dm @@ -49,7 +49,7 @@ var/randn = rand(1, 100) if (randn <= 90) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) - Weaken(rand(10,15)) + Weaken(10) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has tackled down []!", M, src), 1) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 2fc9530b671..b9b76557885 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -309,7 +309,7 @@ playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) var/damage = 5 if(prob(95)) - Weaken(rand(10,15)) + Weaken(15) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has tackled down [name]!", M), 1) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 3b96378ffb2..fc5d44a1ad2 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -623,7 +623,7 @@ if ("disarm") if(!(lying)) if (rand(1,100) <= 85) - Stun(10) + Stun(7) step(src,get_dir(M,src)) spawn(5) step(src,get_dir(M,src)) playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1) diff --git a/html/changelog.html b/html/changelog.html index aede106b027..6782953ba5c 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -48,6 +48,18 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

24 October 2012

+

Giacom updated:

+ +
+

18 October 2012

Giacom updated: