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)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-18 22:17:43 +01:00
|
|
|
void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
2013-07-29 12:13:03 +01:00
|
|
|
{
|
2014-02-24 15:38:38 +01:00
|
|
|
UNUSED(a_Killer);
|
2014-02-23 19:44:58 +01:00
|
|
|
if (GetSize() > 1)
|
|
|
|
|
{
|
|
|
|
|
AddRandomUncommonDropItem(a_Drops, 25.0f, E_ITEM_MAGMA_CREAM);
|
|
|
|
|
}
|
2013-07-29 12:13:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-26 22:24:36 +01:00
|
|
|
|
|
|
|
|
|
2015-05-08 20:50:05 -04:00
|
|
|
AString cMagmaCube::GetSizeName(int a_Size)
|
2015-05-06 23:12:17 -04:00
|
|
|
{
|
2017-02-15 07:05:24 +02:00
|
|
|
if (a_Size == 1)
|
2015-05-06 23:12:17 -04:00
|
|
|
{
|
2017-02-15 07:05:24 +02:00
|
|
|
return "small_";
|
2015-05-06 23:12:17 -04:00
|
|
|
}
|
2017-02-15 07:05:24 +02:00
|
|
|
return "";
|
2015-05-06 23:12:17 -04:00
|
|
|
}
|