This commit is contained in:
Fox-McCloud
2015-01-15 19:42:15 -05:00
parent 342200d6fc
commit baa88a7463
18 changed files with 172 additions and 64 deletions
@@ -179,7 +179,8 @@
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)
if((P.damage_type == BRUTE || P.damage_type == BURN))
adjustBruteLoss(P.damage * 0.5)
visible_message("<span class='danger'>The [P.name] gets reflected by [src]'s shell!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [src]'s shell!</span>")
@@ -11,7 +11,7 @@
var/projectiletype
var/projectilesound
var/casingtype
var/move_to_delay = 2 //delay for the automated movement.
var/move_to_delay = 3 //delay for the automated movement.
var/list/friends = list()
var/vision_range = 9 //How big of an area to search for targets in, a vision of 9 attempts to find targets as soon as they walk into screen view
@@ -32,8 +32,8 @@
/mob/living/simple_animal/hostile/asteroid/bullet_act(var/obj/item/projectile/P)//Reduces damage from most projectiles to curb off-screen kills
if(!stat)
Aggro()
if(P.damage < 30)
P.damage = (P.damage / 2)
if(P.damage < 30 && P.damage_type != BRUTE)
P.damage = (P.damage / 3)
visible_message("<span class='danger'>The [P] has a reduced effect on [src]!</span>")
..()
@@ -42,7 +42,7 @@
var/obj/item/T = AM
if(!stat)
Aggro()
if(T.throwforce <= 15)
if(T.throwforce <= 20)
visible_message("<span class='notice'>The [T.name] [src.throw_message] [src.name]!</span>")
return
..()
@@ -76,6 +76,7 @@
ranged_cooldown_cap = 4
aggro_vision_range = 9
idle_vision_range = 2
turns_per_move = 5
/obj/item/projectile/temp/basilisk
name = "freezing blast"
@@ -123,13 +124,13 @@
icon_aggro = "Goldgrub_alert"
icon_dead = "Goldgrub_dead"
icon_gib = "syndicate_gib"
vision_range = 3
vision_range = 2
aggro_vision_range = 9
idle_vision_range = 3
move_to_delay = 3
idle_vision_range = 2
move_to_delay = 5
friendly = "harmlessly rolls into"
maxHealth = 60
health = 60
maxHealth = 45
health = 45
harm_intent_damage = 5
melee_damage_lower = 0
melee_damage_upper = 0
@@ -208,6 +209,10 @@
Reward()
..()
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustBruteLoss(var/damage)
idle_vision_range = 9
..()
/mob/living/simple_animal/hostile/asteroid/hivelord
name = "hivelord"
desc = "A truly alien creature, it is a mass of unknown organic material, constantly fluctuating. When attacking, pieces of it split off and attack in tandem with the original."
@@ -293,7 +298,7 @@
icon_dead = "Hivelordbrood"
icon_gib = "syndicate_gib"
mouse_opacity = 2
move_to_delay = 0
move_to_delay = 1
friendly = "buzzes near"
vision_range = 10
speed = 3
@@ -328,9 +333,10 @@
mouse_opacity = 2
move_to_delay = 40
ranged = 1
ranged_cooldown = 2 //By default, start the Goliath with his cooldown off so that people can run away quickly on first sight
ranged_cooldown_cap = 8
friendly = "wails at"
vision_range = 5
vision_range = 4
speed = 3
maxHealth = 300
health = 300
@@ -341,18 +347,50 @@
throw_message = "does nothing to the rocky hide of the"
aggro_vision_range = 9
idle_vision_range = 5
anchored = 1 //Stays anchored until death as to be unpullable
var/pre_attack = 0
/mob/living/simple_animal/hostile/asteroid/goliath/Life()
..()
handle_preattack()
/mob/living/simple_animal/hostile/asteroid/goliath/proc/handle_preattack()
if(ranged_cooldown <= 2 && !pre_attack)
pre_attack++
if(!pre_attack || stat || stance == HOSTILE_STANCE_IDLE)
return
icon_state = "Goliath_preattack"
/mob/living/simple_animal/hostile/asteroid/goliath/revive()
anchored = 1
..()
/mob/living/simple_animal/hostile/asteroid/goliath/Die()
anchored = 0
..()
/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire()
visible_message("<span class='warning'>The [src.name] digs its tentacles under [target.name]!</span>")
var/tturf = get_turf(target)
new /obj/effect/goliath_tentacle/original(tturf)
ranged_cooldown = ranged_cooldown_cap
if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen
visible_message("<span class='warning'>The [src.name] digs its tentacles under [target.name]!</span>")
new /obj/effect/goliath_tentacle/original(tturf)
ranged_cooldown = ranged_cooldown_cap
icon_state = icon_aggro
pre_attack = 0
return
/mob/living/simple_animal/hostile/asteroid/goliath/adjustBruteLoss(var/damage)
ranged_cooldown--
handle_preattack()
..()
/mob/living/simple_animal/hostile/asteroid/goliath/Aggro()
vision_range = aggro_vision_range
handle_preattack()
if(icon_state != icon_aggro)
icon_state = icon_aggro
return
/obj/effect/goliath_tentacle/
name = "Goliath tentacle"
icon = 'icons/mob/animal.dmi'
@@ -369,6 +407,9 @@
/obj/effect/goliath_tentacle/original
/obj/effect/goliath_tentacle/original/New()
for(var/obj/effect/goliath_tentacle/original/O in loc)//No more GG NO RE from 2+ goliaths simultaneously tentacling you
if(O != src)
qdel(src)
var/list/directions = cardinal.Copy()
var/counter
for(counter = 1, counter <= 3, counter++)
@@ -378,6 +419,7 @@
new /obj/effect/goliath_tentacle(T)
..()
/obj/effect/goliath_tentacle/proc/Trip()
for(var/mob/living/M in src.loc)
M.Weaken(5)
@@ -400,6 +442,7 @@
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
icon = 'icons/obj/items.dmi'
icon_state = "goliath_hide"
flags = NOBLUDGEON
w_class = 3
layer = 4
@@ -408,10 +451,31 @@
if(istype(target, /obj/item/clothing/suit/space/rig/mining) || istype(target, /obj/item/clothing/head/helmet/space/rig/mining))
var/obj/item/clothing/C = target
var/current_armor = C.armor
if(current_armor.["melee"] < 90)
current_armor.["melee"] = min(current_armor.["melee"] + 10, 90)
if(current_armor.["melee"] < 80)
current_armor.["melee"] = min(current_armor.["melee"] + 10, 80)
user << "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>"
del(src)
else
user << "<span class='info'>You can't improve [C] any further.</span>"
return
return
if(istype(target, /obj/mecha/working/ripley))
var/obj/mecha/D = target
var/list/damage_absorption = D.damage_absorption
if(damage_absorption.["brute"] > 0.3)
damage_absorption.["brute"] = max(damage_absorption.["brute"] - 0.1, 0.3)
user << "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>"
qdel(src)
if(D.icon_state == "ripley-open")
D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open")
D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates."
else
user << "<span class='info'>You can't add armour onto the mech while someone is inside!</span>"
if(damage_absorption.["brute"] == 0.3)
if(D.icon_state == "ripley-open")
D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open")
D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter."
else
user << "<span class='info'>You can't add armour onto the mech while someone is inside!</span>"
else
user << "<span class='info'>You can't improve [D] any further.</span>"
return
@@ -75,7 +75,8 @@
/mob/living/simple_animal/hostile/syndicate/melee/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
if(prob(65))
src.health -= Proj.damage
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
src.health -= Proj.damage
else
visible_message("\red <B>[src] blocks [Proj] with its shield!</B>")
return 0
@@ -56,7 +56,7 @@
var/friendly = "nuzzles" //If the mob does no damage with it's attack
var/environment_smash = 0 //Set to 1 to allow breaking of crates,lockers,racks,tables; 2 for walls; 3 for Rwalls
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
var/speed = 1 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
var/can_hide = 0
//Hot simple_animal baby making vars
@@ -251,8 +251,11 @@
adjustBruteLoss(damage)
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
adjustBruteLoss(Proj.damage)
if(!Proj)
return
if((Proj.damage_type != STAMINA))
adjustBruteLoss(Proj.damage)
Proj.on_hit(src, 0)
return 0
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)