summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.h
diff options
context:
space:
mode:
authorTheJumper <maximilian.springer@web.de>2014-02-23 19:44:58 +0100
committerTheJumper <maximilian.springer@web.de>2014-02-23 19:50:51 +0100
commit2cc597372afddbd798c2a8c2e754b3f9c7a36038 (patch)
treebb5202265e994a69e16041a86e8199563ee6e940 /src/Mobs/Monster.h
parentBlockBed.cpp: Fixed Multiple people in one bed. (diff)
downloadcuberite-2cc597372afddbd798c2a8c2e754b3f9c7a36038.tar
cuberite-2cc597372afddbd798c2a8c2e754b3f9c7a36038.tar.gz
cuberite-2cc597372afddbd798c2a8c2e754b3f9c7a36038.tar.bz2
cuberite-2cc597372afddbd798c2a8c2e754b3f9c7a36038.tar.lz
cuberite-2cc597372afddbd798c2a8c2e754b3f9c7a36038.tar.xz
cuberite-2cc597372afddbd798c2a8c2e754b3f9c7a36038.tar.zst
cuberite-2cc597372afddbd798c2a8c2e754b3f9c7a36038.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index 4d2e099c5..49d0cf9ef 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -5,6 +5,7 @@
#include "../Defines.h"
#include "../BlockID.h"
#include "../Item.h"
+#include "../Enchantments.h"
@@ -118,6 +119,19 @@ public:
void SetAttackDamage(int a_AttackDamage) { m_AttackDamage = a_AttackDamage; }
void SetSightDistance(int a_SightDistance) { m_SightDistance = a_SightDistance; }
+ float GetDropChanceWeapon() { return m_DropChanceWeapon; }
+ float GetDropChanceHelmet() { return m_DropChanceHelmet; }
+ float GetDropChanceChestplate() { return m_DropChanceChestplate; }
+ float GetDropChanceLeggings() { return m_DropChanceLeggings; }
+ float GetDropChanceBoots() { return m_DropChanceBoots; }
+ bool CanPickUpLoot() { return m_CanPickUpLoot; }
+ void SetDropChanceWeapon(float a_DropChanceWeapon) { m_DropChanceWeapon = a_DropChanceWeapon; }
+ void SetDropChanceHelmet(float a_DropChanceHelmet) { m_DropChanceHelmet = a_DropChanceHelmet; }
+ void SetDropChanceChestplate(float a_DropChanceChestplate) { m_DropChanceChestplate = a_DropChanceChestplate; }
+ void SetDropChanceLeggings(float a_DropChanceLeggings) { m_DropChanceLeggings = a_DropChanceLeggings; }
+ void SetDropChanceBoots(float a_DropChanceBoots) { m_DropChanceBoots = a_DropChanceBoots; }
+ void SetCanPickUpLoot(bool a_CanPickUpLoot) { m_CanPickUpLoot = a_CanPickUpLoot; }
+
/// Sets whether the mob burns in daylight. Only evaluated at next burn-decision tick
void SetBurnsInDaylight(bool a_BurnsInDaylight) { m_BurnsInDaylight = a_BurnsInDaylight; }
@@ -220,10 +234,31 @@ protected:
float m_AttackInterval;
int m_SightDistance;
+ float m_DropChanceWeapon;
+ float m_DropChanceHelmet;
+ float m_DropChanceChestplate;
+ float m_DropChanceLeggings;
+ float m_DropChanceBoots;
+ bool m_CanPickUpLoot;
+
void HandleDaylightBurning(cChunk & a_Chunk);
bool m_BurnsInDaylight;
+ /** Adds a random number of a_Item between a_Min and a_Max to itemdrops a_Drops*/
void AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth = 0);
+
+ /** Adds a item a_Item with the chance of a_Chance (in percent) to itemdrops a_Drops*/
+ void AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short a_Item, short a_ItemHealth = 0);
+
+ /** Adds one rare item out of the list of rare items a_Items modified by the looting level a_LootingLevel(I-III or custom) to the itemdrop a_Drops*/
+ void AddRandomRareDropItem(cItems & a_Drops, cItems & a_Items, short a_LootingLevel);
+
+ /** Adds armor that is equipped with the chance of 8,5% (Looting 3: 11,5%) to the drop*/
+ void AddRandomArmorDropItem(cItems & a_Drops, short a_LootingLevel);
+
+ /** Adds weapon that is equipped with the chance of 8,5% (Looting 3: 11,5%) to the drop*/
+ void AddRandomWeaponDropItem(cItems & a_Drops, short a_LootingLevel);
+
} ; // tolua_export