1
0
Fork 0
cuberite-2a/src/Mobs/MagmaCube.cpp

40 lines
663 B
C++
Raw Normal View History

#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
2014-04-23 22:25:10 +00:00
#include "MagmaCube.h"
cMagmaCube::cMagmaCube(int a_Size) :
2017-02-15 05:05:24 +00:00
super("MagmaCube", mtMagmaCube, Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()), Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()), 0.6 * a_Size, 0.6 * a_Size),
m_Size(a_Size)
{
}
void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{
UNUSED(a_Killer);
if (GetSize() > 1)
{
AddRandomUncommonDropItem(a_Drops, 25.0f, E_ITEM_MAGMA_CREAM);
}
}
AString cMagmaCube::GetSizeName(int a_Size)
{
2017-02-15 05:05:24 +00:00
if (a_Size == 1)
{
2017-02-15 05:05:24 +00:00
return "small_";
}
2017-02-15 05:05:24 +00:00
return "";
}