Advertisement
Guest User

cc_combat.ash

a guest
Jul 14th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 67.43 KB | None | 0 0
  1. script "cc_combat.ash"
  2. import <cc_util.ash>
  3. import <cc_equipment.ash>
  4. import <cc_edTheUndying.ash>
  5.  
  6. #void handleBanish(monster enemy, skill banisher);
  7. #void handleBanish(monster enemy, item banisher);
  8. #void handleYellowRay(monster enemy, skill yellowRay);
  9. #void handleYellowRay(monster enemy, item yellowRay);
  10. #void handleSniffs(monster enemy, skill sniffer);
  11. #void handleLashes(monster enemy);
  12. #void handleRenenutet(monster enemy);
  13. monster ocrs_helper(string page);
  14.  
  15. monster ocrs_helper(string page)
  16. {
  17.     if(my_path() != "One Crazy Random Summer")
  18.     {
  19.         abort("Should not be in ocrs_helper if not on the path!");
  20.     }
  21.     string[int] monsterFun = findMonsterFun(page);
  22.     string fun = monsterFun[0];
  23.     monster enemy = to_monster(monsterFun[1]);
  24.     string combatState = get_property("cc_combatHandler");
  25.  
  26.     //  ghostly             physical resistance
  27.     //  untouchable         damage reduced to 5, instant kills still good (much less of an issue now
  28.  
  29.     /*
  30.         For no staggers, don\'t use staggers
  31.         For blocks skills/combat items, we can probably set them all to used as well.
  32.     */
  33.  
  34.     boolean[monster] infernalSeals = $monsters[Broodling Seal, Centurion of Sparky, Hermetic Seal, Spawn of Wally, Heat Seal, Navy Seal, Servant of Grodstank, Shadow of Black Bubbles, Watertight Seal, Wet Seal, Black Crayon Beast, Black Crayon Beetle, Black Crayon Constellation, Black Crayon Golem, Black Crayon Demon, Black Crayon Man, Black Crayon Elemental, Black Crayon Crimbo Elf, Black Crayon Fish, Black Crayon Goblin, Black Crayon Hippy, Black Crayon Hobo, Black Crayon Shambling Monstrosity, Black Crayon Manloid, Black Crayon Mer-kin, Black Crayon Frat Orc, Black Crayon Penguin, Black Crayon Pirate, Black Crayon Flower, Black Crayon Slime, Black Crayon Undead Thing, Black Crayon Spiraling Shape];
  35.     if(infernalSeals contains last_monster())
  36.     {
  37.         if((!contains_text(combatState, "cleesh")) && have_skill($skill[cleesh]) && (my_mp() > 10))
  38.         {
  39.             set_property("cc_useCleesh", false);
  40.             set_property("cc_combatHandler", combatState + "(cleesh)");
  41.         }
  42.     }
  43.  
  44.     if(contains_text(fun, "unstoppable"))
  45.     {
  46.         if(!contains_text(combatState, "unstoppable"))
  47.         {
  48.             set_property("cc_combatHandler", combatState + "(DNA)(air dirty laundry)(ply reality)(indigo cup)(love mosquito)(blue balls)(love gnats)(unstoppable)");
  49.             #Block weaksauce and pocket crumbs?
  50.         }
  51.     }
  52.  
  53.     if(contains_text(fun, "annoying"))
  54.     {
  55.         if(contains_text(page, "makes the most annoying noise you've ever heard, stopping you in your tracks."))
  56.         {
  57.             print("Last action failed, uh oh! Trying to undo!", "olive");
  58.             set_property("cc_combatHandler", get_property("cc_funCombatHandler"));
  59.         }
  60.         set_property("cc_funCombatHandler", get_property("cc_combatHandler"));
  61.     }
  62.  
  63.     if(contains_text(fun, "restless"))
  64.     {
  65.         if(contains_text(page, "moves out of the way"))
  66.         {
  67.             print("Last action failed, uh oh! Trying to undo!", "olive");
  68.             set_property("cc_combatHandler", get_property("cc_funCombatHandler"));
  69.         }
  70.         if(contains_text(page, "quickly moves out of the way"))
  71.         {
  72.             print("Last action failed, uh oh! Trying to undo!", "olive");
  73.             set_property("cc_combatHandler", get_property("cc_funCombatHandler"));
  74.         }
  75.         if(contains_text(page, "will have moved by the time"))
  76.         {
  77.             print("Last action failed, uh oh! Trying to undo!", "olive");
  78.             set_property("cc_combatHandler", get_property("cc_funCombatHandler"));
  79.         }
  80.  
  81.         set_property("cc_funCombatHandler", get_property("cc_combatHandler"));
  82.     }
  83.  
  84.     if(contains_text(fun, "phase-shifting"))
  85.     {
  86.         if(contains_text(page, "blinks out of existence before"))
  87.         {
  88.             print("Last action failed, uh oh! Trying to undo!", "olive");
  89.             set_property("cc_combatHandler", get_property("cc_funCombatHandler"));
  90.         }
  91.         set_property("cc_funCombatHandler", get_property("cc_combatHandler"));
  92.     }
  93.  
  94.     if(contains_text(fun, "cartwheeling"))
  95.     {
  96.         if(contains_text(page, "cartwheels out of the way"))
  97.         {
  98.             print("Last action failed, uh oh! Trying to undo!", "olive");
  99.             set_property("cc_combatHandler", get_property("cc_funCombatHandler"));
  100.         }
  101.         set_property("cc_funCombatHandler", get_property("cc_combatHandler"));
  102.     }
  103.  
  104.     set_property("cc_useCleesh", false);
  105.     if(contains_text(fun, "ticking"))
  106.     {
  107.         if((!contains_text(combatState, "cleesh")) && have_skill($skill[cleesh]) && (my_mp() > 10))
  108.         {
  109.             set_property("cc_useCleesh", true);
  110.         }
  111.     }
  112.     if(contains_text(fun, "untouchable"))
  113.     {
  114.         if((!contains_text(combatState, "cleesh")) && have_skill($skill[cleesh]) && (my_mp() > 10))
  115.         {
  116.             set_property("cc_useCleesh", true);
  117.         }
  118.     }
  119.     return enemy;
  120. }
  121.  
  122. string cc_combatHandler(int round, string opp, string text)
  123. {
  124.     #print("cc_combatHandler: " + round, "brown");
  125.     #Yes, round 0, really.
  126.     if(round == 0)
  127.     {
  128.         print("cc_combatHandler: " + round, "brown");
  129.         set_property("cc_combatHandler", "");
  130.         set_property("cc_funCombatHandler", "");
  131.         set_property("cc_funPrefix", "");
  132.         set_property("cc_combatHandlerThunderBird", "0");
  133.         set_property("cc_combatHandlerFingernailClippers", "0");
  134.     }
  135.  
  136.     set_property("cc_diag_round", round);
  137.  
  138.     if(get_property("cc_diag_round").to_int() > 60)
  139.     {
  140.         abort("Somehow got to 60 rounds.... aborting");
  141.     }
  142.  
  143.     monster enemy = to_monster(opp);
  144.     if(my_path() == "One Crazy Random Summer")
  145.     {
  146.         enemy = ocrs_helper(text);
  147.         enemy = last_monster();
  148.     }
  149.     //  Since mafia is handling monster names at this point, can we just extract fun and default to mafia\'s last_monster()?
  150.  
  151.     phylum type = monster_phylum(enemy);
  152.  
  153.     phylum fish = to_phylum("fish");
  154.     phylum construct = to_phylum("construct");
  155.     phylum constellation = to_phylum("constellation");
  156.     phylum current = to_phylum(get_property("dnaSyringe"));
  157.  
  158.     string combatState = get_property("cc_combatHandler");
  159.     int thunderBirdsLeft = get_property("cc_combatHandlerThunderBird").to_int();
  160.     int fingernailClippersLeft = get_property("cc_combatHandlerFingernailClippers").to_int();
  161.  
  162.     #Handle different path is monster_level_adjustment() > 150 (immune to staggers?)
  163.     int mcd = monster_level_adjustment();
  164.  
  165.     boolean doBanisher = !get_property("kingLiberated").to_boolean();
  166.  
  167.     if(enemy == $monster[Your Shadow])
  168.     {
  169.         if(have_skill($skill[Ambidextrous Funkslinging]))
  170.         {
  171.             if(item_amount($item[gauze garter]) >= 2)
  172.             {
  173.                 return "item gauze garter, gauze garter";
  174.             }
  175.             if(item_amount($item[filthy poultice]) >= 2)
  176.             {
  177.                 return "item filthy poultice, filthy poultice";
  178.             }
  179.             if((item_amount($item[gauze garter]) > 0) && (item_amount($item[filthy poultice]) > 0))
  180.             {
  181.                 return "item gauze garter, filthy poultice";
  182.             }
  183.         }
  184.         if(item_amount($item[gauze garter]) > 0)
  185.         {
  186.             return "item gauze garter";
  187.         }
  188.         if(item_amount($item[filthy poultice]) > 0)
  189.         {
  190.             return "item filthy poultice";
  191.         }
  192.         if(item_amount($item[rain-doh indigo cup]) > 0)
  193.         {
  194.             return "item rain-doh indigo cup";
  195.         }
  196.         return "skill something I don't have, I just want to abort";
  197.     }
  198.  
  199.     if(enemy == $monster[Wall of Meat])
  200.     {
  201.         if((!contains_text(combatState, "makeitrain")) && (have_skill($skill[Make It Rain])) && (my_rain() >= 10))
  202.         {
  203.             set_property("cc_combatHandler", combatState + "(makeitrain)");
  204.             return "skill make it rain";
  205.         }
  206.     }
  207.  
  208.     if(enemy == $monster[wall of skin])
  209.     {
  210.         if(item_amount($item[beehive]) > 0)
  211.         {
  212.             return "item beehive";
  213.         }
  214.         if((!contains_text(combatState, "love stinkbug")) && have_skill($skill[Summon Love Stinkbug]))
  215.         {
  216.             set_property("cc_combatHandler", combatState + "(love stinkbug1)");
  217.             return "skill summon love stinkbug";
  218.         }
  219.  
  220.         if((!contains_text(combatState, "love stinkbug")) && get_property("lovebugsUnlocked").to_boolean())
  221.         {
  222.             set_property("cc_combatHandler", combatState + "(love stinkbug2)");
  223.             return "skill summon love stinkbug";
  224.         }
  225.  
  226.         if((!contains_text(combatState, "shell up")) && have_skill($skill[Shell Up]) && (my_mp() >= 6) && ((my_hp() * 4) < my_maxhp()))
  227.         {
  228.             set_property("cc_combatHandler", combatState + "(shell up)");
  229.             return "skill shell up";
  230.         }
  231.  
  232.         if(have_skill($skill[headbutt]) && (my_mp() >= 3))
  233.         {
  234.             return "headbutt";
  235.         }
  236.         if(have_skill($skill[clobber]) && ((my_mp() >= 1) || (my_class() == $class[Seal Clubber])))
  237.         {
  238.             return "clobber";
  239.         }
  240.         return "attack with weapon";
  241.     }
  242.  
  243.     if(enemy == $monster[wall of bones])
  244.     {
  245.         if(item_amount($item[electric boning knife]) > 0)
  246.         {
  247.             return "item electric boning knife";
  248.         }
  249.         if(((my_hp() * 4) < my_maxhp()) && (have_effect($effect[Takin\' It Greasy]) > 0))
  250.         {
  251.             return "skill unleash the greash";
  252.         }
  253.  
  254.         if((my_mp() >= 50) && have_skill($skill[Garbage Nova]))
  255.         {
  256.             return "skill garbage nova";
  257.         }
  258.  
  259.         if((my_mp() >= 24) && have_skill($skill[Saucegeyser]))
  260.         {
  261.             return "skill saucegeyser";
  262.         }
  263.     }
  264.  
  265.  
  266.     if((!contains_text(combatState, "blackbox")) && (my_path() != "Heavy Rains") && (enemy == $monster[Writing Desk]) && (get_property("writingDesksDefeated").to_int() < 4) && (get_property("cc_spookyravennecklace") != "done") && (get_property("_raindohCopiesMade").to_int() < 5))
  267.     {
  268.         set_property("cc_doCombatCopy", "yes");
  269.     }
  270.     if((!contains_text(combatState, "blackbox")) && (my_path() != "Heavy Rains") && (enemy == $monster[Gaudy Pirate]) && (get_property("cc_gaudypiratecount").to_int() < 1) && (get_property("_raindohCopiesMade").to_int() < 5))
  271.     {
  272.         set_property("cc_doCombatCopy", "yes");
  273.     }
  274.     if((!contains_text(combatState, "blackbox")) && (my_path() != "Heavy Rains") && (enemy == $monster[Modern Zmobie]) && (get_property("cc_modernzmobiecount").to_int() < 3) && (get_property("_raindohCopiesMade").to_int() < 5))
  275.     {
  276.         set_property("cc_doCombatCopy", "yes");
  277.     }
  278.  
  279.     if(have_effect($effect[temporary amnesia]) > 0)
  280.     {
  281.         return "attack with weapon";
  282.     }
  283.  
  284.     if((!contains_text(combatState, "tunneldownwards")) && (have_effect($effect[Shape of...Mole!]) > 0) && (my_location() == $location[Mt. Molehill]))
  285.     {
  286.         set_property("cc_combatHandler", combatState + "(tunneldownwards)");
  287.         return "skill tunnel downwards";
  288.     }
  289.  
  290.     if((my_familiar() == $familiar[Stocking Mimic]) && (round < 12))
  291.     {
  292.         if(item_amount($item[Dictionary]) > 0)
  293.         {
  294.             return "item dictionary";
  295.         }
  296.     }
  297.  
  298.     if(get_property("cc_useCleesh").to_boolean())
  299.     {
  300.         if((!contains_text(combatState, "cleesh")) && have_skill($skill[cleesh]) && (my_mp() > 10))
  301.         {
  302.             set_property("cc_useCleesh", false);
  303.             set_property("cc_combatHandler", combatState + "(cleesh)");
  304.             return "skill cleesh";
  305.         }
  306.     }
  307.  
  308.     if(thunderBirdsLeft > 0)
  309.     {
  310.         thunderBirdsLeft = thunderBirdsLeft - 1;
  311.         if(thunderBirdsLeft == 0)
  312.         {
  313.             set_property("cc_combatHandler", combatState + "(thunderbird)");
  314.         }
  315.         set_property("cc_combatHandlerThunderBird", "" + thunderBirdsLeft);
  316.         return "skill thunder bird";
  317.     }
  318.  
  319.     if((!contains_text(combatState, "thunderstrike")) && (monster_level_adjustment() <= 150) && have_skill($skill[Thunder Bird]))
  320.     {
  321.         if((enemy == $monster[big wisnaqua]) ||
  322.             (enemy == $monster[the big wisniewski]) ||
  323.             (enemy == $monster[the man]) ||
  324.             (enemy == $monster[the aquaman]) ||
  325.             (enemy == $monster[the rain king]))
  326.         {
  327.             if((!contains_text(combatState, "weaksauce")) && (have_skill($skill[curse of weaksauce])) && (my_mp() >= 60))
  328.             {
  329.                 set_property("cc_combatHandler", combatState + "(weaksauce)");
  330.                 return "skill curse of weaksauce";
  331.             }
  332.  
  333.             set_property("cc_combatHandler", combatState + "(thunderstrike)");
  334.             set_property("cc_combatHandlerThunderBird", "5");
  335.             return "skill thunderstrike";
  336.         }
  337.     }
  338.  
  339.     if((my_location() == $location[The Battlefield (Frat Uniform)]) && (enemy == $monster[gourmet gourami]))
  340.     {
  341.         if((item_amount($item[louder than bomb]) > 0) && (get_property("cc_gremlins") == "finished"))
  342.         {
  343.             handleTracker(enemy, $item[louder than bomb], "cc_banishes");
  344.             return "item louder than bomb";
  345.         }
  346.     }
  347.  
  348.     if((enemy == $monster[dirty thieving brigand]) && (!contains_text(combatState, "makeitrain")) && (get_property("cc_nunsTrickReady") == "yes"))
  349.     {
  350.         if((my_rain() > 10) && (have_skill($skill[make it rain])))
  351.         {
  352.             set_property("cc_combatHandler", combatState + "(makeitrain)");
  353.             return "skill make it rain";
  354.         }
  355.     }
  356.  
  357.     if((enemy == $monster[hellseal pup]) && (my_class() == $class[Seal Clubber]))
  358.     {
  359.         return "skill clobber";
  360.     }
  361.  
  362.     if((enemy == $monster[mother hellseal]) && (my_class() == $class[Seal Clubber]))
  363.     {
  364.         if((!contains_text(combatState, "indigo cup")) && (item_amount($item[rain-doh indigo cup]) > 0))
  365.         {
  366.             set_property("cc_combatHandler", combatState + "(indigo cup)");
  367.             return "item rain-doh indigo cup";
  368.         }
  369.         return "skill lunging thrust-smack";
  370.     }
  371.  
  372.     #Do not accidentally charge the nanorhino with a non-banisher
  373.     if((my_familiar() == $familiar[Nanorhino]) && (have_effect($effect[Nanobrawny]) == 0))
  374.     {
  375.         return "skill toss";
  376.     }
  377.  
  378.     if((!contains_text(combatState, "nanotoss")) && (have_effect($effect[Nanobrawny]) >= 40))
  379.     {
  380.         #if appropriate enemy, then banish
  381.         if(enemy == $monster[pygmy janitor])
  382.         {
  383.             set_property("cc_combatHandler", combatState + "(nanotoss)");
  384.             return "skill unleash nanites";
  385.         }
  386.     }
  387.  
  388.     if((!contains_text(combatState, "winkat")) && (my_familiar() == $familiar[Reanimated Reanimator]))
  389.     {
  390.         if((enemy == $monster[lobsterfrogman]) ||
  391.             (enemy == $monster[modern zmobie]) ||
  392.             (enemy == $monster[ninja snowman assassin]) ||
  393.             (enemy == $monster[Writing desk]))
  394.         {
  395.             set_property("cc_combatHandler", combatState + "(winkat)");
  396.             if((get_property("_badlyRomanticArrows") == "1") && (round <= 1) && (get_property("romanticTarget") != enemy))
  397.             {
  398.                 abort("Have animator out but can not arrow");
  399.             }
  400.             if(enemy == $monster[modern zmobie])
  401.             {
  402.                 set_property("cc_waitingArrowAlcove", get_property("cyrptAlcoveEvilness").to_int() - 20);
  403.             }
  404.             return "skill wink at";
  405.         }
  406.     }
  407.  
  408.     if((!contains_text(combatState, "blackbox")) && (get_property("cc_doCombatCopy") == "yes") && (enemy != $monster[gourmet gourami]) && (item_amount($item[Rain-Doh Black Box]) > 0))
  409.     {
  410.         set_property("cc_doCombatCopy", "no");
  411.         set_property("cc_combatHandler", combatState + "(blackbox)");
  412.         if(get_property("_raindohCopiesMade").to_int() < 5)
  413.         {
  414.             return "item rain-doh black box";
  415.         }
  416.         print("Can not issue copy directive because we have no copies left", "red");
  417.     }
  418.     if(get_property("cc_doCombatCopy") == "yes")
  419.     {
  420.         set_property("cc_doCombatCopy", "no");
  421.     }
  422.  
  423.     if((enemy == $monster[plaid ghost]) && (item_amount($item[T.U.R.D.S. Key]) > 0))
  424.     {
  425.         return "item t.u.r.d.s. key";
  426.     }
  427.  
  428.     if((enemy == $monster[tomb rat]) && (item_amount($item[tangle of rat tails]) > 0))
  429.     {
  430.         return "item tangle of rat tails";
  431.     }
  432.  
  433.     if((enemy == $monster[storm cow]) && (have_skill($skill[unleash the greash])))
  434.     {
  435.         return "skill unleash the greash";
  436.     }
  437.  
  438.     if(fingernailClippersLeft > 0)
  439.     {
  440.         fingernailClippersLeft = fingernailClippersLeft - 1;
  441.         if(fingernailClippersLeft == 0)
  442.         {
  443.             set_property("cc_combatHandler", combatState + "(fingernail clippers)");
  444.         }
  445.         set_property("cc_combatHandlerFingernailClippers", "" + fingernailClippersLeft);
  446.         return "item military-grade fingernail clippers";
  447.     }
  448.  
  449.     #Is $monster[one of doctor weirdeaux's creations valid yet?
  450.     if((item_amount($item[military-grade fingernail clippers]) > 0)  && (my_location() == $location[The Mansion of Dr. Weirdeaux]))
  451.     {
  452.         if(!contains_text(combatState, "fingernail clippers"))
  453.         {
  454.             fingernailClippersLeft = 3;
  455.             set_property("cc_combatHandlerFingernailClippers", "3");
  456.         }
  457.     }
  458.  
  459.     if(have_skill($skill[Summon Mayfly Swarm]) && (!contains_text(combatState, "mayfly")))
  460.     {
  461.         if((equipped_item($slot[acc1]) == $item[Mayfly Bait Necklace]) || (equipped_item($slot[acc2]) == $item[Mayfly Bait Necklace]) || (equipped_item($slot[acc3]) == $item[Mayfly Bait Necklace]))
  462.         {
  463.             if((my_location() == $location[Dreadsylvanian Village]) || (my_location() == $location[Dreadsylvanian Castle]) || (my_location() == $location[Dreadsylvanian Woods]) || (my_location() == $location[Sloppy Seconds Diner]))
  464.             {
  465.                 set_property("cc_combatHandler", combatState + "(mayfly)");
  466.                 return "skill summon mayfly swarm";
  467.             }
  468.         }
  469.     }
  470.  
  471.  
  472.     if((item_amount($item[The Big Book of Pirate Insults]) > 0) && (!contains_text(combatState, "insults")))
  473.     {
  474.         if((my_location() == $location[The Obligatory Pirate\'s Cove]) || (my_location() == $location[barrrney\'s barrr]) ||
  475.             (enemy == $monster[gaudy pirate]))
  476.         {
  477.             set_property("cc_combatHandler", combatState + "(insults)");
  478.             return "item the big book of pirate insults";
  479.         }
  480.     }
  481.  
  482.     if((have_effect($effect[on the trail]) == 0) && (have_skill($skill[transcendent olfaction])) && (my_mp() >= 40))
  483.     {
  484.         if((enemy == $monster[pygmy shaman]) && (my_location() == $location[The Hidden Apartment Building]) && (item_amount($item[soft green echo eyedrop antidote]) > 3))
  485.         {
  486.             set_property("cc_combatHandler", combatState + "(olfaction)");
  487.             handleTracker(enemy, $skill[Transcendent Olfaction], "cc_sniffs");
  488.             return "skill transcendent olfaction";
  489.         }
  490.         if((enemy == $monster[Gladiator]) && (my_location() == $location[The Roman Forum]))
  491.         {
  492.             set_property("cc_combatHandler", combatState + "(olfaction)");
  493.             handleTracker(enemy, $skill[Transcendent Olfaction], "cc_sniffs");
  494.             return "skill transcendent olfaction";
  495.         }
  496.     }
  497.  
  498.     if((have_effect($effect[on the trail]) == 0) && (have_skill($skill[transcendent olfaction])) && (my_mp() >= 40) && get_property("kingLiberated").to_boolean())
  499.     {
  500.         if(enemy == $monster[Gurgle the Turgle])
  501.         {
  502.             set_property("cc_combatHandler", combatState + "(olfaction)");
  503.             handleTracker(enemy, $skill[Transcendent Olfaction], "cc_sniffs");
  504.             return "skill transcendent olfaction";
  505.         }
  506.     }
  507.  
  508.  
  509.  
  510.     if((have_effect($effect[on the trail]) == 0) && (have_skill($skill[transcendent olfaction])) && (my_mp() >= 40) && ((get_property("cc_hasrainman") != "true") || get_property("cc_100familiar").to_boolean()))
  511.     {
  512.         if((enemy == $monster[writing desk]) && (my_location() == $location[The Haunted Library]))
  513.         {
  514.             set_property("cc_combatHandler", combatState + "(olfaction)");
  515.             handleTracker(enemy, $skill[Transcendent Olfaction], "cc_sniffs");
  516.             return "skill transcendent olfaction";
  517.         }
  518.     }
  519.  
  520.     if((have_effect($effect[on the trail]) == 0) && (have_skill($skill[transcendent olfaction])) && (my_mp() >= 40) && (enemy == $monster[Smoke Monster]) && (item_amount($item[Pack Of Smokes]) > 0))
  521.     {
  522.         set_property("cc_combatHandler", combatState + "(olfaction)");
  523.         handleTracker(enemy, $skill[Transcendent Olfaction], "cc_sniffs");
  524.         return "skill transcendent olfaction";
  525.     }
  526.  
  527.  
  528.     if((have_effect($effect[on the trail]) == 0) && (have_skill($skill[transcendent olfaction])) && (my_mp() >= 40))
  529.     {
  530.         if((enemy == $monster[blooper]) ||
  531.             (enemy == $monster[bob racecar]) ||
  532.             (enemy == $monster[racecar bob]) ||
  533. #           (enemy == $monster[cubist bull]) ||
  534.             (enemy == $monster[pygmy bowler]) ||
  535.             (enemy == $monster[pygmy witch surgeon]) ||
  536.             (enemy == $monster[quiet healer]) ||
  537.             (enemy == $monster[Tomb Rat]) ||
  538.             (enemy == $monster[morbid skull]))
  539.         {
  540.             set_property("cc_combatHandler", combatState + "(olfaction)");
  541.             handleTracker(enemy, $skill[Transcendent Olfaction], "cc_sniffs");
  542.             return "skill transcendent olfaction";
  543.         }
  544.     }
  545.  
  546.     if(contains_text(combatState, "insults"))
  547.     {
  548.         if((enemy == $monster[shady pirate]) && have_skill($skill[Thunder Clap]) && (my_thunder() >= 40))
  549.         {
  550.             handleTracker(enemy, $skill[thunder clap], "cc_banishes");
  551.             return "skill thunder clap";
  552.         }
  553.         if(enemy == $monster[shifty pirate])
  554.         {
  555.             if(get_property("_pantsgivingBanish").to_int() < 5)
  556.             {
  557.                 handleTracker(enemy, $skill[talk about politics], "cc_banishes");
  558.                 return "skill talk about poltiics";
  559.             }
  560.         }
  561.         if(my_lightning() >= 25)
  562.         {
  563.             if(have_skill($skill[lightning strike]))
  564.             {
  565.                 return "skill lightning strike";
  566.             }
  567.         }
  568.     }
  569.  
  570.     if((!contains_text(combatState, "flyers")) && (my_location() != $location[The Battlefield (Frat Uniform)]))
  571.     {
  572.         if((item_amount($item[rock band flyers]) > 0) && (get_property("flyeredML").to_int() < 10000))
  573.         {
  574.             set_property("cc_combatHandler", combatState + "(flyers)");
  575.             return "item rock band flyers";
  576.         }
  577.     }
  578.  
  579.     if((enemy == $monster[dirty thieving brigand]) && (!contains_text(combatState, "4dcamera")) && (get_property("cc_nunsTrickActive") == "yes") && (item_amount($item[4-d Camera]) == 1) && (get_property("_cameraUsed").to_boolean() != true))
  580.     {
  581.         set_property("cc_combatHandler", combatState + "(4dcamera)");
  582.         return "item 4-d camera";
  583.     }
  584.  
  585.     if((enemy == $monster[clingy pirate]) && (item_amount($item[cocktail napkin]) > 0))
  586.     {
  587.         return "item cocktail napkin";
  588.     }
  589.  
  590.     if((!contains_text(combatState, "DNA")) && (monster_level_adjustment() < 150) && (item_amount($item[DNA Extraction Syringe]) > 0))
  591.     {
  592.         if(type != current)
  593.         {
  594.             set_property("cc_combatHandler", combatState + "(DNA)");
  595.             print("syringing...");
  596.             return "item DNA extraction syringe";
  597.         }else{
  598.             print("not syringing...");
  599.         }
  600.     }
  601.  
  602.     if(have_effect($effect[everything looks yellow]) == 0)
  603.     {
  604.         if(contains_text(combatState, "yellowray"))
  605.         {
  606.             abort("Ugh, where is my damn yellowray!!!");
  607.         }
  608.         if((my_lightning() >= 5) || (item_amount($item[golden light]) > 0) || (my_familiar() == $familiar[Crimbo Shrub]))
  609.         {
  610.             boolean doYellow = false;
  611.             if((enemy == $monster[burly sidekick]) && (item_amount($item[mohawk wig]) == 0))
  612.             {
  613.                 doYellow = true;
  614.             }
  615.             if((enemy == $monster[filthworm royal guard]) ||
  616.                 ((enemy == $monster[orcish frat boy spy]) && (my_daycount() == 1)) ||
  617.                 (enemy == $monster[knob goblin harem girl]))
  618.             {
  619.                 doYellow = true;
  620.             }
  621.             if((get_property("cc_nunsTrickGland") == "start") && (enemy == $monster[larval filthworm]))
  622.             {
  623.                 doYellow = true;
  624.             }
  625.             if(doYellow)
  626.             {
  627.                 set_property("cc_combatHandler", combatState + "(yellowray)");
  628.                 if(my_familiar() == $familiar[Crimbo Shrub])
  629.                 {
  630.                     print("Trying to Open a Big Yellow Present", "red");
  631.                     handleTracker(enemy, $skill[Open a Big Yellow Present], "cc_yellowRays");
  632.                     return "skill Open a Big Yellow Present";
  633.                 }
  634.                 if(my_lightning() >= 5)
  635.                 {
  636.                     handleTracker(enemy, $skill[Ball Lightning], "cc_yellowRays");
  637.                     return "skill ball lightning";
  638.                 }
  639.                 handleTracker(enemy, $item[Golden Light], "cc_yellowRays");
  640.                 return "item golden light";
  641.             }
  642.         }
  643.     }
  644.  
  645.     if((enemy == $monster[animated possessions]) || (enemy == $monster[natural spider]))
  646.     {
  647.         if(item_amount($item[green smoke bomb]) > 0)
  648.         {
  649.             return "item green smoke bomb";
  650.         }
  651.     }
  652.  
  653.     if(get_property("kingLiberated") == "false")
  654.     {
  655.         if((enemy == $monster[pygmy orderlies]) ||
  656.             (enemy == $monster[pygmy witch lawyer]) ||
  657.             (enemy == $monster[pygmy witch nurse]))
  658.         {
  659.             if(item_amount($item[short writ of habeas corpus]) > 0)
  660.             {
  661.                 return "item short writ of habeas corpus";
  662.             }
  663.         }
  664.     }
  665.  
  666.     #First pass thunder clap
  667.     if((!contains_text(combatState, "thunder clap")) && (have_skill($skill[thunder clap])) && (my_thunder() >= 40))
  668.     {
  669.         if((enemy == $monster[animated mahogany nightstand]) ||
  670.             (enemy == $monster[coaltergeist]) ||
  671.             (enemy == $monster[flock of stab-bats]) ||
  672.             (enemy == $monster[mad wino]) ||
  673. #           (enemy == $monster[empty suit of armor]) ||
  674.             (enemy == $monster[tomb servant]) ||
  675.             (enemy == $monster[sabre-toothed goat]) ||
  676.             (enemy == $monster[pygmy witch lawyer]) ||
  677.             (enemy == $monster[pygmy witch nurse]) ||
  678.             (enemy == $monster[possessed laundry press]) ||
  679.             (enemy == $monster[mismatched twins]) ||
  680.             (enemy == $monster[crusty pirate]))
  681.         {
  682.             set_property("cc_combatHandler", combatState + "(thunder clap)");
  683.             handleTracker(enemy, $skill[thunder clap], "cc_banishes");
  684.             return "skill thunder clap";
  685.         }
  686.         if((enemy == $monster[burly sidekick]) && (item_amount($item[mohawk wig]) > 0))
  687.         {
  688.             set_property("cc_combatHandler", combatState + "(thunder clap)");
  689.             handleTracker(enemy, $skill[thunder clap], "cc_banishes");
  690.             return "skill thunder clap";
  691.         }
  692.         if((enemy == $monster[knob goblin madam]) && (item_amount($item[knob goblin perfume]) > 0))
  693.         {
  694.             set_property("cc_combatHandler", combatState + "(thunder clap)");
  695.             handleTracker(enemy, $skill[thunder clap], "cc_banishes");
  696.             return "skill thunder clap";
  697.         }
  698.     }
  699.  
  700.     #First pass politics
  701.     if((!contains_text(combatState, "politics")) && (have_skill($skill[talk about politics])) && (get_property("_pantsgivingBanish").to_int() < 5))
  702.     {
  703.         if((enemy == $monster[plaid ghost]) ||
  704.             (enemy == $monster[skeletal sommelier]) ||
  705.             (enemy == $monster[slick lihc]) ||
  706.             (enemy == $monster[doughbat]) ||
  707.             (enemy == $monster[natural spider]) ||
  708.             (enemy == $monster[wardr&ouml;b nightstand]) ||
  709.             (enemy == $monster[upgraded ram]) ||
  710.             (enemy == $monster[taco cat]))
  711.         {
  712.             set_property("cc_combatHandler", combatState + "(politics)");
  713.             handleTracker(enemy, $skill[talk about politics], "cc_banishes");
  714.             return "skill talk about politics";
  715.         }
  716.     }
  717.  
  718.     #Unlikely path: Louder than bomb
  719.     if((!contains_text(combatState, "louderthanbomb")) && (item_amount($item[louder than bomb]) > 0))
  720.     {
  721.         if((enemy == $monster[tan gnat]) ||
  722.             (enemy == $monster[natural spider]) ||
  723.             (enemy == $monster[upgraded ram]))
  724.         {
  725.             set_property("cc_combatHandler", combatState + "(louderthanbomb)");
  726.             return "item louder than bomb";
  727.         }
  728.     }
  729.  
  730.     #Only Batter Up
  731.     if((!contains_text(combatState, "batter up!")) && (have_skill($skill[batter up!])) && (my_fury() >= 5))
  732.     {
  733.         if((enemy == $monster[animated rustic nightstand]) ||
  734.             (enemy == $monster[bullet bill]) ||
  735.             (enemy == $monster[coaltergeist]) ||
  736.             (enemy == $monster[chatty pirate]) ||
  737.             (enemy == $monster[snow queen]) ||
  738.             (enemy == $monster[steam elemental]) ||
  739.             (enemy == $monster[drunk goat]) ||
  740.             (enemy == $monster[evil olive]) ||
  741.             (enemy == $monster[procrastination giant]) ||
  742.             (enemy == $monster[protagonist]) ||
  743.             (enemy == $monster[mad wino]) ||
  744.             (enemy == $monster[tomb asp]) ||
  745.             (enemy == $monster[animated possessions]) ||
  746.             (enemy == $monster[senile lihc]) ||
  747. #           (enemy == $monster[guy with a pitchfork\, and his wife]) ||
  748.             (enemy == $monster[pygmy headhunter]) ||
  749.             (enemy == $monster[pygmy orderlies]) ||
  750.             (enemy == $monster[punk rock giant]) ||
  751.             (enemy == $monster[skeletal sommelier]) ||
  752.             (enemy == $monster[possessed laundry press]) ||
  753.             (enemy == $monster[knob goblin harem guard]) ||
  754.             (enemy == $monster[bubblemint twins]))
  755.         {
  756.             set_property("cc_combatHandler", combatState + "(batter up!)");
  757.             handleTracker(enemy, $skill[batter up!], "cc_banishes");
  758.             return "skill batter up!";
  759.         }
  760.     }
  761.  
  762.     #Second thunder clap pass
  763.     if((!contains_text(combatState, "thunder clap")) && (have_skill($skill[thunder clap])) && (my_thunder() >= 40))
  764.     {
  765.         if((enemy == $monster[plaid ghost]) ||
  766.             (enemy == $monster[slick lihc]) ||
  767.             (enemy == $monster[skeletal sommelier]) ||
  768.             (enemy == $monster[procrastination giant]) ||
  769.             (enemy == $monster[natural spider]) ||
  770.             (enemy == $monster[steam elemental]))
  771.         {
  772.             set_property("cc_combatHandler", combatState + "(thunder clap)");
  773.             handleTracker(enemy, $skill[thunder clap], "cc_banishes");
  774.             return "skill thunder clap";
  775.         }
  776.     }
  777.  
  778.     #Second poltiics pass
  779.     if((!contains_text(combatState, "politics")) && (have_skill($skill[talk about politics])) && (get_property("_pantsgivingBanish").to_int() < 5))
  780.     {
  781.         if((enemy == $monster[tomb asp]) ||
  782.             (enemy == $monster[pygmy orderlies]) ||
  783.             (enemy == $monster[clingy pirate]))
  784.         {
  785.             set_property("cc_combatHandler", combatState + "(politics)");
  786.             handleTracker(enemy, $skill[talk about politics], "cc_banishes");
  787.             return "skill talk about politics";
  788.         }
  789.     }
  790.  
  791.  
  792.     if(item_amount($item[disposable instant camera]) > 0)
  793.     {
  794.         if((enemy == $monster[bob racecar]) || (enemy == $monster[racecar bob]))
  795.         {
  796.             set_property("cc_combatHandler", combatState + "(disposable instant camera)");
  797.             return "item disposable instant camera";
  798.         }
  799.     }
  800.  
  801.     if((enemy == $monster[oil cartel]) && (item_amount($item[duskwalker syringe]) > 0))
  802.     {
  803.         return "item duskwalker syringe";
  804.     }
  805.  
  806.     if((!contains_text(combatState, "opium grenade")) && (item_amount($item[opium grenade]) > 0))
  807.     {
  808.         if(enemy == $monster[pair of burnouts])
  809.         {
  810.             set_property("cc_combatHandler", combatState + "(opium grenade)");
  811.             return "item opium grendade";
  812.         }
  813.     }
  814.  
  815.     if(!enemy.boss)
  816.     {
  817.         if(my_lightning() > 89)
  818.         {
  819.             if(have_skill($skill[lightning strike]))
  820.             {
  821.                 return "skill lightning strike";
  822.             }
  823.         }
  824.         if(my_lightning() >= 25)
  825.         {
  826.             if((my_daycount() == 2) && (get_property("desertExploration").to_int() < 100))
  827.             {
  828.                 if((my_familiar() == $familiar[Artistic Goth Kid]) && (have_skill($skill[lightning strike])))
  829.                 {
  830.                     return "skill lightning strike";
  831.                 }
  832.             }
  833.             else if(have_skill($skill[lightning strike]))
  834.             {
  835.                 return "skill lightning strike";
  836.             }
  837.         }
  838.     }
  839.  
  840.     #Default behaviors:
  841.     if(mcd < 150)
  842.     {
  843.         if((!contains_text(combatState, "weaksauce")) && (have_skill($skill[curse of weaksauce])) && (my_mp() >= 60))
  844.         {
  845.             set_property("cc_combatHandler", combatState + "(weaksauce)");
  846.             return "skill curse of weaksauce";
  847.         }
  848.  
  849.         if((!contains_text(combatState, "pocket crumbs")) && (have_skill($skill[pocket crumbs])))
  850.         {
  851.             set_property("cc_combatHandler", combatState + "(pocket crumbs)");
  852.             return "skill pocket crumbs";
  853.         }
  854.  
  855.         if((!contains_text(combatState, "air dirty laundry")) && (have_skill($skill[air dirty laundry])))
  856.         {
  857.             set_property("cc_combatHandler", combatState + "(air dirty laundry)");
  858.             return "skill air dirty laundry";
  859.         }
  860.  
  861.         if((!contains_text(combatState, "ply reality")) && (have_skill($skill[ply reality])))
  862.         {
  863.             set_property("cc_combatHandler", combatState + "(ply reality)");
  864.             return "skill ply reality";
  865.         }
  866.  
  867.         if((!contains_text(combatState, "indigo cup")) && (item_amount($item[rain-doh indigo cup]) > 0))
  868.         {
  869.             set_property("cc_combatHandler", combatState + "(indigo cup)");
  870.             return "item rain-doh indigo cup";
  871.         }
  872.  
  873.         if((!contains_text(combatState, "love mosquito")) && have_skill($skill[Summon Love Mosquito]))
  874.         {
  875.             set_property("cc_combatHandler", combatState + "(love mosquito)");
  876.             return "skill summon love mosquito";
  877.         }
  878.     }
  879.  
  880.     #Default behaviors, multi-staggers when chance is 50% or greater
  881.     if(mcd < 100)
  882.     {
  883.         if((!contains_text(combatState, "blue balls")) && (item_amount($item[rain-doh blue balls]) > 0))
  884.         {
  885.             set_property("cc_combatHandler", combatState + "(blue balls)");
  886.             return "item rain-doh blue balls";
  887.         }
  888.  
  889.         if((!contains_text(combatState, "love gnats")) && have_skill($skill[Summon Love Gnats]))
  890.         {
  891.             set_property("cc_combatHandler", combatState + "(love gnats)");
  892.             return "skill summon love gnats";
  893.         }
  894.     }
  895.  
  896.     if((!contains_text(combatState, "candyblast")) && (my_mp() > 60) && (get_property("kingLiberated").to_boolean()))
  897.     {
  898.         set_property("cc_combatHandler", combatState + "(candyblast)");
  899.         return "skill candyblast";
  900.     }
  901.  
  902.     if((!contains_text(combatState, "spiritsnap")) && (my_class() == $class[Turtle Tamer]) && (have_skill($skill[Spirit Snap]) && (my_mp() > 80)))
  903.     {
  904.         set_property("cc_combatHandler", combatState + "(spiritsnap)");
  905.         return "skill spirit snap";
  906.     }
  907.  
  908.     if((!contains_text(combatState, "weaksauce")) && (have_skill($skill[curse of weaksauce])) && (my_class() == $class[Sauceror]) && (my_mp() >= 32))
  909.     {
  910.         set_property("cc_combatHandler", combatState + "(weaksauce)");
  911.         return "skill curse of weaksauce";
  912.     }
  913.  
  914.     string attackBasic = "attack with weapon";
  915.     string attackMinor = "attack with weapon";
  916.     string attackMajor = "attack with weapon";
  917.     string stunner = "";
  918.  
  919.     switch(my_class())
  920.     {
  921.     case $class[Seal Clubber]:
  922.         attackMinor = "attack with weapon";
  923.         if(have_skill($skill[lunge smack]) && (my_mp() >= 1))
  924.         {
  925.             attackMinor = "skill lunge smack";
  926.         }
  927.         if(have_skill($skill[lunging thrust-smack]) && (my_mp() >= 8))
  928.         {
  929.             attackMajor = "skill lunging thrust-smack";
  930.         }
  931.         if(have_skill($skill[Club Foot]) && (my_mp() >= 8))
  932.         {
  933.             stunner = "skill club foot";
  934.         }
  935.         break;
  936.     case $class[Turtle Tamer]:
  937.         attackMinor = "attack with weapon";
  938.         if((my_mp() > 150) && (have_skill($skill[shieldbutt])) && hasShieldEquipped())
  939.         {
  940.             attackMinor = "skill shieldbutt";
  941.         }
  942.         else if(my_mp() > 80)
  943.         {
  944.             attackMinor = "skill kneebutt";
  945.         }
  946.         attackMajor = "skill kneebutt";
  947.         if((have_skill($skill[shieldbutt])) && hasShieldEquipped() && (my_mp() >= 10))
  948.         {
  949.             attackMajor = "skill shieldbutt";
  950.         }
  951.         if(have_skill($skill[Shell Up]))
  952.         {
  953.             stunner = "skill shell up";
  954.         }
  955.         break;
  956.     case $class[Pastamancer]:
  957.         if((my_mp() >= mp_cost($skill[Cannelloni Cannon])) && (have_skill($skill[Cannelloni Cannon])))
  958.         {
  959.             attackMinor = "skill Cannelloni Cannon";
  960.         }
  961.         if((my_mp() >= mp_cost($skill[Weapon of the Pastalord])) && (have_skill($skill[Weapon of the Pastalord])))
  962.         {
  963.             attackMajor = "skill Weapon of the Pastalord";
  964.         }
  965.         if((my_mp() >= 1) && (have_skill($skill[Utensil Twist])))
  966.         {
  967.             attackMinor = "skill Utensil Twist";
  968.         }
  969.         break;
  970.     case $class[Sauceror]:
  971.         if((my_mp() >= 24) && (have_skill($skill[Saucegeyser])))
  972.         {
  973.             attackMinor = "skill saucegeyser";
  974.             attackMajor = "skill saucegeyser";
  975.             attackBasic = "skill saucegeyser";
  976.         }else{
  977.             abort("only "+to_string(my_mp())+" mp, aborting combat automazation.");
  978.         }
  979.         //if(my_soulsauce() >= 5)
  980.         //{
  981.         //  stunner = "skill soul bubble";
  982.         //}
  983.         //stunner = "skill curse of weaksauce";
  984.         break;
  985.  
  986.     }
  987.  
  988.     if(round <= 25)
  989.     {
  990.         if(((my_hp() * 10)/3) < my_maxhp())
  991.         {
  992.             if((!contains_text(combatState, "thunderstrike")) && (have_skill($skill[thunderstrike])) && (monster_level_adjustment() <= 150))
  993.             {
  994.                 set_property("cc_combatHandler", combatState + "(thunderstrike)");
  995.                 return "skill thunderstrike";
  996.             }
  997.  
  998.             if((!contains_text(combatState, "stunner")) && (stunner != "") && (monster_level_adjustment() <= 50) && (my_mp() > 10))
  999.             {
  1000.                 set_property("cc_combatHandler", combatState + "(stunner)");
  1001.                 return stunner;
  1002.             }
  1003.  
  1004.             if((have_skill($skill[unleash the greash])) && (monster_element(enemy) != $element[sleaze]) && (have_effect($effect[Takin\' It Greasy]) > 100))
  1005.             {
  1006.                 return "skill unleash the greash";
  1007.             }
  1008.             if((have_skill($skill[thousand-yard stare])) && (monster_element(enemy) != $element[spooky]) && (have_effect($effect[Intimidating Mien]) > 100))
  1009.             {
  1010.                 return "skill thousand-yard stare";
  1011.             }
  1012.             if((enemy == $monster[Aquagoblin]) ||
  1013.                 (enemy == $monster[Lord Soggyraven]))
  1014.             {
  1015.                 return attackMajor;
  1016.             }
  1017.             if((my_class() == $class[Turtle Tamer]) && (my_mp() >= 10) && (have_skill($skill[Spirit Snap])) && (!contains_text(combatState, "spirit snap")))
  1018.             {
  1019.                 set_property("cc_combatHandler", combatState + "(spirit snap)");
  1020.                 return "skill spirit snap";
  1021.             }
  1022.             if((!contains_text(combatState, "northern explosion")) && (have_skill($skill[northern explosion])) && (my_mp() >= 16) && (my_class() == $class[Seal Clubber]) && (monster_element(enemy) != $element[cold]))
  1023.             {
  1024.                 set_property("cc_combatHandler", combatState + "(northern explosion)");
  1025.                 return "skill northern explosion";
  1026.             }
  1027.             if((!contains_text(combatState, "last attempt")) && (my_mp() >= 8))
  1028.             {
  1029.                 set_property("cc_combatHandler", combatState + "(last attempt)");
  1030.                 return attackMajor;
  1031.             }
  1032.             if(my_location() != $location[The Slime Tube])
  1033.             {
  1034.                 abort("Could not handle monster, sorry");
  1035.             }
  1036.         }
  1037.         if((monster_level_adjustment() > 150) && (my_mp() >= 45) && (have_skill($skill[Shell Up])) && (!contains_text(combatState, "shellup")) && (my_class() == $class[Turtle Tamer]))
  1038.         {
  1039.                 set_property("cc_combatHandler", combatState + "(shellup)");
  1040.                 return "skill shell up";
  1041.         }
  1042.  
  1043.  
  1044.         if((monster_level_adjustment() > 150) && (my_mp() >= 8))
  1045.         {
  1046.             return attackMajor;
  1047.         }
  1048.         if((have_skill($skill[lunge smack])) && (my_mp() >= 1))
  1049.         {
  1050.             return attackMinor;
  1051.         }
  1052.         return attackBasic;
  1053.     }
  1054.  
  1055.     if(round > 100)
  1056.     {
  1057.         abort("Some sort of problem occured, maybe the fat stacks were nerfed again");
  1058.     }
  1059.  
  1060.     print("using attackBasic, which is: "+to_string(attackBasic));
  1061.     return attackBasic;
  1062. #   return get_ccs_action(round);
  1063. }
  1064.  
  1065. /*
  1066. void handleBanish(monster enemy, skill banisher)
  1067. {
  1068.     string banishes = get_property("cc_banishes");
  1069.     if(banishes != "")
  1070.     {
  1071.         banishes = banishes + ", ";
  1072.     }
  1073.     banishes = banishes + "(" + my_daycount() + ":" + enemy + ":" + banisher + ":" + my_turncount() + ")";
  1074.     set_property("cc_banishes", banishes);
  1075. }
  1076.  
  1077. void handleBanish(monster enemy, item banisher)
  1078. {
  1079.     string banishes = get_property("cc_banishes");
  1080.     if(banishes != "")
  1081.     {
  1082.         banishes = banishes + ", ";
  1083.     }
  1084.     banishes = banishes + "(" + my_daycount() + ":" + enemy + ":" + banisher + ":" + my_turncount() + ")";
  1085.     set_property("cc_banishes", banishes);
  1086. }
  1087.  
  1088.  
  1089. void handleYellowRay(monster enemy, skill yellowRay)
  1090. {
  1091.     string yellow = get_property("cc_yellowRays");
  1092.     if(yellow != "")
  1093.     {
  1094.         yellow = yellow + ", ";
  1095.     }
  1096.     yellow = yellow + "(" + my_daycount() + ":" + enemy + ":" + yellowRay + ":" + my_turncount() + ")";
  1097.     set_property("cc_yellowRays", yellow);
  1098. }
  1099.  
  1100. void handleYellowRay(monster enemy, item yellowRay)
  1101. {
  1102.     string yellow = get_property("cc_yellowRays");
  1103.     if(yellow != "")
  1104.     {
  1105.         yellow = yellow + ", ";
  1106.     }
  1107.     yellow = yellow + "(" + my_daycount() + ":" + enemy + ":" + yellowRay + ":" + my_turncount() + ")";
  1108.     set_property("cc_yellowRays", yellow);
  1109. }
  1110. */
  1111. string findBanisher(string opp)
  1112. {
  1113.     print("In findBanisher for: " + opp, "green");
  1114.     monster enemy = to_monster(opp);
  1115.     if(get_property("cc_gremlinlouder") == "")
  1116.     {
  1117.         set_property("cc_gremlinlouder", "used");
  1118.         if(item_amount($item[louder than bomb]) > 0)
  1119.         {
  1120.             handleTracker(enemy, $item[louder than bomb], "cc_banishes");
  1121.             return "item louder than bomb";
  1122.         }
  1123.     }
  1124.     if(get_property("cc_gremlinpants") == "")
  1125.     {
  1126.         set_property("cc_gremlinpants", "used");
  1127.         if(have_skill($skill[talk about politics]))
  1128.         {
  1129.             handleTracker(enemy, $skill[talk about politics], "cc_banishes");
  1130.             return "skill talk about politics";
  1131.         }
  1132.     }
  1133.     if(get_property("cc_gremlinbatter") == "")
  1134.     {
  1135.         set_property("cc_gremlinbatter", "used");
  1136.         if((have_skill($skill[batter up!])) && (my_fury() >= 5))
  1137.         {
  1138.             handleTracker(enemy, $skill[batter up!], "cc_banishes");
  1139.             return "skill batter up!";
  1140.         }
  1141.     }
  1142.     if(get_property("cc_gremlinclap") == "")
  1143.     {
  1144.         set_property("cc_gremlinclap", "used");
  1145.         if(have_skill($skill[thunder clap]))
  1146.         {
  1147.             handleTracker(enemy, $skill[thunder clap], "cc_banishes");
  1148.             return "skill thunder clap";
  1149.         }
  1150.     }
  1151.  
  1152.     if((my_thunder() >= 40) && have_skill($skill[thunder clap]))
  1153.     {
  1154.         return "skill thunder clap";
  1155.     }
  1156.     if((have_skill($skill[talk about politics])) && (get_property("_pantsgivingBanish").to_int() < 5))
  1157.     {
  1158.         return "skill talk about politics";
  1159.     }
  1160.  
  1161.     if((my_class() == $class[Ed]) && have_skill($skill[Curse of Vacation]) && (my_mp() >= 35))
  1162.     {
  1163.         handleTracker(enemy, $skill[Curse of Vacation], "cc_banishes");
  1164.         return "skill curse of vacation";
  1165.     }
  1166.  
  1167.     return "attack with weapon";
  1168. }
  1169.  
  1170. string ccsJunkyard(int round, string opp, string text)
  1171. {
  1172.     if(opp == "gourmet gourami")
  1173.     {
  1174.         return "attack with weapon";
  1175.     }
  1176.  
  1177.  
  1178.     string fun = "";
  1179.     monster enemy = to_monster(opp);
  1180.     if(enemy.base_hp == 0)
  1181.     {
  1182.         while((length(opp) > 0) && (enemy.base_hp == 0))
  1183.         {
  1184.             int space = index_of(opp, " ");
  1185.             if(space == -1)
  1186.             {
  1187.                 print("Could not determine non-fun monster.", "red");
  1188.                 break;
  1189.             }
  1190.             else
  1191.             {
  1192.                 fun = fun + substring(opp, 0, space+1);
  1193.                 opp = substring(opp, space+1);
  1194.                 enemy = to_monster(opp);
  1195.  
  1196.  
  1197.                 if(enemy.base_hp != 0)
  1198.                 {
  1199.                     print("Determined non-fun monster: (" + enemy + ") with fun: " + fun, "blue");
  1200.                 }
  1201.             }
  1202.         }
  1203.     }
  1204.  
  1205.  
  1206.     if(round == 0)
  1207.     {
  1208.         print("ccsJunkyard: " + round, "brown");
  1209.         set_property("cc_gremlinMoly", true);
  1210.         set_property("cc_combatJunkyard", "clear");
  1211.         set_property("cc_combatHandler", "");
  1212.     }
  1213.     else
  1214.     {
  1215.         print("cc_Junkyard: " + round, "brown");
  1216.     }
  1217.     string combatState = get_property("cc_combatHandler");
  1218.     string edCombatState = get_property("cc_edCombatHandler");
  1219.  
  1220.     if(my_class() == $class[Ed])
  1221.     {
  1222.         if(contains_text(edCombatState, "gremlinNeedBanish"))
  1223.         {
  1224.             set_property("cc_gremlinMoly", false);
  1225.         }
  1226.     }
  1227.  
  1228.     if(my_location() == $location[Next To That Barrel With Something Burning In It])
  1229.     {
  1230.         if(opp == "vegetable gremlin")
  1231.         {
  1232.             set_property("cc_gremlinMoly", false);
  1233.         }
  1234.         else if(contains_text(text, "It does a bombing run over your head"))
  1235.         {
  1236.             set_property("cc_gremlinMoly", false);
  1237.         }
  1238.     }
  1239.     else if(my_location() == $location[Out By That Rusted-Out Car])
  1240.     {
  1241.         if(opp == "erudite gremlin")
  1242.         {
  1243.             set_property("cc_gremlinMoly", false);
  1244.         }
  1245.         else if(contains_text(text, "It picks a beet off of itself and beats you with it"))
  1246.         {
  1247.             set_property("cc_gremlinMoly", false);
  1248.         }
  1249.     }
  1250.     else if(my_location() == $location[Over Where The Old Tires Are])
  1251.     {
  1252.         if(opp == "spider gremlin")
  1253.         {
  1254.             set_property("cc_gremlinMoly", false);
  1255.         }
  1256.         else if(contains_text(text, "He uses the random junk around him"))
  1257.         {
  1258.             set_property("cc_gremlinMoly", false);
  1259.         }
  1260.     }
  1261.     else if(my_location() == $location[Near an Abandoned Refrigerator])
  1262.     {
  1263.         if(opp == "batwinged gremlin")
  1264.         {
  1265.             set_property("cc_gremlinMoly", false);
  1266.         }
  1267.         else if(contains_text(text, "It bites you in the fibula with its mandibles"))
  1268.         {
  1269.             set_property("cc_gremlinMoly", false);
  1270.         }
  1271.     }
  1272.  
  1273.     if(!contains_text(edCombatState, "gremlinNeedBanish") && !get_property("cc_gremlinMoly").to_boolean() && (my_class() == $class[Ed]))
  1274.     {
  1275.         set_property("cc_edCombatHandler", "(gremlinNeedBanish)");
  1276.     }
  1277.  
  1278.     if(round >= 28)
  1279.     {
  1280.         if(have_skill($skill[Lunging Thrust-Smack]) && (my_mp() >= 8))
  1281.         {
  1282.             return "skill lunging thrust-smack";
  1283.         }
  1284.         return "attack with weapon";
  1285.     }
  1286.  
  1287.     if(contains_text(text, "It whips out a hammer") || contains_text(text, "He whips out a crescent") || contains_text(text, "It whips out a pair") || contains_text(text, "It whips out a screwdriver"))
  1288.     {
  1289.         return "item molybdenum magnet";
  1290.     }
  1291.     if((!contains_text(combatState, "marshmallow")) && have_skill($skill[Curse of the Marshmallow]) && (my_mp() > 1))
  1292.     {
  1293.         set_property("cc_combatHandler", combatState + "(marshmallow)");
  1294.         return "skill Curse of the Marshmallow";
  1295.     }
  1296.     if((!contains_text(combatState, "love scarab")) && have_skill($skill[Summon Love Scarabs]))
  1297.     {
  1298.         set_property("cc_combatHandler", combatState + "(love scarab)");
  1299.         return "skill summon love scarabs";
  1300.     }
  1301.     if((!contains_text(combatState, "love gnats")) && have_skill($skill[Summon Love Gnats]))
  1302.     {
  1303.         set_property("cc_combatHandler", combatState + "(love gnats)");
  1304.         return "skill summon love gnats";
  1305.     }
  1306.  
  1307.     if(!get_property("cc_gremlinMoly").to_boolean() && (my_class() == $class[Ed]))
  1308.     {
  1309.         if(get_property("cc_edCombatStage").to_int() >= 2)
  1310.         {
  1311.             string banisher = findBanisher(opp);
  1312.             if(banisher != "attack with weapon")
  1313.             {
  1314.                 return banisher;
  1315.             }
  1316.             else if(my_mp() >= 8)
  1317.             {
  1318.                 return "skill storm of the scarab";
  1319.             }
  1320.             return banisher;
  1321.         }
  1322.     }
  1323.  
  1324.  
  1325.     if((!contains_text(combatState, "flyers")) && (my_location() != $location[The Battlefield (Frat Uniform)]))
  1326.     {
  1327.         if((item_amount($item[rock band flyers]) > 0) && (get_property("flyeredML").to_int() < 10000))
  1328.         {
  1329.             set_property("cc_combatHandler", combatState + "(flyers)");
  1330.             return "item rock band flyers";
  1331.         }
  1332.     }
  1333.  
  1334.  
  1335.     if(!get_property("cc_gremlinMoly").to_boolean())
  1336.     {
  1337.         if(my_class() == $class[Ed])
  1338.         {
  1339.             if(get_property("cc_edCombatStage").to_int() >= 2)
  1340.             {
  1341.                 return findBanisher(opp);
  1342.             }
  1343.             else if(item_amount($item[dictionary]) > 0)
  1344.             {
  1345.                 return "item dictionary";
  1346.             }
  1347.             else if(item_amount($item[seal tooth]) > 0)
  1348.             {
  1349.                 return "item seal tooth";
  1350.             }
  1351.         }
  1352.         else
  1353.         {
  1354.             return findBanisher(opp);
  1355.         }
  1356.     }
  1357.  
  1358.  
  1359.     if(!get_property("cc_gremlinMoly").to_boolean())
  1360.     {
  1361.         if(have_skill($skill[Lunging Thrust-Smack]) && (my_mp() >= 8))
  1362.         {
  1363.             return "skill lunging thrust-smack";
  1364.         }
  1365.         if(have_skill($skill[Storm of the Scarab]) && (my_mp() >= 8))
  1366.         {
  1367.             return "skill Storm of the Scarab";
  1368.         }
  1369.         return "attack with weapon";
  1370.     }
  1371.  
  1372.     if(item_amount($item[dictionary]) > 0)
  1373.     {
  1374.         return "item dictionary";
  1375.     }
  1376.     if(item_amount($item[seal tooth]) > 0)
  1377.     {
  1378.         return "item seal tooth";
  1379.     }
  1380.     if(item_amount($item[Spectre Scepter]) > 0)
  1381.     {
  1382.         return "item spectre scepter";
  1383.     }
  1384.     if(have_skill($skill[toss]))
  1385.     {
  1386.         if((my_mp() >= 1) || (my_class() == $class[Turtle Tamer]))
  1387.         {
  1388.             return "skill toss";
  1389.         }
  1390.     }
  1391.     return "attack with weapon";
  1392. }
  1393. /*
  1394. void handleSniffs(monster enemy, skill sniffer)
  1395. {
  1396.     if(my_daycount() <= 5)
  1397.     {
  1398.         string sniffs = get_property("cc_sniffs");
  1399.         if(sniffs != "")
  1400.         {
  1401.             sniffs = sniffs + ",";
  1402.         }
  1403.         sniffs = sniffs + "(" + my_daycount() + ":" + enemy + ":" + sniffer + ":" + my_turncount() + ")";
  1404.         set_property("cc_sniffs", sniffs);
  1405.     }
  1406. }
  1407.  
  1408. void handleLashes(monster enemy)
  1409. {
  1410.     if(my_daycount() <= 5)
  1411.     {
  1412.         string lashes = get_property("cc_lashes");
  1413.         if(lashes != "")
  1414.         {
  1415.             lashes = lashes + ", ";
  1416.         }
  1417.         if(get_property("_edLashCount").to_int() >= 30)
  1418.         {
  1419.             lashes = lashes + "(" + my_daycount() + ":" + enemy + ":" + my_turncount() + "F)";
  1420.         }
  1421.         else
  1422.         {
  1423.             lashes = lashes + "(" + my_daycount() + ":" + enemy + ":" + my_turncount() + ")";
  1424.         }
  1425.         set_property("cc_lashes", lashes);
  1426.     }
  1427. }
  1428.  
  1429. void handleRenenutet(monster enemy)
  1430. {
  1431.     if(my_daycount() <= 5)
  1432.     {
  1433.         string renenutet = get_property("cc_renenutet");
  1434.         if(renenutet != "")
  1435.         {
  1436.             renenutet = renenutet + ", ";
  1437.         }
  1438.         renenutet = renenutet + "(" + my_daycount() + ":" + enemy + ":" + my_turncount() + ")";
  1439.         set_property("cc_renenutet", renenutet);
  1440.     }
  1441. }
  1442. */
  1443. string cc_edCombatHandler(int round, string opp, string text)
  1444. {
  1445.     if(my_path() != "Actually Ed the Undying")
  1446.     {
  1447.         abort("Not in Actually Ed the Undying, this ccs will result in massive suckage.");
  1448.     }
  1449.     if(round == 0)
  1450.     {
  1451.         print("cc_combatHandler: " + round, "brown");
  1452.         set_property("cc_combatHandler", "");
  1453.         if(get_property("cc_edCombatStage").to_int() == 0)
  1454.         {
  1455.             set_property("cc_edCombatCount", 1 + get_property("cc_edCombatCount").to_int());
  1456.             set_property("cc_edCombatStage", 1);
  1457.             set_property("cc_edStatus", "UNDYING!");
  1458.         }
  1459.         else
  1460.         {
  1461.             set_property("cc_edCombatStage", 1 + get_property("cc_edCombatStage").to_int());
  1462.         }
  1463.     }
  1464.     set_property("cc_edCombatRoundCount", 1 + get_property("cc_edCombatRoundCount").to_int());
  1465.  
  1466.  
  1467.     if(get_property("cc_edCombatStage").to_int() == 3)
  1468.     {
  1469.         set_property("cc_edStatus", "dying");
  1470.         set_property("cc_edCombatStage", 0);
  1471.     }
  1472.  
  1473.     set_property("cc_diag_round", round);
  1474.  
  1475.     if(get_property("cc_diag_round").to_int() > 60)
  1476.     {
  1477.         abort("Somehow got to 60 rounds.... aborting");
  1478.     }
  1479.  
  1480.     monster enemy = to_monster(opp);
  1481.     phylum type = monster_phylum(enemy);
  1482.     string combatState = get_property("cc_combatHandler");
  1483.     string edCombatState = get_property("cc_edCombatHandler");
  1484.  
  1485.     #Handle different path is monster_level_adjustment() > 150 (immune to staggers?)
  1486.     int mcd = monster_level_adjustment();
  1487.  
  1488.     if(have_effect($effect[temporary amnesia]) > 0)
  1489.     {
  1490.         return "attack with weapon";
  1491.     }
  1492.  
  1493.     if((!contains_text(combatState, "pocket crumbs")) && (have_skill($skill[pocket crumbs])))
  1494.     {
  1495.         set_property("cc_combatHandler", combatState + "(pocket crumbs)");
  1496.         return "skill pocket crumbs";
  1497.     }
  1498.  
  1499.     if((!contains_text(combatState, "air dirty laundry")) && (have_skill($skill[air dirty laundry])))
  1500.     {
  1501.         set_property("cc_combatHandler", combatState + "(air dirty laundry)");
  1502.         return "skill air dirty laundry";
  1503.     }
  1504.  
  1505.     if((!contains_text(combatState, "love scarab")) && have_skill($skill[Summon Love Scarabs]))
  1506.     {
  1507.         set_property("cc_combatHandler", combatState + "(love scarab)");
  1508.         return "skill summon love scarabs";
  1509.     }
  1510.  
  1511.  
  1512.  
  1513.     if(get_property("cc_edStatus") == "UNDYING!")
  1514.     {
  1515.         if((!contains_text(combatState, "love gnats")) && have_skill($skill[Summon Love Gnats]))
  1516.         {
  1517.             set_property("cc_combatHandler", combatState + "(love gnats)");
  1518.             return "skill summon love gnats";
  1519.         }
  1520.     }
  1521.     else if(get_property("cc_edStatus") == "dying")
  1522.     {
  1523.         boolean doStunner = true;
  1524.  
  1525.         if((mcd > 50) && (expected_damage() * 1.15) > my_hp())
  1526.         {
  1527.             doStunner = false;
  1528.         }
  1529.  
  1530.         if(doStunner)
  1531.         {
  1532.             if((!contains_text(combatState, "love gnats")) && have_skill($skill[Summon Love Gnats]))
  1533.             {
  1534.                 set_property("cc_combatHandler", combatState + "(love gnats)");
  1535.                 return "skill summon love gnats";
  1536.             }
  1537.         }
  1538.     }
  1539.     else
  1540.     {
  1541.         print("Ed combat state does not exist, winging it....", "red");
  1542.     }
  1543.  
  1544.  
  1545.     if((!contains_text(combatState, "sewage pistol")) && have_skill($skill[Fire Sewage Pistol]))
  1546.     {
  1547.         set_property("cc_combatHandler", combatState + "(sewage pistol)");
  1548.         return "skill fire sewage pistol";
  1549.     }
  1550.  
  1551.     if(enemy == $monster[Protagonist])
  1552.     {
  1553.         set_property("cc_edStatus", "dying");
  1554.     }
  1555.  
  1556.  
  1557.     if((!contains_text(combatState, "flyers")) && (my_location() != $location[The Battlefield (Frat Uniform)]))
  1558.     {
  1559.         if((item_amount($item[rock band flyers]) > 0) && (get_property("flyeredML").to_int() < 10000))
  1560.         {
  1561.             set_property("cc_combatHandler", combatState + "(flyers)");
  1562.             return "item rock band flyers";
  1563.         }
  1564.     }
  1565.  
  1566.     if((enemy == $monster[clingy pirate]) && (item_amount($item[cocktail napkin]) > 0))
  1567.     {
  1568.         return "item cocktail napkin";
  1569.     }
  1570.  
  1571.     if((enemy == $monster[dirty thieving brigand]) && (!contains_text(edCombatState, "curse of fortune")))
  1572.     {
  1573.         if((item_amount($item[Ka Coin]) > 0) && (have_skill($skill[Curse of Fortune])))
  1574.         {
  1575.             set_property("cc_edCombatHandler", edCombatState + "(curse of fortune)");
  1576.             set_property("cc_edStatus", "dying");
  1577.             return "skill curse of fortune";
  1578.         }
  1579.     }
  1580.  
  1581.     if((item_amount($item[The Big Book of Pirate Insults]) > 0) && (!contains_text(combatState, "insults")))
  1582.     {
  1583.         if((my_location() == $location[The Obligatory Pirate\'s Cove]) || (my_location() == $location[barrrney\'s barrr]) ||
  1584.             (enemy == $monster[gaudy pirate]))
  1585.         {
  1586.             set_property("cc_combatHandler", combatState + "(insults)");
  1587.             return "item the big book of pirate insults";
  1588.         }
  1589.     }
  1590.  
  1591.     if(!contains_text(edCombatState, "curseofstench") && (have_skill($skill[Curse of Stench])) && (my_mp() >= 35) && (get_property("stenchCursedMonster") != opp) && (get_property("cc_edStatus") == "UNDYING!"))
  1592.     {
  1593.         if((enemy == $monster[bob racecar]) ||
  1594.             (enemy == $monster[pygmy bowler]) ||
  1595.             (enemy == $monster[pygmy witch surgeon]) ||
  1596.             (enemy == $monster[possessed wine rack]) ||
  1597.             (enemy == $monster[cabinet of Dr. Limpieza]) ||
  1598.             (enemy == $monster[quiet healer]) ||
  1599.             (enemy == $monster[racecar bob]) ||
  1600.             (enemy == $monster[dirty old lihc]) ||
  1601.             (enemy == $monster[dairy goat]) ||
  1602.             (enemy == $monster[green ops soldier]) ||
  1603.             (enemy == $monster[Government Scientist]) ||
  1604.             (enemy == $monster[Writing Desk]))
  1605.         {
  1606.             set_property("cc_edCombatHandler", combatState + "(curseofstench)");
  1607.             handleTracker(enemy, $skill[Curse of Stench], "cc_sniffs");
  1608.             return "skill Curse of Stench";
  1609.         }
  1610.     }
  1611.  
  1612.     if(my_location() == $location[The Secret Council Warehouse])
  1613.     {
  1614.         if(!contains_text(edCombatState, "curseofstench") && (have_skill($skill[Curse of Stench])) && (my_mp() >= 35) && (get_property("stenchCursedMonster") != opp) && (get_property("cc_edStatus") == "UNDYING!"))
  1615.         {
  1616.             boolean doStench = false;
  1617.             #   Rememeber, we are looking to see if we have enough of the opposite item here.
  1618.             if(enemy == $monster[Warehouse Guard])
  1619.             {
  1620.                 int progress = get_property("warehouseProgress").to_int();
  1621.                 progress = progress + (8 * item_amount($item[Warehouse Inventory Page]));
  1622.                 if(progress >= 50)
  1623.                 {
  1624.                     doStench = true;
  1625.                 }
  1626.             }
  1627.  
  1628.             if(enemy == $monster[Warehouse Clerk])
  1629.             {
  1630.                 int progress = get_property("warehouseProgress").to_int();
  1631.                 progress = progress + (8 * item_amount($item[Warehouse Map Page]));
  1632.                 if(progress >= 50)
  1633.                 {
  1634.                     doStench = true;
  1635.                 }
  1636.             }
  1637.             if(doStench)
  1638.             {
  1639.                 set_property("cc_edCombatHandler", combatState + "(curseofstench)");
  1640.                 handleTracker(enemy, $skill[Curse of Stench], "cc_sniffs");
  1641.                 return "skill Curse of Stench";
  1642.             }
  1643.         }
  1644.     }
  1645.  
  1646.  
  1647.     if(my_location() == $location[The Smut Orc Logging Camp])
  1648.     {
  1649.         if(!contains_text(edCombatState, "curseofstench") && (have_skill($skill[Curse of Stench])) && (my_mp() >= 35) && (get_property("stenchCursedMonster") != opp) && (get_property("cc_edStatus") == "UNDYING!"))
  1650.         {
  1651.             boolean doStench = false;
  1652.             string stenched = to_lower_case(get_property("stenchCursedMonster"));
  1653.  
  1654.             if((fastenerCount() >= 30) && (stenched != "smut orc pipelayer") && (stenched != "smut orc jacker"))
  1655.             {
  1656.                 #   Sniff 100% lumber
  1657.                 if((enemy == $monster[Smut Orc Pipelayer]) || (enemy == $monster[Smut Orc Jacker]))
  1658.                 {
  1659.                     doStench = true;
  1660.                 }
  1661.             }
  1662.             if((lumberCount() >= 30) && (stenched != "smut orc screwer") && (stenched != "smut orc nailer"))
  1663.             {
  1664.                 #   Sniff 100% fastener
  1665.                 if((enemy == $monster[Smut Orc Screwer]) || (enemy == $monster[Smut Orc Nailer]))
  1666.                 {
  1667.                     doStench = true;
  1668.                 }
  1669.             }
  1670.  
  1671.             if(doStench)
  1672.             {
  1673.                 set_property("cc_edCombatHandler", combatState + "(curseofstench)");
  1674.                 handleTracker(enemy, $skill[Curse of Stench], "cc_sniffs");
  1675.                 return "skill Curse of Stench";
  1676.             }
  1677.         }
  1678.     }
  1679.  
  1680.     if(contains_text(combatState, "insults") && (get_property("cc_edStatus") == "dying"))
  1681.     {
  1682.         if((enemy == $monster[shady pirate]) && have_skill($skill[Curse of Vacation]) && (my_mp() >= 30))
  1683.         {
  1684.             handleTracker(enemy, $skill[Curse of Vacation], "cc_banishes");
  1685.             return "skill curse of vacation";
  1686.         }
  1687.         if((enemy == $monster[shifty pirate]) && (get_property("_pantsgivingBanish").to_int() < 5))
  1688.         {
  1689.             handleTracker(enemy, $skill[talk about politics], "cc_banishes");
  1690.             return "skill talk about poltiics";
  1691.         }
  1692.     }
  1693.  
  1694.     if((!contains_text(combatState, "yellowray")) && (have_effect($effect[everything looks yellow]) == 0) && (have_skill($skill[Wrath of Ra])) && (my_mp() >= 40))
  1695.     {
  1696.         boolean doWrath = false;
  1697.         if((my_location() == $location[Hippy Camp]) && !possessEquipment($item[Filthy Corduroys]) && !possessEquipment($item[Filthy Knitted Dread Sack]))
  1698.         {
  1699.             doWrath = true;
  1700.         }
  1701.         if((enemy == $monster[burly sidekick]) && (item_amount($item[mohawk wig]) == 0))
  1702.         {
  1703.             doWrath = true;
  1704.         }
  1705.         if(enemy == $monster[knob goblin harem girl])
  1706.         {
  1707.             doWrath = true;
  1708.         }
  1709.         if(enemy == $monster[Mountain Man])
  1710.         {
  1711.             doWrath = true;
  1712.         }
  1713.         if((opp == "mountain man") && !doWrath)
  1714.         {
  1715.             doWrath = true;
  1716.             print("Mountain man was not found by $monster (" + enemy + ")and instead only by opp compare", "red");
  1717.         }
  1718.  
  1719.         if((enemy == $monster[Frat Warrior Drill Sergeant]) || (enemy == $monster[War Pledge]))
  1720.         {
  1721.             if(!possessEquipment($item[Bullet-Proof Corduroys]) && !possessEquipment($item[Reinforced Beaded Headband]) && !possessEquipment($item[Round Purple Sunglasses]))
  1722.             {
  1723.                 doWrath = true;
  1724.             }
  1725.         }
  1726.  
  1727.         if(doWrath)
  1728.         {
  1729.             set_property("cc_combatHandler", combatState + "(yellowray)");
  1730.             handleTracker(enemy, $skill[Wrath of Ra], , "cc_yellowRays");
  1731.             return "skill wrath of ra";
  1732.         }
  1733.     }
  1734.  
  1735.     if(have_skill($skill[Curse of Vacation]) && (my_mp() >= 35))
  1736.     {
  1737.         if((enemy == $monster[pygmy orderlies]) && (my_location() == $location[The Hidden Bowling Alley]))
  1738.         {
  1739.             set_property("cc_combatHandler", combatState + "(curse of vacation)");
  1740.             handleTracker(enemy, $skill[Curse of Vacation], "cc_banishes");
  1741.             return "skill curse of vacation";
  1742.         }
  1743.     }
  1744.  
  1745.     if(have_skill($skill[Curse of Vacation]) && (my_mp() >= 35))
  1746.     {
  1747.         if((enemy == $monster[fallen archfiend]) && (my_location() == $location[The Dark Heart of the Woods]) && (get_property("cc_pirateoutfit") != "almost") && (get_property("cc_pirateoutfit") != "finished"))
  1748.         {
  1749.             set_property("cc_combatHandler", combatState + "(curse of vacation)");
  1750.             handleTracker(enemy, $skill[Curse of Vacation], "cc_banishes");
  1751.             return "skill curse of vacation";
  1752.         }
  1753.     }
  1754.  
  1755.     if(have_skill($skill[Curse of Vacation]) && (my_mp() >= 35))
  1756.     {
  1757.         if((enemy == $monster[animated mahogany nightstand]) ||
  1758.             (enemy == $monster[coaltergeist]) ||
  1759.             (enemy == $monster[flock of stab-bats]) ||
  1760.             (enemy == $monster[procrastination giant]) ||
  1761.             (enemy == $monster[mad wino]) ||
  1762.             (enemy == $monster[Irritating Series of Random Encounters]) ||
  1763.             (enemy == $monster[sabre-toothed goat]) ||
  1764.             (enemy == $monster[knob goblin harem guard]) ||
  1765.             (enemy == $monster[pygmy witch lawyer]) ||
  1766.             (enemy == $monster[pygmy witch nurse]) ||
  1767.             (enemy == $monster[punk rock giant]) ||
  1768.             (enemy == $monster[slick lihc]) ||
  1769.             (enemy == $monster[warehouse janitor]) ||
  1770.             (enemy == $monster[possessed laundry press]) ||
  1771.             (enemy == $monster[mismatched twins]) ||
  1772.             (enemy == $monster[crusty pirate]))
  1773.         {
  1774.             set_property("cc_combatHandler", combatState + "(curse of vacation)");
  1775.             handleTracker(enemy, $skill[Curse of Vacation], "cc_banishes");
  1776.             return "skill curse of vacation";
  1777.         }
  1778.     }
  1779.  
  1780.     if(item_amount($item[disposable instant camera]) > 0)
  1781.     {
  1782.         if((enemy == $monster[bob racecar]) || (enemy == $monster[racecar bob]))
  1783.         {
  1784.             set_property("cc_combatHandler", combatState + "(disposable instant camera)");
  1785.             return "item disposable instant camera";
  1786.         }
  1787.     }
  1788.  
  1789.     if((my_location() == $location[Oil Peak]) && (item_amount($item[duskwalker syringe]) > 0))
  1790.     {
  1791.         return "item duskwalker syringe";
  1792.     }
  1793.  
  1794.     if(!contains_text(edCombatState, "lashofthecobra") && have_skill($skill[Lash of the Cobra]) && (my_mp() >= 12))
  1795.     {
  1796.         set_property("cc_edCombatHandler", edCombatState + "(lashofthecobra)");
  1797.         boolean doLash = false;
  1798.         if((enemy == $monster[Swarthy Pirate]) && !possessEquipment($item[Stuffed Shoulder Parrot]))
  1799.         {
  1800.             doLash = true;
  1801.         }
  1802.         if((enemy == $monster[Big Wheelin\' Twins]) && !possessEquipment($item[Badge Of Authority]))
  1803.         {
  1804.             doLash = true;
  1805.         }
  1806.  
  1807.         if((enemy == $monster[Fishy Pirate]) && !possessEquipment($item[Perfume-Soaked Bandana]))
  1808.         {
  1809.             doLash = true;
  1810.         }
  1811.         if((enemy == $monster[Funky Pirate]) && !possessEquipment($item[Sewage-Clogged Pistol]))
  1812.         {
  1813.             doLash = true;
  1814.         }
  1815.         if((enemy == $monster[Garbage Tourist]) && (item_amount($item[Bag of Park Garbage]) == 0))
  1816.         {
  1817.             doLash = true;
  1818.         }
  1819.  
  1820.         if((enemy == $monster[Sassy Pirate]) && !possessEquipment($item[Swashbuckling Pants]))
  1821.         {
  1822.             doLash = true;
  1823.         }
  1824.         if((enemy == $monster[Smarmy Pirate]) && !possessEquipment($item[Eyepatch]))
  1825.         {
  1826.             doLash = true;
  1827.         }
  1828.         if((enemy == $monster[One-eyed Gnoll]) && !possessEquipment($item[Eyepatch]))
  1829.         {
  1830.             doLash = true;
  1831.         }
  1832.         if((enemy == $monster[Stone Temple Pirate]) && !possessEquipment($item[Eyepatch]))
  1833.         {
  1834.             doLash = true;
  1835.         }
  1836.         if((enemy == $monster[Dairy Goat]) && (item_amount($item[Goat Cheese]) < 3))
  1837.         {
  1838.             doLash = true;
  1839.         }
  1840.         if((enemy == $monster[Renaissance Giant]) && (item_amount($item[Ye Olde Meade]) < 1) && (my_daycount() == 1))
  1841.         {
  1842.             doLash = true;
  1843.         }
  1844.         if((enemy == $monster[Protagonist]) && !possessEquipment($item[Ocarina of Space]))
  1845.         {
  1846.             doLash = true;
  1847.         }
  1848.         if(enemy == $monster[Bearpig Topiary Animal])
  1849.         {
  1850.             doLash = true;
  1851.         }
  1852.         if(enemy == $monster[Elephant (Meatcar?) Topiary Animal])
  1853.         {
  1854.             doLash = true;
  1855.         }
  1856.         if(enemy == $monster[Spider (Duck?) Topiary Animal])
  1857.         {
  1858.             doLash = true;
  1859.         }
  1860.         if(enemy == $monster[Beanbat])
  1861.         {
  1862.             doLash = true;
  1863.         }
  1864.         if(enemy == $monster[Bookbat])
  1865.         {
  1866.             doLash = true;
  1867.         }
  1868.         if(((enemy == $monster[Toothy Sklelton]) || (enemy == $monster[Spiny Skelelton])) && (get_property("cyrptNookEvilness").to_int() > 26))
  1869.         {
  1870.             doLash = true;
  1871.         }
  1872.         if((enemy == $monster[Oil Baron]) && (item_amount($item[Bubblin\' Crude]) < 12) && (item_amount($item[Jar of Oil]) == 0))
  1873.         {
  1874.             doLash = true;
  1875.         }
  1876.  
  1877.         if((enemy == $monster[Blackberry Bush]) && (item_amount($item[Blackberry]) < 3) && !possessEquipment($item[Blackberry Galoshes]))
  1878.         {
  1879.             doLash = true;
  1880.         }
  1881.         if((enemy == $monster[Pygmy Bowler]) && (get_property("_edLashCount").to_int() < 26))
  1882.         {
  1883.             doLash = true;
  1884.         }
  1885.         if(enemy == $monster[Larval Filthworm])
  1886.         {
  1887.             doLash = true;
  1888.         }
  1889.         if(enemy == $monster[Filthworm Drone])
  1890.         {
  1891.             doLash = true;
  1892.         }
  1893.         if(enemy == $monster[Filthworm Royal Guard])
  1894.         {
  1895.             doLash = true;
  1896.         }
  1897.         if(enemy == $monster[Knob Goblin Madam])
  1898.         {
  1899.             if(item_amount($item[Knob Goblin Perfume]) == 0)
  1900.             {
  1901.                 doLash = true;
  1902.             }
  1903.         }
  1904.         if(enemy == $monster[Knob Goblin Harem Girl])
  1905.         {
  1906.             if(!possessEquipment($item[Knob Goblin Harem Veil]) || !possessEquipment($item[Knob Goblin Harem Pants]))
  1907.             {
  1908.                 doLash = true;
  1909.             }
  1910.         }
  1911.  
  1912.         if(((my_location() == $location[Hippy Camp]) || (my_location() == $location[Wartime Hippy Camp])) && contains_text(enemy, "hippy"))
  1913.         {
  1914.             if(!possessEquipment($item[Filthy Knitted Dread Sack]) || !possessEquipment($item[Filthy Corduroys]))
  1915.             {
  1916.                 doLash = true;
  1917.             }
  1918.         }
  1919.  
  1920.         if(my_location() == $location[Wartime Frat House])
  1921.         {
  1922.             if(!possessEquipment($item[Beer Helmet]) || !possessEquipment($item[Bejeweled Pledge Pin]) || !possessEquipment($item[Distressed Denim Pants]))
  1923.             {
  1924.                 doLash = true;
  1925.             }
  1926.         }
  1927.  
  1928.         if((enemy == $monster[Dopey 7-Foot Dwarf]) && !possessEquipment($item[Miner\'s Helmet]))
  1929.         {
  1930.             doLash = true;
  1931.         }
  1932.  
  1933.         if((enemy == $monster[Grumpy 7-Foot Dwarf]) && !possessEquipment($item[7-Foot Dwarven Mattock]))
  1934.         {
  1935.             doLash = true;
  1936.         }
  1937.  
  1938.         if((enemy == $monster[Sleepy 7-Foot Dwarf]) && !possessEquipment($item[Miner\'s Pants]))
  1939.         {
  1940.             doLash = true;
  1941.         }
  1942.  
  1943.         if((enemy == $monster[Burly Sidekick]) && !possessEquipment($item[Mohawk Wig]))
  1944.         {
  1945.             doLash = true;
  1946.         }
  1947.  
  1948.         if((enemy == $monster[Spunky Princess]) && !possessEquipment($item[Titanium Assault Umbrella]))
  1949.         {
  1950.             doLash = true;
  1951.         }
  1952.  
  1953.         if((enemy == $monster[Quiet Healer]) && !possessEquipment($item[Amulet of Extreme Plot Significance]))
  1954.         {
  1955.             doLash = true;
  1956.         }
  1957.  
  1958.         if((enemy == $monster[P Imp]) || (enemy == $monster[G Imp]))
  1959.         {
  1960.             if((get_property("cc_pirateoutfit") != "finished") && (get_property("cc_pirateoutfit") != "almost") && (item_amount($item[Hot Wing]) < 3))
  1961.             {
  1962.                 doLash = true;
  1963.             }
  1964.         }
  1965.  
  1966.         if(enemy == $monster[Warehouse Clerk])
  1967.         {
  1968.             int progress = get_property("warehouseProgress").to_int();
  1969.             progress = progress + (8 * item_amount($item[Warehouse Inventory Page]));
  1970.             if(progress < 50)
  1971.             {
  1972.                 doLash = true;
  1973.             }
  1974.         }
  1975.  
  1976.         if(enemy == $monster[Warehouse Guard])
  1977.         {
  1978.             int progress = get_property("warehouseProgress").to_int();
  1979.             progress = progress + (8 * item_amount($item[Warehouse Map Page]));
  1980.             if(progress < 50)
  1981.             {
  1982.                 doLash = true;
  1983.             }
  1984.         }
  1985.  
  1986.         if(doLash)
  1987.         {
  1988.             handleTracker(enemy, "cc_lashes");
  1989.             return "skill lash of the cobra";
  1990.         }
  1991.     }
  1992.  
  1993.     if((item_amount($item[Tattered Scrap of Paper]) > 0) && (!contains_text(combatState, "tatters")))
  1994.     {
  1995.         if((enemy == $monster[Demoninja]) ||
  1996.             (enemy == $monster[Drunken Rat]) ||
  1997.             (enemy == $monster[Bunch of Drunken Rats]) ||
  1998.             (enemy == $monster[Knob Goblin Elite Guard]) ||
  1999.             (enemy == $monster[Drunk Goat]) ||
  2000.             (enemy == $monster[Sabre-Toothed Goat]) ||
  2001.             (enemy == $monster[Bubblemint Twins]) ||
  2002.             (enemy == $monster[Creepy Ginger Twin]) ||
  2003.             (enemy == $monster[Mismatched Twins]) ||
  2004.             (enemy == $monster[Coaltergeist]) ||
  2005.             (enemy == $monster[L imp]) ||
  2006.             (enemy == $monster[W imp]) ||
  2007.             (enemy == $monster[Hellion]) ||
  2008.             (enemy == $monster[Fallen Archfiend]))
  2009.         {
  2010.             set_property("cc_combatHandler", combatState + "(tatters)");
  2011.             return "item tattered scrap of paper";
  2012.         }
  2013.     }
  2014.  
  2015.  
  2016.  
  2017.     if((!contains_text(edCombatState, "talismanofrenenutet")) && (item_amount($item[Talisman of Renenutet]) > 0))
  2018.     {
  2019.         boolean doRenenutet = false;
  2020.         if((enemy == $monster[Cleanly Pirate]) && (item_amount($item[Rigging Shampoo]) == 0))
  2021.         {
  2022.             doRenenutet = true;
  2023.         }
  2024.         if((enemy == $monster[Creamy Pirate]) && (item_amount($item[Ball Polish]) == 0))
  2025.         {
  2026.             doRenenutet = true;
  2027.         }
  2028.         if((enemy == $monster[Curmudgeonly Pirate]) && (item_amount($item[Mizzenmast Mop]) == 0))
  2029.         {
  2030.             doRenenutet = true;
  2031.         }
  2032.         if(enemy == $monster[Possessed Wine Rack])
  2033.         {
  2034.             doRenenutet = true;
  2035.         }
  2036.         if(enemy == $monster[Cabinet of Dr. Limpieza])
  2037.         {
  2038.             doRenenutet = true;
  2039.         }
  2040.         if((enemy == $monster[Quiet Healer]) && !possessEquipment($item[Amulet of Extreme Plot Significance]))
  2041.         {
  2042.             doRenenutet = true;
  2043.         }
  2044.         if(enemy == $monster[Mountain Man])
  2045.         {
  2046.             doRenenutet = true;
  2047.         }
  2048.         if((enemy == $monster[Pygmy Janitor]) && (item_amount($item[Book of Matches]) == 0))
  2049.         {
  2050.             doRenenutet = true;
  2051.         }
  2052.         if(enemy == $monster[Blackberry Bush])
  2053.         {
  2054.             if(!possessEquipment($item[Blackberry Galoshes]) && (item_amount($item[Blackberry]) < 3))
  2055.             {
  2056.                 doRenenutet = true;
  2057.             }
  2058.         }
  2059.         if(my_location() == $location[Wartime Frat House])
  2060.         {
  2061.             if(!possessEquipment($item[Beer Helmet]) || !possessEquipment($item[Bejeweled Pledge Pin]) || !possessEquipment($item[Distressed Denim Pants]))
  2062.             {
  2063.                 doRenenutet = true;
  2064.             }
  2065.         }
  2066.         if((enemy == $monster[Warehouse Clerk]) || (enemy == $monster[Warehouse Guard]))
  2067.         {
  2068.             doRenenutet = true;
  2069.         }
  2070.         if(doRenenutet)
  2071.         {
  2072.             set_property("cc_edCombatHandler", edCombatState + "(talismanofrenenutet)");
  2073.             handleTracker(enemy, "cc_renenutet");
  2074.             set_property("cc_edStatus", "dying");
  2075.             return "item Talisman of Renenutet";
  2076.         }
  2077.     }
  2078.  
  2079.     if((enemy == $monster[Pygmy Orderlies]) && (item_amount($item[Short Writ of Habeas Corpus]) > 0))
  2080.     {
  2081.         return "item short writ of habeas corpus";
  2082.     }
  2083.  
  2084.     if(!ed_needShop() && (my_level() >= 10) && (item_amount($item[Rock Band Flyers]) == 0) && (my_location() != $location[The Hidden Apartment Building]) && (type != to_phylum("Undead")) && (my_mp() > 20) && (my_location() != $location[Barrrney\'s Barrr]))
  2085.     {
  2086.         set_property("cc_edStatus", "dying");
  2087.     }
  2088.  
  2089.     if(get_property("cc_edStatus") == "UNDYING!")
  2090.     {
  2091. #       if((my_location() == $location[The Secret Government Laboratory]) || !ed_needShop())
  2092.         if(my_location() == $location[The Secret Government Laboratory])
  2093.         {
  2094.             if(item_amount($item[Rock Band Flyers]) == 0)
  2095.             {
  2096.                 if((!contains_text(combatState, "love stinkbug")) && have_skill($skill[Summon Love Stinkbug]))
  2097.                 {
  2098.                     set_property("cc_combatHandler", combatState + "(love stinkbug1)");
  2099.                     return "skill summon love stinkbug";
  2100.                 }
  2101.                 if((!contains_text(combatState, "love stinkbug")) && get_property("lovebugsUnlocked").to_boolean())
  2102.                 {
  2103.                     set_property("cc_combatHandler", combatState + "(love stinkbug2)");
  2104.                     return "skill summon love stinkbug";
  2105.                 }
  2106.             }
  2107.         }
  2108.  
  2109.         if(item_amount($item[Dictionary]) > 0)
  2110.         {
  2111. #           string macro = "item dictionary; repeat";
  2112. #           visit_url("fight.php?action=macro&macrotext=" + url_encode(macro), true, true);
  2113.             return "item dictionary";
  2114.         }
  2115.         if(item_amount($item[Seal Tooth]) > 0)
  2116.         {
  2117.             return "item seal tooth";
  2118.         }
  2119.  
  2120.         return "skill Mild Curse";
  2121.     }
  2122.  
  2123.     if((my_mp() >= 15) && (my_location() == $location[The Secret Government Laboratory]) && have_skill($skill[Roar of the Lion]))
  2124.     {
  2125.         if(have_skill($skill[Storm of the Scarab]) && (my_buffedstat($stat[Mysticality]) >= 60))
  2126.         {
  2127.             return "skill Storm of the Scarab";
  2128.         }
  2129.         return "skill Roar of the Lion";
  2130.     }
  2131.  
  2132. #   if((!contains_text(combatState, "love stinkbug")) && have_skill($skill[Summon Love Stinkbug]) && (mcd <= 50))
  2133. #   {
  2134. #       set_property("cc_combatHandler", combatState + "(love stinkbug1)");
  2135. #       return "skill summon love stinkbug";
  2136. #   }
  2137. #   if((!contains_text(combatState, "love stinkbug")) && get_property("lovebugsUnlocked").to_boolean() && (mcd <= 50))
  2138. #   {
  2139. #       set_property("cc_combatHandler", combatState + "(love stinkbug2)");
  2140. #       return "skill summon love stinkbug";
  2141. #   }
  2142.  
  2143.     int fightStat = my_buffedstat(weapon_type(equipped_item($slot[weapon]))) - 20;
  2144.     if((fightStat > monster_defense()) && (round < 20) && ((expected_damage() * 1.1) < my_hp()))
  2145.     {
  2146.         return "attack with weapon";
  2147.     }
  2148.  
  2149.  
  2150.     if((item_amount($item[ice-cold Cloaca Zero]) > 0) && (my_mp() < 15) && (my_maxmp() > 200))
  2151.     {
  2152.         return "item ice-cold Cloaca Zero";
  2153.     }
  2154.     if((my_mp() >= 8) && have_skill($skill[Storm of the Scarab]) && (my_buffedstat($stat[Mysticality]) > 35))
  2155.     {
  2156.         return "skill Storm of the Scarab";
  2157.     }
  2158.  
  2159.     if((enemy.physical_resistance >= 100) || (round >= 25) || ((expected_damage() * 1.25) >= my_hp()))
  2160.     {
  2161.         if((my_mp() >= 5) && have_skill($skill[Fist of the Mummy]))
  2162.         {
  2163.             return "skill Fist of the Mummy";
  2164.         }
  2165.     }
  2166.  
  2167.     if((my_mp() < 5) && (item_amount($item[Holy Spring Water]) > 0))
  2168.     {
  2169.         return "item Holy Spring Water";
  2170.     }
  2171.  
  2172.     if(round >= 29)
  2173.     {
  2174.         print("About to UNDYING too much but have no other combat resolution. Please report this.", "red");
  2175.     }
  2176.  
  2177.     return "skill Mild Curse";
  2178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement