@Override public void execute( Hero hero, String action ) { super.execute(hero, action); if (action.equals(AC_FEED)){ GameScene.selectItem(itemSelector, mode, Messages.get(this, "prompt")); } else if (action.equals(AC_ROOT) && level() > 0){ if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); else if (charge == 0) GLog.i( Messages.get(this, "no_charge") ); else { Buff.prolong(hero, Roots.class, 5); Buff.affect(hero, Earthroot.Armor.class).level(charge); CellEmitter.bottom(hero.pos).start(EarthParticle.FACTORY, 0.05f, 8); Camera.main.shake(1, 0.4f); charge = 0; updateQuickslot(); } } }
@Override public void execute( Hero hero, String action ) { super.execute(hero, action); if (action.equals(AC_FEED)){ GameScene.selectItem(itemSelector, mode, Messages.get(this, "prompt")); } else if (action.equals(AC_ROOT) && level() > 0){ if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); else if (charge == 0) GLog.i( Messages.get(this, "no_charge") ); else { Buff.prolong(hero, Roots.class, 5); Buff.affect(hero, Earthroot.Armor.class).level(charge); CellEmitter.bottom(hero.pos).start(EarthParticle.FACTORY, 0.05f, 8); Camera.main.shake(1, 0.4f); charge = 0; updateQuickslot(); } } }