From 501b8fe743c56ad07c5fd8bdd4bfffa13fcb3c4d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 5 Mar 2012 01:30:55 +0200 Subject: Damage groups WIP --- src/tool.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/tool.h') diff --git a/src/tool.h b/src/tool.h index d2a9c13c8..685dfb5f2 100644 --- a/src/tool.h +++ b/src/tool.h @@ -108,5 +108,27 @@ HitParams getHitParams(const ItemGroupList &groups, HitParams getHitParams(const ItemGroupList &groups, const ToolCapabilities *tp); +struct PunchDamageResult +{ + bool did_punch; + int damage; + int wear; + + PunchDamageResult(): + did_punch(false), + damage(0), + wear(0) + {} +}; + +struct ItemStack; + +PunchDamageResult getPunchDamage( + const ItemGroupList &armor_groups, + const ToolCapabilities *toolcap, + const ItemStack *punchitem, + float time_from_last_punch +); + #endif -- cgit v1.2.3