From 8d3e3cf98b369ef5cb48cbdc3106f82763272371 Mon Sep 17 00:00:00 2001 From: Delimusca Date: Sun, 25 Jan 2015 15:16:24 -0700 Subject: [PATCH 1/2] added slime naming verb, dragdrop feeding, and stealing mass from other slimes --- .../modules/mob/living/carbon/slime/powers.dm | 14 ++++++++++- code/modules/mob/living/carbon/slime/slime.dm | 25 +++++++++++++------ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/slime/powers.dm b/code/modules/mob/living/carbon/slime/powers.dm index ef91582c3ec..09bda14bd37 100644 --- a/code/modules/mob/living/carbon/slime/powers.dm +++ b/code/modules/mob/living/carbon/slime/powers.dm @@ -226,4 +226,16 @@ else src << "I am not ready to reproduce yet..." else - src << "I am not old enough to reproduce yet..." \ No newline at end of file + src << "I am not old enough to reproduce yet..." + +/mob/living/carbon/slime/verb/SetSlimeName() + set name = "Set Name" + set category = "Slime" + set desc = "This will change your name." + + var/OldSlimeName = name + var/NewSlimeName = copytext(sanitize(input(usr, "Put your gooey title here.", "Pick a name!", OldSlimeName)),1,MAX_NAME_LEN) + + if (length(NewSlimeName) == 0) + NewSlimeName = OldSlimeName + name = NewSlimeName \ No newline at end of file diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index d0703c45ccd..d16479d808c 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -204,6 +204,12 @@ updatehealth() return +/mob/living/carbon/slime/MouseDrop(var/atom/movable/A as mob|obj) + if(isliving(A) && A != usr) + var/mob/living/Food = A + if(Food.Adjacent(usr) && !stat && Food.stat != DEAD) //messy + Feedon(Food) //lmao + ..() /mob/living/carbon/slime/unEquip(obj/item/W as obj) return @@ -216,14 +222,19 @@ /mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob) ..() - var/damage = rand(1, 3) + if(src.Victim) + src.Victim = null + visible_message("[M] pulls [src] off!") + return attacked += 5 - if(M.is_adult) - damage = rand(1, 6) - else - damage = rand(1, 3) - adjustBruteLoss(damage) - updatehealth() + if(src.nutrition >= 100) //steal some nutrition. negval handled in life() + src.nutrition -= (50 + (5 * M.amount_grown)) + M.add_nutrition(50 + (5 * M.amount_grown)) + if(src.health > 0) + src.adjustBruteLoss(4 + (2 * M.amount_grown)) //amt_grown isn't very linear but it works + src.updatehealth() + M.adjustBruteLoss(-4 + (-2 * M.amount_grown)) + M.updatehealth() return /mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob) From f1be4d510caee7c0c671e24f16574ad14795f379 Mon Sep 17 00:00:00 2001 From: Delimusca Date: Mon, 26 Jan 2015 03:08:18 -0700 Subject: [PATCH 2/2] removed slime naming and 3am comment --- code/modules/mob/living/carbon/slime/powers.dm | 14 +------------- code/modules/mob/living/carbon/slime/slime.dm | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/code/modules/mob/living/carbon/slime/powers.dm b/code/modules/mob/living/carbon/slime/powers.dm index 09bda14bd37..ef91582c3ec 100644 --- a/code/modules/mob/living/carbon/slime/powers.dm +++ b/code/modules/mob/living/carbon/slime/powers.dm @@ -226,16 +226,4 @@ else src << "I am not ready to reproduce yet..." else - src << "I am not old enough to reproduce yet..." - -/mob/living/carbon/slime/verb/SetSlimeName() - set name = "Set Name" - set category = "Slime" - set desc = "This will change your name." - - var/OldSlimeName = name - var/NewSlimeName = copytext(sanitize(input(usr, "Put your gooey title here.", "Pick a name!", OldSlimeName)),1,MAX_NAME_LEN) - - if (length(NewSlimeName) == 0) - NewSlimeName = OldSlimeName - name = NewSlimeName \ No newline at end of file + src << "I am not old enough to reproduce yet..." \ No newline at end of file diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index d16479d808c..0c4d805ded1 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -208,7 +208,7 @@ if(isliving(A) && A != usr) var/mob/living/Food = A if(Food.Adjacent(usr) && !stat && Food.stat != DEAD) //messy - Feedon(Food) //lmao + Feedon(Food) ..() /mob/living/carbon/slime/unEquip(obj/item/W as obj)