From 13d5ed0fff20e25d54524192c654dabf791f5270 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sat, 9 Jun 2012 01:39:21 +0100 Subject: [PATCH 1/5] Randomises blob weakness/strengths. Hitting the blob with a something it's weak too will do MASSIVE DAMAGE. Hitting it with something it's resistant too will either do very little, or heal it. --- code/game/gamemodes/blob/theblob.dm | 133 ++++++++++++++++++-- code/modules/chemical/Chemistry-Reagents.dm | 28 +++++ 2 files changed, 149 insertions(+), 12 deletions(-) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 52e578ac0a5..c329e7fd01e 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -11,10 +11,13 @@ anchored = 1 var/active = 1 var/health = 30 - var/brute_resist = 4 - var/fire_resist = 1 + var/maxhealth = 60 + var/brute_resist = 2 + var/fire_resist = 2 var/blobtype = "Blob" var/blobdebug = 0 + var/weakness = null //What works best + var/strength = null //What doesn't/heals them /*Types var/Blob var/Node @@ -26,9 +29,21 @@ var/steps_since_action = 1 - New(loc, var/h = 30) + New(loc, var/h = 30, var/w = "fire", var/s = "brute") blobs += src src.health = h + src.weakness = w + src.strength = s + if(w) + if(w == "fire") + src.fire_resist = 1 + if(w == "brute") + src.brute_resist = 1 + if(s) + if(s == "fire") + src.fire_resist = 4 + if(s == "brute") + src.brute_resist = 4 src.dir = pick(1,2,4,8) src.update() ..(loc) @@ -51,6 +66,7 @@ CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if((air_group && blobtype != "Shield") || (height==0)) return 1 if(istype(mover) && mover.pass_flags&PASSBLOB) return 1 + if(istype(mover, /obj/effect/decal) || istype(mover, /obj/effect/effect/chem_smoke)) return 1 return 0 @@ -77,6 +93,16 @@ blobtype = "Core" blob_cores += src processing_objects.Add(src) + weakness = pick("fire", "brute", "cold", "acid", "elec") + strength = pick("fire", "brute", "cold", "acid", "elec") + if(src.strength == src.weakness) //Yes, they could have the same weakness and strength, but this should reduce the odds. + src.strength = pick("fire", "brute", "cold", "acid", "elec") + var/w = src.weakness + if(w) + if(w == "fire") + src.fire_resist = 1 + if(w == "brute") + src.brute_resist = 1 return 1 //Nodeblob if((blobdebug == 2)) @@ -132,7 +158,7 @@ var/turf/T = get_step(src, dirn) var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) if(!B) - expand(T)//No blob here so try and expand + expand(T, src.weakness, src.strength)//No blob here so try and expand return B.Pulse((pulse+1),get_dir(src.loc,T)) return @@ -182,10 +208,29 @@ temperature_expose(datum/gas_mixture/air, temperature, volume) if(temperature > T0C+200) - health -= 0.01 * temperature + if(weakness == "fire") + health -= 0.01 * temperature + if(strength == "fire") + health += 0.01 * temperature + else + health -= 0.005 * temperature update() + if(temperature < T0C+20) //Because cold is rather hard to change, it happens at a relatively high temperature + if(weakness == "cold") + if(temperature >= T0C) + health -= 0.1 * (20-temperature) + else + health -= 0.1 * abs(temperature) + update() + if(strength == "cold") //Don't want blobs on space to be too hard to kill + if(temperature >= T0C) + health += 0.01 * (20-temperature) + else + health += 0.01 * abs(temperature) + update() - proc/expand(var/turf/T = null) + + proc/expand(var/turf/T = null, var/weakness, var/strength) if(!prob(health)) return//TODO: Change this to prob(health + o2 mols or such) if(!T) var/list/dirs = list(1,2,4,8) @@ -198,7 +243,7 @@ continue else break if(T) - var/obj/effect/blob/B = new /obj/effect/blob(src.loc, min(src.health, 30)) + var/obj/effect/blob/B = new /obj/effect/blob(src.loc, min(src.health, 30), weakness, strength) if(T.Enter(B,src)) B.loc = T else @@ -221,6 +266,8 @@ proc/update()//Needs to be updated with the types + if(health > maxhealth) + health = maxhealth if(health <= 0) playsound(src.loc, 'splat.ogg', 50, 1) del(src) @@ -236,8 +283,33 @@ bullet_act(var/obj/item/projectile/Proj) if(!Proj) return - src.health -= Proj.damage - update() + var/damage = 0 + if(istype(Proj, /obj/item/projectile/energy/electrode)) + damage = Proj.damage + if(src.weakness == "elec") + damage += 20 + src.visible_message("\red \The [src] disintegrates slightly from \the [Proj]!") + if(src.strength == "elec") + damage -= 10 + src.visible_message("\red \The [src] absorbs \the [Proj]!") + else if(istype(Proj, /obj/item/projectile/beam)) + damage = Proj.damage + if(src.weakness == "fire") + damage = damage*2 + if(src.strength == "fire") + damage = -(damage*0.5) + src.visible_message("\red \The [src] absorbs \the [Proj]!") + else if(istype(Proj, /obj/item/projectile/bullet)) + damage = Proj.damage + if(src.weakness == "brute") + damage = damage*2 + if(src.strength == "brute") + damage = damage*0.5 + src.visible_message("\red \The [src] abosrbs \the [Proj]!") + else + damage = Proj.damage + src.health -= damage + src.update() return 0 @@ -248,11 +320,35 @@ switch(W.damtype) if("fire") damage = (W.force / max(src.fire_resist,1)) + if(src.weakness == "fire") + damage = damage*1.25 + if(src.strength == "fire") + damage = -(damage*0.5) + src.visible_message("\red The [src.name] rebuilds itself from the heat!") if(istype(W, /obj/item/weapon/weldingtool)) playsound(src.loc, 'Welder.ogg', 100, 1) if("brute") damage = (W.force / max(src.brute_resist,1)) - + if(istype(W, /obj/item/weapon/melee/baton)) + var/obj/item/weapon/melee/baton/T = W + if(T.status == 1 && T.charges > 0) //Copied over from stun baton code + playsound(src.loc, 'Egloves.ogg', 50, 1, -1) + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.charge -= 20 + else + T.charges-- + if(src.weakness == "elec") + damage = damage*2 + src.visible_message("\red The [src.name] disintegrates from the electricity!") + if(src.strength == "elec") + damage = -(damage*0.5) + src.visible_message("\red The [src.name] absorbs the electricity!") + if(src.weakness == "brute") + damage = damage*1.25 + if(src.strength == "brute") + damage = damage*0.5 + src.visible_message("\red The [src.name] rebounds the hit!") src.health -= damage src.update() return @@ -278,8 +374,10 @@ icon_state = "blobidle0" - New(loc, var/h = 10) + New(loc, var/h = 10, var/w = "fire", var/s = "brute") src.health = h + src.weakness = w + src.strength = s src.dir = pick(1,2,4,8) src.update_idle() @@ -298,7 +396,7 @@ Del() //idle blob that spawns a normal blob when killed. - var/obj/effect/blob/B = new /obj/effect/blob( src.loc ) + var/obj/effect/blob/B = new /obj/effect/blob(src.loc, src.weakness, src.strength) spawn(30) B.Life() ..() @@ -310,6 +408,17 @@ spawn() src.blobdebug = 1 src.Life() + src.weakness = pick("fire", "brute", "cold", "acid", "elec") + src.strength = pick("fire", "brute", "cold", "acid", "elec") + if(src.strength == src.weakness) //Yes, they could have the same weakness and strength, but this should reduce the odds. + src.strength = pick("fire", "brute", "cold", "acid", "elec") + var/w = src.weakness + if(w) + if(w == "fire") + src.fire_resist = 1 + if(w == "brute") + src.brute_resist = 1 + /obj/effect/blob/node/New() ..() diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index 31bfd9f0759..f033f30f5d1 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -734,6 +734,20 @@ datum M.take_organ_damage(min(15, volume * 2)) reaction_obj(var/obj/O, var/volume) + if(istype(O, /obj/effect/blob)) + var/obj/effect/blob/B = O + if(B.weakness == "acid") + B.health -= rand(volume*2,volume*3) + B.update() + O.visible_message("\red \The [O] sizzles violently!") + else if(B.strength == "acid") + B.health += rand(volume*0.5,volume*1) + B.update() + O.visible_message("\red \The [O] strengthens!") + else + B.health -= rand(volume*1,volume*1.5) + O.visible_message("\red \The [O] dissolves slightly.") + B.update() if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(10)) if(!O.unacidable) var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) @@ -801,6 +815,20 @@ datum M.take_organ_damage(min(15, volume * 4)) reaction_obj(var/obj/O, var/volume) + if(istype(O, /obj/effect/blob)) + var/obj/effect/blob/B = O + if(B.weakness == "acid") + B.health -= rand(volume*5,volume*6) + B.update() + O.visible_message("\red \The [O] sizzles violently!") + if(B.strength == "acid") + B.health += rand(volume*2,volume*3) + B.update() + O.visible_message("\red \The [O] strengthens!") + else + B.health -= rand(volume*2,volume*2.5) + O.visible_message("\red \The [O] dissolves slightly.") + B.update() if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom))) if(!O.unacidable) var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) From fe59af1a14a9df8d54e66b823d88a94e9192b195 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sat, 9 Jun 2012 01:53:54 +0100 Subject: [PATCH 2/5] Gah, didn't save these. --- code/game/gamemodes/blob/theblob.dm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index c329e7fd01e..f8487668f66 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -12,8 +12,8 @@ var/active = 1 var/health = 30 var/maxhealth = 60 - var/brute_resist = 2 - var/fire_resist = 2 + var/brute_resist = 3 + var/fire_resist = 3 var/blobtype = "Blob" var/blobdebug = 0 var/weakness = null //What works best @@ -39,11 +39,6 @@ src.fire_resist = 1 if(w == "brute") src.brute_resist = 1 - if(s) - if(s == "fire") - src.fire_resist = 4 - if(s == "brute") - src.brute_resist = 4 src.dir = pick(1,2,4,8) src.update() ..(loc) From 710ba29197682acfc18c3b64ac1fc5e5c03981f6 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sat, 9 Jun 2012 01:59:38 +0100 Subject: [PATCH 3/5] Removed some of Deus Dactyl's customs on request. --- code/modules/customitems/item_defines.dm | 9 ++++++--- config/custom_items.txt | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 7b2c7e55916..60ef6d82ac7 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -167,13 +167,15 @@ icon_state = "serithi_artalis_1" //////////// Hats //////////// - +//Removed by request +/* /obj/item/clothing/head/helmet/hardhat/fluff/greg_anderson_1 //deusdactyl: Greg Anderson name = "old hard hat" desc = "An old dented hard hat with the nametag \"Anderson\". It seems to be backwards." icon_state = "hardhat0_dblue" //Already an in-game sprite item_state = "hardhat0_dblue" color = "dblue" +*/ /obj/item/clothing/head/secsoft/fluff/swatcap //deusdactyl: James Girard name = "\improper SWAT hat" @@ -287,7 +289,8 @@ //////////// Sets //////////// ////// CDC //deusdactyl: Roger Wiles - +//Removed by request. +/* /obj/item/clothing/under/rank/virologist/fluff/cdc_jumpsuit name = "\improper CDC jumpsuit" desc = "A modified standard-issue CDC jumpsuit made of a special fiber that gives special protection against biohazards. It has a biohazard symbol sewn into the back." @@ -300,7 +303,7 @@ desc = "A standard-issue CDC labcoat that protects against minor chemical spills. It has the name \"Wiles\" sewn on to the breast pocket." icon = 'custom_items.dmi' icon_state = "labcoat_cdc_open" - +*/ ////// Short Sleeve Medical Outfit //erthilo: Farah Lants /obj/item/clothing/under/rank/medical/fluff/short diff --git a/config/custom_items.txt b/config/custom_items.txt index ba2fe35bad2..14eb2f9ed84 100644 --- a/config/custom_items.txt +++ b/config/custom_items.txt @@ -6,8 +6,6 @@ chinsky: Summer Springfield: /obj/item/weapon/camera_test/fluff/orange compactninja: Ysyr Rylias: /obj/item/weapon/reagent_containers/food/drinks/dry_ramen, /obj/item/weapon/reagent_containers/food/drinks/dry_ramen, /obj/item/weapon/reagent_containers/food/drinks/dry_ramen, /obj/item/weapon/reagent_containers/food/drinks/dry_ramen desiderium: Momiji Inubashiri: /obj/item/clothing/under/fluff/olddressuniform desiderium: Rook Maudlin: /obj/item/clothing/suit/storage/det_suit/fluff/retpolcoat, /obj/item/clothing/head/det_hat/fluff/retpolcap, /obj/item/clothing/under/det/fluff/retpoluniform -deusdactyl: Greg Anderson: /obj/item/clothing/head/helmet/hardhat/fluff/greg_anderson_1 -deusdactyl: Roger Wiles: /obj/item/clothing/under/rank/virologist/fluff/cdc_jumpsuit, /obj/item/clothing/suit/storage/labcoat/fluff/cdc_labcoat deusdactyl: James Girard: /obj/item/clothing/head/secsoft/fluff/swatcap eternal248: Maximilian Haynes: /obj/item/weapon/paper/certificate fastler: Fastler Greay: /obj/item/weapon/card/id/fluff/lifetime From 572a4197355182d105d7e3960e5a12ee755a5147 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sat, 9 Jun 2012 02:03:10 +0100 Subject: [PATCH 4/5] Changelog! --- html/changelog.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/html/changelog.html b/html/changelog.html index e0c8fb1ecaa..ac2584b9306 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -41,7 +41,7 @@ Header Section Code: Abi79, Aryn, Cael_Aislinn, Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, Lexusjjss, Melonstorm, Miniature, Mloc, SkyMarshal, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty
- Sprites: Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, Miniature, Xenone
+ Sprites: Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, Miniature, Searif, Xenone
Sounds: Aryn
Thanks To: /tg/ station, Goonstation, Animus Station, Daedalus, and original Spacestation 13 devs. Skibiliano for the IRC bot. @@ -57,6 +57,15 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit though. Thanks. --> +
+

09 June 2012

+

Erthilo updated:

+
    +
  • Blobs have evolved! Their weaknesses/strengths are now randomised. Experimentation ahoy!
  • +
  • Meteors have been fixed, and will therefore appear again. Meteor mode works too.
  • +
+
+

07 June 2012

SkyMarshal updated:

From 36877fcacda09710677277d96f73cfa539f57229 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sat, 9 Jun 2012 15:24:47 +0100 Subject: [PATCH 5/5] Blob code cleanup. --- code/defines/obj/decal.dm | 3 +++ code/game/gamemodes/blob/theblob.dm | 20 ++++++++++---------- code/game/objects/effect_system.dm | 1 + 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/code/defines/obj/decal.dm b/code/defines/obj/decal.dm index 222e22ed0a8..92a66b79b07 100644 --- a/code/defines/obj/decal.dm +++ b/code/defines/obj/decal.dm @@ -1,3 +1,6 @@ +/obj/effect/decal + pass_flags = PASSBLOB + /obj/effect/decal/ash name = "ashes" desc = "Ashes to ashes, dust to dust, and into space." diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index f8487668f66..d2b1c1923e9 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -16,6 +16,7 @@ var/fire_resist = 3 var/blobtype = "Blob" var/blobdebug = 0 + var/list/blob_attributes = list("fire","brute","cold","elec","acid") var/weakness = null //What works best var/strength = null //What doesn't/heals them /*Types @@ -61,7 +62,6 @@ CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if((air_group && blobtype != "Shield") || (height==0)) return 1 if(istype(mover) && mover.pass_flags&PASSBLOB) return 1 - if(istype(mover, /obj/effect/decal) || istype(mover, /obj/effect/effect/chem_smoke)) return 1 return 0 @@ -88,10 +88,10 @@ blobtype = "Core" blob_cores += src processing_objects.Add(src) - weakness = pick("fire", "brute", "cold", "acid", "elec") - strength = pick("fire", "brute", "cold", "acid", "elec") - if(src.strength == src.weakness) //Yes, they could have the same weakness and strength, but this should reduce the odds. - src.strength = pick("fire", "brute", "cold", "acid", "elec") + var/list/a = blob_attributes + weakness = pick(a) + a -= weakness + strength = pick(a) var/w = src.weakness if(w) if(w == "fire") @@ -300,7 +300,7 @@ damage = damage*2 if(src.strength == "brute") damage = damage*0.5 - src.visible_message("\red \The [src] abosrbs \the [Proj]!") + src.visible_message("\red \The [src] absorbs \the [Proj]!") else damage = Proj.damage src.health -= damage @@ -403,10 +403,10 @@ spawn() src.blobdebug = 1 src.Life() - src.weakness = pick("fire", "brute", "cold", "acid", "elec") - src.strength = pick("fire", "brute", "cold", "acid", "elec") - if(src.strength == src.weakness) //Yes, they could have the same weakness and strength, but this should reduce the odds. - src.strength = pick("fire", "brute", "cold", "acid", "elec") + var/list/a = blob_attributes + weakness = pick(a) + a -= weakness + strength = pick(a) var/w = src.weakness if(w) if(w == "fire") diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index 1c0d6480d01..3e80c869db6 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -393,6 +393,7 @@ steam.start() -- spawns the effect opacity = 1 anchored = 0.0 mouse_opacity = 0 + pass_flags = PASSBLOB var/amount = 6.0 var/divisor = 1