Do tell! I am very curious to learn what data change you think will make KoLmafia "shrug" timer effects.This should be easy to fix - a data update for effects.txt is all that's needed.
public static final boolean isRemovable( final int effectId )
{
// http://forums.kingdomofloathing.com/vb/showthread.php?t=195401
//
// The following effects should now no longer be removable by any means:
// Goofball Withdrawal
// Soul-Crushing Headache
// Coated in Slime
// Everything Looks Yellow
// Everything Looks Blue
// Everything Looks Red
// Timer effects
switch ( effectId )
{
case -1:
// So, what about the following?
case EffectPool.EAU_DE_TORTUE_ID:
case EffectPool.CURSED_BY_RNG_ID:
case EffectPool.FORM_OF_BIRD_ID:
case EffectPool.GOOFBALL_WITHDRAWAL_ID:
case EffectPool.SOUL_CRUSHING_HEADACHE_ID:
case EffectPool.COVERED_IN_SLIME_ID:
case EffectPool.EVERYTHING_LOOKS_YELLOW_ID:
case EffectPool.EVERYTHING_LOOKS_BLUE_ID:
case EffectPool.EVERYTHING_LOOKS_RED_ID:
case EffectPool.TIMER1_ID:
case EffectPool.TIMER2_ID:
case EffectPool.TIMER3_ID:
case EffectPool.TIMER4_ID:
case EffectPool.TIMER5_ID:
case EffectPool.TIMER6_ID:
case EffectPool.TIMER7_ID:
case EffectPool.TIMER8_ID:
case EffectPool.TIMER9_ID:
case EffectPool.TIMER10_ID:
return false;
default:
return true;
}
}
if ( !UneffectRequest.isRemovable( this.effectId ) )
if ( !UneffectRequest.isRemovable( this.effectId ) || !UneffectRequest.isShruggable( this.effect.getName() ) )
public UneffectRequest( final AdventureResult effect )
{
super( UneffectRequest.isShruggable( effect.getName() ) ? "charsheet.php" : "uneffect.php" );
this.effect = effect;
String name = effect.getName();
this.effectId = EffectDatabase.getEffectId( name );
[B] this.isShruggable = UneffectRequest.isShruggable( name );[/B]
this.isTimer = name.startsWith( "Timer " );
if ( this.isShruggable )
{
[B] this.addFormField( "action", "unbuff" );[/B]
this.addFormField( "ajax", "1" );
this.addFormField( "whichbuff", String.valueOf( this.effectId ) );
}
public static final boolean isShruggable( final String effectName )
{
[B] if ( effectName.startsWith( "Timer " ) )[/B]
{
return true;
}
Code:public static final boolean isShruggable( final String effectName ) { [B] if ( effectName.startsWith( "Timer " ) )[/B] { return true; }