cheesecookie
Member
The Beancannon skill is limited to 5 uses per day but is currently not tracked by mafia (in terms of uses, the banish itself is tracked).
I believe this patch is sufficient, and if not, would love to know what I did wrong:
I believe this patch is sufficient, and if not, would love to know what I did wrong:
Code:
Index: src/data/defaults.txt
===================================================================
--- src/data/defaults.txt (revision 18148)
+++ src/data/defaults.txt (working copy)
@@ -1255,6 +1263,7 @@
user _ballpit false
user _banderRunaways 0
user _barrelPrayer false
+user _beanCannonUses 0
user _bearHugs 0
user _beerLensDrops 0
user _bendHellUsed false
Index: src/net/sourceforge/kolmafia/request/FightRequest.java
===================================================================
--- src/net/sourceforge/kolmafia/request/FightRequest.java (revision 18148)
+++ src/net/sourceforge/kolmafia/request/FightRequest.java (working copy)
@@ -1519,6 +1531,25 @@
return;
}
}
+ else if ( skillName.equals( "Beancannon" ) )
+ {
+ // You can only use 5 Beancannon banishes per day
+
+ if ( Preferences.getInteger( "_beanCannonUses" ) >= 5 ||
+ ( !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.FRIGID_BEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.HEIMZ_BEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.HELLFIRE_BEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.MIXED_BEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.PORK_N_BEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.PREMIUM_BEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.TESLA_BEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.STINKBEANS, 1 ) ) &&
+ !KoLCharacter.hasEquipped( ItemPool.get( ItemPool.BLACKEST_EYED_PEAS, 1 ) ) ) )
+ {
+ this.skipRound();
+ return;
+ }
+ }
else if ( skillName.equals( "Release the Boots" ) )
{
// You can only release the boots 7 times per day
@@ -8037,6 +8098,7 @@
case SkillPool.BEANCANNON:
if ( responseText.contains( "tide of beans" ) || skillSuccess )
{
+ Preferences.increment( "_beanCannonUses" );
BanishManager.banishMonster( monsterName, "beancannon" );
EquipmentManager.discardEquipment( EquipmentManager.getEquipment( EquipmentManager.OFFHAND ) );
}