Refactors how armor works. It's now less of a dice roll, but still retains some randomness. This makes weaker armor worth using, and stronger armor not godlike.

Also fixes a bug with the auto shotgun causing runtimes.
This commit is contained in:
Neerti
2015-12-01 03:45:47 -05:00
parent dacc1c85be
commit 062a092cfe
7 changed files with 114 additions and 52 deletions

View File

@@ -242,8 +242,8 @@
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0),
list(mode_name="3-round bursts", burst=3, move_delay=6, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 0.6)),
// list(mode_name="6-round bursts", burst=6, move_delay=6, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2, 1.2)),
list(mode_name="3-round bursts", burst=3, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 0.6)),
// list(mode_name="6-round bursts", burst=6, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2, 1.2)),
)
/obj/item/weapon/gun/projectile/automatic/as24/update_icon()

View File

@@ -70,7 +70,7 @@
//TODO: make it so this is called more reliably, instead of sometimes by bullet_act() and sometimes not
/obj/item/projectile/proc/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null)
if(blocked >= 2) return 0//Full block
if(blocked >= 100) return 0//Full block
if(!isliving(target)) return 0
if(isanimal(target)) return 0
var/mob/living/L = target
@@ -144,19 +144,19 @@
on_impact(user)
qdel(src)
return 0
loc = get_turf(user) //move the projectile out into the world
firer = user
shot_from = launcher.name
silenced = launcher.silenced
return launch(target, target_zone, x_offset, y_offset)
//Used to change the direction of the projectile in flight.
/obj/item/projectile/proc/redirect(var/new_x, var/new_y, var/atom/starting_loc, var/mob/new_firer=null)
var/turf/new_target = locate(new_x, new_y, src.z)
original = new_target
if(new_firer)
firer = src
@@ -402,9 +402,9 @@
var/turf/targloc = get_turf(target)
if(!curloc || !targloc)
return 0
original = target
//plot the initial trajectory
setup_trajectory(curloc, targloc)
return process(targloc)
@@ -438,7 +438,7 @@
//Set the flags and pass flags to that of the real projectile...
if(!isnull(flags))
trace.flags = flags
trace.flags = flags
trace.pass_flags = pass_flags
var/output = trace.launch(target) //Test it!