Code: Select all
[H:frontBackList = "Front, Back"]
[H:locList = "Face, Leg, Arm, Extremity, Chest, Abdomen, Neck"]
[h: input("frontBack | "+frontBackList+" | Is the attack from the front or the back? | LIST | SELECT==0")]
[h: input("loc | "+locList+" | Where is the attack? | LIST | SELECT == 0")]
[h: FaceLocTab = " [
"jaw",
"nose",
"easrs",
"cheek",
"cheek",
"eyes"
]" ]
[h: LegLocTab = ' [
"shin",
"shin",
"shin",
"knee",
"thigh",
"thigh vein (if cut, imp, or tbb)"
]']
[h: ArmLocTab = ' [
"forearm",
"forearm",
"forearm",
"elbow (joint if cr)",
"upper arm",
"shoulder (vein/artery if cut, imp, or tbb)"
]']
[h: ExtremLocTab = ' [
"joint (if cr, cut, pi, or tbb)",
"extremity",
"extremity",
"extremity",
"extremity",
"extremity"
]']
[h: ChestLocTab = ' [
"[h: if(frontBack==0, "vitals (if cr, imp, pi, or tbb)","spine (if cut")]",
"chest",
"chest",
"chest",
"chest",
"chest"
]']
[h: AbdLocTab = ' [
"vitals (if cr, imp, pi, or tbb)",
"digestive tract",
"digestive tract",
"digestive tract",
"pelvis",
"groin"
]']
[h: NeckLocTab = ' [
"[h: if(frontBack==0, "vitals (if cr, imp, pi, or tbb)","spine (if cr")]",
"neck",
"neck",
"neck",
"neck",
"neck"
]']
[h: Result=1d6-1]
[h: FaceLoc=json.get(FaceLocTab,Result)]
[h: LegLoc=json.get(LegLocTab,Result)]
[h: ArmLoc=json.get(ArmLocTab,Result)]
[h: ExtremLoc=json.get(ExtremLocTab,Result)]
[h: ChestLoc=json.get(ChestLocTab,Result)]
[h: AbdLoc=json.get(AbdLocTab,Result)]
[h: NeckLoc=json.get(NeckLocTab,Result)]
[h: HitLoc = if(loc == 0, FaceLoc)]
[h: HitLoc = if(loc == 1, LegLoc)]
[h: HitLoc = if(loc == 2, ArmLoc)]
[h: HitLoc = if(loc == 3, ExtremLoc)]
[h: HitLoc = if(loc == 4, ChestLoc)]
[h: HitLoc = if(loc == 5, AbdLoc)]
[h: HitLoc = if(loc == 6, NeckLoc)]
The target is struck in the [r: HitLoc].