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

40 lines
667 B
C++
Raw Normal View History

#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
2014-04-23 18:25:10 -04:00
#include "MagmaCube.h"
cMagmaCube::cMagmaCube(int a_Size) :
2020-03-22 11:50:34 -04: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 00:05:24 -05:00
if (a_Size == 1)
{
2017-02-15 00:05:24 -05:00
return "small_";
}
2017-02-15 00:05:24 -05:00
return "";
}