return onMap.tile[onX][onY].items.items.get(onMap.tile[onX][onY].items.items.size() - 1);
}
public GenericUnit produceUnit(int creatureID, int onX, int onY, TilelessMap onMap) {
Unit newUnit;
newUnit = new Unit(onX, onY, creatureID, onMap);
if (onMap != null) {
onMap.placeUnit(onX, onY, newUnit);
//Log.info("Placed unit");
} else {
Log.error("No map!");
//Detonator.INSTANCE.units.add(newUnit);
}
if (newUnit.creature.hasTag("pc")) {
onMap.player = newUnit;
}
if (Detonator.INSTANCE.useGDXImages) {
newUnit.setImage(newUnit.creature.masterImage);
}
if (newUnit.creature.cards != null) {
Log.warn("DECK TIME");
newUnit.deck = new Deck();