Files
cuberite-2a/src/Mobs/MagmaCube.cpp
T

48 lines
688 B
C++
Raw Normal View History

2013-07-29 12:13:03 +01:00
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
2014-04-23 15:25:10 -07:00
#include "MagmaCube.h"
2013-07-29 12:13:03 +01:00
2013-09-18 22:17:43 +01:00
cMagmaCube::cMagmaCube(int a_Size) :
2021-04-06 16:09:16 +01:00
Super(
"MagmaCube",
mtMagmaCube,
Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()),
Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()),
"",
0.51f * a_Size,
0.51f * a_Size
),
2013-07-29 12:13:03 +01:00
m_Size(a_Size)
{
}
AString cMagmaCube::GetSizeName(int a_Size)
2013-07-29 12:13:03 +01:00
{
if (a_Size == 1)
{
return "small_";
}
return "";
2013-07-29 12:13:03 +01:00
}
void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
2015-05-06 23:12:17 -04:00
{
UNUSED(a_Killer);
if (GetSize() > 1)
2015-05-06 23:12:17 -04:00
{
AddRandomUncommonDropItem(a_Drops, 25.0f, E_ITEM_MAGMA_CREAM);
2015-05-06 23:12:17 -04:00
}
}