|
@@ -1,397 +0,0 @@
|
|
|
-:: AppearanceSystem
|
|
|
-<<set $here = 'AppearanceSystem'>>
|
|
|
-<<set $ARGS = $location_var[$here]>>
|
|
|
-<<set $this = 'AppearanceSystem'>>
|
|
|
-<<if !$location_var[$here][0]>>
|
|
|
- <!-- !{
|
|
|
- PC's appearance is updated regularly in stat.qsrc.
|
|
|
- Note: A huge part of PC's appearance is from base appearance, which is updated once a day. Because it's
|
|
|
- a global variable, it does not show in this function in particular, but it's used in 'CalcAppearance'
|
|
|
- } -->
|
|
|
- <<if $pc.pcs_makeup == 6 and getvar("$bimbolevel") >= 2>>
|
|
|
- <<set $extra_supnatvnesh = 2 * $bimbolevel - 2>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <!-- !STD check. STD will make appearance automatically -10-->
|
|
|
- <<if getvar("$Gerpes") >= 3 or getvar("$Sifilis") >= 21 or getvar("$Triper") > 2>>
|
|
|
- <<set $pc.pcs_apprnc = -10>>
|
|
|
- <<set $pc.hotcat = -1>>
|
|
|
- <<else>>
|
|
|
- <<set $clothingBonus = func($this, 'CalcClothingBonus')>>
|
|
|
- <<set $accessoriesBonus = func($this, 'CalcAccessoriesBonus', bonusZ, PShoQuality)>>
|
|
|
- <<set $groomingBonus = func($this, 'CalcGroomingBonus')>>
|
|
|
- <<set $groomingPenalty = func($this, 'CalcGroomingPenalty')>>
|
|
|
- <<set $pc.pcs_apprnc = func($this, 'CalcAppearance', ($supnatvnesh + $extra_supnatvnesh))>>
|
|
|
- <<set $Hotcat = func($this, 'ConvertToHotcat')>>
|
|
|
- <</if>>
|
|
|
- <<set $clothingBonus to null>>
|
|
|
- <<set $accessoriesBonus to null>>
|
|
|
- <<set $groomingBonus to null>>
|
|
|
- <<set $groomingPenalty to null>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'UpdateBaseAppearnce'>>
|
|
|
- <!-- !{
|
|
|
- Base Appearance is updated once a day at midnight and called from cikl
|
|
|
- Base Appearance is calculated from:
|
|
|
- vidage, skin, body shape (fat and strength), attributes (endurance and agility)
|
|
|
- } -->
|
|
|
- <<set $attributeBonus = func($this, 'CalcAttributeBonus')>>
|
|
|
- <<set $skinBonus = $pc.pcs_skin / 10>>
|
|
|
- <<set $pc.bodyShapeBonus = func($this, 'SetBodyShapeBonus')>>
|
|
|
- <<set $visibleAgePenalty = func($this, 'CalcVisibleAgePenalty')>>
|
|
|
- <<set $pc.teethPenalty = func($this, 'CalcTeethPenalty')>>
|
|
|
- <!-- ! Calculte base appearance-->
|
|
|
- <<set $pc.pcs_apprncbase = $skinBonus + $pc.bodyShapeBonus + $attributeBonus - $visibleAgePenalty - $pc.teethPenalty + $supnatvnesh>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcFaceBonus'>>
|
|
|
- <!-- !! Setting Eyelashes bonus-->
|
|
|
- <<if $pc.eyelashes <= 0>>
|
|
|
- <<set $eyelashesBonus = 0>>
|
|
|
- <<elseif $pc.eyelashes == 1>>
|
|
|
- <<set $eyelashesBonus = 1>>
|
|
|
- <<elseif $pc.eyelashes == 2>>
|
|
|
- <<set $eyelashesBonus = 3>>
|
|
|
- <<elseif $pc.eyelashes == 3>>
|
|
|
- <<set $eyelashesBonus = 4>>
|
|
|
- <<elseif $pc.eyelashes == 4>>
|
|
|
- <<set $eyelashesBonus = 5>>
|
|
|
- <<elseif $pc.eyelashes == 5>>
|
|
|
- <<set $eyelashesBonus = 6>>
|
|
|
- <<else>>
|
|
|
- <<set $eyelashesBonus = 0>>
|
|
|
- <</if>>
|
|
|
- <<set $eyelashesBonus = FUNC($this, 'AdjustFromBMI', eyelashesBonus)>>
|
|
|
- <!-- !! Setting Eye Size bonus-->
|
|
|
- <<if $pc.eyesize == 1>>
|
|
|
- <<set $eyeSizeBonus = 1>>
|
|
|
- <<elseif $pc.eyesize == 2>>
|
|
|
- <<set $eyeSizeBonus = 3>>
|
|
|
- <<elseif $pc.eyesize == 3>>
|
|
|
- <<set $eyeSizeBonus = 2>>
|
|
|
- <<else>>
|
|
|
- <<set $eyeSizeBonus = 0>>
|
|
|
- <</if>>
|
|
|
- <<set $eyeSizeBonus = FUNC($this, 'AdjustFromBMI', eyeSizeBonus)>>
|
|
|
- <!-- !! Setting the Lip size bonus-->
|
|
|
- <<if $pc.lip_size == 0>>
|
|
|
- <<set $lipBonus = -2>>
|
|
|
- <<elseif $pc.lip_size == 1>>
|
|
|
- <<set $lipBonus = 0>>
|
|
|
- <<elseif $pc.lip_size == 2>>
|
|
|
- <<set $lipBonus = 1>>
|
|
|
- <<elseif $pc.lip_size == 3>>
|
|
|
- <<set $lipBonus = 3>>
|
|
|
- <<else>>
|
|
|
- <<set $lipBonus = 3>>
|
|
|
- <</if>>
|
|
|
- <<set $lipBonus = FUNC($this, 'AdjustFromBMI', lipBonus)>>
|
|
|
- <<set $result = $eyelashesBonus + $eyeSizeBonus + $lipBonus>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcAttributeBonus'>>
|
|
|
- <<set $tempAttributeBonus = ($pc.skillLevel("agility") / 5) + ($pc.pcs_vital / 5)>>
|
|
|
- <<set $result = func($this, 'AdjustFromBMI', tempAttributeBonus)>>
|
|
|
- <<set $tempAttributeBonus to null>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcVisibleAgePenalty'>>
|
|
|
- <<if $pc.visualAge < 20>>
|
|
|
- <<set $tempAttributePenalty = func('shortgs','round_divide', (5 * (20 - $pc.visualAge)), 2)>>
|
|
|
- <<else>>
|
|
|
- <<set $tempAttributePenalty = 0>>
|
|
|
- <</if>>
|
|
|
- <<set $result = func($this, 'AdjustFromBMI', tempAttributePenalty)>>
|
|
|
- <<set $tempAttributePenalty to null>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcTeethPenalty'>>
|
|
|
- <<if $pc.pcs_teeth > 0>>
|
|
|
- <<set $tempAttributePenalty = 10 * $pc.pcs_teeth>>
|
|
|
- <<elseif $pc.pcs_teeth == 0>>
|
|
|
- <<set $tempAttributePenalty = 5>>
|
|
|
- <<else>>
|
|
|
- <<set $tempAttributePenalty = 0>>
|
|
|
- <</if>>
|
|
|
- <<if $pc.pcs_missing_teeth > 0>>
|
|
|
- <<set $tempAttributePenalty += 10 * $pc.pcs_missing_teeth>>
|
|
|
- <</if>>
|
|
|
- <<set $result = func($this, 'AdjustFromBMI', tempAttributePenalty)>>
|
|
|
- <<set $tempAttributePenalty to null>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'SetBodyShapeBonus'>>
|
|
|
- <!-- ! Magic uses a different calculation-->
|
|
|
- <<if getvar("$dounspell") == 1>>
|
|
|
- <<set $pc.bodytipe = $pc.pcs_hips - $pc.pcs_waist>>
|
|
|
- <<if getvar("$pc.bodytipe") < 20>>
|
|
|
- <<set $result = 0>>
|
|
|
- <<elseif getvar("$pc.bodytipe") >= 20 and getvar("$pc.bodytipe") < 25>>
|
|
|
- <<set $result = 2>>
|
|
|
- <<elseif (getvar("$pc.bodytipe") >= 25 and getvar("$pc.bodytipe") < 30) or getvar("$pc.bodytipe") >= 35>>
|
|
|
- <<set $result = 4>>
|
|
|
- <<elseif getvar("$pc.bodytipe") >= 30 and getvar("$pc.bodytipe") < 35>>
|
|
|
- <<set $result = 8>>
|
|
|
- <</if>>
|
|
|
- <!-- !!Setting the pcs_apprnc bonus based on fat and strength-->
|
|
|
- <<else>>
|
|
|
- <<if $pc.pcs_bmi < 16>>
|
|
|
- <!-- !! severely underweight-->
|
|
|
- <<set $tempBodyShapeBonus = -10>>
|
|
|
- <<elseif $pc.pcs_bmi < 19>>
|
|
|
- <!-- !! underweight-->
|
|
|
- <<set $tempBodyShapeBonus = 25>>
|
|
|
- <<elseif $pc.pcs_bmi < 25>>
|
|
|
- <!-- !! healthy weight-->
|
|
|
- <<set $tempBodyShapeBonus = 50>>
|
|
|
- <<elseif $pc.pcs_bmi < 30>>
|
|
|
- <!-- !! overweight-->
|
|
|
- <<set $tempBodyShapeBonus = 25>>
|
|
|
- <<elseif $pc.pcs_bmi < 35>>
|
|
|
- <!-- !! moderately obese-->
|
|
|
- <<set $tempBodyShapeBonus = 10>>
|
|
|
- <<elseif $pc.pcs_bmi < 40>>
|
|
|
- <!-- !! severely obese-->
|
|
|
- <<set $tempBodyShapeBonus = -15>>
|
|
|
- <<elseif $pc.pcs_bmi < 45>>
|
|
|
- <!-- !! very severely obese-->
|
|
|
- <<set $tempBodyShapeBonus = -40>>
|
|
|
- <<else>>
|
|
|
- <!-- !! morbidly obese-->
|
|
|
- <<set $tempBodyShapeBonus = -80>>
|
|
|
- <</if>>
|
|
|
- <<if getvar("$succubusflag") == 1>>
|
|
|
- <<set $tempBodyShapeBonus += 10>>
|
|
|
- <<else>>
|
|
|
- <<if $pc.muscularity > 190>>
|
|
|
- <<set $tempBodyShapeBonus -= 130>>
|
|
|
- <<elseif $pc.muscularity > 180>>
|
|
|
- <<set $tempBodyShapeBonus -= 100>>
|
|
|
- <<elseif $pc.muscularity > 170>>
|
|
|
- <<set $tempBodyShapeBonus -= 75>>
|
|
|
- <<elseif $pc.muscularity > 160>>
|
|
|
- <<set $tempBodyShapeBonus -= 60>>
|
|
|
- <<elseif $pc.muscularity > 150>>
|
|
|
- <<set $tempBodyShapeBonus -= 45>>
|
|
|
- <<elseif $pc.muscularity <= 5 or $pc.muscularity > 140>>
|
|
|
- <<set $tempBodyShapeBonus -= 30>>
|
|
|
- <<elseif $pc.muscularity <= 10>>
|
|
|
- <<set $tempBodyShapeBonus -= 20>>
|
|
|
- <<elseif $pc.muscularity <= 15 or $pc.muscularity > 130>>
|
|
|
- <<set $tempBodyShapeBonus -= 15>>
|
|
|
- <<elseif $pc.muscularity <= 25>>
|
|
|
- <<set $tempBodyShapeBonus -= 10>>
|
|
|
- <<elseif $pc.muscularity <= 35 or $pc.muscularity > 120>>
|
|
|
- <<set $tempBodyShapeBonus -= 5>>
|
|
|
- <<elseif $pc.muscularity <= 50 or $pc.muscularity > 110>>
|
|
|
- <<set $tempBodyShapeBonus += 0>>
|
|
|
- <<elseif $pc.muscularity <= 70 or $pc.muscularity > 100>>
|
|
|
- <<set $tempBodyShapeBonus += 5>>
|
|
|
- <<else>>
|
|
|
- <<set $tempBodyShapeBonus += 10>>
|
|
|
- <</if>>
|
|
|
- <</if>>
|
|
|
- <!-- !!This modifies bodykoef for high or low salo values-->
|
|
|
- <<if $pc.salocatnow == 0 or $pc.salocatnow >= 7>>
|
|
|
- <<set $tempBodyShapeBonus -= 8>>
|
|
|
- <<elseif $pc.salocatnow == 1 or $pc.salocatnow == 6>>
|
|
|
- <<set $tempBodyShapeBonus -= 4>>
|
|
|
- <</if>>
|
|
|
- <<if getvar("$vofat") > 0>>
|
|
|
- <<set $tempBodyShapeBonus -= $vofat>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <<set $result = $tempBodyShapeBonus>>
|
|
|
- <<set $tempBodyShapeBonus to null>>
|
|
|
- <</if>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcClothingBonus'>>
|
|
|
- <<if $wardrobe.clothingworntype == 'nude'>>
|
|
|
- <<if $pc.pcs_bmi >= 19 and $pc.pcs_bmi < 30>>
|
|
|
- <!-- ! Healthy and overweight-->
|
|
|
- <<set $tempRevealing = 405>>
|
|
|
- <<set $wardrobe.PCloQuality = 3>>
|
|
|
- <<else>>
|
|
|
- <<set $tempRevealing = 0>>
|
|
|
- <<set $wardrobe.PCloQuality = 1>>
|
|
|
- <</if>>
|
|
|
- <<else>>
|
|
|
- <<if $pc.pcs_bmi < 19>>
|
|
|
- <!-- !Skinny and severely skinny-->
|
|
|
- <<set $tempRevealing = ((400 - $wardrobe.PXCloThinness) + (500 - $wardrobe.PXCloTopCut) + (400 - $wardrobe.PXCloBottomShortness)) / 2>>
|
|
|
- <<elseif $pc.pcs_bmi >= 19 and $pc.pcs_bmi < 30>>
|
|
|
- <!-- !Healthy and overweight-->
|
|
|
- <<set $tempRevealing = ($wardrobe.PXCloThinness + $wardrobe.PXCloTopCut + $wardrobe.PXCloBottomShortness) / 2>>
|
|
|
- <<elseif $pc.pcs_bmi >= 30>>
|
|
|
- <!-- !Moderately overweight and above-->
|
|
|
- <<set $tempRevealing = ((400 - $wardrobe.PXCloThinness) + (500 - $wardrobe.PXCloTopCut) + (400 - $wardrobe.PXCloBottomShortness)) * 3 / 4>>
|
|
|
- <</if>>
|
|
|
- <</if>>
|
|
|
- <<set $result = $tempRevealing / 76 * $wardrobe.PCloQuality>>
|
|
|
- <<set $tempRevealing to null>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcAccessoriesBonus'>>
|
|
|
- <<set $coatQualityBonus = $ARGS[1]>>
|
|
|
- <<set $shoesQualityBonus = $ARGS[2]>>
|
|
|
- <!-- !!bonuses for certain underwear-->
|
|
|
- <<if $wardrobe.pantyworntype == 'lusso'>>
|
|
|
- <<set $pantyBonus = 4>>
|
|
|
- <<elseif $wardrobe.pantyworntype == 'fashionista'>>
|
|
|
- <<set $pantyBonus = 2>>
|
|
|
- <</if>>
|
|
|
- <<if $wardrobe.braworntype == 'lusso'>>
|
|
|
- <<set $braBonus = 4>>
|
|
|
- <<elseif $wardrobe.braworntype == 'fashionista'>>
|
|
|
- <<set $braBonus = 2>>
|
|
|
- <</if>>
|
|
|
- <<set $result = $coatQualityBonus + $shoesQualityBonus + $pantyBonus + $braBonus>>
|
|
|
- <<set $coatQualityBonus to null>>
|
|
|
- <<set $shoesQualityBonus to null>>
|
|
|
- <<set $pantyBonus to null>>
|
|
|
- <<set $braBonus to null>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcGroomingBonus'>>
|
|
|
- <<set $makeupBonus = $pc.skillLevel("makeup") / 5 - 5>>
|
|
|
- <<if $pc.pcs_makeup == 0>>
|
|
|
- <<set $makeupBonus = -5>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <<if $pc.pcs_makeup == 1>>
|
|
|
- <<set $makeupBonus = 0>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <<if $pc.pcs_makeup == 5>>
|
|
|
- <<set $makeupBonus = 30>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <<set $breathBonus = $pc.pcs_breath * 5>>
|
|
|
- <<set $tempGroomingBonus = $makeupBonus + $breathBonus>>
|
|
|
- <!-- !result = tempGroomingBonus-->
|
|
|
- <<set $result = func($this, 'AdjustFromBMI', tempGroomingBonus)>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcGroomingPenalty'>>
|
|
|
- <<if $pc.pcs_lipbalm > 0>>
|
|
|
- <<set $lipBalmPenalty = 0>>
|
|
|
- <<else>>
|
|
|
- <<set $lipBalmPenalty = 5>>
|
|
|
- <</if>>
|
|
|
- <<set $hairPenalty = (1 - $pc.pcs_hairbsh) * 10>>
|
|
|
- <!-- !! buzzcut penalty to pcs_apprnc-->
|
|
|
- <<if $pc.pcs_hairlng < 10>>
|
|
|
- <<set $buzzCutPenalty = 10>>
|
|
|
- <<else>>
|
|
|
- <<set $buzzCutPenalty = 0>>
|
|
|
- <</if>>
|
|
|
- <!-- !!Small penalty for not wearing deodorant, if pcs_sweat is low enough-->
|
|
|
- <<if $pc.deodorant_on == 0 or $pc.pcs_sweat >= 20>>
|
|
|
- <<set $deodorantPenalty = 5>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <<if $pc.pcs_sweat < 22>>
|
|
|
- <<set $sweatPenalty = 0>>
|
|
|
- <<elseif getvar("$temppcs_sweat") < 38>>
|
|
|
- <<set $sweatPenalty = ($pc.pcs_sweat - 10) / 4>>
|
|
|
- <<elseif getvar("$temppcs_sweat") < 54>>
|
|
|
- <<set $sweatPenalty = ($pc.pcs_sweat - 10) / 2>>
|
|
|
- <<else>>
|
|
|
- <<set $sweatPenalty = 3 * ($pc.pcs_sweat - 10) / 4>>
|
|
|
- <</if>>
|
|
|
- <!-- !Glasses Penalty-->
|
|
|
- <<if $pc.glass >= 2 or $pc.glass == 0>>
|
|
|
- <<set $pc.glassesPenalty = 0>>
|
|
|
- <<elseif $pc.glass == 1>>
|
|
|
- <<set $pc.glassesPenalty = 10>>
|
|
|
- <</if>>
|
|
|
- <!-- !hair color fade penalty-->
|
|
|
- <<if $pc.hairColor != $pc.hairColorNatural>>
|
|
|
- <<if $pc.hairDyeFade > 0 and $pc.hairDyeFade < 7>>
|
|
|
- <<set $hairDyePenalty = 5>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <<if $pc.hairDyeFade == 0>>
|
|
|
- <<set $hairDyePenalty = 15>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <</if>>
|
|
|
- <!-- ! Leg hair penalty-->
|
|
|
- <<if $pc.legHair <= 0>>
|
|
|
- <<set $legPenalty = 0>>
|
|
|
- <<elseif $pc.legHair <= 3>>
|
|
|
- <<set $legPenalty = 3>>
|
|
|
- <<elseif $pc.legHair <= 6>>
|
|
|
- <<set $legPenalty = 6>>
|
|
|
- <<else>>
|
|
|
- <<set $legPenalty = 9>>
|
|
|
- <</if>>
|
|
|
- <<set $result = $sweatPenalty + $pc.glassesPenalty + $hairDyePenalty + $buzzCutPenalty + $legPenalty + $lipBalmPenalty + $hairPenalty + $deodorantPenalty>>
|
|
|
- <<set $buzzCutPenalty to null>>
|
|
|
- <<set $deodorantPenalty to null>>
|
|
|
- <<set $pc.glassesPenalty to null>>
|
|
|
- <<set $hairDyePenalty to null>>
|
|
|
- <<set $hairPenalty to null>>
|
|
|
- <<set $legPenalty to null>>
|
|
|
- <<set $lipBalmPenalty to null>>
|
|
|
- <<set $sweatPenalty to null>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'CalcAppearance'>>
|
|
|
- <<set $superNaturalBonus = $ARGS[1]>>
|
|
|
- <<set $temp_apprnc = $pc.pcs_apprncbase + $clothingBonus + $accessoriesBonus + $groomingBonus - $groomingPenalty>>
|
|
|
- <<if getvar("$temp_apprnc") >= 200>>
|
|
|
- <<set $temp_apprnc = 200>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <<if getvar("$temp_apprnc") < 0>>
|
|
|
- <<set $temp_apprnc = 0>>
|
|
|
-
|
|
|
- <</if>>
|
|
|
- <!-- !Any super natural bonuses are allowed to go above the max scale-->
|
|
|
- <<set $result = $temp_apprnc + $superNaturalBonus>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'ConvertToHotcat'>>
|
|
|
- <<if $pc.pcs_apprnc <= 40>>
|
|
|
- <<set $result = 1>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 60>>
|
|
|
- <<set $result = 2>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 80>>
|
|
|
- <<set $result = 3>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 100>>
|
|
|
- <<set $result = 4>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 125>>
|
|
|
- <<set $result = 5>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 150>>
|
|
|
- <<set $result = 6>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 165>>
|
|
|
- <<set $result = 7>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 180>>
|
|
|
- <<set $result = 8>>
|
|
|
- <<elseif $pc.pcs_apprnc <= 199>>
|
|
|
- <<set $result = 9>>
|
|
|
- <<else>>
|
|
|
- <<set $result = 10>>
|
|
|
- <</if>>
|
|
|
-<</if>>
|
|
|
-<<if $location_var[$here][0] == 'AdjustFromBMI'>>
|
|
|
- <<set $tempValue = $ARGS[1]>>
|
|
|
- <<if $pc.pcs_bmi < 16>>
|
|
|
- <!-- !! severely underweight-->
|
|
|
- <<set $tempValue = $tempValue * 50 / 100>>
|
|
|
- <<elseif $pc.pcs_bmi < 19>>
|
|
|
- <!-- !! underweight-->
|
|
|
- <<set $tempValue = $tempValue * 95 / 100>>
|
|
|
- <<elseif $pc.pcs_bmi < 25>>
|
|
|
- <!-- !! healthy weight-->
|
|
|
- <!-- !! normal bonus-->
|
|
|
- <<elseif $pc.pcs_bmi < 30>>
|
|
|
- <!-- !! overweight-->
|
|
|
- <<set $tempValue = $tempValue * 95 / 100>>
|
|
|
- <<elseif $pc.pcs_bmi < 35>>
|
|
|
- <!-- !! moderately obese-->
|
|
|
- <<set $tempValue = $tempValue * 80 / 100>>
|
|
|
- <<elseif $pc.pcs_bmi < 40>>
|
|
|
- <!-- !! severely obese-->
|
|
|
- <<set $tempValue = $tempValue * 55 / 100>>
|
|
|
- <<elseif $pc.pcs_bmi < 45>>
|
|
|
- <!-- !! very severely obese-->
|
|
|
- <<set $tempValue = $tempValue * 50 / 100>>
|
|
|
- <<else>>
|
|
|
- <!-- !!morbidly obese-->
|
|
|
- <<set $tempValue = $tempValue * 40 / 100>>
|
|
|
- <</if>>
|
|
|
- <<set $result = $tempValue>>
|
|
|
- <<set $tempValue to null>>
|
|
|
-<</if>>
|