From 49dfb52cea127686483173d9f8fd0b936140f11c Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Sun, 25 Oct 2015 21:42:47 -0500 Subject: [PATCH 1/2] Parasites --- code/__DEFINES/is_helpers.dm | 2 + code/_onclick/hud/hud.dm | 2 + .../living/simple_animal/guardian/guardian.dm | 158 ++++++++++++++---- icons/mob/guardian.dmi | Bin 0 -> 2746 bytes 4 files changed, 133 insertions(+), 29 deletions(-) create mode 100644 icons/mob/guardian.dmi diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index f3f476f9788..a1639cdaf3e 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -58,6 +58,8 @@ #define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer)) +#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian)) + #define islimb(A) (istype(A, /obj/item/organ/limb)) // ASSEMBLY HELPERS diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index d947bfa6553..3efbb13d9e3 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -199,6 +199,8 @@ var/datum/global_hud/global_hud = new() drone_hud(ui_style) else if(isswarmer(mymob)) swarmer_hud() + else if(isguardian(mymob)) + guardian_hud() //Version denotes which style should be displayed. blank or 0 means "next version" diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 9c0d195af4e..03a777316e5 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -16,6 +16,7 @@ attack_sound = 'sound/weapons/punch1.ogg' atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 + maxbodytemp = 10000000 attacktext = "punches" maxHealth = 100000 //The spirit itself is invincible health = 100000 @@ -39,12 +40,17 @@ if(summoner) if(summoner.stat == DEAD) src << "Your summoner has died!" - visible_message("The [src] dies along with its user!") + visible_message("The [src] dies along with its user!") + summoner.visible_message("[summoner]'s body is completely consumed by the strain of sustaining [src]!") + for(var/obj/item/W in summoner) + if(!summoner.unEquip(W)) + qdel(W) + summoner.dust() ghostize() qdel(src) else src << "Your summoner has died!" - visible_message("The [src] dies along with its user!") + visible_message("The [src] dies along with its user!") ghostize() qdel(src) if(summoner) @@ -74,10 +80,10 @@ summoner.adjustBruteLoss(damage) if(damage) summoner << "Your [name] is under attack! You take damage!" - summoner.visible_message("Blood sprays from [summoner] as [src] takes damage!") + summoner.visible_message("Blood sprays from [summoner] as [src] takes damage!") if(summoner.stat == UNCONSCIOUS) summoner << "Your body can't take the strain of sustaining [src] in this condition, it begins to fall apart!" - summoner.adjustCloneLoss(damage/2) + summoner.adjustCloneLoss(damage) /mob/living/simple_animal/hostile/guardian/ex_act(severity, target) switch (severity) @@ -99,10 +105,7 @@ //Manifest, Recall, Communicate -/mob/living/simple_animal/hostile/guardian/verb/Manifest() - set name = "Manifest" - set category = "Guardian" - set desc = "Spring forth into battle!" +/mob/living/simple_animal/hostile/guardian/proc/Manifest() if(cooldown > world.time) return if(loc == summoner) @@ -114,20 +117,14 @@ spawn(6) icon_state = end_icon -/mob/living/simple_animal/hostile/guardian/verb/Recall() - set name = "Recall" - set category = "Guardian" - set desc = "Return to your summoner." +/mob/living/simple_animal/hostile/guardian/proc/Recall() if(cooldown > world.time) return loc = summoner buckled = null cooldown = world.time + 30 -/mob/living/simple_animal/hostile/guardian/verb/Communicate() - set name = "Communicate" - set category = "Guardian" - set desc = "Communicate telepathically with your summoner." +/mob/living/simple_animal/hostile/guardian/proc/Communicate() var/input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "") if(!input) return @@ -137,6 +134,10 @@ src << "[src]: [input]" log_say("[src.real_name]/[src.key] : [input]") +/mob/living/simple_animal/hostile/guardian/proc/ToggleMode() + src << "You dont have another mode!" + + /mob/living/proc/guardian_comm() set name = "Communicate" set category = "Guardian" @@ -155,6 +156,13 @@ log_say("[src.real_name]/[src.key] : [text]") +/mob/living/simple_animal/hostile/guardian/proc/ToggleLight() + if(!luminosity) + SetLuminosity(3) + else + SetLuminosity(0) + + //////////////////////////TYPES OF GUARDIANS @@ -182,7 +190,7 @@ /mob/living/simple_animal/hostile/guardian/fire/AttackingTarget() ..() - if(prob(30)) + if(prob(45)) if(istype(target, /atom/movable)) var/atom/movable/M = target if(!M.anchored && M != summoner) @@ -203,8 +211,8 @@ /mob/living/simple_animal/hostile/guardian/fire/proc/collision_ignite(AM as mob|obj) if(istype(AM, /mob/living/)) var/mob/living/M = AM - if(AM != summoner) - M.adjust_fire_stacks(7) + if(AM != summoner && M.fire_stacks < 7) + M.fire_stacks = 7 M.IgniteMob() /mob/living/simple_animal/hostile/guardian/fire/Bump(AM as mob|obj) @@ -277,10 +285,7 @@ C.adjustOxyLoss(-5) C.adjustToxLoss(-5) -/mob/living/simple_animal/hostile/guardian/healer/verb/ToggleMode() - set name = "Toggle Mode" - set category = "Guardian" - set desc = "Toggle between combat and healing modes." +/mob/living/simple_animal/hostile/guardian/healer/ToggleMode() if(src.loc == summoner) if(toggle) a_intent = "harm" @@ -366,6 +371,7 @@ icon_state = "guardian" damage = 5 damage_type = BRUTE + armour_penetration = 100 /mob/living/simple_animal/hostile/guardian/ranged a_intent = "help" @@ -385,10 +391,7 @@ var/list/snares = list() var/toggle = FALSE -/mob/living/simple_animal/hostile/guardian/ranged/verb/ToggleMode() - set name = "Toggle Mode" - set category = "Guardian" - set desc = "Toggle between combat and scout modes." +/mob/living/simple_animal/hostile/guardian/ranged/ToggleMode() if(src.loc == summoner) if(toggle) ranged = 1 @@ -475,11 +478,11 @@ if(bomb_cooldown <= world.time && !stat) var/obj/item/weapon/guardian_bomb/B = new /obj/item/weapon/guardian_bomb(get_turf(A)) src << "Success! Bomb armed!" - bomb_cooldown = world.time + 400 + bomb_cooldown = world.time + 200 B.spawner = src B.disguise (A) else - src << "Your powers are on cooldown! You must wait 40 seconds between bombs." + src << "Your powers are on cooldown! You must wait 20 seconds between bombs." /obj/item/weapon/guardian_bomb name = "bomb" @@ -677,3 +680,100 @@ new /obj/item/weapon/guardiancreator/tech/choose(src) new /obj/item/weapon/paper/guardian(src) return + + + + + + + +///HUD + +/datum/hud/proc/guardian_hud(ui_style = 'icons/mob/screen_midnight.dmi') + adding = list() + + var/obj/screen/using + + using = new /obj/screen/guardian/Manifest() + using.screen_loc = ui_rhand + adding += using + + using = new /obj/screen/guardian/Recall() + using.screen_loc = ui_lhand + adding += using + + using = new /obj/screen/guardian/ToggleMode() + using.screen_loc = ui_storage1 + adding += using + + using = new /obj/screen/guardian/ToggleLight() + using.screen_loc = ui_back + adding += using + + using = new /obj/screen/guardian/Communicate() + using.screen_loc = ui_inventory + adding += using + + mymob.client.screen = list() + mymob.client.screen += mymob.client.void + mymob.client.screen += adding + + + + +//HUD BUTTONS + +/obj/screen/guardian + icon = 'icons/mob/guardian.dmi' + +/obj/screen/guardian/Manifest + icon_state = "manifest" + name = "Manifest" + desc = "Spring forth into battle!" + +/obj/screen/guardian/Manifest/Click() + if(isguardian(usr)) + var/mob/living/simple_animal/hostile/guardian/G = usr + G.Manifest() + + +/obj/screen/guardian/Recall + icon_state = "recall" + name = "Recall" + desc = "Return to your user." + +/obj/screen/guardian/Recall/Click() + if(isguardian(usr)) + var/mob/living/simple_animal/hostile/guardian/G = usr + G.Recall() + +/obj/screen/guardian/ToggleMode + icon_state = "toggle" + name = "Toggle Mode" + desc = "Switch between ability modes." + +/obj/screen/guardian/ToggleMode/Click() + if(isguardian(usr)) + var/mob/living/simple_animal/hostile/guardian/G = usr + G.ToggleMode() + +/obj/screen/guardian/Communicate + icon_state = "communicate" + name = "Communicate" + desc = "Communicate telepathically with your user." + +/obj/screen/guardian/Communicate/Click() + if(isguardian(usr)) + var/mob/living/simple_animal/hostile/guardian/G = usr + G.Communicate() + + +/obj/screen/guardian/ToggleLight + icon_state = "light" + name = "Toggle Light" + desc = "Glow like star dust." + +/obj/screen/guardian/ToggleLight/Click() + if(isguardian(usr)) + var/mob/living/simple_animal/hostile/guardian/G = usr + G.ToggleLight() \ No newline at end of file diff --git a/icons/mob/guardian.dmi b/icons/mob/guardian.dmi new file mode 100644 index 0000000000000000000000000000000000000000..9db3fbedc689b4c206903be487e836ad431d6187 GIT binary patch literal 2746 zcmV;r3PtsaP)V=-0C=2*%{vOiFc3x2TC<6ozy`-Met$ zjrf?J^NMDf;Z3!1$*A#uI)nP~CIL0xuAl<34{}5kD})+{$UevbYUA2a;|0`SZK7lU zlq)H{GCM2OwNku~eU@zIom&69lCv@XV{t!E1X0lZE_{(EMyRuwhrEn;LBd1cXEy0!4kG5{-&@XjK}iqE%lSfhx7? zsuhUtLmz^wXsaT1wG<(-s8zN=x=098qO>tVp(qInPMjkRRn4DQTwE3`Dk{wcKYYF! z0KjVIUnBd${wj!zib_K&FSP3T#Q^wxGxqiC*Q2noSn=g(M59s3wZ&r5P44&4*?qnl zySxxq3;&@L?M%n%pNRYt2drKDMko*nBoL$u7K;UI*S-+~ps2Lho&Q+-8Rl;v{feXc zB>`YrHf`ht7K;V*^FGCUuQUJQwo^=3=UI+rSqZ-+0O^cAK{C5$6aPr7mr+Xd&ZSDu zDCe>EGt8&wPIF59%W^>9XU7=;XgKnT?w2yEz{o@;0|3@4FGtR`K&Q1 zP*T1czb*&Rs_whq!;pf9JC?vDTo3oU8R7;tC+Jn6yuPQ^fBo(k0DzWVO^VmMYFxNG z2Fdfp5r!Q=Lx%&@luuyF0TSh}cf||7wo^E|+k~Ubg}&=OOfo0vR^Xe1Le;ZSr>o&r zLok*P0tWd3vCbFIsdP$6rhEd^ZGfnJs_+9#HNtbXoxpILaL?tEI6>(J4E2H*lKnZ_ z(5iz~`AMBmS3|L2D5+aZ`D*;;dO@+mZ)n&fR5yKh7%>P`UTQC(hGe}UK)dRZUn{+b z9{zVORdOS(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)IUBl zh|==vv^gM^$XW;7-cS^6UhvzVmX(LC&#f4J@BKv2%rCbbO+!Vm8DO|NH~?q zY6m1!AaTOGG4)3x!WwLPet2PiPO}}zIY0_S`vV+5|Fwnm|2=gsaXy&V{C9rz3#RAF zh1C7OpcG@pI)GqkpjS*wBgAv!;4D=;RMLU0cL1Qi6#L<=&pCNof+zp$=K$b|!aag) z-ye_( Date: Tue, 27 Oct 2015 05:13:09 -0500 Subject: [PATCH 2/2] Cloneloss --- code/modules/mob/living/simple_animal/guardian/guardian.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 03a777316e5..d60b0b1ad6f 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -83,7 +83,7 @@ summoner.visible_message("Blood sprays from [summoner] as [src] takes damage!") if(summoner.stat == UNCONSCIOUS) summoner << "Your body can't take the strain of sustaining [src] in this condition, it begins to fall apart!" - summoner.adjustCloneLoss(damage) + summoner.adjustCloneLoss(damage/2) /mob/living/simple_animal/hostile/guardian/ex_act(severity, target) switch (severity) @@ -776,4 +776,4 @@ /obj/screen/guardian/ToggleLight/Click() if(isguardian(usr)) var/mob/living/simple_animal/hostile/guardian/G = usr - G.ToggleLight() \ No newline at end of file + G.ToggleLight()