Talk:Proposals/Obsolete Proposals/Medikits

From UFO:AI

This is just a quick example of how the UI could implement a confunc to add wounds on the HUD. NOTE: This isn't a correct implementation, just an example of how it might roughly be done.

/* 
 * <1> = wound type (leg, torso, etc)
 * <2> = HP bleeding per turn
 */
confunc add_wound {	
	*node:root.wounds.<1>.HP@integer = (<2> + *node:root.wounds.<1>.HP@integer)
	if (*node:root.wounds.<1>.HP@integer < 5) {
		*node:root.wounds.<1>.severity@bgcolor = (yellow color)
	} elif (* > 15) {
		// make it red
	}
}

Differences between proposal and implementation

  • For simplicity, instead of keeping a list of wounds, for each body part it keeps track of the damage received and the amount that has been treated.
    • Bleeding is calculated from the amount of untreated damage.
    • Penalties are also calculated from received damage: Untreated damage incurs full penalties, treated damage incurs half the penalties.
    • Both bleeding and penalties only take place when the damage is above a certain threshold, so flesh wounds (treated or not) don't cause bleeding or penalties (but further damage to that body part might worsen the wound 'level' enough for the side effects to take place)
  • Since it isn't possible to treat wounds in order, the most wounded body part is treated first instead.
    • The medikit will stop bleeding in that body part up to an amount equal to the HP healed (treating enough damage as needed to that effect)
  • In addition to the five specified penalties there is a sixth penalty type: "max TUs" which as the name implies reduces the max TUs available to the victim (currently applied to robotic actors -- meant as an example)

Fire mode naming

I named the morale boosting mode for the medikit 'Antipsychotics', I don't think that's the best name I could have chosen, thoughts?