v3.0.0: fixed recently used item track not being renamed as intended

This commit is contained in:
Evan Debenham
2024-12-11 18:55:55 -05:00
parent 056e9ab95e
commit 99221d1f6d
2 changed files with 9 additions and 9 deletions

View File

@@ -724,7 +724,7 @@ public enum Talent {
&& hero.hasTalent(RECALL_INSCRIPTION)
&& Scroll.class.isAssignableFrom(cls)
&& cls != ScrollOfUpgrade.class){
Buff.prolong(hero, RecallInscription.UsedGlyphTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls;
Buff.prolong(hero, RecallInscription.UsedItemTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls;
}
}
@@ -732,7 +732,7 @@ public enum Talent {
if (hero.heroClass == HeroClass.CLERIC
&& hero.hasTalent(RECALL_INSCRIPTION)
&& Runestone.class.isAssignableFrom(cls)){
Buff.prolong(hero, RecallInscription.UsedGlyphTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls;
Buff.prolong(hero, RecallInscription.UsedItemTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls;
}
}

View File

@@ -60,11 +60,11 @@ public class RecallInscription extends ClericSpell {
@Override
public void onCast(HolyTome tome, Hero hero) {
if (hero.buff(UsedGlyphTracker.class) == null){
if (hero.buff(UsedItemTracker.class) == null){
return;
}
Item item = Reflection.newInstance(hero.buff(UsedGlyphTracker.class).item);
Item item = Reflection.newInstance(hero.buff(UsedItemTracker.class).item);
item.setCurrent(hero);
@@ -84,14 +84,14 @@ public class RecallInscription extends ClericSpell {
}
onSpellCast(tome, hero);
hero.buff(UsedGlyphTracker.class).detach();
hero.buff(UsedItemTracker.class).detach();
}
@Override
public float chargeUse(Hero hero) {
if (hero.buff(UsedGlyphTracker.class) != null){
Class<? extends Item> item = hero.buff(UsedGlyphTracker.class).item;
if (hero.buff(UsedItemTracker.class) != null){
Class<? extends Item> item = hero.buff(UsedItemTracker.class).item;
if (ExoticScroll.class.isAssignableFrom(item)){
if (item == ScrollOfMetamorphosis.class || item == ScrollOfEnchantment.class){
return 8;
@@ -117,10 +117,10 @@ public class RecallInscription extends ClericSpell {
@Override
public boolean canCast(Hero hero) {
return hero.buff(UsedGlyphTracker.class) != null;
return hero.buff(UsedItemTracker.class) != null;
}
public static class UsedGlyphTracker extends FlavourBuff {
public static class UsedItemTracker extends FlavourBuff {
{
type = buffType.POSITIVE;