summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/CliffPushing.c4d/Extra.c4d/OGoblet.c4d/Script.c
blob: a0400370c9e62312e01461a09797cf77b46b479d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*-- Kelch --*/

#strict

local iTimer;

func Initialize()
  {
  return(1);
  }

func FillCheck()
  {
  if(!Contained())
      if(Inside(GetR(), 20, 340))
        Hit();
    if(!(iTimer%5))
    {
    var iX = Sin(GetR(), RandomX(-4,4) );
    var iY = -Cos(GetR(), RandomX(-4,1) );
    if(!Contained())
      CreateParticle("NoGravSpark", iX, iY,0,0,RandomX(25, 55),RGBa(255,255,0,120));
    }
  iTimer++;
  if(iTimer>=10) 
    {
    if(GetOCF(Contained()) & OCF_CrewMember())
      DoEnergy(+15, Contained());
    iTimer=0;
    }
  return(1);
  }

func Hit()
  {
  if(!GBackLiquid())
    {
    for(var i=15; i>0; i--)
      {
      var iX=Sin(GetR(), RandomX(4,8)), iY=-Cos(GetR(), RandomX(4,8)), iXDir=GetWind()*30/100, iYDir=-Cos(GetR()+RandomX(-2,2), Random(7));
      InsertMaterial(Material("Water"), iX, iY, iXDir, iYDir);
      }
    SetEmpty();
    }
  }

private func SetEmpty()
  {
  ChangeDef(EGBL);
  return(1);
  }
  
// Mit Kelch: Aufwertung zum Magus
public func GetRevaluationCombo() { return(MAGE); }