From ac2e3ede1d9cd76aec851e50a2312a4ab548b25a Mon Sep 17 00:00:00 2001 From: p-mcgowan Date: Fri, 21 Nov 2014 23:20:44 -0800 Subject: villagers turn into witches when struck by lightning --- src/Mobs/Villager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp index 5c9999a59..371132dfb 100644 --- a/src/Mobs/Villager.cpp +++ b/src/Mobs/Villager.cpp @@ -37,6 +37,11 @@ bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI) m_World->BroadcastEntityStatus(*this, esVillagerAngry); } } + if (a_TDI.DamageType == dtLightning) + { + m_World->SpawnMob((int) GetPosX(), (int) GetPosY(), (int) GetPosZ(), mtWitch); + super::Destroy(this); + } return true; } -- cgit v1.2.3