wipf: dig free is covered with earth (#1703)

liquid_container
Maikel de Vries 2016-03-09 20:54:43 +01:00
parent 21cbf97562
commit 21c5f63d44
1 changed files with 12 additions and 0 deletions

View File

@ -61,6 +61,14 @@ public func FxIntActivityTimer(object target, proplist effect, int time)
if (Contained())
return FX_OK;
// Start digging if stuck.
if (Stuck())
{
SetAction("Dig");
SetDigDirection(Random(2) * 2 - 1, Random(2) * 2 - 1);
return FX_OK;
}
// Actions when standing.
if (IsStanding())
{
@ -115,6 +123,10 @@ public func FxIntActivityTimer(object target, proplist effect, int time)
// Actions on digging.
if (IsDigging())
{
// If the wipf if stuck while digging digfree the full wipf's shape.
if (Stuck())
DigFree(GetX(), GetY(), 8);
// Change digging direction.
if (!Random(3))
{