mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 21:57:53 +01:00
Adds accuracy penalties for certain detrimental states.
Being blind gives an additional 75% chance to miss. Having blurry eyes gives an additional 15% chance to miss. Being confused gives an additional 30% chance to miss. This was done so that if the PR for flashes to apply these effects instead of a stun are merged, they would hopefully still be useful if someone is trying to robust you. Melee and ranged penalties should be equivalent, despite different numbers due to how the different code works.
This commit is contained in:
@@ -154,7 +154,16 @@ emp_act
|
||||
if(user == src) // Attacking yourself can't miss
|
||||
return target_zone
|
||||
|
||||
var/hit_zone = get_zone_with_miss_chance(target_zone, src)
|
||||
// Certain statuses make it harder to score a hit. These are the same as gun accuracy, however melee doesn't use multiples of 15.
|
||||
var/accuracy_penalty = 0
|
||||
if(user.eye_blind)
|
||||
accuracy_penalty += 75
|
||||
if(user.eye_blurry)
|
||||
accuracy_penalty += 15
|
||||
if(user.confused)
|
||||
accuracy_penalty += 30
|
||||
|
||||
var/hit_zone = get_zone_with_miss_chance(target_zone, src, accuracy_penalty)
|
||||
|
||||
if(!hit_zone)
|
||||
visible_message("<span class='danger'>\The [user] misses [src] with \the [I]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user