v3.1.0: fixed errors with tooltips and curse vfx in body form window
This commit is contained in:
+16
-2
@@ -359,18 +359,32 @@ public class Trinity extends ArmorAbility {
|
|||||||
ArrayList<Item> options = new ArrayList<>();
|
ArrayList<Item> options = new ArrayList<>();
|
||||||
for (Class<?> cls : discoveredClasses){
|
for (Class<?> cls : discoveredClasses){
|
||||||
if (Weapon.Enchantment.class.isAssignableFrom(cls)){
|
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){
|
if (Dungeon.hero.belongings.weapon() != null){
|
||||||
w.image = Dungeon.hero.belongings.weapon().image;
|
w.image = Dungeon.hero.belongings.weapon().image;
|
||||||
}
|
}
|
||||||
w.enchant((Weapon.Enchantment) Reflection.newInstance(cls));
|
w.enchant((Weapon.Enchantment) Reflection.newInstance(cls));
|
||||||
|
w.cursedKnown = true;
|
||||||
options.add(w);
|
options.add(w);
|
||||||
} else if (Armor.Glyph.class.isAssignableFrom(cls)) {
|
} 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){
|
if (Dungeon.hero.belongings.armor() != null){
|
||||||
a.image = Dungeon.hero.belongings.armor().image;
|
a.image = Dungeon.hero.belongings.armor().image;
|
||||||
}
|
}
|
||||||
a.inscribe((Armor.Glyph) Reflection.newInstance(cls));
|
a.inscribe((Armor.Glyph) Reflection.newInstance(cls));
|
||||||
|
a.cursedKnown = true;
|
||||||
options.add(a);
|
options.add(a);
|
||||||
} else {
|
} else {
|
||||||
options.add((Item) Reflection.newInstance(cls));
|
options.add((Item) Reflection.newInstance(cls));
|
||||||
|
|||||||
Reference in New Issue
Block a user