Bug - Fixed is_banished() returns false on certain banished monsters

Ezandora

Member
r13909 OS X 10.9.2

is_banished() returns false for banished monsters KOLMafia appears to be tracking properly.
To reproduce: ice house an A.M.C. Gremlin, then run ash is_banished($monster[a.m.c. gremlin]);

Code:
> banishes

Monsters Banished
Banished By
On Turn
Turns Left
a.m.c. gremlin
ice house
2669
Until Ice House opened
flock of stab-bats
pantsgiving
301
29

> ash $monster[flock of stab-bats].is_banished();

Returned: false

> ash $monster[a.m.c. gremlin].is_banished();

Returned: false

> get banishedMonsters

a.m.c. gremlin:ice house:2669:flock of stab-bats:pantsgiving:301


This may be due to the comparison in BanishManager.java, line 424, in the function isBanished():

Code:
if ( current.getMonsterName().equals( monster ) )

The banish manager may be storing monster names lower-case, then comparing against the regular-case monster names?
If I convert the comparison to lower-case, is_banished returns true for both A.M.C. gremlin and Flock of Stab-Bats. Not sure if that's the ideal fix, may want to investigate the case issue further?
 
Top