Bug $monster[ancient protector spirit] incorrect id and name

Baden

Member
In ASH on KoLmafia r26118, $monster[ancient protector spirit] has an id = 0 and name = null. This is the same id and name associated with $monster[none].

Code:
> ash $monster[ancient protector spirit]

Returned:    ancient protector spirit
name =>
id => 0
base_hp => 110
base_attack    => 188
base_defense => 157
raw_hp => 80
raw_attack => 158
raw_defense    => 145
base_initiative => 20
raw_initiative => 10
attack_element    => none
defense_element => none
physical_resistance => 100
min_meat    => 0
max_meat => 0
min_sprinkles => 0
max_sprinkles => 0
base_mainstat_exp    => 24.75
phylum => undead
poison => none
boss => false
copyable    => true
image => protspirit.gif
images => aggregate boolean    [string]
  protspirit.gif => true
sub_types =>    aggregate boolean [string]
  ghost => true
random_modifiers    => aggregate boolean [string]
manuel_name => ancient protector spirit
wiki_name    => ancient protector spirit
attributes => HP: 80 Def: 145 Atk: 158    Init: 10 Phys: 100 P: undead GHOST

> ash $monster[none]

Returned: none
name    =>
id => 0
base_hp => 0
base_attack => 0
base_defense    => 0
raw_hp => 0
raw_attack => 0
raw_defense => 0
base_initiative    => 0
raw_initiative => 0
attack_element => none
defense_element    => none
physical_resistance => 0
min_meat => 0
max_meat    => 0
min_sprinkles => 0
max_sprinkles => 0
base_mainstat_exp    => 0.0
phylum => none
poison => none
boss => false
copyable    => false
image =>
images => aggregate boolean [string]
sub_types    => aggregate boolean [string]
random_modifiers => aggregate boolean    [string]
manuel_name =>
wiki_name =>
attributes =>
 

lostcalpolydude

Developer
Staff member
I suppose you want to get an error instead, since there are four different monsters (five really, but one is unavailable) that ambiguously have that name?

ancient protector spirit 0
# --- ancient protector spirits are distinguishable only by location/drop
ancient protector spirit (The Hidden Apartment Building) 442
ancient protector spirit (The Hidden Hospital) 443
ancient protector spirit (The Hidden Office Building) 444
ancient protector spirit (The Hidden Bowling Alley) 445
ancient protector spirit (obsolete) 446
Those are the relevant lines from monsters.txt (with the rest of each line removed because it doesn't matter here). So, what result are you hoping for?
 

Baden

Member
I was expecting monster id to be unique so that I could fetch any monster with just the id. It appears the following monsters all share an id of 0:
  • ancient protector spirit
  • Ed the Undying (1)
  • Ed the Undying (2)
  • Ed the Undying (3)
  • Ed the Undying (4)
  • Ed the Undying (5)
  • Ed the Undying (6)
  • Ed the Undying (7)
  • the darkness (blind)
 

lostcalpolydude

Developer
Staff member
> ash $monster[442]

Returned: ancient protector spirit (The Hidden Apartment Building)
name => ancient protector spirit (The Hidden Apartment Building)
id => 442
You can fetch any real monster with just the ID.
 
Top