This commit is contained in:
kevinz000
2020-03-16 04:18:22 -07:00
parent 857f793600
commit 69374c64c9
8 changed files with 36 additions and 41 deletions
+2 -2
View File
@@ -227,8 +227,8 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BLOCK_PHYSICAL_INTERNAL (1<<5)
/// Attack outright missed because the target dodged. Should usually be combined with redirection passthrough or something (see martial arts)
#define BLOCK_TARGET_DODGED (1<<7)
/// Meta-flag for run_block/do_run_block : Whatever triggered this has completely blocked the attack (or failed so miserably hard it wants us to stop for when that's implemented), do not keep checking. Most methods of block should probably use this.
#define BLOCK_INTERRUPT_CHAIN (1<<8)
/// Meta-flag for run_block/do_run_block : By default, BLOCK_SUCCESS tells do_run_block() to assume the attack is completely blocked and not continue the block chain. If this is present, it will continue to check other items in the chain rather than stopping.
#define BLOCK_cONTINUE_CHAIN (1<<8)
/// For keys in associative list/block_return as we don't want to saturate our (somewhat) limited flags.
#define BLOCK_RETURN_REDIRECT_METHOD "REDIRECT_METHOD"
+5 -5
View File
@@ -289,6 +289,8 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
var/hacked = FALSE
/// Can this reflect all energy projectiles?
var/can_reflect = TRUE
var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD
var/list/possible_colors = list("red", "blue", "green", "purple")
var/list/rainbow_colors = list(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
@@ -376,7 +378,7 @@
/obj/item/twohanded/dualsaber/run_block(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(!wielded)
return NONE
if(is_energy_reflectable_projectile(object) && (attack_type == ATTACK_TYPE_PROJECTILE))
if(can_reflect && is_energy_reflectable_projectile(object) && (attack_type == ATTACK_TYPE_PROJECTILE))
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER //no you
return BLOCK_SHOULD_REDIRECT | BLOCK_SUCCESS | BLOCK_REDIRECTED
return ..()
@@ -559,15 +561,13 @@
block_chance = 50
armour_penetration = 0
var/chaplain_spawnable = TRUE
can_reflect = FALSE
obj_flags = UNIQUE_RENAME
/obj/item/twohanded/dualsaber/hypereutactic/chaplain/ComponentInitialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
/obj/item/twohanded/dualsaber/hypereutactic/chaplain/IsReflect()
return FALSE
//spears
/obj/item/twohanded/spear
icon_state = "spearglass0"
@@ -905,7 +905,7 @@
owner.visible_message("<span class='danger'>[owner] deflects [attack_text] with [src]!</span>")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
return BLOCK_SUCCESS | BLOCK_REDIRECT | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL
else
owner.visible_message("<span class='danger'>[owner] parries [attack_text] with [src]!</span>")
return BLOCK_SUCCESS | BLOCK_PARRY
@@ -68,7 +68,7 @@
return BLOCK_NONE
return block_action(owner, real_attack, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
/obj/item/clothing/suit/armor/reactive/block_action(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
/obj/item/clothing/suit/armor/reactive/proc/block_action(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
return BLOCK_NONE
//When the wearer gets hit, this armor will teleport the user a short distance away (to safety or to more danger, no one knows. That's the fun of it!)
@@ -1,4 +0,0 @@
/mob/living/carbon/get_blocking_items()
. = ..()
if(wear_suit)
. += wear_suit
@@ -1,5 +1,7 @@
/mob/living/carbon/human/get_blocking_items()
. = ..()
if(wear_suit)
. += wear_suit)
if(w_uniform)
. += w_uniform
if(wear_neck)
+5 -7
View File
@@ -47,7 +47,7 @@
/mob/living/proc/do_run_block(real_attack = TRUE, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list())
// Component signal block runs have highest priority.. for now.
. = SEND_SIGNAL(src, COMSIG_LIVING_RUN_BLOCK, real_attack, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list)
if(. & BLOCK_INTERRUPT_CHAIN)
if((. & BLOCK_SUCCESS) && !(. & BLOCK_CONTINUE_CHAIN))
return
var/list/obj/item/tocheck = get_blocking_items()
// i don't like this
@@ -57,7 +57,7 @@
var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
var/results = I.run_block(src, real_attack, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list)
. |= results
if(results & BLOCK_INTERRUPT_CHAIN)
if((results & BLOCK_SUCCESS) && !(results & BLOCK_CONTINUE_CHAIN))
break
/// Gets an unsortedlist of objects to run block checks on.
@@ -74,10 +74,8 @@
var/block_chance = 0
/obj/item/proc/run_block(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
/obj/item/proc/_hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
SEND_SIGNAL(src, COMSIG_ITEM_HIT_REACT, args)
SEND_SIGNAL(src, COMSIG_ITEM_RUN_BLOCK, args)
if(prob(final_block_chance))
owner.visible_message("<span class='danger'>[owner] blocks [attack_text] with [src]!</span>")
return 1
return 0
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
return BLOCK_NONE
@@ -12,7 +12,7 @@
* - Charges at the target after a telegraph, throwing them across the arena should it connect.
* - Legionnaire's head detaches, attacking as it's own entity. Has abilities of it's own later into the fight. Once dead, regenerates after a brief period. If the skill is used while the head is off, it will be killed.
* - Leaves a pile of bones at your location. Upon using this skill again, you'll swap locations with the bone pile.
* - Spews a cloud of smoke from it's maw, wherever said maw is.
* - Spews a cloud of smoke from it's maw, wherever said maw is.
* A unique fight incorporating the head mechanic of legion into a whole new beast. Combatants will need to make sure the tag-team of head and body don't lure them into a deadly trap.
*/
@@ -44,35 +44,35 @@
/datum/action/innate/elite_attack/head_detach,
/datum/action/innate/elite_attack/bonfire_teleport,
/datum/action/innate/elite_attack/spew_smoke)
var/mob/living/simple_animal/hostile/asteroid/elite/legionnairehead/myhead = null
var/obj/structure/legionnaire_bonfire/mypile = null
var/has_head = TRUE
/datum/action/innate/elite_attack/legionnaire_charge
name = "Legionnaire Charge"
button_icon_state = "legionnaire_charge"
chosen_message = "<span class='boldwarning'>You will attempt to grab your opponent and throw them.</span>"
chosen_attack_num = LEGIONNAIRE_CHARGE
/datum/action/innate/elite_attack/head_detach
name = "Release Head"
button_icon_state = "head_detach"
chosen_message = "<span class='boldwarning'>You will now detach your head or kill it if it is already released.</span>"
chosen_attack_num = HEAD_DETACH
/datum/action/innate/elite_attack/bonfire_teleport
name = "Bonfire Teleport"
button_icon_state = "bonfire_teleport"
chosen_message = "<span class='boldwarning'>You will leave a bonfire. Second use will let you swap positions with it indefintiely. Using this move on the same tile as your active bonfire removes it.</span>"
chosen_attack_num = BONFIRE_TELEPORT
/datum/action/innate/elite_attack/spew_smoke
name = "Spew Smoke"
button_icon_state = "spew_smoke"
chosen_message = "<span class='boldwarning'>Your head will spew smoke in an area, wherever it may be.</span>"
chosen_attack_num = SPEW_SMOKE
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/OpenFire()
if(client)
switch(chosen_attack)
@@ -95,7 +95,7 @@
bonfire_teleport()
if(SPEW_SMOKE)
spew_smoke()
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/legionnaire_charge(target)
ranged_cooldown = world.time + 50
var/dir_to_target = get_dir(get_turf(src), get_turf(target))
@@ -106,7 +106,7 @@
playsound(src,'sound/magic/demon_attack1.ogg', 200, 1)
visible_message("<span class='boldwarning'>[src] prepares to charge!</span>")
addtimer(CALLBACK(src, .proc/legionnaire_charge_2, dir_to_target, 0), 5)
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/legionnaire_charge_2(var/move_dir, var/times_ran)
if(times_ran >= 4)
return
@@ -135,7 +135,7 @@
L.Stun(20) //substituting this for the Paralyze from the line above, because we don't have tg paralysis stuff
L.adjustBruteLoss(50)
addtimer(CALLBACK(src, .proc/legionnaire_charge_2, move_dir, (times_ran + 1)), 2)
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/head_detach(target)
ranged_cooldown = world.time + 10
if(myhead != null)
@@ -159,11 +159,11 @@
else if(health < maxHealth * 0.5)
myhead.melee_damage_lower = 20
myhead.melee_damage_upper = 20
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/onHeadDeath()
myhead = null
addtimer(CALLBACK(src, .proc/regain_head), 50)
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/regain_head()
has_head = TRUE
if(stat == DEAD)
@@ -195,7 +195,7 @@
forceMove(pileturf)
visible_message("<span class='boldwarning'>[src] forms from the bonfire!</span>")
mypile.forceMove(legionturf)
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/spew_smoke()
ranged_cooldown = world.time + 60
var/turf/T = null
@@ -212,7 +212,7 @@
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(2, T)
smoke.start()
//The legionnaire's head. Basically the same as any legion head, but we have to tell our creator when we die so they can generate another head.
/mob/living/simple_animal/hostile/asteroid/elite/legionnairehead
name = "legionnaire head"
@@ -238,12 +238,12 @@
faction = list()
ranged = FALSE
var/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/body = null
/mob/living/simple_animal/hostile/asteroid/elite/legionnairehead/death()
. = ..()
if(body)
body.onHeadDeath()
//The legionnaire's bonfire, which can be swapped positions with. Also sets flammable living beings on fire when they walk over it.
/obj/structure/legionnaire_bonfire
name = "bone pile"
@@ -257,20 +257,20 @@
light_range = 4
light_color = LIGHT_COLOR_RED
var/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/myowner = null
/obj/structure/legionnaire_bonfire/Entered(atom/movable/mover, turf/target)
if(isliving(mover))
var/mob/living/L = mover
L.adjust_fire_stacks(3)
L.IgniteMob()
. = ..()
/obj/structure/legionnaire_bonfire/Destroy()
if(myowner != null)
myowner.mypile = null
. = ..()
//The visual effect which appears in front of legionnaire when he goes to charge.
/obj/effect/temp_visual/dragon_swoop/legionnaire
duration = 10
@@ -279,7 +279,7 @@
/obj/effect/temp_visual/dragon_swoop/legionnaire/Initialize()
. = ..()
transform *= 0.33
// Legionnaire's loot: Legionnaire Spine
/obj/item/crusher_trophy/legionnaire_spine
-1
View File
@@ -2208,7 +2208,6 @@
#include "code\modules\mob\living\brain\say.dm"
#include "code\modules\mob\living\brain\status_procs.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_block.dm"
#include "code\modules\mob\living\carbon\carbon_defense.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\carbon_movement.dm"