From 34e0bc759326803ead6e752533b402ff32db9dd2 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 20 Aug 2014 18:56:31 -0600 Subject: Got the new mob classes implemented. --- src/Mobs/NewWither.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/Mobs/NewWither.cpp (limited to 'src/Mobs/NewWither.cpp') diff --git a/src/Mobs/NewWither.cpp b/src/Mobs/NewWither.cpp new file mode 100644 index 000000000..c4f26f1da --- /dev/null +++ b/src/Mobs/NewWither.cpp @@ -0,0 +1,42 @@ + +#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules + +#include "NewWither.h" + +#include "../World.h" +#include "../Entities/Player.h" + + + + + +cNewWither::cNewWither(void) : + super("Wither", mtWither, "mob.wither.hurt", "mob.wither.death", 0.9, 4.0) +{ + SetMaxHealth(300); +} + + + + + +bool cNewWither::Initialize(cWorld & a_World) +{ + // Set health before BroadcastSpawnEntity() + SetHealth(GetMaxHealth() / 3); + + return super::Initialize(a_World); +} + + + + + +void cNewWither::GetDrops(cItems & a_Drops, cEntity * a_Killer) +{ + AddRandomDropItem(a_Drops, 1, 1, E_ITEM_NETHER_STAR); +} + + + + -- cgit v1.2.3