1
0

Cave spider now poisons its victim, added IsPawn function to Entity

This commit is contained in:
archshift
2014-06-11 16:21:47 -07:00
parent 814cdca054
commit 71b4c49490
5 changed files with 24 additions and 5 deletions

View File

@@ -27,6 +27,21 @@ void cCaveSpider::Tick(float a_Dt, cChunk & a_Chunk)
void cCaveSpider::Attack(float a_Dt)
{
super::Attack(a_Dt);
if (m_Target->IsPawn())
{
// TODO: Easy = no poison, Medium = 7 seconds, Hard = 15 seconds
((cPawn *) m_Target)->AddEntityEffect(cEntityEffect::effPoison, cEntityEffect(140, 0, this));
}
}
void cCaveSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{
int LootingLevel = 0;