void KrakenAttack(aref rCharacter, int iSwimQuantity)
// Character and number of tentacles
{
if (!bSeaActive) return;
int delay = 0;
for (int i=0; i < iSwimQuantity; i++)
{
PostEvent("CreateKrakenTentacle", delay, "i", rCharacter);
delay = delay + rand(2000);
}
}
#event_handler("CreateKrakenTentacle", "KrakenTentacle");
void KrakenTentacle()
{
if (!bSeaActive) return;
aref rCharacter = GetEventData();
if(CheckAttribute(rCharacter,"Ship"))
{
switch(rand(15))
{
case 0: Direct_AddGood(rCharacter, "Oil", "tentacle1_0", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 1: Direct_AddGood(rCharacter, "Oil", "tentacle1_90", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 2: Direct_AddGood(rCharacter, "Oil", "tentacle1_180", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 3: Direct_AddGood(rCharacter, "Oil", "tentacle1_270", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 4: Direct_AddGood(rCharacter, "Oil", "tentacle2_0", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 5: Direct_AddGood(rCharacter, "Oil", "tentacle2_90", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 6: Direct_AddGood(rCharacter, "Oil", "tentacle2_180", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 7: Direct_AddGood(rCharacter, "Oil", "tentacle2_270", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 8: Direct_AddGood(rCharacter, "Oil", "tentacle3_0", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 9: Direct_AddGood(rCharacter, "Oil", "tentacle3_90", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 10: Direct_AddGood(rCharacter, "Oil", "tentacle3_180", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 11: Direct_AddGood(rCharacter, "Oil", "tentacle3_270", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 12: Direct_AddGood(rCharacter, "Oil", "tentacle4_0", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 13: Direct_AddGood(rCharacter, "Oil", "tentacle4_90", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 14: Direct_AddGood(rCharacter, "Oil", "tentacle4_180", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
case 15: Direct_AddGood(rCharacter, "Oil", "tentacle4_270", 0.0, 105, 10 + rand(20), Degree2Radian(rand(360))); break;
}
}
}