By the way, here's my horrible version that seems to actually work (kinda).
Main Issues:
1) Not really macroable, I'm just exploiting BatBrain's damage formulas (biggest issue, it takes like 15 seconds per combat)
2) Since I didn't know how to get the maximum possible damage, I took the expected damage and multiplied by 1.5 (number picked out of the air)
3) If I wasn't using this in aftercore, I'm pretty sure I would get beaten-up because it takes 8-12 rounds per combat.
4) Pretty sure I'm using some square peg in round hole programming.
Main Issues:
1) Not really macroable, I'm just exploiting BatBrain's damage formulas (biggest issue, it takes like 15 seconds per combat)
2) Since I didn't know how to get the maximum possible damage, I took the expected damage and multiplied by 1.5 (number picked out of the air)
3) If I wasn't using this in aftercore, I'm pretty sure I would get beaten-up because it takes 8-12 rounds per combat.
4) Pretty sure I'm using some square peg in round hole programming.
Code:
import "SmartStasis.ash";
//don't want to use any combat items except a seal tooth
boolean only_tooth(advevent a) {
matcher aid = create_matcher("(use )(?:(\\d+),?(\\d+)?)?",a.id);
if(aid.find())
{
switch(aid.group(1)+aid.group(2)) {
case "use 2":
return false;
}
return true;
}
return false;
}
advevent attack_downto(int targethp)
{
sort opts by -dmg_dealt(value.dmg);
foreach i,opt in opts
{
if ( (dmg_dealt(opt.dmg) == 0) ||
(monster_stat("hp") - ceil(dmg_dealt(oneround(opt).dmg))) < targethp ||
(opt.id == get_action("attack").id) ||
only_tooth(opt))
{
continue;
}
//if it isn't a seal tooth, multiple by 1.5, just to make sure we don't go below 24
//by accident
if(opt.id != "use 2" && opt.id != "skill 3020" &&
(monster_stat("hp") - ceil(dmg_dealt(oneround(opt).dmg))*1.5) < targethp)
{
continue;
}
print("Attack action chosen: "+opt.id,8);
print("Should deal: "+dmg_dealt(oneround(opt).dmg));
return opt;
}
return new advevent;
}
boolean main(int initround, monster foe, string pg)
{
//init page
page = act(pg);
//always stun
enqueue(get_action($skill[entangling noodles]));
while (monster_stat("hp") > 24)
{
enqueue(attack_downto(24));
macro();
reset_queue();
print("Monster HP:"+monster_stat("hp"));
}
reset_queue();
print("Should be at 24 HP, Comboing now.");
enqueue(get_action($skill[Disco Dance II: Electric Boogaloo]));
enqueue(get_action($skill[Disco Dance of Doom]));
macro(get_action($skill[Disco Face Stab]));
}
Last edited: