mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-01 04:52:16 +00:00
Incorporates laser reflection into the shield system
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/material/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/attack_text = "the attack")
|
||||
/obj/item/weapon/material/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
|
||||
//parry only melee attacks
|
||||
if(istype(damage_source, /obj/item/projectile) || (attacker && get_dist(user, attacker) > 1))
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
return unwield()
|
||||
|
||||
//Allow a small chance of parrying melee attacks when wielded - maybe generalize this to other weapons someday
|
||||
/obj/item/weapon/material/twohanded/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/attack_text = "the attack")
|
||||
/obj/item/weapon/material/twohanded/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(!wielded)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
attack_verb = list()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/attack_text = "the attack")
|
||||
/obj/item/weapon/melee/energy/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(!active)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "shield"
|
||||
var/base_block_chance = 50
|
||||
|
||||
/obj/item/weapon/shield/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/attack_text = "the attack")
|
||||
/obj/item/weapon/shield/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
//block as long as they are not directly behind us
|
||||
var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block
|
||||
if(check_shield_arc(user, bad_arc, damage_source, attacker))
|
||||
|
||||
Reference in New Issue
Block a user