cheesecookie
Member
I was going through my logs recently and noticed that in some combats when I wanted to use a single item, I actually used 2 of that item (if I had it) via a combat filter, even though I did not use the format for funkslinging.
I wrote a script that verifies the situation by getting 2 gauze garters, going into combat, trying to use 1 but ultimately using both in combat:
The script that generates this:
The actual combat result I am getting is as if I returned "item gauze garter, gauze garter", which is the funkslinging usage format for combat filters.
I wrote a script that verifies the situation by getting 2 gauze garters, going into combat, trying to use 1 but ultimately using both in combat:
Code:
Visit to Manor1: The Haunted Pantry in progress...
[482] The Haunted Pantry
Encounter: fiendish can of asparagus
Round 0: cheesecookie wins initiative!
Round 1: You lose 1 hit point
You have 2 gauze garters.
Round 1: cheesecookie uses the gauze garter and uses the gauze garter!
Round 2: You gain 95 hit points
Round 2: You gain 81 hit points
Round 2: Casablanca Jones whips your opponent in the arm, dealing 36 damage.
Round 2: fiendish can of asparagus takes 36 damage.
Sorry, I can't figure out what "gauze garter" means. Perhaps you have 0.
Used Gauze Garter for testing, done
The script that generates this:
Code:
script "filtertest.ash"
string combatTest(int round, string opp, string text)
{
static int didGauze = 0;
if(didGauze == 1)
{
cli_execute("/count gauze garter");
didGauze = 0;
abort("Used Gauze Garter for testing, done");
}
cli_execute("/count gauze garter");
if(item_amount($item[Gauze Garter]) > 0)
{
didGauze = 1;
return "item gauze garter";
}
return "fail";
}
void main()
{
take_storage(2 - item_amount($item[Gauze Garter]), $item[Gauze Garter]);
take_closet(2 - item_amount($item[Gauze Garter]), $item[Gauze Garter]);
print("Gauze garters: " + item_amount($item[Gauze Garter]), "blue");
cli_execute("/count gauze garter");
adv1($location[The Haunted Pantry], 1, "combatTest");
}
The actual combat result I am getting is as if I returned "item gauze garter, gauze garter", which is the funkslinging usage format for combat filters.