Added Iron Apple which heals 4 Hearts

This commit is contained in:
sfan5 2011-09-12 20:10:17 +02:00
parent 785a2fd23a
commit 88dc8c694e
3 changed files with 20 additions and 0 deletions

BIN
data/apple_iron.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

@ -428,6 +428,20 @@ InventoryItem *craft_get_result(InventoryItem **items)
return new MaterialItem(CONTENT_LADDER, 1);
}
}
// Iron Apple
{
ItemSpec specs[9];
specs[1] = ItemSpec(ITEM_CRAFT, "steel_ingot");
specs[3] = ItemSpec(ITEM_CRAFT, "steel_ingot");
specs[4] = ItemSpec(ITEM_CRAFT, "apple");
specs[5] = ItemSpec(ITEM_CRAFT, "steel_ingot");
specs[7] = ItemSpec(ITEM_CRAFT, "steel_ingot");
if(checkItemCombination(items, specs))
{
return new CraftItem("apple_iron", 1);
}
}
return NULL;
}

@ -73,6 +73,8 @@ std::string item_craft_get_image_name(const std::string &subname)
return "firefly.png";
else if(subname == "apple")
return "apple.png";
else if(subname == "apple_iron")
return "apple_iron.png";
else
return "cloud.png"; // just something
}
@ -130,6 +132,8 @@ bool item_craft_is_eatable(const std::string &subname)
return true;
else if(subname == "apple")
return true;
else if(subname == "apple_iron")
return true;
return false;
}
@ -139,6 +143,8 @@ s16 item_craft_eat_hp_change(const std::string &subname)
return 6; // 3 hearts
else if(subname == "apple")
return 4; // 2 hearts
else if(subname == "apple_iron")
return 8; // 4 hearts
return 0;
}