Cooldown: 5
  Conditions:
  - offgcd
  - targetwithin{d=20} true
  - targetnotwithin{d=3} true
  - targetinlineofsight true
  Skills:
  - gcd{ticks=20}
  - state{s=spit_attack} @self
  - delay 20
  - sound{s=entity.llama.spit} @self
  - projectile{onTick=carnivorespit-Tick;onHit=carnivorespit-Hit;v=24;i=1;hR=1;vR=1}
  - delay 1
  - threat{amount=10} @EntitiesInRadius{r=6}

carnivorespit-Tick:
  Skills:
  - effect:particles{p=slime;amount=1;speed=0;hS=0.2;vS=0.2} @origin
  - effect:particles{p=explosion_normal;amount=1;speed=0;hS=0.2;vS=0.2} @origin

carnivorespit-Hit:
  Skills:
  - damage{a=1} @EntitiesNearOrigin{r=3} 
  - potion{type=CONFUSION;duration=60;lvl=4} @PlayersNearOrigin{r=3}
  - potion{type=POISON;duration=40;lvl=1} @EntitiesNearOrigin{r=3}
  - effect:particles{p=slime;amount=10;speed=0;hS=0.2;vS=0.2} @origin
  - effect:particles{p=explosion_normal;amount=1;speed=0;hS=0.2;vS=0.2} @origin
  - sound{s=entity.slime.jump} @self
  - threat{amount=-50} @EntitiesNearOrigin{r=2}