Esempio n. 1
0
  @Override
  public boolean attachTo(Char target) {
    if (super.attachTo(target)) {

      target.paralysed = true;
      Burning.detach(target, Burning.class);

      if (target instanceof Hero) {
        Hero hero = (Hero) target;
        Item item = hero.belongings.randomUnequipped();
        if (item instanceof MysteryMeat) {

          item = item.detach(hero.belongings.backpack);
          FrozenCarpaccio carpaccio = new FrozenCarpaccio();
          if (!carpaccio.collect(hero.belongings.backpack)) {
            Dungeon.level.drop(carpaccio, target.pos).sprite.drop();
          }
        }
      }

      return true;
    } else {
      return false;
    }
  }
Esempio n. 2
0
 public ItemSprite(Item item) {
   this(item.image(), item.glowing());
 }