Files
Aurora.3/code/modules/mob/living/simple_animal/constructs.dm
unknown 39b467c9da New bullet types, projectile rewrite
* Refactors projectile Bump()
* Converts projectile_type var strings to paths
* Reorganizes bullet projectile paths
* Made a pass through all the bullet_act() definitions. Mainly ensured that damage_type is checked when dealing damage to certain objects. Removed stupid /turf bullet_act() override, replaced with on_hit() overrides on the relevant projectiles.

* Adds shotgun pellets projectile. Adds Raptor's shotgun slug sprite.
* Gives stunshots more of their own identity, refluffs them as taser cartridges for shotguns. They still aren't obtainable anywhere unless spawned.
* Makes projectiles pass through girders and cultgirders with a certain probability, unless the girder itself was clicked.
* Projectiles are also able to pass through grilles. Low damage projectiles have a chance to be blocked by grilles. High damage projectiles have a chance to have some damage absorbed by the grille.
* Makes projectiles for blanks invisible.
* Adds flash bullet types
* Adds support for 'penetrating' projectiles
* Swaps .45 and 9mm projectile types. .45s hit slightly harder, 9mils have more ammo capacity.
2015-02-06 20:09:32 -05:00

313 lines
9.0 KiB
Plaintext

/mob/living/simple_animal/construct
name = "Construct"
real_name = "Construct"
desc = ""
speak_emote = list("hisses")
emote_hear = list("wails","screeches")
response_help = "thinks better of touching"
response_disarm = "flails at"
response_harm = "punches"
icon_dead = "shade_dead"
speed = -1
a_intent = "harm"
stop_automated_movement = 1
status_flags = CANPUSH
universal_speak = 1
attack_sound = 'sound/weapons/punch1.ogg'
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
faction = "cult"
var/list/construct_spells = list()
/mob/living/simple_animal/construct/New()
..()
name = text("[initial(name)] ([rand(1, 1000)])")
real_name = name
for(var/spell in construct_spells)
spell_list += new spell(src)
/mob/living/simple_animal/construct/death()
new /obj/item/weapon/ectoplasm (src.loc)
..(null,"collapses in a shattered heap.")
ghostize()
del src
/mob/living/simple_animal/construct/attack_generic(var/mob/user)
if(istype(user, /mob/living/simple_animal/construct/builder))
if(health < maxHealth)
adjustBruteLoss(-5)
user.visible_message("<b>\The [user]</b> mends some of \the [src]'s wounds.")
else
user << "<span class='notice'>\The [src] is undamaged.</span>"
return
return ..()
/mob/living/simple_animal/construct/examine(mob/user)
..(user)
var/msg = ""
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
if (src.health >= src.maxHealth/2)
msg += "It looks slightly dented.\n"
else
msg += "<B>It looks severely dented!</B>\n"
msg += "</span>"
msg += "*---------*</span>"
user << msg
return
/mob/living/simple_animal/construct/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
/////////////////Juggernaut///////////////
/mob/living/simple_animal/construct/armoured
name = "Juggernaut"
real_name = "Juggernaut"
desc = "A possessed suit of armour driven by the will of the restless dead"
icon = 'icons/mob/mob.dmi'
icon_state = "behemoth"
icon_living = "behemoth"
maxHealth = 250
health = 250
response_harm = "harmlessly punches"
harm_intent_damage = 0
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "smashed their armoured gauntlet into"
mob_size = 20
speed = 3
wall_smash = 1
attack_sound = 'sound/weapons/punch3.ogg'
status_flags = 0
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
/mob/living/simple_animal/construct/armoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
/mob/living/simple_animal/construct/armoured/Life()
weakened = 0
..()
/mob/living/simple_animal/construct/armoured/bullet_act(var/obj/item/projectile/P)
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
var/reflectchance = 80 - round(P.damage/3)
if(prob(reflectchance))
adjustBruteLoss(P.damage * 0.5)
visible_message("<span class='danger'>\The [P] was reflected by \the [src]'s shell!</span>", \
"<span class='userdanger'>\The [P] was reflected by \the [src]'s shell!</span>")
// Find a turf near or on the original location to bounce to
if(P.starting)
var/new_x = P.starting.x + pick(0, 0, -1, 1, -2, 2, -2, 2, -2, 2, -3, 3, -3, 3)
var/new_y = P.starting.y + pick(0, 0, -1, 1, -2, 2, -2, 2, -2, 2, -3, 3, -3, 3)
var/turf/curloc = get_turf(src)
// redirect the projectile
P.redirect(new_x, new_y, curloc, src)
return -1 // complete projectile permutation
return (..(P))
////////////////////////Wraith/////////////////////////////////////////////
/mob/living/simple_animal/construct/wraith
name = "Wraith"
real_name = "Wraith"
desc = "A wicked bladed shell contraption piloted by a bound spirit"
icon = 'icons/mob/mob.dmi'
icon_state = "floating"
icon_living = "floating"
maxHealth = 75
health = 75
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashed"
speed = -1
see_in_dark = 7
attack_sound = 'sound/weapons/bladeslice.ogg'
construct_spells = list(/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift)
/////////////////////////////Artificer/////////////////////////
/mob/living/simple_animal/construct/builder
name = "Artificer"
real_name = "Artificer"
desc = "A bulbous construct dedicated to building and maintaining The Cult of Nar-Sie's armies"
icon = 'icons/mob/mob.dmi'
icon_state = "artificer"
icon_living = "artificer"
maxHealth = 50
health = 50
response_harm = "viciously beats"
harm_intent_damage = 5
melee_damage_lower = 5
melee_damage_upper = 5
attacktext = "rammed"
speed = 0
wall_smash = 1
attack_sound = 'sound/weapons/punch2.ogg'
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser,
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor,
/obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone,)
/////////////////////////////Behemoth/////////////////////////
/mob/living/simple_animal/construct/behemoth
name = "Behemoth"
real_name = "Behemoth"
desc = "The pinnacle of occult technology, Behemoths are the ultimate weapon in the Cult of Nar-Sie's arsenal."
icon = 'icons/mob/mob.dmi'
icon_state = "behemoth"
icon_living = "behemoth"
maxHealth = 750
health = 750
speak_emote = list("rumbles")
response_harm = "harmlessly punches"
harm_intent_damage = 0
melee_damage_lower = 50
melee_damage_upper = 50
attacktext = "brutally crushed"
speed = 5
wall_smash = 1
attack_sound = 'sound/weapons/punch4.ogg'
mob_size = 20
var/energy = 0
var/max_energy = 1000
/mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
////////////////Powers//////////////////
/*
/client/proc/summon_cultist()
set category = "Behemoth"
set name = "Summon Cultist (300)"
set desc = "Teleport a cultist to your location"
if (istype(usr,/mob/living/simple_animal/constructbehemoth))
if(usr.energy<300)
usr << "\red You do not have enough power stored!"
return
if(usr.stat)
return
usr.energy -= 300
var/list/mob/living/cultists = new
for(var/datum/mind/H in ticker.mode.cult)
if (istype(H.current,/mob/living))
cultists+=H.current
var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - usr)
if(!cultist)
return
if (cultist == usr) //just to be sure.
return
cultist.loc = usr.loc
usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/