This commit is contained in:
kevinz000
2020-03-16 03:23:09 -07:00
parent 9ead492bb0
commit 5d2fb654e8
4 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -229,5 +229,5 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BLOCK_SHOULD_PASSTHROUGH (1<<6)
/// Attack outright missed because the target dodged. Should usually be combined with SHOULD_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.
#define BLOCK_STOP_CHAIN (1<<8)
/// 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)
+1 -1
View File
@@ -235,7 +235,7 @@
create_with_tank = TRUE
/obj/item/flamethrower/run_block(real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance)
if(real_attack && (attack_type == ATTACK_TYPE_PROJECTILE
if(real_attack && (attack_type == ATTACK_TYPE_PROJECTILE))
var/obj/item/projectile/P = hitby
if(istype(P) && (P.damage_type != STAMINA) && damage && !P.nodamage && prob(15))
owner.visible_message("<span class='danger'>\The [attack_text] hits the fueltank on [owner]'s [name], rupturing it! What a shot!</span>")
+1 -1
View File
@@ -11,7 +11,7 @@
var/charge_cost = 30
/obj/item/borg/stun/attack(mob/living/M, mob/living/user)
if(M.check_shields(src, 0, "[M]'s [name]", MELEE_ATTACK, 0, user, ran_zone(user.zone_selected)) & BLOCK_SUCCESS)
if(M.run_block(src, 0, "[M]'s [name]", ATTACK_TYPE_MELEE, 0, user, ran_zone(user.zone_selected)) & BLOCK_SUCCESS)
playsound(M, 'sound/weapons/genhit.ogg', 50, 1)
return FALSE
if(iscyborg(user))
+8 -7
View File
@@ -5,7 +5,7 @@
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
var/transparent = FALSE // makes beam projectiles pass through the shield
/obj/item/shield/proc/on_shield_block(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK)
/obj/item/shield/proc/on_shield_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance)
return TRUE
/obj/item/shield/riot
@@ -26,15 +26,16 @@
transparent = TRUE
max_integrity = 75
/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
/obj/item/shield/run_block(real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance)
if(transparent && (hitby.pass_flags & PASSGLASS))
return FALSE
if(attack_type == THROWN_PROJECTILE_ATTACK)
if(attack_type == ATTACK_TYPE_THROWN)
final_block_chance += 30
if(attack_type == LEAP_ATTACK)
if(attack_type == ATTACK_TYPE_LEAP)
final_block_chance = 100
. = ..()
if(.)
if(. & BLOCK_SUCCESS)
on_shield_block
on_shield_block(owner, hitby, attack_text, damage, attack_type)
/obj/item/shield/riot/attackby(obj/item/W, mob/user, params)
@@ -249,7 +250,7 @@
transparent = FALSE
item_flags = SLOWS_WHILE_IN_HAND
/obj/item/shield/riot/implant/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
/obj/item/shield/riot/implant/hit_reaction(real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance)
if(attack_type == ATTACK_TYPE_PROJECTILE)
final_block_chance = 60 //Massive shield
return ..()