User Tools

Site Tools


mr:tengu_liver_item

Tengu Liver Item - Code References

Tengu Liver

Tengu Liver is a special collectible item in Remixed Dungeon. It is dropped by Tengu boss when defeated by the Gnoll hero class, and allows the Gnoll to choose a subclass.

Java Classes

This entity is implemented in Lua, no Java class exists. Related Java classes:

  • Item pickup validation: ``RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/Tengu.java``
  • Badge validation: ``RemixedDungeon/src/main/java/com/watabou/pixeldungeon/Badges.java``

JSON Configuration

This entity is implemented in Lua, no JSON configuration found. Check:

  • RemixedDungeon/src/main/assets/itemsDesc/*.json
  • RemixedDungeon/src/main/assets/spritesDesc/tengu_liver.json

String Resources

English string resources:

<string name="TenguLiver_Name">Tengu liver</string>
<string name="TenguLiver_Info">A strange trophy dropped by Tengu when killed by Gnoll.</string>

Russian string resources (values-ru/strings_all.xml):

<string name="TenguLiver_Name">Печень Тенгу</string>
<string name="TenguLiver_Info">Странный трофей, выпадающий из Тенгу, когда его убивает Гнолл.</string>

Lua Scripts

  • TenguLiver.lua - Main item implementation
  • Location: ``RemixedDungeon/src/main/assets/scripts/items/TenguLiver.lua``

Script Details:

return item.init{
    desc  = function ()
        return {
            image     = 1,
            imageFile = "items/mastery_items.png",
            name      = "TenguLiver_Name",
            info      = "TenguLiver_Info",
            defaultAction = "Food_ACEat",
            price         = 0
        }
    end,
 
    actions = function() return {RPD.Actions.eat} end,
 
    execute = function(self, item, hero, action)
        if action == RPD.Actions.eat then
            local wnd = luajava.newInstance(RPD.Objects.Ui.WndChooseWay, hero, item,
                hero:getSubClassByName("GUARDIAN"), hero:getSubClassByName("WITCHDOCTOR") )
            RPD.GameScene:show(wnd)
        end
    end,
 
    onPickUp = function(self, item, chr)
        RPD.Badges:validateMastery(chr:getHeroClass())
    end
}

Item Properties:

  • Image ID: 1 (from items/mastery_items.png sprite sheet)
  • Sprite Sheet: ``items/mastery_items.png``
  • Default Action: ``Food_ACEat`` (eat action)
  • Price: 0 (cannot be sold)
  • Action: Eat (consumes the item to choose subclass)

Behavior:

  • On Eat: Opens ``WndChooseWay`` dialog to choose between Guardian or Witchdoctor subclass
  • On Pickup: Validates mastery badge for Gnoll hero class
  • Drop Condition: Only drops when Tengu is killed by Gnoll class

Drop Conditions

  • Source: Tengu boss
  • Requirement: Must be killed by Gnoll hero class
  • Quantity: One per run (when conditions met)
  • Purpose: Subclass selection item for Gnoll class
  • Boss mob: Tengu
  • Hero class: Gnoll
  • Subclasses: Guardian, Witchdoctor
  • UI: ``WndChooseWay`` (subclass selection dialog)
mr/tengu_liver_item.txt · Last modified: by 127.0.0.1