v3.1.0: fixed errors with tooltips and curse vfx in body form window

This commit is contained in:
Evan Debenham
2025-04-20 11:30:25 -04:00
parent 9a5748ebe1
commit 1b04254c8f

View File

@@ -359,18 +359,32 @@ public class Trinity extends ArmorAbility {
ArrayList<Item> options = new ArrayList<>();
for (Class<?> cls : discoveredClasses){
if (Weapon.Enchantment.class.isAssignableFrom(cls)){
MeleeWeapon w = new WornShortsword();
MeleeWeapon w = new WornShortsword(){
@Override
public String name() {
//for button tooltips
return enchantment.name();
}
};
if (Dungeon.hero.belongings.weapon() != null){
w.image = Dungeon.hero.belongings.weapon().image;
}
w.enchant((Weapon.Enchantment) Reflection.newInstance(cls));
w.cursedKnown = true;
options.add(w);
} else if (Armor.Glyph.class.isAssignableFrom(cls)) {
Armor a = new ClothArmor();
Armor a = new ClothArmor(){
@Override
public String name() {
//for button tooltips
return glyph.name();
}
};
if (Dungeon.hero.belongings.armor() != null){
a.image = Dungeon.hero.belongings.armor().image;
}
a.inscribe((Armor.Glyph) Reflection.newInstance(cls));
a.cursedKnown = true;
options.add(a);
} else {
options.add((Item) Reflection.newInstance(cls));