lava and acid bubbles do not explode at animals which resist corrosion

alut-include-path
Maikel de Vries 2017-03-26 18:41:22 +02:00
parent bcecff2811
commit a435a6db1a
3 changed files with 6 additions and 6 deletions

View File

@ -280,7 +280,7 @@ local MaxEnergy = 10000;
local MaxBreath = 10000;
local NoBurnDecay = 1;
local ContactIncinerate = 15;
local CorrosionResist = 1;
local CorrosionResist = true;
local BorderBound = C4D_Border_Sides;
local ContactCalls = true;

View File

@ -34,7 +34,7 @@ private func FxMoveTimer(object target, effect fx, int time)
DoCon(2);
// Causes bubbles to repel each other.
var nearby_bubble = FindObject(Find_Distance(GetCon()/15, 0, 0), Find_ID(GetID()));
var nearby_bubble = FindObject(Find_Distance(GetCon() / 15), Find_ID(GetID()));
if (nearby_bubble)
{
SetXDir(-(nearby_bubble->GetX() - GetX()) / 2);
@ -43,7 +43,7 @@ private func FxMoveTimer(object target, effect fx, int time)
// Deep green bubbles explode when near a living thing.
if (fx.is_explosive)
{
var prey = FindObject(Find_Distance(GetCon()/15, 0, 0), Find_OCF(OCF_Alive));
var prey = FindObject(Find_Distance(GetCon() / 15), Find_OCF(OCF_Alive), Find_Not(Find_Property("CorrosionResist")));
if (prey)
{
Explode(10);

View File

@ -48,9 +48,9 @@ private func FxMoveTimer(object target, effect, int time)
if (Inside(GetXDir(), -6, 6))
SetXDir(GetXDir() + 2 * Random(2) - 1);
// Explodes near living things
var prey = FindObject(Find_Distance(GetCon()/15, 0, 0), Find_OCF(OCF_Alive));
if(prey != nil)
// Explodes near living things.
var prey = FindObject(Find_Distance(GetCon() / 15), Find_OCF(OCF_Alive), Find_Not(Find_Property("CorrosionResist")));
if (prey)
Explode(10);
return FX_OK;
}