public
Created

Hit them where it hurts

  • Download Gist
HitLocation.cs
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
public class HitLocation
{
public string name;
public float stunMultiplier;
public float nStunMultiplier;
public float bodyMultiplier;
}
 
public class HitLocationTable
{
public static HitLocation getHitLocation()
{
return null;
}
}
 
public class HumanoidHitLocationTable : HitLocationTable
{
public static HitLocation getHitLocation(int loc)
{
HitLocation rv = new HitLocation();
if (loc <=5)
{
rv.name = "head";
rv.stunMultiplier = 5;
rv.nStunMultiplier = 2;
rv.bodyMultiplier = 2;
}
else if (loc <=6)
{
rv.name = "hand";
rv.stunMultiplier = 1;
rv.nStunMultiplier = 0.5f;
rv.bodyMultiplier = 0.5f;
}
else if (loc <= 8)
{
rv.name = "arm";
rv.stunMultiplier = 2;
rv.nStunMultiplier = 0.5f;
rv.bodyMultiplier = 0.5f;
}
else if (loc <= 9)
{
rv.name = "shoulder";
rv.stunMultiplier = 3;
rv.nStunMultiplier = 1;
rv.bodyMultiplier = 1;
}
else if (loc <= 11)
{
rv.name = "chest";
rv.stunMultiplier = 3;
rv.nStunMultiplier = 1;
rv.bodyMultiplier = 1;
}
else if (loc <= 12)
{
rv.name = "stomach";
rv.stunMultiplier = 4;
rv.nStunMultiplier = 1.5f;
rv.bodyMultiplier = 1;
}
else if (loc <= 13)
{
rv.name = "vitals";
rv.stunMultiplier = 4;
rv.nStunMultiplier = 1.5f;
rv.bodyMultiplier = 2;
}
else if (loc <= 14)
{
rv.name = "thigh";
rv.stunMultiplier = 2;
rv.nStunMultiplier = 1;
rv.bodyMultiplier = 1;
}
else if (loc <= 16)
{
rv.name = "leg";
rv.stunMultiplier = 2;
rv.nStunMultiplier = 0.5f;
rv.bodyMultiplier = 0.5f;
}
else if (loc <= 18)
{
rv.name = "foot";
rv.stunMultiplier = 1;
rv.nStunMultiplier = 0.5f;
rv.bodyMultiplier = 0.5f;
}
return rv;
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.