forked from Mirrors/openclonk
32 lines
506 B
C
32 lines
506 B
C
#appendto JarOfWinds
|
|
local charges;
|
|
|
|
|
|
protected func ControlUse(object pClonk, iX, iY)
|
|
{
|
|
|
|
if(!GetEffect("JarReload",this))
|
|
{
|
|
if(!GBackLiquid())
|
|
{
|
|
FireWeapon(pClonk, iX, iY);
|
|
charges++;
|
|
if(charges>5)
|
|
{
|
|
CastParticles("Magic",30,18,0,0,16,32,RGB(0,0,255),RGB(128,128,255));
|
|
RemoveObject();
|
|
}
|
|
Amount=0;
|
|
AddEffect("JarReload",this,100,2,this);
|
|
Sound("WindCharge.ogg",false,nil,nil,1);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
pClonk->Message("Reloading!");
|
|
return true;
|
|
}
|
|
}
|