Karma discarding

morgad

Member
Question: when you press thsi discard karma button in the relay browser when in the gash, should it discard all Karma, or just one?
(on todays run for me it only discarded one - my other is now in storage)

on a related note, would it be worth me putting in a feature request for a Mafia option to auto-discard any Karma as soon as it is aquired?
I tried sticking
Code:
void bbb() {

...
   switch (get_property("lastEncounter")) {

...
      case "The Naughty Sorceress (3)": visit_url("inventory.php?which=1&action=discard&whichitem=4448&ajax=1?undefined"); break; <===
in BestBetweenBattle, but it did not do anything.

best regards
Dave
 

Bale

Minion
It is supposed to discard only one karma. That made a lot of sense when the purpose of karma was different.

I'm not sure if people want a link to discard all karma, but I suppose it is worth a feature request to see if others agree with you.

That's not the best way to discard all karma. I'd put a bit into my preAscensionScript checking while(item_amount($item[instant karma]) > 1)
 

slyz

Developer
on a related note, would it be worth me putting in a feature request for a Mafia option to auto-discard any Karma as soon as it is aquired?
Hum, no. Why would Mafia do that automatically? What about people who don't want to discard their Karma?
visit_url("inventory.php?which=1&action=discard&whichitem=4448&ajax=1?undefined");
try with:
Code:
visit_url( "inventory.php?which=1&action=discard&pwd=" + my_hash()   + "&whichitem=4448&ajax=1" );
 

Bale

Minion
Or since mafia automatically adds my_hash()...

Code:
visit_url( "inventory.php?which=1&action=discard&pwd&whichitem=4448&ajax=1" );
 

slyz

Developer
Maybe the problem is "The Naughty Sorceress (3)". I wonder if lastEncounter is really that after finishing the NS fight.
 

Bale

Minion
I'm not sure about lastEncounter, but I know that is the correct value for last_monster() unless you're in a "Bees Hate You" run.
 

Veracity

Developer
Staff member
If you want to discard every karma as soon as you get it, you could simply check to see if you have a karma in inventory. If you have any you don't want to discard, leave them in storage or your closet.
 

fronobulax

Developer
Staff member
Perhaps related, when I last used the Discard Karma link from the pre-ascension page it discarded one but did not update the count of karma on hand.
 

morgad

Member
Or since mafia automatically adds my_hash()...

Code:
visit_url( "inventory.php?which=1&action=discard&pwd&whichitem=4448&ajax=1" );

Thanks Bale. I have stuck this in DiscardKarma.ash, and will experiment with adding a button to my custom daily deeds button later.
(and updating BBB, or making a pre-assension script)

@slyz - you missed the *option* word in my post, I was thinking of something similar to Mafia's Clover protection, but did not express myself very well ...

best regards
Dave
 

slyz

Developer
I did miss the "option" part. Even so, it seems like KoLMafia devs have always tried to avoid adding checkboxes and options as much as possible.
 

morgad

Member
Yep - simple is better. :)
Given the lack of people diving on this thread saying they want Karma protection, I will not waste any Dev time by making a feature request.

Dave
 

Theraze

Active member
Well, the standard dev response, as far as I'm aware, is that if it's useful, not provided by a script, and they have time... then maybe. If it's not considered by them to be generally useful, provided for by a script, or they're all busy... nope.

This might be useful for some, but does definitely fall under the second category. There's already a preAscension script setting where you can do a script for anything you want to happen on ascension, such as grabbing your free goofballs if you haven't yet, discarding all of your karma, crafting key lime pies, and any of those other things that the ascension warning window tells you about.

As such, it's unlikely to gain dev approval because it's already easily possible...
 
Top