code:
public function executeButtonClick(button:int = 0):void {
	mainView.clickButton( button );
}

//DROPDOWN BOX STUFF
// import fl.controls.ComboBox;
// import fl.data.DataProvider;
// import flash.net.navigateToURL;

//Change handler is only used for selecting perks. Moved to engineCore with the other perk selection code

 /*HOLY SHIT THIS HOW TO DO URL LINKS!
public function changeHandler(event:Event):void {
    var request:URLRequest = new URLRequest();
    request.url = ComboBox(event.target).selectedItem.data;
    navigateToURL(request);
    mainView.aCb.selectedIndex = -1;
}*/

public function displayControls():void
{
	mainView.hideAllMenuButtons();
	inputManager.DisplayBindingPane();
	menu();
	addButton(0, "Reset Ctrls", resetControls);
	addButton(1, "Clear Ctrls", clearControls);
	addButton(4, "Back", hideControls);
}

public function hideControls():void
{
	inputManager.HideBindingPane();

	gameSettings.settingsScreenMain();
}

public function resetControls():void
{
	inputManager.HideBindingPane();

	outputText("Are you sure you want to reset all of the currently bound controls to their defaults?");

	doYesNo(resetControlsYes, displayControls);
}

public function resetControlsYes():void
{
	inputManager.ResetToDefaults();

	outputText("Controls have been reset to defaults!\n\n");

	doNext(displayControls);
}

public function clearControls():void
{
	inputManager.HideBindingPane();

	outputText("Are you sure you want to clear all of the currently bound controls?");

	doYesNo(clearControlsYes, displayControls);
}

public function clearControlsYes():void
{
	inputManager.ClearAllBinds();

	outputText("Controls have been cleared!");

	doNext(displayControls);
}


code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/30.0">
  <id>com.cochgg</id>
  <versionNumber>2.9.0</versionNumber>
  <filename>Corruption of Champions (HGG Mod)</filename>
  <description>An interactive text-based fantasy RPG intended for adult audiences. (18+)</description>
  <name>Corruption of Champions (HGG Mod)</name>
  <initialWindow>
    <title>Corruption of Champions (HGG Mod)</title>
    <content>CoC-AIR.swf</content>
    <systemChrome>standard</systemChrome>
    <transparent>false</transparent>
    <visible>true</visible>
    <fullScreen>true</fullScreen>
    <autoOrients>true</autoOrients>
    <aspectRatio>any</aspectRatio>
    <renderMode>gpu</renderMode>
  </initialWindow>
  <icon>
    <image29x29>icons/icon_29.png</image29x29>
    <image57x57>icons/icon_57.png</image57x57>
    <image72x72>icons/icon_72.png</image72x72>
    <image144x144>icons/icon_144.png</image144x144>
    <image512x512>icons/icon_512.png</image512x512>
  </icon>
  <customUpdateUI>false</customUpdateUI>
  <allowBrowserInvocation>false</allowBrowserInvocation>
  <android>
    <manifestAdditions><![CDATA[<manifest>
		<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
		<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
	</manifest>]]></manifestAdditions>
  </android>
</application>

license: unknown


code:
<?xml version="1.0" encoding="utf-8"?>
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<flex-config>
  <target-player>10.3</target-player>
  <benchmark>true</benchmark>
  <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
  <use-network>false</use-network>
  <compiler>
    <define append="true">
      <name>CONFIG::debug</name>
      <value>true</value>
    </define>
    <define append="true">
      <name>CONFIG::release</name>
      <value>false</value>
    </define>
    <define append="true">
      <name>CONFIG::timeStamp</name>
      <value>'11/23/2016'</value>
    </define>
    <define append="true">
      <name>CONFIG::air</name>
      <value>false</value>
    </define>
    <define append="true">
      <name>CONFIG::mobile</name>
      <value>false</value>
    </define>
    <define append="true">
      <name>CONFIG::desktop</name>
      <value>false</value>
    </define>
    <define append="true">
      <name>CONFIG::STANDALONE</name>
      <value>true</value>
    </define>
    <define append="true">
      <name>CONFIG::AIR</name>
      <value>false</value>
    </define>
    <verbose-stacktraces>true</verbose-stacktraces>
    <source-path append="true">
      <path-element>C:\Flash\Corruption-of-Champions-Mod-Deviant\classes</path-element>
      <path-element>C:\Flash\Corruption-of-Champions-Mod-Deviant\lib\bin</path-element>
      <path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
    </source-path>
    <library-path append="true">
      <path-element>C:\Flash\Corruption-of-Champions-Mod-Deviant\lib\bin\MainView.swc</path-element>
      <path-element>C:\Flash\Corruption-of-Champions-Mod-Deviant\lib\bin\ScrollPane.swc</path-element>
    </library-path>
  </compiler>
  <file-specs>
    <path-element>C:\Flash\Corruption-of-Champions-Mod-Deviant\classes\classes\CoC.as</path-element>
  </file-specs>
  <default-background-color>#000000</default-background-color>
  <default-frame-rate>24</default-frame-rate>
  <default-size>
    <width>1000</width>
    <height>800</height>
  </default-size>
</flex-config>


code:
Artists Okay With Art being in the artpack:
Aldergames
AF
ComfyCushion
Frogapus
Gurgles
Jacques00 (I think)
Jass_Befrold
KaviCat
Lethal_Doors
LurkerGG
mylittlepornicorn
Sharona
SlashySmiley
UCite
Volentis
WolfieCanem
Bluh


code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE model [
        <!ELEMENT model (palettes|properties|colorkeys|spritemap|layers|logic)*>
        <!ATTLIST model
                name CDATA #REQUIRED
                dir CDATA #REQUIRED
                width CDATA #REQUIRED
                height CDATA #REQUIRED
                scale CDATA #REQUIRED
                originX CDATA #IMPLIED
                originY CDATA #IMPLIED>
        <!ELEMENT palettes (palette)*>
        <!ELEMENT palette (color)*>
        <!ATTLIST palette
                name CDATA #REQUIRED>
        <!ELEMENT color (#PCDATA)>
        <!ATTLIST color
                name CDATA #REQUIRED>
        <!ELEMENT properties (property)*>
        <!ELEMENT property EMPTY>
        <!ATTLIST property
                default CDATA #REQUIRED
                name CDATA #REQUIRED
                src CDATA #IMPLIED
                palette CDATA #REQUIRED>
        <!ELEMENT colorkeys (key)*>
        <!ELEMENT key (#PCDATA)>
        <!ATTLIST key
                base CDATA #REQUIRED
                src CDATA #REQUIRED
                transform CDATA #IMPLIED>
        <!ELEMENT spritemap (cell)*>
        <!ATTLIST spritemap
                file CDATA #REQUIRED>
        <!ELEMENT cell (#PCDATA)>
        <!ATTLIST cell
                dx CDATA #IMPLIED
                dy CDATA #IMPLIED
                name CDATA #REQUIRED
                rect CDATA #REQUIRED>
        <!ELEMENT layers (layer)*>
        <!ELEMENT layer (#PCDATA)>
        <!ATTLIST layer
                name CDATA #REQUIRED>
        <!ELEMENT logic (show|switch|if|hide)*>
        <!ELEMENT switch (case|default)*>
        <!ATTLIST switch
                value CDATA #IMPLIED>
        <!ELEMENT case (show|switch|if|hide)*>
        <!ATTLIST case
                test CDATA #IMPLIED
                value CDATA #IMPLIED
                values CDATA #IMPLIED>
        <!ELEMENT show (#PCDATA)>
        <!ATTLIST show
                part CDATA #REQUIRED>
        <!ELEMENT default (show|switch|if|hide)*>
        <!ELEMENT if (show|switch|if|hide)*>
        <!ATTLIST if
                test CDATA #REQUIRED>
        <!ELEMENT hide (#PCDATA)>
        <!ATTLIST hide
                part CDATA #REQUIRED>
        ]>
<!--suppress EqualityComparisonWithCoercionJS, CheckTagEmptyBody -->
<model name="demo" dir="./res/charview/" width="180" height="220" scale="1" originX="15" originY="10">
    <palettes>
        <!--Colors common for skin/hair/fur/scales/... go here. Can be overriden later-->
        <palette name="common">
            <color name="albino">#f2f2e8</color>
            <color name="aqua">#00cccc</color>
            <color name="ashen">#817d79</color>
            <color name="ashen2">#9f948e</color>
            <color name="auburn">#732d26</color>
            <color name="black">#333333</color>
            <color name="blond">#e0c685</color>
            <color name="blonde">#f2e4bf</color>
            <color name="blue">#405fce</color>
            <color name="bronzed">#a89148</color>
            <color name="brown">#664400</color>
            <color name="caramel">#c39350</color>
            <color name="caramel2">#c38c50</color>
            <color name="cerulean">#59cfde</color>
            <color name="cerulean2">#377bc3</color>
            <color name="chocolate">#4a3b2b</color>
            <color name="crimson">#dc143c</color>
            <color name="crystal">#bc81ca</color>
            <color name="dark">#694e44</color>
            <color name="dark2">#352722</color>
            <color name="dusky">#f000f0</color>
            <color name="ebony">#3d3529</color>
            <color name="emerald">#4cc875</color>
            <color name="fair">#edccbf</color>
            <color name="golden">#ffdd00</color>
            <color name="gray">#808080</color>
            <color name="green">#08a108</color>
            <color name="indigo">#4d0080</color>
            <color name="light">#feebd7</color>
            <color name="mahogany">#81473b</color>
            <color name="mahogany2">#672828</color>
            <color name="metallic">#9c9c9c</color>
            <color name="midnight">#30354a</color>
            <color name="olive">#90974e</color>
            <color name="orange">#ffa600</color>
            <color name="peach">#f4c0a4</color>
            <color name="pink">#ffb3b3</color>
            <color name="purple">#7a007a</color>
            <color name="red">#f02c0a</color>
            <color name="red2">#ff0000</color>
            <color name="russet">#aa6546</color>
            <color name="russet2">#793939</color>
            <color name="sable">#d6caa9</color>
            <color name="sanguine">#c03030</color>
            <color name="silky">#ffd6ff</color>
            <color name="silver">#d8e0e9</color>
            <color name="tan">#af8750</color>
            <color name="tan2">#cfaa30</color>
            <color name="tawny">#b97f27</color>
            <color name="turquoise">#1ed9dc</color>
            <color name="white">#e6e6eb</color>
            <color name="yellow">#edef6b</color>
            <color name="aphotic blue-black">#08155e</color>
            <color name="ashen grayish-blue">#93b6c8</color>
            <color name="creamy-white">#f2ebde</color>
            <color name="crimson platinum">#d56c6c</color>
            <color name="dark blue">#3d529e</color>
            <color name="dark gray">#534f59</color>
            <color name="dark green">#36582d</color>
            <color name="deep blue">#1e3667</color>
            <color name="deep red">#742525</color>
            <color name="ghostly pale">#e3deed</color>
            <color name="glacial white">#dee5f2</color>
            <color name="golden blonde">#f5d88a</color>
            <color name="grayish-blue">#b0c9e3</color>
            <color name="iridescent gray">#999999</color>
            <color name="leaf green">#5eba5e</color>
            <color name="light blonde">#ffe78f</color>
            <color name="light blue">#b1c8ec</color>
            <color name="light gray">#dddadd</color>
            <color name="light green">#94f390</color>
            <color name="light grey">#c4d1d9</color>
            <color name="light purple">#e4cdf3</color>
            <color name="lime green">#73df72</color>
            <color name="mediterranean-toned">#ac7339</color>
            <color name="metallic golden">#ddc469</color>
            <color name="metallic silver">#cfedfc</color>
            <color name="midnight black">#171622</color>
            <color name="milky white">#f4dfdc</color>
            <color name="pale white">#ffeac7</color>
            <color name="pale yellow">#eeecaa</color>
            <color name="platinum blonde">#f7f3e8</color>
            <color name="platinum crimson">#ff745c</color>
            <color name="platinum-blonde">#ffe5c7</color>
            <color name="purplish-black">#794474</color>
            <color name="quartz white">#ffffff</color>
            <color name="reddish-orange">#df8453</color>
            <color name="rough gray">#525252</color>
            <color name="sandy blonde">#ebd69e</color>
            <color name="sandy brown">#a28d57</color>
            <color name="sandy-blonde">#e0cd9f</color>
            <color name="shiny black">#1c262c</color>
            <color name="silver blonde">#fcfaf8</color>
            <color name="silver-white">#eff3f6</color>
            <color name="snow white">#f9f9fa</color>
            <color name="yellowish-green">#e1eca7</color>
            <color name="black and yellow">#000000</color>
            <color name="white and black">#eff3f6</color>
        </palette>
        <palette name="hair">
            <color name="red">#d85741</color>
            <color name="flaxen">#e1ba94</color>
            <color name="brown">#674f42</color>
            <color name="black">#334252</color>
            <color name="gray">#647a7d</color>
            <color name="white">#aeaba3</color>
            <color name="raven">#101728</color>
            <color name="snowy">#dddfe4</color>
        </palette>
        <palette name="skin">
            <color name="pale">#f2e8e3</color>
        </palette>
    </palettes>
    <properties>
        <property name="hair" palette="hair,common" default="#ffffff"/>
        <property name="hair2" palette="hair,common" default="#ffffff"/>
        <property name="fur" palette="hair,common" default="#ffffff"/>
        <property name="fur2" palette="hair,common" default="#ffffff"/>
        <property name="scales" palette="common" default="#ffffff"/>
        <property name="scales2" palette="common" default="#ffffff"/>
        <property name="chitin" palette="common" default="#ffffff"/>
        <property name="chitin2" palette="common" default="#ffffff"/>
        <property name="skin" palette="skin,common" default="#ffffff"/>
        <property name="skin2" palette="skin,common" default="#ffffff"/>
        <property name="iris" palette="common" default="#0000ff"/>
    </properties>
    <colorkeys>
        <key src="#FF88FF" base="hair" transform="lighten(25)"/>
        <key src="#CC00CC" base="hair"/>
        <key src="#880088" base="hair" transform="darken(25)"/>
        <key src="#440044" base="hair" transform="darken(50)"/>
        <key src="#FFFF88" base="hair2" transform="lighten(25)"/>
        <key src="#CCCC00" base="hair2"/>
        <key src="#999900" base="hair2" transform="darken(25)"/>
        <key src="#333300" base="hair2" transform="darken(50)"/>
        <key src="#88FF88" base="fur" transform="lighten(25)"/>
        <key src="#00CC00" base="fur"/>
        <key src="#009900" base="fur" transform="darken(25)"/>
        <key src="#003300" base="fur" transform="darken(50)"/>
        <key src="#AA88FF" base="fur2" transform="lighten(25)"/>
        <key src="#6633CC" base="fur2"/>
        <key src="#442288" base="fur2" transform="darken(25)"/>
        <key src="#220044" base="fur2" transform="darken(50)"/>
        <key src="#8888FF" base="scales" transform="lighten(25)"/>
        <key src="#4444FF" base="scales"/>
        <key src="#0000CC" base="scales" transform="darken(25)"/>
        <key src="#000033" base="scales" transform="darken(50)"/>
        <key src="#AAFFAA" base="scales2" transform="lighten(25)"/>
        <key src="#66CC66" base="scales2"/>
        <key src="#448844" base="scales2" transform="darken(25)"/>
        <key src="#223322" base="scales2" transform="darken(50)"/>
        <key src="#88FFFF" base="chitin" transform="lighten(25)"/>
        <key src="#44CCFF" base="chitin"/>
        <key src="#0099CC" base="chitin" transform="darken(25)"/>
        <key src="#006666" base="chitin" transform="darken(50)"/>
        <key src="#AACCDD" base="chitin2" transform="lighten(25)"/>
        <key src="#77AACC" base="chitin2"/>
        <key src="#4477AA" base="chitin2" transform="darken(25)"/>
        <key src="#114477" base="chitin2" transform="darken(50)"/>
        <key src="#FFE9CC" base="skin" transform="lighten(25)"/>
        <key src="#FACE8D" base="skin"/>
        <key src="#BC9B6D" base="skin" transform="darken(25)"/>
        <key src="#7C6647" base="skin" transform="darken(50)"/>
        <key src="#1C0F0F" base="skin" transform="darken(75)"/>
        <key src="#FFCCCC" base="skin2" transform="lighten(25)"/>
        <key src="#FF9999" base="skin2"/>
        <key src="#BB7777" base="skin2" transform="darken(25)"/>
        <key src="#884444" base="skin2" transform="darken(50)"/>
        <key src="#221111" base="skin2" transform="darken(75)"/>
		<key src="#FF0000" base="iris"/>
		<key src="#AA0000" base="iris" transform="darken(25)"/>
        <!--<key src="#F9A98E" base="nipples"/>-->
        <!--<key src="#FFFFFF" base="sclera"/>-->
    </colorkeys>
    <!--<spritesheet file="char1.png" cellwidth="192" cellheight="192">
        <row>name1,name2,,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
        <row>,,breasts/Dfur,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
        <row>,,,,,,,,,,,,,,</row>
    </spritesheet>-->

    <spritemap file="body.png">
        <cell rect="1,90,49,59" name="torso/human" dx="69" dy="64"/>
        <cell rect="51,90,49,59" name="torso/fur" dx="69" dy="64"/>
        <cell rect="101,90,49,59" name="torso/chitin" dx="69" dy="64"/>
        <cell rect="151,90,49,59" name="torso/bee" dx="69" dy="64"/>
        <cell rect="201,90,49,59" name="torso/orca" dx="69" dy="64"/>
        <cell rect="251,90,49,59" name="torso/pscales" dx="69" dy="64"/>
        <cell rect="301,90,49,59" name="torso/scales" dx="69" dy="64"/>
        <cell rect="351,90,49,59" name="torso/goo" dx="69" dy="64"/>
        <cell rect="401,90,49,59" name="torso/kraken" dx="69" dy="64"/>
        <cell rect="1,150,49,59" name="arms_bg/human" dx="46" dy="64"/>
        <cell rect="51,150,49,59" name="arms_bg/fur" dx="46" dy="64"/>
        <cell rect="101,150,49,59" name="arms_bg/chitin" dx="46" dy="64"/>
        <cell rect="151,150,49,59" name="arms_bg/bee" dx="46" dy="64"/>
        <cell rect="201,150,49,59" name="arms_bg/chitin2" dx="46" dy="64"/>
        <cell rect="251,150,49,59" name="arms_bg/orca" dx="46" dy="64"/>
        <cell rect="301,150,49,59" name="arms_bg/pscales" dx="46" dy="64"/>
        <cell rect="351,150,49,59" name="arms_bg/scales" dx="46" dy="64"/>
        <cell rect="401,150,49,59" name="arms_bg/goo" dx="46" dy="64"/>
        <cell rect="1,210,49,59" name="arms/human" dx="94" dy="64"/>
        <cell rect="51,210,49,59" name="arms/fur" dx="94" dy="64"/>
        <cell rect="101,210,49,59" name="arms/chitin" dx="94" dy="64"/>
        <cell rect="151,210,49,59" name="arms/bee" dx="94" dy="64"/>
        <cell rect="201,210,49,59" name="arms/chitin2" dx="94" dy="64"/>
        <cell rect="251,210,49,59" name="arms/orca" dx="94" dy="64"/>
        <cell rect="301,210,49,59" name="arms/pscales" dx="94" dy="64"/>
        <cell rect="351,210,49,59" name="arms/scales" dx="94" dy="64"/>
        <cell rect="401,210,49,59" name="arms/goo" dx="94" dy="64"/>
        <cell rect="1,270,49,59" name="hands_bg/fur" dx="46" dy="64"/>
        <cell rect="51,270,49,59" name="hands_bg/devil" dx="46" dy="64"/>
        <cell rect="101,270,49,59" name="hands_bg/harpy" dx="46" dy="64"/>
        <cell rect="151,270,49,59" name="hands_bg/kraken" dx="46" dy="64"/>
        <cell rect="201,270,49,59" name="hands_bg/alraune" dx="46" dy="64"/>
        <cell rect="251,270,49,59" name="hands_bg/chitin" dx="46" dy="64"/>
        <cell rect="301,270,49,59" name="hands_bg/chitin2" dx="46" dy="64"/>
        <cell rect="351,270,49,59" name="hands_bg/fire" dx="46" dy="64"/>
        <cell rect="401,270,49,59" name="hands_bg/scales" dx="46" dy="64"/>
        <cell rect="451,270,49,59" name="hands_bg/human" dx="46" dy="64"/>
        <cell rect="501,270,49,59" name="hands_bg/fins-orca" dx="46" dy="64"/>
        <cell rect="551,270,49,59" name="hands_bg/goo" dx="46" dy="64"/>
        <cell rect="1,330,49,59" name="hands/fur" dx="94" dy="64"/>
        <cell rect="51,330,49,59" name="hands/devil" dx="94" dy="64"/>
        <cell rect="101,330,49,59" name="hands/harpy" dx="94" dy="64"/>
        <cell rect="151,330,49,59" name="hands/kraken" dx="94" dy="64"/>
        <cell rect="201,330,49,59" name="hands/alraune" dx="94" dy="64"/>
        <cell rect="251,330,49,59" name="hands/chitin" dx="94" dy="64"/>
        <cell rect="301,330,49,59" name="hands/chitin2" dx="94" dy="64"/>
        <cell rect="351,330,49,59" name="hands/fire" dx="94" dy="64"/>
        <cell rect="401,330,49,59" name="hands/scales" dx="94" dy="64"/>
        <cell rect="451,330,49,59" name="hands/human" dx="94" dy="64"/>
        <cell rect="501,330,49,59" name="hands/fins-orca" dx="94" dy="64"/>
        <cell rect="551,330,49,59" name="hands/goo" dx="94" dy="64"/>
        <cell rect="1,390,49,59" name="legs/human" dx="69" dy="115"/>
        <cell rect="51,390,49,59" name="legs/fur" dx="69" dy="115"/>
        <cell rect="101,390,49,59" name="legs/chitin" dx="69" dy="115"/>
        <cell rect="151,390,49,59" name="legs/chitin2" dx="69" dy="115"/>
        <cell rect="201,390,49,59" name="legs/orca" dx="69" dy="115"/>
        <cell rect="251,390,49,59" name="legs/pscales" dx="69" dy="115"/>
        <cell rect="301,390,49,59" name="legs/scales" dx="69" dy="115"/>
        <cell rect="351,390,49,59" name="legs/devil" dx="69" dy="115"/>
        <cell rect="401,390,49,59" name="legs/goo" dx="69" dy="115"/>
        <cell rect="51,450,49,59" name="feet/fur" dx="68" dy="115"/>
        <cell rect="101,450,49,59" name="feet/scales" dx="69" dy="115"/>
        <cell rect="151,450,49,59" name="feet/fire" dx="69" dy="115"/>
        <cell rect="1,520,90,90" name="legs/harpy_human" dx="50" dy="99"/>
        <cell rect="92,520,90,90" name="legs/harpy_fur" dx="50" dy="99"/>
        <cell rect="183,520,90,90" name="legs/harpy_scales" dx="50" dy="99"/>
        <cell rect="274,520,90,90" name="legs/harpy_pscales" dx="50" dy="99"/>
        <cell rect="365,520,90,90" name="legs/harpy_chitin" dx="50" dy="99"/>
        <cell rect="1,611,90,90" name="legs/manticore_sit" dx="50" dy="61"/>
        <cell rect="92,611,90,90" name="legs/manticore_sit_fur" dx="50" dy="61"/>
        <cell rect="183,611,90,90" name="legs/manticore_sit_scales" dx="50" dy="61"/>
        <cell rect="274,611,90,90" name="legs/manticore_sit_pscales" dx="50" dy="61"/>
        <cell rect="365,611,90,90" name="legs/manticore_sit_chitin" dx="50" dy="61"/>
        <cell rect="1,702,90,90" name="arms/manticore_sit" dx="50" dy="61"/>
        <cell rect="92,702,90,90" name="arms/manticore_sit_fur" dx="50" dy="61"/>
        <cell rect="183,702,90,90" name="arms/manticore_sit_scales" dx="50" dy="61"/>
        <cell rect="274,702,90,90" name="arms/manticore_sit_pscales" dx="50" dy="61"/>
        <cell rect="365,702,90,90" name="arms/manticore_sit_chitin" dx="50" dy="61"/>
    </spritemap>
    <spritemap file="extra.png">
        <cell rect="2,55,147,128" name="legs_bg/alraune" dx="24" dy="82"/>
        <cell rect="1,188,173,156" name="legs_bg/liliraune" dx="-3" dy="58"/>
        <cell rect="9,351,175,119" name="legs_bg/drider" dx="21" dy="64"/>
        <cell rect="226,325,143,107" name="legs_bg/centaur" dx="47" dy="93"/>
        <cell rect="131,491,117,117" name="legs/kraken" dx="35" dy="94"/>
        <cell rect="251,450,118,158" name="legs/scylla" dx="34" dy="54"/>
        <cell rect="255,230,125,88" name="legs_bg/cattaur" dx="71" dy="101"/>
        <cell rect="201,101,130,108" name="legs/naga" dx="32" dy="96"/>
        <cell rect="132,611,125,69" name="legs/gooblob" dx="31" dy="102"/>
        <cell rect="260,620,21,28" name="neck/goocore" dx="85" dy="67"/>
        <cell rect="162,59,54,31" name="neck/manticore" dx="67" dy="46"/>
        <cell rect="222,59,54,31" name="neck/weasel" dx="67" dy="52"/>
    </spritemap>
    <spritemap file="hair.png">
        <cell rect="1,70,59,65" name="hair/0" dx="65" dy="21"/>
        <cell rect="1,136,59,65" name="hair_bg/0" dx="65" dy="21"/>
        <cell rect="61,70,59,65" name="hair/feather" dx="65" dy="21"/>
        <cell rect="61,136,59,65" name="hair_bg/feather" dx="65" dy="21"/>
        <cell rect="121,70,59,65" name="hair/gorgon" dx="65" dy="21"/>
        <cell rect="121,136,59,65" name="hair_bg/gorgon" dx="65" dy="21"/>
        <cell rect="1,251,89,98" name="hair/slime" dx="50" dy="4"/>
        <cell rect="91,251,89,98" name="hair_bg/slime2" dx="50" dy="4"/>
        <cell rect="1,350,89,98" name="hair/raiju" dx="50" dy="4"/>
        <cell rect="91,350,89,164" name="hair_bg/raiju3" dx="50" dy="4"/>
    </spritemap>
    <spritemap file="head.png">
        <cell rect="1,70,29,32" name="head/human" dx="80" dy="37"/>
        <cell rect="31,70,29,32" name="head/fur" dx="80" dy="37"/>
        <cell rect="61,70,29,32" name="head/pscales" dx="80" dy="37"/>
        <cell rect="91,70,29,32" name="head/scales" dx="80" dy="37"/>
        <cell rect="121,70,29,32" name="head/chitin" dx="80" dy="37"/>
        <cell rect="151,70,29,32" name="head/bee" dx="80" dy="37"/>
        <cell rect="181,70,29,32" name="head/orca" dx="80" dy="37"/>
        <cell rect="211,70,29,32" name="head/goo" dx="80" dy="37"/>
        <cell rect="1,110,29,32" name="face/human" dx="80" dy="37"/>
        <cell rect="31,110,29,32" name="face/human_fang" dx="80" dy="37"/>
        <cell rect="61,110,29,32" name="face/fur" dx="80" dy="37"/>
        <cell rect="91,110,29,32" name="face/spider" dx="80" dy="37"/>
        <cell rect="121,110,29,32" name="face/insect" dx="80" dy="37"/>
        <cell rect="151,110,29,32" name="face/mouse" dx="80" dy="37"/>
        <cell rect="181,110,29,32" name="face/orca" dx="80" dy="37"/>
        <cell rect="211,110,29,32" name="face/shark" dx="80" dy="37"/>
        <cell rect="241,110,29,32" name="face/reptile" dx="80" dy="37"/>
        <cell rect="271,110,29,32" name="face/fur2" dx="80" dy="37"/>
        <cell rect="301,110,29,32" name="face/racoon" dx="80" dy="37"/>
        <cell rect="331,110,29,32" name="face/racoon_mask" dx="80" dy="37"/>
        <cell rect="361,110,29,32" name="face/goo" dx="80" dy="37"/>
        <cell rect="1,150,29,32" name="eyes/human" dx="80" dy="37"/>
        <cell rect="31,150,29,32" name="eyes/devil" dx="80" dy="37"/>
        <cell rect="61,150,29,32" name="eyes/cat" dx="80" dy="37"/>
        <cell rect="91,150,29,32" name="eyes/spider" dx="80" dy="37"/>
        <cell rect="121,150,29,32" name="eyes/sandtrap" dx="80" dy="37"/>
        <cell rect="151,150,29,32" name="eyes/manticore" dx="80" dy="37"/>
        <cell rect="181,150,29,32" name="eyes/orca" dx="80" dy="37"/>
        <cell rect="211,150,29,32" name="eyes/raiju" dx="80" dy="37"/>
        <cell rect="1,190,29,32" name="ears_bg/human" dx="80" dy="37"/>
        <cell rect="31,190,29,32" name="ears/fur" dx="80" dy="37"/>
        <cell rect="61,190,59,32" name="ears_bg/elfin" dx="65" dy="37"/>
        <cell rect="61,223,59,32" name="ears/elfin" dx="65" dy="37"/>
        <cell rect="121,190,59,32" name="ears_bg/goat" dx="65" dy="37"/>
        <cell rect="121,223,59,32" name="ears/goat" dx="65" dy="37"/>
        <cell rect="121,256,59,32" name="ears_bg/dragon" dx="65" dy="37"/>
        <cell rect="121,289,59,32" name="ears/dragon" dx="65" dy="37"/>
        <cell rect="181,190,29,65" name="ears_bg/fox" dx="80" dy="4"/>
        <cell rect="181,256,29,65" name="ears/fox" dx="80" dy="4"/>
        <cell rect="211,190,29,65" name="ears_bg/wolf" dx="80" dy="4"/>
        <cell rect="211,256,29,65" name="ears/wolf" dx="80" dy="4"/>
        <cell rect="241,190,29,65" name="ears_bg/cat" dx="80" dy="4"/>
        <cell rect="241,256,29,65" name="ears/cat" dx="80" dy="4"/>
        <cell rect="271,190,29,65" name="ears_bg/mouse" dx="80" dy="4"/>
        <cell rect="271,256,29,65" name="ears/mouse" dx="80" dy="4"/>
        <cell rect="301,190,89,65" name="ears_bg/orca" dx="50" dy="37"/>
        <cell rect="301,256,89,65" name="ears/orca" dx="50" dy="37"/>
        <cell rect="391,190,59,32" name="ears_bg/naga" dx="65" dy="37"/>
        <cell rect="391,223,59,32" name="ears/naga" dx="65" dy="37"/>
        <cell rect="451,190,59,65" name="ears_bg/bunny" dx="65" dy="4"/>
        <cell rect="451,256,59,65" name="ears/bunny" dx="65" dy="4"/>
        <cell rect="511,190,89,65" name="ears_bg/weasel" dx="50" dy="4"/>
        <cell rect="511,256,89,65" name="ears/weasel" dx="50" dy="4"/>
        <cell rect="1,330,59,65" name="horns_bg/orchid" dx="65" dy="4"/>
        <cell rect="1,396,59,65" name="horns/orchid" dx="65" dy="4"/>
        <cell rect="61,330,59,65" name="horns_bg/devil" dx="65" dy="4"/>
        <cell rect="61,396,59,65" name="horns/devil" dx="65" dy="4"/>
        <cell rect="121,330,59,65" name="horns_bg/cow" dx="65" dy="4"/>
        <cell rect="121,396,59,65" name="horns/cow" dx="65" dy="4"/>
        <cell rect="181,330,29,65" name="horns/2small" dx="80" dy="4"/>
        <cell rect="211,330,29,65" name="horns/2large" dx="80" dy="4"/>
        <cell rect="241,330,59,65" name="horns_bg/kraken" dx="65" dy="4"/>
        <cell rect="301,330,59,65" name="horns_bg/demon" dx="65" dy="4"/>
        <cell rect="361,330,59,65" name="horns_bg/dragon" dx="65" dy="4"/>
        <cell rect="361,396,59,65" name="horns/dragon" dx="65" dy="4"/>
        <cell rect="1,470,59,65" name="antennae/bee" dx="65" dy="4"/>
    </spritemap>
    <spritemap file="lewd.png">
        <cell rect="11,80,49,29" name="breasts/0" dx="69" dy="68"/>
        <cell rect="11,110,49,29" name="breasts/B" dx="69" dy="68"/>
        <cell rect="61,110,49,29" name="breasts/Bfur" dx="69" dy="68"/>
        <cell rect="111,110,49,29" name="breasts/Bchitin" dx="69" dy="68"/>
        <cell rect="161,110,49,29" name="breasts/Bbee" dx="69" dy="68"/>
        <cell rect="211,110,49,29" name="breasts/Bscales" dx="69" dy="68"/>
        <cell rect="261,110,49,29" name="breasts/Bscales" dx="69" dy="68"/>
        <cell rect="311,110,49,29" name="breasts/Bskin2" dx="69" dy="68"/>
        <cell rect="361,110,49,29" name="breasts/Bgoo" dx="69" dy="68"/>
        <cell rect="11,140,49,29" name="breasts/D" dx="69" dy="68"/>
        <cell rect="61,140,49,29" name="breasts/Dfur" dx="69" dy="68"/>
        <cell rect="111,140,49,29" name="breasts/Dchitin" dx="69" dy="68"/>
        <cell rect="161,140,49,29" name="breasts/Dbee" dx="69" dy="68"/>
        <cell rect="211,140,49,29" name="breasts/Dpscales" dx="69" dy="68"/>
        <cell rect="261,140,49,29" name="breasts/Dscales" dx="69" dy="68"/>
        <cell rect="311,140,49,29" name="breasts/Dskin2" dx="69" dy="68"/>
        <cell rect="361,140,49,29" name="breasts/Dgoo" dx="69" dy="68"/>
    </spritemap>
    <spritemap file="tails.png">
        <cell rect="1,71,168,139" name="tail/manticore" dx="10" dy="40"/>
        <cell rect="1,211,83,139" name="tail/orca" dx="78" dy="39"/>
        <cell rect="86,211,83,139" name="tail/mouse" dx="85" dy="40"/>
        <cell rect="170,211,83,139" name="tail/mouse_fire" dx="85" dy="40"/>
        <cell rect="255,211,83,139" name="tail/cat" dx="85" dy="40"/>
        <cell rect="339,211,83,139" name="tail/cat2" dx="85" dy="40"/>
        <cell rect="1,351,168,69" name="tail/reptile" dx="10" dy="90"/>
        <cell rect="170,351,168,69" name="tail/demon" dx="10" dy="90"/>
        <cell rect="1,421,168,69" name="tail_fg/reptile_fire" dx="10" dy="90"/>
        <cell rect="170,421,168,69" name="tail/cow" dx="10" dy="90"/>
        <cell rect="1,491,83,69" name="tail/bunny" dx="85" dy="90"/>
        <cell rect="86,491,83,69" name="tail/goat" dx="85" dy="90"/>
        <cell rect="170,491,83,69" name="tail/harpy" dx="85" dy="90"/>
        <cell rect="1,561,83,139" name="tail/fox1" dx="85" dy="40"/>
        <cell rect="86,561,83,139" name="tail/fox2" dx="85" dy="40"/>
        <cell rect="170,561,83,139" name="tail/bee_abdomen" dx="85" dy="40"/>
        <cell rect="255,561,83,139" name="tail/spider" dx="85" dy="40"/>
        <cell rect="339,561,83,139" name="tail/weasel" dx="85" dy="40"/>
    </spritemap>
    <spritemap file="wings.png">
        <cell rect="1,70,84,139" name="wings_bg/mantibig" dx="10" dy="20"/>
        <cell rect="86,70,83,139" name="wings/mantibig" dx="95" dy="20"/>
        <cell rect="170,70,84,139" name="wings_bg/fairy" dx="10" dy="20"/>
        <cell rect="255,70,83,139" name="wings/fairy" dx="95" dy="20"/>
        <cell rect="339,70,84,139" name="wings_bg/feather_large" dx="10" dy="20"/>
        <cell rect="424,70,83,139" name="wings/feather_large" dx="95" dy="20"/>
        <cell rect="1,210,84,139" name="wings_bg/scales" dx="10" dy="20"/>
        <cell rect="86,210,83,139" name="wings/scales" dx="95" dy="20"/>
        <cell rect="170,210,168,139" name="wings/bee" dx="10" dy="20"/>
        <cell rect="1,350,84,139" name="wings_bg/demon" dx="10" dy="20"/>
        <cell rect="86,350,83,139" name="wings/demon" dx="95" dy="20"/>
    </spritemap>

    <layers>
        <layer name="antennae"/>
        <layer name="horns"/>
        <layer name="ears"/>
        <layer name="eyes"/>
        <layer name="hair"/>
        <layer name="ears_bg"/>

        <layer name="face"/>
        <layer name="head"/>

        <layer name="horns_bg"/>
        <layer name="neck"/>
        <layer name="breasts"/>
        <layer name="hands"/>
        <layer name="arms"/>
        <layer name="hands_bg"/>
        <layer name="arms_bg"/>
        <layer name="feet"/>
        <layer name="legs"/>
        <layer name="wings"/>
        <layer name="feet_bg"/>
        <layer name="legs_bg"/>

        <layer name="torso"/>

        <layer name="hair_bg"/>
        <layer name="tail_fg"/>
        <layer name="tail"/>
        <layer name="wings_bg"/>
    </layers>

    <logic>
        <!--

        Syntax:

        Type item = show | hide | if | switch

        Element <show part=""/>
            attribute [part] - key in spritesheet or spritemap

        Element <hide part=""/>
            attribute [part] - full name or "layer/*" mask

        Element <if test=""> item* </if>
            attribute [test] - evaluated as expression
            children >item* - items to process if [test] evaluates to 'true'

        Element <switch> case* default? </switch>
            optional attribute [value] - evaluated as expression; allows using case[value]
            children >case* - they are evaluated, if one passes test, its contents are processed
                and case iteration stops
            optional child >default? - processed if no cases passed the test

        Element <case test=""|value=""> item* </case>
            optional attribute [test] - evaluated as expression
            optional attribute [value] - evaluated as expression
            optional attribute [values] - evaluated as commaa-separated expressions
            children >item* - if:
                [test] is present and evaluates to 'true'
                or:
                [values] is present and any of it evaluates to same as parent
                switch[value]
                or:
                [value] is present and evaluates to same as parent switch[value]
                then items are processed

        Element <default> item* </default>

        -->
        <switch value="antennae.type">
            <case value="Antennae.NONE"></case>
            <case value="Antennae.MANTIS">
                <show part="antennae/bee"/>
            </case>
            <case value="Antennae.BEE">
                <show part="antennae/bee"/>
            </case>
            <default>
                <show part="antennae/bee"/>
            </default>
        </switch>

        <switch value="horns.type">
            <case value="Horns.NONE"></case>
            <case value="Horns.DEMON">
                <show part="horns_bg/demon"/>
            </case>
            <case value="Horns.COW_MINOTAUR">
                <show part="horns_bg/cow"/>
                <show part="horns/cow"/>
            </case>
            <case value="Horns.GOAT">
                <show part="horns/devil"/>
                <show part="horns_bg/devil"/>
            </case>
            <case value="Horns.UNICORN"><!--TODO UNICORN--></case>
            <case value="Horns.ORCHID">
                <show part="horns/orchid"/>
                <show part="horns_bg/orchid"/>
            </case>
            <case value="'never'">
                <show part="horns/2small"/>
                <show part="horns_bg/kraken"/>
            </case>
            <case value="Horns.DRACONIC_X4_12_INCH_LONG">
                <show part="horns_bg/dragon"/>
            </case>
            <default><!--TODO DRACONIC_X2, , ANTLERS, RHINO, OAK, GARGOYLE, ONI_X2, ONI-->
                <show part="horns/2large"/>
            </default>
        </switch>

        <switch value="ears.type">
            <case value="Ears.HUMAN">
                <show part="ears_bg/human"/>
            </case>
            <case values="Ears.HORSE,Ears.COW,Ears.KANGAROO,Ears.RACOON,Ears.FERRET,Ears.PIG,Ears.RHINO,Ears.ECHIDNA,Ears.DEER"><!--TODO-->
                <show part="ears/goat"/>
                <show part="ears_bg/goat"/>
            </case>
            <case values="Ears.DOG,Ears.WOLF">
                <show part="ears/wolf"/>
                <show part="ears_bg/wolf"/>
            </case>
            <case values="Ears.ELFIN,Ears.ELVEN,Ears.ONI,Ears.VAMPIRE">
                <show part="ears/elfin"/>
                <show part="ears_bg/elfin"/>
            </case>
            <case value="Ears.CAT">
                <show part="ears/cat"/>
                <show part="ears_bg/cat"/>
            </case>
            <case values="Ears.LIZARD"></case>
            <case values="Ears.BUNNY">
                <show part="ears/bunny"/>
                <show part="ears_bg/bunny"/>
            </case>
            <case values="Ears.DRAGON">
                <show part="ears/dragon"/>
                <show part="ears_bg/dragon"/>
            </case>
            <case values="Ears.FOX,Ears.BAT">
                <show part="ears/fox"/>
                <show part="ears_bg/fox"/>
            </case>
            <case values="Ears.MOUSE">
                <show part="ears/mouse"/>
                <show part="ears_bg/mouse"/>
            </case>
            <case values="Ears.LION">
                <show part="ears/cat"/>
                <show part="ears_bg/cat"/>
            </case>
            <case value="Ears.YETI">
                <show part="ears/fur"/>
            </case>
            <case value="Ears.ORCA">
                <show part="ears/orca"/>
                <show part="ears_bg/orca"/>
            </case>
            <case value="Ears.SNAKE">
                <show part="ears/naga"/>
                <show part="ears_bg/naga"/>
            </case>
            <case values="Ears.GOAT">
                <show part="ears/goat"/>
                <show part="ears_bg/goat"/>
            </case>
            <case values="Ears.WEASEL">
                <show part="ears/weasel"/>
                <show part="ears_bg/weasel"/>
                <show part="neck/weasel"/>
            </case>
            <default> <!-- TODO RED_PANDA, AVIAN, GRYPHON -->
                <show part="ears_bg/human"/>
            </default>
        </switch>

        <switch value="eyes.type">
            <case value="Eyes.HUMAN">
                <show part="eyes/human"/>
            </case>
            <case value="Eyes.FOUR_SPIDER_EYES">
                <show part="eyes/spider"/>
            </case>
            <case value="Eyes.BLACK_EYES_SAND_TRAP">
                <show part="eyes/sandtrap"/>
            </case>
            <case values="Eyes.SLITS,Eyes.FENRIR,Eyes.REPTILIAN,Eyes.SNAKE,Eyes.DRAGON,Eyes.ONI,Eyes.ELF">
                <show part="eyes/cat"/>
            </case>
            <case value="Eyes.DEVIL">
                <show part="eyes/devil"/>
            </case>
            <case value="Eyes.RAIJU">
                <show part="eyes/raiju"/>
            </case>
            <default>
                <show part="eyes/human"/>
            </default>
        </switch>

        <!--
             = 0   bald
             < 1   trim
             < 3   short
             < 6   shaggy
             < 10  moderately long
             < 16  long (shoulder-length)
             < 26  very long
             < 40  ass-length
             < tallness
                   obscenely long
             >= tallness
                   floor-length
        -->
        <if test="hairLength > 0">
            <switch value="hairType">
                <case value="Hair.FEATHER">
                    <show part="hair/feather"/>
                    <show part="hair_bg/feather"/>
                </case>
                <case value="Hair.GORGON">
                    <show part="hair/gorgon"/>
                    <show part="hair_bg/gorgon"/>
                </case>
                <case value="Hair.STORM">
                    <switch>
                        <case test="hairLength lt 16">
                            <show part="hair/raiju"/>
                        </case>
                        <default>
                            <show part="hair/raiju"/>
                            <show part="hair_bg/raiju3"/>
                        </default>
                    </switch>
                </case>
                <case value="Hair.GOO">
                    <switch>
                        <case test="hairLength lt 16">
                            <show part="hair/slime"/>
                        </case>
                        <default>
                            <show part="hair/raiju"/>
                            <show part="hair_bg/slime2"/>
                        </default>
                    </switch>
                </case>
                <default> <!-- covers Hair.NORMAL, Hair.GHOST, Hair.ANEMONE, Hair.QUILL, Hair.LEAF, Hair.FLUFFY, Hair.GRASS, Hair.SILKEN, Hair.STORM --> <!-- TODO  -->
                    <switch>
                        <case test="hairLength lt 6">
                            <show part="hair/0"/>
                            <show part="hair_bg/0"/>
                        </case>
                        <default>
                            <show part="hair/0"/>
                            <show part="hair_bg/0"/>
                        </default>
                    </switch>
                </default>
            </switch>
        </if>

        <switch>
            <case test="not hasPartialCoat()">
                <switch value="skin.type">
                    <case values="Skin.PLAIN,Skin.AQUA_RUBBER_LIKE">
                        <show part="head/human"/>
                        <show part="torso/human"/>
                        <show part="arms/human"/>
                        <show part="arms_bg/human"/>
                        <show part="legs/human"/>

                        <if test="skin.base.pattern==Pattern.ORCA_UNDERBODY">
                            <hide part="head/*"/>
                            <show part="head/orca"/>
                            <show part="torso/orca"/>
                            <hide part="torso/*"/>
                            <hide part="arms/*"/>
                            <show part="arms/orca"/>
                            <hide part="arms_bg/*"/>
                            <show part="arms_bg/orca"/>
                            <hide part="legs/*"/>
                            <show part="legs/orca"/>
                        </if>
                    </case>
                    <case value="Skin.FUR">
                        <show part="head/fur"/>
                        <show part="torso/fur"/>
                        <show part="arms/fur"/>
                        <show part="arms_bg/fur"/>
                        <show part="legs/fur"/>
                    </case>
                    <case values="Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES">
                        <show part="head/scales"/>
                        <show part="torso/scales"/>
                        <show part="arms/scales"/>
                        <show part="arms_bg/scales"/>
                        <show part="legs/scales"/>
                    </case>
                    <case value="Skin.GOO">
                        <show part="head/goo"/>
                        <show part="torso/goo"/>
                        <show part="arms/goo"/>
                        <show part="arms_bg/goo"/>
                        <show part="legs/goo"/>
                    </case>
                    <!--<case value="Skin.BARK">TODO </case>-->
                    <!--<case value="Skin.STONE">TODO </case>-->
                    <!--<case value="Skin.MOSS">TODO </case>-->
                    <case value="Skin.CHITIN">
                        <show part="head/chitin"/>
                        <show part="torso/chitin"/>
                        <if test="skin.coat.pattern==Pattern.BEE_STRIPES">
                            <hide part="head/*"/>
                            <show part="head/bee"/>
                            <hide part="torso/*"/>
                            <show part="torso/bee"/>
                            <hide part="arms/*"/>
                            <show part="arms/bee"/>
                            <hide part="arms_bg/*"/>
                            <show part="arms_bg/bee"/>
                        </if>
                        <show part="arms/chitin"/>
                        <show part="arms_bg/chitin"/>
                        <show part="legs/chitin"/>
                    </case>
                    <default>
                        <show part="head/human"/>
                        <show part="torso/human"/>
                        <show part="arms/human"/>
                        <show part="arms_bg/human"/>
                        <show part="legs/human"/>
                    </default>
                </switch>
            </case>
            <default>
                <switch value="skin.coat.type">
                    <case values="Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES">
                        <show part="head/pscales"/>
                        <show part="torso/pscales"/>
                        <show part="arms/pscales"/>
                        <show part="arms_bg/pscales"/>
                        <show part="legs/pscales"/>
                    </case>
                    <!--TODO partial fur/chitin/bark/moss-->
                    <default>
                        <show part="head/human"/>
                        <show part="torso/human"/>
                        <show part="arms/human"/>
                        <show part="arms_bg/human"/>
                        <show part="legs/human"/>
                    </default>
                </switch>
            </default>
        </switch>
        <switch value="faceType">
            <case value="Face.HUMAN">
                <show part="face/human"/>
            </case>
            <case values="Face.HORSE,Face.COW_MINOTAUR,Face.KANGAROO,Face.FOX,Face.RACCOON,Face.FERRET,Face.PIG,Face.BOAR,Face.RHINO,Face.ECHIDNA,Face.DEER"><!--TODO -->
                <show part="face/fur"/>
            </case>
            <case values="Face.DOG,Face.CAT,Face.WOLF">
                <show part="face/fur"/>
            </case>
            <case value="Face.SHARK_TEETH">
                <show part="face/shark"/>
            </case>
            <case values="Face.SNAKE_FANGS">
                <show part="face/human_fang"/>
            </case>
            <case values="Face.LIZARD,Face.DRAGON">
                <show part="face/reptile"/>
            </case>
            <case values="Face.BUNNY,Face.BUCKTEETH">
                <show part="face/mouse"/>
            </case>
            <case value="Face.SPIDER_FANGS">
                <show part="face/spider"/>
            </case>
            <case value="Face.RACOON_MASK"><!--TODO -->
                <show part="face/human"/>
            </case>
            <case value="Face.FERRET_MASK"><!--TODO -->
                <show part="face/human"/>
            </case>
            <case values="Face.SHARPTEETH,Face.VAMPIRE">
                <show part="face/human_fang"/>
            </case>
            <case value="Face.ORCA">
                <show part="face/orca"/>
            </case>
            <case value="'never'"><!--TODO-->
                <show part="face/insect"/>
            </case>
            <default><!-- TODO Face.YETI_FANGS,Face.PLANT_DRAGON,Face.DRAGON_FANGS -->
                <show part="face/human"/>
            </default>
        </switch>

        <if test="breastRows.length gt 0">
            <switch>
                <case test="breastRows[0].breastRating lte BreastCup.FLAT"><!--FLAT-->
                    <show part="breasts/0"/>
                </case>
                <case test="breastRows[0].breastRating lte BreastCup.B"><!--A-B-->
                    <switch>
                        <case test="hasFullCoatOfType(Skin.FUR)">
                            <show part="breasts/Bfur"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.CHITIN)">
                            <show part="breasts/Bchitin"/>
                            <if test="skin.coat.pattern==Pattern.BEE_STRIPES">
                                <hide part="breasts/*"/>
                                <show part="breasts/Bbee"/>
                            </if>
                        </case>
                        <case test="hasFullCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="breasts/Bscales"/>
                        </case>
                        <case test="hasPartialCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="breasts/Bpscales"/>
                        </case>
                        <case value="'never'"><!--TODO Skin.BARK,Skin.STONE,Skin.MOSS-->
                            <show part="breasts/B"/>
                        </case>
                        <case test="skin.base.pattern==Pattern.ORCA_UNDERBODY">
                            <show part="breasts/Bskin2"/>
                        </case>
                        <case test="skin.base.type==Skin.GOO">
                            <show part="breasts/Bgoo"/>
                        </case>
                        <default>
                            <show part="breasts/B"/>
                        </default>
                    </switch>
                </case>
                <default>
                    <switch>
                        <case test="hasFullCoatOfType(Skin.FUR)">
                            <show part="breasts/Dfur"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.CHITIN)">
                            <show part="breasts/Dchitin"/>
                            <if test="skin.coat.pattern==Pattern.BEE_STRIPES">
                                <hide part="breasts/*"/>
                                <show part="breasts/Dbee"/>
                            </if>
                        </case>
                        <case test="hasFullCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="breasts/Dscales"/>
                        </case>
                        <case test="hasPartialCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="breasts/Dpscales"/>
                        </case>
                        <case value="'never'"><!--TODO Skin.BARK,Skin.STONE,Skin.MOSS-->
                            <show part="breasts/D"/>
                        </case>
                        <case test="skin.base.pattern==Pattern.ORCA_UNDERBODY">
                            <show part="breasts/Dskin2"/>
                        </case>
                        <case test="skin.base.type==Skin.GOO">
                            <show part="breasts/Dgoo"/>
                        </case>
                        <default>
                            <show part="breasts/D"/>
                        </default>
                    </switch>
                </default>
            </switch>
        </if>

        <switch value="arms.type">
            <case values="Arms.HUMAN,Arms.KITSUNE,Arms.ONI,Arms.ELF,Arms.RAIJU">
                <!--see switch[value=skin.coverage]-->
            </case>
            <case values="Arms.HARPY,Arms.PHOENIX">
                <show part="hands/harpy"/>
                <show part="hands_bg/harpy"/>
            </case>
            <case values="Arms.SPIDER,Arms.MANTIS">
                <show part="hands/chitin2"/>
                <show part="hands_bg/chitin2"/>
            </case>
            <case value="Arms.BEE">
                <hide part="arms/*"/>
                <hide part="arms_bg/*"/><hide part="hands_bg/*"/>
                <show part="arms/bee"/>
                <show part="arms_bg/bee"/>
            </case>
            <case value="Arms.SALAMANDER">
                <hide part="arms/*"/>
                <hide part="arms_bg/*"/>
                <show part="arms/pscales"/>
                <show part="arms_bg/pscales"/>
            </case>
            <case values="Arms.PLANT,Arms.PLANT2">
                <show part="hands/alraune"/>
                <show part="hands_bg/alraune"/>
            </case>
            <case value="Arms.FINS">
                <show part="hands/fins-orca"/>
                <show part="hands_bg/fins-orca"/>
            </case>
            <case value="Arms.GARGOYLE"><!--TODO -->
                <hide part="arms/*"/>
                <hide part="arms_bg/*"/>
                <show part="arms/human"/>
                <show part="arms_bg/human"/>
            </case>
            <case values="Arms.WOLF,Arms.FOX,Arms.YETI">
                <show part="hands/fur"/>
                <show part="hands_bg/fur"/>
            </case>
            <case value="Arms.LION">
                <show part="neck/manticore"/>
                <show part="hands/fur"/>
                <show part="hands_bg/fur"/>
                <if test="lowerBody==LowerBody.LION">
                    <hide part="arms/*"/>
                    <hide part="arms_bg/*"/>
                    <hide part="hands/*"/>
                    <hide part="hands_bg/*"/>
                    <switch>
                        <case test="hasPartialCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="arms/manticore_sit_pscales"/>
                            <show part="arms_bg/manticore_sit_pscales"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.FUR)">
                            <show part="arms/manticore_sit_fur"/>
                            <show part="arms_bg/manticore_sit_fur"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.CHITIN)">
                            <show part="arms/manticore_sit_chitin"/>
                            <show part="arms_bg/manticore_sit_chitin"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="arms/manticore_sit_scales"/>
                            <show part="arms_bg/manticore_sit_scales"/>
                        </case>
                        <default>
                            <show part="arms/manticore_sit"/>
                            <show part="arms_bg/manticore_sit"/>
                        </default>
                    </switch>
                </if>
            </case>
            <case values="Arms.LIZARD,Arms.DRAGON">
                <show part="hands/scales"/>
                <show part="hands_bg/scales"/>
            </case>
            <case value="Arms.ORCA">
                <hide part="arms/*"/>
                <hide part="arms_bg/*"/>
                <show part="arms_bg/orca"/>
                <show part="arms/orca"/>
                <show part="arms/fins-orca"/>
                <show part="arms_bg/fins-orca"/>
            </case>
            <case value="Arms.DEVIL">
                <show part="hands/devil"/>
                <show part="hands_bg/devil"/>
            </case>
            <case value="'never'"><!--TODO hinezumi-->
                <show part="hands/fire"/>
                <show part="hands_bg/fire"/>
            </case>
            <case value="'never'"><!--TODO kraken-->
                <hide part="arms/*"/>
                <hide part="arms_bg/*"/>
                <show part="arms/kraken"/>
                <show part="arms_bg/kraken"/>
            </case>
            <default>
                <!--see switch[value=skinType]-->
            </default>
        </switch>

        <switch value="lowerBody">
            <case value="LowerBody.HUMAN">
                <!--see switch[value=skin.coverage]-->
            </case>
            <case values="LowerBody.HOOFED,LowerBody.PONY,LowerBody.CLOVEN_HOOFED">
                <hide part="legs/*"/>
                <switch>
                    <case test="legCount==4">
                        <show part="legs_bg/centaur"/>
                    </case>
                    <default>
                        <show part="legs/devil"/>
                    </default>
                </switch>
            </case>
            <case value="LowerBody.CAT">
                <switch>
                    <case test="legCount==4">
                        <hide part="legs/*"/>
                        <show part="legs_bg/cattaur"/>
                    </case>
                    <default>
                        <show part="feet/fur"/>
                    </default>
                </switch>
            </case>
            <case values="LowerBody.CANINE,LowerBody.BUNNY,LowerBody.KANGAROO,LowerBody.FOX,LowerBody.RACCOON,LowerBody.FERRET">
                <show part="feet/fur"/>
            </case>
            <case value="LowerBody.NAGA">
                <hide part="legs/*"/>
                <show part="legs/naga"/>
            </case>
            <!--<case value="LowerBody.DEMONIC_HIGH_HEELS">TODO </case>-->
            <!--<case value="LowerBody.DEMONIC_CLAWS"">TODO </case>-->
            <case value="LowerBody.BEE">
                <hide part="legs/*"/>
                <show part="legs/chitin"/>
            </case>
            <case value="LowerBody.GOO">
                <hide part="legs/*"/>
                <show part="legs/gooblob"/>
            </case>
            <case values="LowerBody.LIZARD,LowerBody.DRAGON,LowerBody.SALAMANDER">
                <show part="feet/scales"/>
            </case>
            <case values="LowerBody.HARPY">
                <hide part="legs/*"/>
                <hide part="feet/*"/>
                <switch>
                    <case test="hasFullCoatOfType(Skin.FUR)">
                        <show part="legs/harpy_fur"/>
                    </case>
                    <case test="hasFullCoatOfType(Skin.SCALES)">
                        <show part="legs/harpy_scales"/>
                    </case>
                    <case test="hasFullCoatOfType(Skin.CHITIN)">
                        <show part="legs/harpy_chitin"/>
                    </case>
                    <case test="hasPartialCoatOfType(Skin.SCALES)">
                        <show part="legs/harpy_pscales"/>
                    </case>
                    <default>
                        <show part="legs/harpy_human"/>
                    </default>
                </switch>
            </case>
            <case value="LowerBody.CHITINOUS_SPIDER_LEGS">
                <hide part="legs/*"/>
                <show part="legs/chitin2"/>
            </case>
            <case value="LowerBody.DRIDER">
                <hide part="legs/*"/>
                <show part="legs_bg/drider"/>
            </case>
            <!--<case value="LowerBody.ECHIDNA">TODO </case>-->
            <case value="LowerBody.SCYLLA">
                <hide part="legs/*"/>
                <show part="legs/scylla"/>
            </case>
            <case value="LowerBody.MANTIS"><!--TODO -->
                <hide part="legs/*"/>
                <show part="legs/chitin"/>
            </case>
            <!--<case value="LowerBody.GARGOYLE">TODO </case>-->
            <!--<case value="LowerBody.PLANT_HIGH_HEELS">TODO </case>-->
            <!--<case value="LowerBody.PLANT_ROOT_CLAWS">TODO </case>-->
            <case value="LowerBody.PLANT_FLOWER">
                <hide part="legs/*"/>
                <show part="legs_bg/alraune"/>
            </case>
            <case value="LowerBody.LION">
                <show part="feet/fur"/>
                <if test="arms.type==Arms.LION">
                    <hide part="legs/*"/>
                    <hide part="feet/*"/>
                    <switch>
                        <case test="hasPartialCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="legs/manticore_sit_pscales"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.FUR)">
                            <show part="legs/manticore_sit_fur"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.CHITIN)">
                            <show part="legs/manticore_sit_chitin"/>
                        </case>
                        <case test="hasFullCoatOfType(Skin.SCALES,Skin.AQUA_SCALES,Skin.DRAGON_SCALES)">
                            <show part="legs/manticore_sit_scales"/>
                        </case>
                        <default>
                            <show part="legs/manticore_sit"/>
                        </default>
                    </switch>
                </if>
            </case>
            <!--<case value="LowerBody.YETI">TODO </case>-->
            <case values="LowerBody.ORCA,LowerBody.SHARK">
                <hide part="legs/*"/>
                <show part="legs/orca"/>
            </case>
            <!--<case value="LowerBody.YGG_ROOT_CLAWS">TODO </case>-->
            <case value="'never'"><!--TODO liliraune-->
                <hide part="legs/*"/>
                <show part="legs_bg/liliraune"/>
            </case>

            <default>
                <!--see switch[value=skin.coverage]-->
            </default>
        </switch>

        <switch value="wings.type">
            <case value="Wings.NONE"></case>
            <case values="Wings.BEE_LIKE_SMALL,Wings.BEE_LIKE_LARGE">
                <show part="wings/bee"/>
            </case>
            <case values="Wings.HARPY,Wings.FEATHERED">
                <show part="wings/feather_large"/>
                <show part="wings_bg/feather_large"/>
            </case>
            <case values="Wings.IMP,Wings.BAT_LIKE_TINY,Wings.BAT_LIKE_LARGE,Wings.BAT_LIKE_LARGE_2"><!--TODO sizes -->
                <show part="wings/demon"/>
                <show part="wings_bg/demon"/>
            </case>
            <!--TODO Wings.SHARK_FIN-->
            <case values="Wings.DRACONIC_SMALL,Wings.DRACONIC_LARGE,Wings.DRACONIC_HUGE"><!--TODO sizes -->
                <show part="wings_bg/scales"/>
                <show part="wings/scales"/>
            </case>
            <case values="Wings.GIANT_DRAGONFLY,Wings.MANTIS_LIKE_SMALL,Wings.MANTIS_LIKE_LARGE,Wings.MANTIS_LIKE_LARGE2"><!--TODO -->
                <show part="wings/bee"/>
            </case>
            <!--TODO Wings.PLANT, Wings.BAT_ARM, Wings.VAMPIRE-->
            <case values="Wings.MANTICORE_LIKE_SMALL,Wings.MANTICORE_LIKE_LARGE">
                <show part="wings/mantibig"/>
                <show part="wings_bg/mantibig"/>
            </case>
            <case values="Wings.FEY_DRAGON_WINGS">
                <show part="wings/fairy"/>
                <show part="wings_bg/fairy"/>
            </case>
            <default>
            </default>
        </switch>

        <switch value="tailType">
            <case value="Tail.NONE"></case>
            <case values="Tail.HORSE,Tail.DOG,Tail.WOLF"><!--TODO -->
                <show part="tail/goat"/>
            </case>
            <case values="Tail.HORSE,Tail.DOG,Tail.COW,Tail.WOLF">
                <show part="tail/cow"/>
            </case>
            <case value="Tail.DEMONIC">
                <show part="tail/demon"/>
            </case>
            <case value="Tail.SPIDER_ABDOMEN">
                <show part="tail/spider"/>
            </case>
            <case value="Tail.BEE_ABDOMEN">
                <show part="tail/bee_abdomen"/>
            </case>
            <case value="Tail.CAT">
                <switch value="tailCount">
                    <case value="1">
                        <show part="tail/cat"/>
                    </case>
                    <case value="2">
                        <show part="tail/cat2"/>
                    </case>
                    <default>
                        <show part="tail/cat2"/>
                    </default>
                </switch>
            </case>
            <case values="Tail.LIZARD,Tail.DRACONIC">
                <show part="tail/reptile"/>
            </case>
            <case value="Tail.RABBIT"></case>
            <case value="Tail.HARPY">
                <show part="tail/harpy"/>
            </case>
            <case value="Tail.FOX">
                <show part="tail/fox1"/>
                <if test="tailCount ge 2">
                    <show part="tail/fox2"/>
                </if>
                <if test="tailCount ge 3">
                    <show part="tail/fox3"/>
                </if>
                <if test="tailCount ge 4">
                    <show part="tail/fox4"/>
                </if>
                <if test="tailCount ge 5">
                    <show part="tail/fox5"/>
                </if>
                <if test="tailCount ge 6">
                    <show part="tail/fox6"/>
                </if>
                <if test="tailCount ge 7">
                    <show part="tail/fox7"/>
                </if>
                <if test="tailCount ge 8">
                    <show part="tail/fox8"/>
                </if>
                <if test="tailCount ge 9">
                    <show part="tail/fox9"/>
                </if>
            </case>
            <case values="Tail.KANGAROO,Tail.RACCOON,Tail.FERRET"><!--TODO -->
                <show part="tail/cat"/>
            </case>
            <case value="Tail.MOUSE">
                <show part="tail/mouse"/>
            </case>
            <case value="Tail.BEHEMOTH">
                <!--TODO -->
                <show part="tail/reptile"/>
            </case>
            <case value="Tail.PIG"></case>
            <case value="Tail.SCORPION"><!--TODO--></case>
            <case value="Tail.GOAT">
                <show part="tail/goat"/>
            </case>
            <case value="Tail.RHINO"></case>
            <case value="Tail.ECHIDNA"></case>
            <case value="Tail.DEER"></case>
            <case value="Tail.SALAMANDER">
                <show part="tail/reptile"/>
                <show part="tail_fg/reptile_fire"/>
            </case>
            <case value="Tail.KITSHOO">
                <!--TODO -->
            </case>
            <case value="Tail.MANTIS_ABDOMEN">
                <!--TODO -->
            </case>
            <case value="Tail.MANTICORE_PUSSYTAIL">
                <show part="tail/manticore"/>
            </case>
            <case value="Tail.GARGOYLE">
                <!--TODO -->
                <show part="tail/reptile"/>
            </case>
            <case values="Tail.ORCA,Tail.SHARK">
                <show part="tail/orca"/>
            </case>
            <case value="Tail.YGGDRASIL">
                <!--TODO -->
            </case>
            <case value="'never'">
                <show part="tail/mouse_fire"/><!--TODO hinezumi-->
            </case>
            <default>
            </default>
        </switch>

    </logic>
</model>


code:
# must be unique in a given SonarQube instance
sonar.projectKey=org.github.Kitteh6660:Corruption-of-Champions-Mod
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=Corruption-of-Champions-Mod
sonar.projectVersion=COC_VERSION

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# Since SonarQube 4.2, this property is optional if sonar.modules is set.
# If not set, SonarQube starts looking for source code from the directory containing
# the sonar-project.properties file.
sonar.sources=classes,includes
sonar.tests=test

# Language
sonar.language=flex

# Encoding of the source files
sonar.sourceEncoding=UTF-8

# Retrieve code coverage data from the Cobertura report
sonar.flex.cobertura.reportPath=report/coverage.xml


code:
package {

import ClassesSuit;

[Suite]
[RunWith("org.flexunit.runners.Suite")]
	public class AllTestsSuit
	{
		 public var classesSuit:ClassesSuit;
	}
}


code:
package {
	import classes.HelperSuit;
	import classes.InternalsSuit;
	import classes.PlayerTest;
	import classes.ScenesSuit;
	import classes.ItemsSuit;

	import classes.CreatureTest;
	import classes.CoCTest;
	import classes.CharSpecialTest;
	import classes.CharCreationTest;
	import classes.MonsterTest;
	import classes.VaginaClassTest;
	import classes.CockTest;
	import classes.SavesTest;
	import classes.PlayerEventsTest;
	import classes.PlayerEventsVaginaLoosenessRecoveryTest;
	import classes.MenusSuit;

[Suite]
[RunWith("org.flexunit.runners.Suite")]
	public class ClassesSuit
	{
		 public var helperSuit:HelperSuit;
		 public var scenesSuit:ScenesSuit;
		 public var itemsSuit:ItemsSuit;

		 public var coCTest:CoCTest;
		 public var charSpecialTest:CharSpecialTest;
		 public var charCreationTest:CharCreationTest;
		 public var monsterTest:MonsterTest;
		 public var creaturTest:CreatureTest;
		 public var playerTest:PlayerTest;
		 public var vaginaClass:VaginaClassTest;
		 public var cockTest:CockTest;
		 public var savesTest:SavesTest;
		 public var playerEventsTest:PlayerEventsTest;
		 public var playerEventsVaginaLoosenessRecoveryTest:PlayerEventsVaginaLoosenessRecoveryTest;
		 public var internalsSuit:InternalsSuit;
		 public var menusSuit:MenusSuit;
	}
}


code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
   xmlns:flexUnitUIRunner="http://www.adobe.com/2009/flexUnitUIRunner"
   creationComplete="runTests();"
   layout="absolute">

   <mx:Script>
      <![CDATA[
		  import mx.logging.LogEventLevel;
		  import org.flexunit.internals.TextListener;
		  import org.flexunit.internals.TraceListener;
         import org.flexunit.listeners.CIListener;
         import org.flexunit.listeners.UIListener;
         import org.flexunit.runner.FlexUnitCore;
		 import AllTestsSuit;
		 import classes.helper.StageLocator;

         public function runTests() : void {
				var core : FlexUnitCore = new FlexUnitCore();

				/**If you don't need graphical test results, comment out the line below and the MXML declaring
				the TestRunnerBase. **/
				core.addListener(new CIListener());
				new StageLocator(systemManager.stage);
				/**If you would like to see text output in verbose mode, umcomment either of the follow listeners **/
				//core.addListener( new TraceListener() ); - For AS3 Projects
				//core.addListener( TextListener.getDefaultTextListener( LogEventLevel.DEBUG ) ); - For Flex Projects

            core.run(AllTestsSuit);
         }
      ]]>
   </mx:Script>
</mx:Application>


code:
package classes{
    import org.flexunit.asserts.*;
	import org.hamcrest.assertThat;
	import org.hamcrest.core.*;
	import org.hamcrest.number.*;
	import org.hamcrest.object.*;
	import org.hamcrest.text.*;
	import org.hamcrest.collection.*;

	import classes.CharSpecial;
	import classes.CoC;
	import classes.Player;
	import classes.GlobalFlags.kGAMECLASS;
	import classes.helper.StageLocator;
	import classes.CharCreation;
	import classes.GlobalFlags.kFLAGS;

    public class CharCreationTest {
        private var cut:CharCreationForTest;
		private var player:Player;

		[BeforeClass]
		public static function runOnceForTestClass():void {
			kGAMECLASS = new CoC(StageLocator.stage);
		}

        [Before]
        public function setUp():void {
			cut = new CharCreationForTest();
			this.player = new Player();
			kGAMECLASS.player = player;
			kGAMECLASS.flags[kFLAGS.NEW_GAME_PLUS_LEVEL] = 0;
        }

		private function createVaginaWithClit(clitLength:Number):void {
			player.createVagina();
			player.setClitLength(clitLength);
		}

		[Test(description="Check that the array or vector for vaginas is correctly initialised")]
        public function testReincarnateCreatesVaginaStoreNotNull():void {
			cut.testReincarnate();

			assertThat(player.vaginas, notNullValue());
        }

		[Test(description="Check that the array or vector for vaginas is correctly initialised")]
        public function testReincarnateCreatesVaginaStoreZeroLength():void {
			cut.testReincarnate();

			assertThat(player.vaginas, emptyArray());
        }

		[Test(description="New game plus reduces the clit length to a maximum if it is too long")]
        public function newGameGo_clitLengthIsResetToMaxWhenNewGamePlus():void {
			createVaginaWithClit(3);
			kGAMECLASS.flags[kFLAGS.NEW_GAME_PLUS_LEVEL] = 1;

			cut.newGameGo();

			assertThat(player.getClitLength(), equalTo(CharCreation.NEW_GAME_PLUS_RESET_CLIT_LENGTH_MAX));
        }

		[Test(description="New game plus will not change the clit length if it is below the maximum")]
        public function newGameGo_clitLengthIsNotResetWhenNewGamePlus():void {
			var testLength : Number = 1.2;
			createVaginaWithClit(testLength);
			kGAMECLASS.flags[kFLAGS.NEW_GAME_PLUS_LEVEL] = 1;

			cut.newGameGo();

			assertThat(player.getClitLength(), equalTo(testLength));
        }

		[Test]
		public function isAWoman_checkClitLength():void {
			cut.isAWoman();

			assertThat(player.getClitLength(), equalTo(Vagina.DEFAULT_CLIT_LENGTH));
		}

		[Test]
		public function isAHerm_checkClitLength():void {
			cut.isAHerm();

			assertThat(player.getClitLength(), equalTo(Vagina.DEFAULT_CLIT_LENGTH));
		}

		[Test]
		public function hpSetToMaxHpDuringNewGame(): void {
			cut.newGameGo();

			assertThat(kGAMECLASS.player.HP, equalTo(95));
		}

		[Test]
		public function hpSetToMaxUsingToughPerk():void {
			cut.testSetEndowment(PerkLib.Tough);

			assertThat(kGAMECLASS.player.HP, equalTo(60));
		}
    }
}

import classes.CharCreation;
import classes.PerkType;

/**
 * This is to allow the testing of functions without making them public in the actual class.
 */
class CharCreationForTest extends CharCreation {
	public function testReincarnate():void {
		reincarnate();
	}

	public function testSetEndowment(choice:PerkType):void {
		setEndowment(choice);
	}
}


code:
package classes{
	import classes.GlobalFlags.kFLAGS;
    import org.flexunit.asserts.*;
	import org.hamcrest.assertThat;
	import org.hamcrest.core.*;
	import org.hamcrest.number.*;
	import org.hamcrest.object.*;
	import org.hamcrest.text.*;

	import classes.CharSpecial;
	import classes.CoC;
	import classes.Player;
	import classes.GlobalFlags.kGAMECLASS;
	import classes.helper.StageLocator;

    public class CharSpecialTest {
		private static const CHAR_NAME_INDEX:int = 0;
		private static const CHAR_FUNCTION_INDEX:int = 1;
		private static const CHAR_CUSTOMIZE_INDEX:int = 2;

        private var cut:CharSpecial;
		private var player : Player;

		private function findCharFunction(name:String):Function {
			for (var t:Number = 0; t < cut.customs.length; t++) {
				if(cut.customs[t][0] == name) {
					return cut.customs[t][1];
				}
			}

			fail("No special character found with the name: " + name);
			return null;
		}

		private function createCharByName(name:String):void {
			var func:Function = findCharFunction(name);

			func();
		}

		[BeforeClass]
		public static function runOnceForTestClass():void {
			kGAMECLASS = new CoC(StageLocator.stage);
		}

        [Before]
        public function setUp():void {
			cut = new CharSpecial();
			resetPlayer();

			// guard asserts
			assertThat(kGAMECLASS.player.isFemaleOrHerm(), equalTo(false));
			assertThat(kGAMECLASS.player.isMaleOrHerm(), equalTo(false));
        }

		private function resetPlayer() : void {
			kGAMECLASS.player = new Player();
			kGAMECLASS.flags[kFLAGS.HISTORY_PERK_SELECTED] = 1;
			this.player = kGAMECLASS.player;
		}

		[Test(description="Execute every custom character function to see what breaks")]
		public function testCheckForRuntimeErrors():void {
			var failedCharInit:Vector.<String> = new Vector.<String>();

			for (var index:int = 1; index < cut.customs.length; index++) {
					// reset the player, as the init functions will change the instance state
					resetPlayer();

					var charCreation:Function = cut.customs[index][CHAR_FUNCTION_INDEX];

					try{
						if (charCreation != null) {
							charCreation();
						}
					}catch (error:Error) {
						failedCharInit.push(cut.customs[index][CHAR_NAME_INDEX]);
					}
			}

			if (failedCharInit.length != 0) {
				fail("The following char creations failed: " + failedCharInit.join());
			}
		}

		[Test(description="Execute every custom character function to see where history perks are missing")]
		public function testAllForHistoryPerk():void
		{
			var noHistoryPerk:Vector.<String> = new Vector.<String>();

			for (var index:int = 1; index < cut.customs.length; index++) {
					// reset the player, as the init functions will change the instance state
					resetPlayer();

					var charCreation:Function = cut.customs[index][CHAR_FUNCTION_INDEX];
					var charNotCustomizable:Boolean = cut.customs[index][CHAR_CUSTOMIZE_INDEX];

					try {
						if (charCreation !== null) {
							charCreation();
							if (!player.hasHistoryPerk() && kGAMECLASS.flags[kFLAGS.HISTORY_PERK_SELECTED] !== 0 && charNotCustomizable) {
								noHistoryPerk.push(cut.customs[index][CHAR_NAME_INDEX]);
							}
						}
					} catch (error:Error) {}
			}

			if (noHistoryPerk.length > 0) {
				fail("The following chars had no history perk: " + noHistoryPerk.join());
			}
		}

		[Test]
        public function testEtisNonVirgin():void {
			var func:Function = findCharFunction("Etis");

			func();

			assertThat(kGAMECLASS.player.isFemaleOrHerm(), equalTo(true));
			assertThat(kGAMECLASS.player.hasVirginVagina(), equalTo(false));
        }

		[Test]
        public function testChimeraNonVirgin():void {
			var func:Function = findCharFunction("Chimera");

			func();

			assertThat(kGAMECLASS.player.isFemaleOrHerm(), equalTo(true));
			assertThat(kGAMECLASS.player.hasVirginVagina(), equalTo(false));
        }

		[Test]
        public function testMirvanna():void {
			var func:Function = findCharFunction(CharSpecial.MIRVANNA_NAME);

			func();

			assertThat(kGAMECLASS.player.isFemaleOrHerm(), equalTo(true));
			assertThat(kGAMECLASS.player.hasVirginVagina(), equalTo(false));
        }

		[Test]
		public function testAriaHasBreastrow() : void {
			var func : Function = findCharFunction(CharSpecial.ARIA_NAME);

			func();

			assertThat(kGAMECLASS.player.bRows(), equalTo(1));
		}

		[Test]
		public function testAriaBreastRating() : void {
			var func : Function = findCharFunction(CharSpecial.ARIA_NAME);

			func();

			assertThat(kGAMECLASS.player.breastRows[0].breastRating, equalTo(5));
		}

		[Test]
		public function testCharaunBreastRows() : void {
			var func : Function = findCharFunction(CharSpecial.CHARAUN_NAME);

			func();

			assertThat(player.bRows(), equalTo(4));
		}

		[Test]
		public function testCharaunBreastFuckable() : void {
			var func : Function = findCharFunction(CharSpecial.CHARAUN_NAME);

			func();

			assertThat(player.breastRows[0].fuckable, equalTo(true));
			assertThat(player.breastRows[1].fuckable, equalTo(true));
			assertThat(player.breastRows[2].fuckable, equalTo(true));
			assertThat(player.breastRows[3].fuckable, equalTo(true));
		}

		[Test]
		public function testCharaunBreastRating() : void {
			var func : Function = findCharFunction(CharSpecial.CHARAUN_NAME);

			func();

			assertThat(player.breastRows[0].breastRating, equalTo(4));
			assertThat(player.breastRows[1].breastRating, equalTo(3));
			assertThat(player.breastRows[2].breastRating, equalTo(2));
			assertThat(player.breastRows[3].breastRating, equalTo(1));
		}

		[Test]
		public function testGalateaBreastRowCount() : void {
			var func : Function = findCharFunction(CharSpecial.GALATEA_NAME);

			func();

			assertThat(player.bRows(), equalTo(1));
		}

		[Test]
		public function testGalateaBreastRating() : void {
			var func : Function = findCharFunction(CharSpecial.GALATEA_NAME);

			func();

			assertThat(player.breastRows[0].breastRating, equalTo(21));
		}

		[Test]
		public function testHikariBreastRowCount() : void {
			var func : Function = findCharFunction(CharSpecial.HIKARI_NAME);

			func();

			assertThat(player.bRows(), equalTo(1));
		}

		[Test]
		public function testHikariBreastRating() : void {
			var func : Function = findCharFunction(CharSpecial.HIKARI_NAME);

			func();

			assertThat(player.breastRows[0].breastRating, equalTo(4));
		}

		[Test]
		public function testKattiBreastRowCount() : void {
			var func : Function = findCharFunction(CharSpecial.KATTI_NAME);

			func();

			assertThat(player.bRows(), equalTo(1));
		}

		[Test]
		public function testKattiBreastRating() : void {
			var func : Function = findCharFunction(CharSpecial.KATTI_NAME);

			func();

			assertThat(player.breastRows[0].breastRating, equalTo(19));
		}

		[Test]
		public function testKattiNippleLength() : void {
			var func : Function = findCharFunction(CharSpecial.KATTI_NAME);

			func();

			assertThat(player.nippleLength, equalTo(4.5));
		}

		[Test]
		public function leahHpRestored():void {
			createCharByName(CharSpecial.LEAH_NAME);

			assertThat(player.HP, equalTo(80));
		}

		[Test]
		public function testKattiBreastFuckable() : void {
			var func : Function = findCharFunction(CharSpecial.KATTI_NAME);

			func();

			assertThat(player.breastRows[0].fuckable, equalTo(true));
		}

		[Test]
		public function testLucinaBreastRowCount() : void {
			var func : Function = findCharFunction(CharSpecial.LUCINA_NAME);

			func();

			assertThat(player.bRows(), equalTo(1));
		}

		[Test]
		public function testLucinaBreastRating() : void {
			var func : Function = findCharFunction(CharSpecial.LUCINA_NAME);

			func();

			assertThat(player.breastRows[0].breastRating, equalTo(4));
		}

		[Test]
		public function testNavornBreastRows() : void {
			var func : Function = findCharFunction(CharSpecial.NAVORN_NAME);

			func();

			assertThat(player.bRows(), equalTo(4));
		}

		[Test]
		public function testNavornBreastFuckable() : void {
			var func : Function = findCharFunction(CharSpecial.NAVORN_NAME);

			func();

			assertThat(player.breastRows[0].fuckable, equalTo(true));
			assertThat(player.breastRows[1].fuckable, equalTo(true));
			assertThat(player.breastRows[2].fuckable, equalTo(true));
			assertThat(player.breastRows[3].fuckable, equalTo(true));
		}

		[Test]
		public function testNavornBreastRating() : void {
			var func : Function = findCharFunction(CharSpecial.NAVORN_NAME);

			func();

			assertThat(player.breastRows[0].breastRating, equalTo(5));
			assertThat(player.breastRows[1].breastRating, equalTo(5));
			assertThat(player.breastRows[2].breastRating, equalTo(5));
			assertThat(player.breastRows[3].breastRating, equalTo(5));
		}

		[Test]
		public function testNavornNippelsPerBreast() : void {
			var func : Function = findCharFunction(CharSpecial.NAVORN_NAME);

			func();

			assertThat(player.breastRows[0].nipplesPerBreast, equalTo(4));
			assertThat(player.breastRows[1].nipplesPerBreast, equalTo(4));
			assertThat(player.breastRows[2].nipplesPerBreast, equalTo(4));
			assertThat(player.breastRows[3].nipplesPerBreast, equalTo(4));
		}

		[Test]
		public function nixiHpRestored(): void {
			createCharByName(CharSpecial.NIXI_NAME);

			assertThat(player.HP, equalTo(80));
		}

		[Test]
		public function testLukazIsMale() : void {
			var func : Function = findCharFunction(CharSpecial.LUKAZ_NAME);

			func();

			assertThat(player.isMale(), equalTo(true));
		}

		[Test]
		public function lukazHPRestored():void {
			createCharByName(CharSpecial.LUKAZ_NAME);

			assertThat(player.HP, equalTo(84));
		}

		[Test]
		public function testMaraClitLength() : void {
			var func : Function = findCharFunction(CharSpecial.MARA_NAME);

			func();

			assertThat(player.getClitLength(), equalTo(0.5));
		}

		[Test]
		public function vahdunbriiHpRestored(): void {
			createCharByName(CharSpecial.VAHDUNBRII_NAME);

			assertThat(player.HP, equalTo(80));
		}

		[Test]
		public function etisHpRestored(): void {
			createCharByName(CharSpecial.ETIS_NAME);

			assertThat(player.HP, equalTo(50));
		}

		[Test]
		public function chimeraHpRestored(): void {
			createCharByName(CharSpecial.CHIMERA_NAME);

			assertThat(player.HP, equalTo(50));
		}
	}
}


code:
package classes{
    import org.flexunit.asserts.*;
	import org.hamcrest.assertThat;
	import org.hamcrest.core.*;
	import org.hamcrest.collection.*;
	import org.hamcrest.number.*;
	import org.hamcrest.object.*;
	import org.hamcrest.text.*;

	import flash.display.Stage;

	import classes.CoC;
	import classes.helper.StageLocator;
	import classes.helper.FireButtonEvent;
	import classes.GlobalFlags.kGAMECLASS;

	public class CoCTest {
		private var cut:CoCForTest;
		private var fireButton:FireButtonEvent;

		[Before]
		public function runBeforeEveryTest():void {
			assertThat(StageLocator.stage, not(nullValue()));

			cut = new CoCForTest(StageLocator.stage);
			cut.player.createVagina();

			fireButton = new FireButtonEvent(kGAMECLASS.mainView, Output.MAX_BUTTON_INDEX);
		}

		[Test]
		public function injectStageForTest():void {
			var coc:CoC = new CoC(StageLocator.stage);
		}

		[Test(expected="TypeError")]
		public function noInjectedStage():void {
			var coc:CoC = new CoC();
		}

		[Test]
		public function parserSmokeTest(): void {
			cut.doThatTestingThang();
		}

		[Test]
		public function eventTesterSmokeTest(): void {
			cut.eventTester();

			//Button presses are required to stop the test from hanging
			fireButton.fireButtonClick(0); //press 'proceed' button
			fireButton.fireButtonClick(4); //press 'exit' button
		}
	}
}

import classes.CoC;
import flash.display.Stage;

class CoCForTest extends CoC {
	public var calls:Vector.<Number> = new Vector.<Number>();
	public var collectedOutput:Vector.<String> = new Vector.<String>();

	public function CoCForTest(injectedStage:Stage)
	{
		super(injectedStage);
	}
}


code:
package classes{
    import org.flexunit.asserts.*;
	import org.hamcrest.assertThat;
	import org.hamcrest.core.*;
	import org.hamcrest.number.*;
	import org.hamcrest.object.*;
	import org.hamcrest.text.*;

	import classes.Cock;
	import classes.CockTypesEnum;
	import classes.internals.SerializationUtils;

	public class CockTest {
		private static const DEFAULT_COCK_TYPE:CockTypesEnum = CockTypesEnum.HUMAN;
		private static const DEFAULT_COCK_LENGTH:Number = 5.5;
		private static const DEFAULT_COCK_THICKNESS:Number = 1;
		private static const DEFAULT_KNOT_MULTIPLIER:Number = 1;

		private static const TEST_SOCK:String = "testSock";
		private static const PIERCING:int = 42;
		private static const PIERCING_DESCRIPTION:String = "piercing description";
		private static const PIERCING_NO_DESCRIPTION:String = "null";

		private static const COCK_LENGTH:Number = 12.3;
		private static const COCK_THICKNESS:Number= 3.21;

		private var cut:Cock;
		private var serializedClass:*;

		[Before]
		public function setUp():void {
			cut = new Cock();

			serializedClass = [];
		}

		[Test]
		public function testDefaultHumanCockType():void {
			assertThat(cut.cockType, equalTo(DEFAULT_COCK_TYPE));
		}

		[Test]
		public function testDefaultLength():void {
			assertThat(cut.cockLength, equalTo(DEFAULT_COCK_LENGTH));
		}

		[Test]
		public function testDefaultThickness():void {
			assertThat(cut.cockThickness, equalTo(DEFAULT_COCK_THICKNESS));
		}

		[Test]
		public function testDefaultNotPierced():void {
			assertThat(cut.isPierced, equalTo(false));
		}

		[Test]
		public function testDefaultKnotMultiplier():void {
			assertThat(cut.knotMultiplier, equalTo(DEFAULT_KNOT_MULTIPLIER));
		}

		[Test]
		public function deserializeUpgradeNoSock():void {
			serializedClass.sock = undefined;

			cut.upgradeSerializationVersion(serializedClass, 0);

			assertThat(cut.sock, equalTo(""));
		}

		[Test]
		public function deserializeUpgradeSock():void {
			serializedClass.sock = TEST_SOCK;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.sock, equalTo(TEST_SOCK));
		}

		[Test]
		public function deserializeUpgradeNoPiercingDescriptionShort():void {
			serializedClass.pShortDesc = PIERCING_NO_DESCRIPTION;

			cut.upgradeSerializationVersion(serializedClass, 0);

			assertThat(cut.pShortDesc, equalTo(""));
		}

		[Test]
		public function deserializeUpgradePiercingDescriptionShort():void {
			serializedClass.pShortDesc = PIERCING_DESCRIPTION;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.pShortDesc, equalTo(PIERCING_DESCRIPTION));
		}

		[Test]
		public function deserializeUpgradeNoPiercingDescriptionLong():void {
			serializedClass.pLongDesc = PIERCING_NO_DESCRIPTION;

			cut.upgradeSerializationVersion(serializedClass, 0);

			assertThat(cut.pLongDesc, equalTo(""));
		}

		[Test]
		public function deserializeUpgradePiercingDescriptionLong():void {
			serializedClass.pLongDesc = PIERCING_DESCRIPTION;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.pLongDesc, equalTo(PIERCING_DESCRIPTION));
		}

		[Test]
		public function deserializeUpgradeNoPiercing():void {
			serializedClass.pierced = undefined;

			cut.upgradeSerializationVersion(serializedClass, 0);

			assertThat(cut.pierced, equalTo(0));
		}

		[Test]
		public function deserializeUpgradePiercing():void {
			serializedClass.pierced = PIERCING;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.pierced, equalTo(PIERCING));
		}

		[Test(description="Not using Cock const is intentional")]
		public function limitMaxCockLength():void {
			serializedClass.cockLength = Number.MAX_VALUE;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.cockLength, equalTo(9999.9));
		}

		[Test(description="Not using Cock const is intentional")]
		public function limitMaxCockThickness():void {
			serializedClass.cockThickness = Number.MAX_VALUE;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.cockThickness, equalTo(999.9));
		}

		[Test]
		public function deserializeCockLength():void {
			serializedClass.cockLength = COCK_LENGTH;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.cockLength, equalTo(COCK_LENGTH));
		}

		[Test]
		public function deserializeCockThickness():void {
			serializedClass.cockThickness = COCK_THICKNESS;

			SerializationUtils.deserialize(serializedClass, cut);

			assertThat(cut.cockThickness, equalTo(COCK_THICKNESS));
		}
	}
}