LegacyConditions:
  - mobscore EAIRainStorm;=0
  - mobscore RedO;>2001
  Skills:
  - sendtitle{title="&cAlert!";subtitle="<mob.name> &elearned &cRain Storm (Ebony and Ivory)";d=60} @PlayersInRadius{r=40}
  - message{m="&7[&l&cAlert!&r&7] &4<mob.name> &elearned &cRain Storm (Ebony and Ivory)"} @PlayersInRadius{r=40}
  - speechbubble{id=RedOrb;display="&cRed Orbs &7= &e<mob.score.RedO><nl>&5Devil Star L &7= &e<mob.score.DevL><nl>&5Devil Star S &7= &e<mob.score.DevS>";ll=25;counter=100;sideoffset=-1.5;offset=1.0} @self
  - modifymobscore{o=RedO;A=SUBTRACT;V=2000}
  - modifymobscore{o=EAIRainStorm;a=SET;v=1}






FireHandguns-Basic:
  LegacyConditions:
  - mobscore EHandguns;=1
  - mobscore OkayFireGuns;=1
  - targetnotwithin 7
  CompareConditions:
  - targetinlineofsight true
  Skills:
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-Basic-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  
Handguns-Basic-DamageCalculation:
  Skills:
  - skill{s=Handguns-Basic-DamageLevel1}
  - skill{s=Handguns-Basic-DamageLevel2}
  - skill{s=Handguns-Basic-DamageLevel3}
  
Handguns-Basic-DamageLevel1:
  LegacyConditions:
  - mobscore EAILevel;=1
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=10}
Handguns-Basic-DamageLevel2:
  LegacyConditions:
  - mobscore EAILevel;=2
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=12}
Handguns-Basic-DamageLevel3:
  LegacyConditions:
  - mobscore EAILevel;=3
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=15}
  
FireHandguns-Basic-ChargeFail:
  LegacyConditions:
  - mobscore EHandguns;=1
  - mobscore OkayFireGuns;=1
  - targetnotwithin 7
  CompareConditions:
  - targetinlineofsight true
  Skills:
  - message{m="&7[&l&cAlert!&r&7] &4<mob.name> &eFailed to fire charged shots x4"} @PlayersInRadius{r=40}
  - sound{s=entity.zombie.attack_door_wood} @self
  - shoot{type=SNOWBALL;velocity=5;damage=10}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - shoot{type=SNOWBALL;velocity=5;damage=10}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - shoot{type=SNOWBALL;velocity=5;damage=10}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - shoot{type=SNOWBALL;velocity=5;damage=10}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  
FireHandguns-RapidShot:
  Cooldown: 10
  LegacyConditions:
  - mobscore EAIRapidShot;=1
  - mobscore EHandguns;=1
  - mobscore OkayFireGuns;=1
  - targetnotwithin 7
  CompareConditions:
  - targetinlineofsight true
  Skills:
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
   - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  - delay 3
  - sound{s=entity.zombie.attack_door_wood} @self
  - skill{s=Handguns-RapidShot-DamageCalculation}
  - effect:particles{p=flame;amount=10;hS=0.5;vS=0.5;speed=0;y=1;fo=0.5} @self
  
Handguns-RapidShot-DamageCalculation:
  Skills:
  - skill{s=Handguns-RapidShot-DamageLevel1}
  - skill{s=Handguns-RapidShot-DamageLevel2}
  - skill{s=Handguns-RapidShot-DamageLevel3}
  
Handguns-RapidShot-DamageLevel1:
  LegacyConditions:
  - mobscore EAILevel;=1
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=8}
Handguns-RapidShot-DamageLevel2:
  LegacyConditions:
  - mobscore EAILevel;=2
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=9}
Handguns-RapidShot-DamageLevel3:
  LegacyConditions:
  - mobscore EAILevel;=3
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=11}
  
  
FireHandguns-Charged-Attempt:
  LegacyConditions:
  - mobscore EAIChargeShot;=1
  - mobscore EHandguns;=1
  - mobscore OkayFireGuns;=1
  - mobscore DTGauge;>8
  - targetnotwithin 7
  CompareConditions:
  - targetinlineofsight true
  Skills:
  - message{m="&7[&l&cAlert!&r&7] &4<mob.name> &eIs Attempting to fire charged shots x4"} @PlayersInRadius{r=40}
  - castif{c="mobscore EHandguns;=1 && mobscore OkayFireGuns;=1 && mobscore mobscore DTGauge;>8 && targetnotwithin{d=7} && mobscore nodamage10s;>9";meet=FireHandguns-Charged;else=FireHandguns-Basic-ChargeFail
  
FireHandguns-Charged:
  LegacyConditions:
  - mobscore EAIChargeShot;=1
  - mobscore EHandguns;=1
  - mobscore OkayFireGuns;=1
  - mobscore DTGauge;>8
  - targetnotwithin 7
  CompareConditions:
  - targetinlineofsight true
  Skills:
  - message{m="&7[&l&cAlert!&r&7] &4<mob.name> &eIs firing charged shots x4"} @PlayersInRadius{r=40}
  - sound{s=entity.zombie.attack_door_wood} @self
  - projectile{onTick=HandgunChargedBullet-Tick;onHit=HandgunChargedBullet-Hit;v=18;i=1;hR=1;vR=1} @target
  - effect:particles{p=reddust;amount=80;hS=1.5;vS=1.5;speed=0;y=1;fo=0.5} @self
  - effect:particles{p=reddust;color=#FA8072;amount=40;hS=1;vS=1;speed=0;y=1;fo=1} @self
  - effect:particles{p=reddust;color=#ffffff;amount=20;hS=0.5;vS=0.5;speed=0;y=1;fo=1} @self
  - modifymobscore{o=DTGauge;a=SUBTRACT;v=2}
  - skill{s=UpdateDTGauge}
  - delay 10
  - sound{s=entity.zombie.attack_door_wood} @self
  - projectile{onTick=HandgunChargedBullet-Tick;onHit=HandgunChargedBullet-Hit;v=18;i=1;hR=1;vR=1} @target
  - effect:particles{p=reddust;amount=80;hS=1.5;vS=1.5;speed=0;y=1;fo=0.5} @self
  - effect:particles{p=reddust;color=#FA8072;amount=40;hS=1;vS=1;speed=0;y=1;fo=1} @self
  - effect:particles{p=reddust;color=#ffffff;amount=20;hS=0.5;vS=0.5;speed=0;y=1;fo=1} @self
  - modifymobscore{o=DTGauge;a=SUBTRACT;v=2}
  - skill{s=UpdateDTGauge}
  - delay 10
  - sound{s=entity.zombie.attack_door_wood} @self
  - projectile{onTick=HandgunChargedBullet-Tick;onHit=HandgunChargedBullet-Hit;v=18;i=1;hR=1;vR=1} @target
  - effect:particles{p=reddust;amount=80;hS=1.5;vS=1.5;speed=0;y=1;fo=0.5} @self
  - effect:particles{p=reddust;color=#FA8072;amount=40;hS=1;vS=1;speed=0;y=1;fo=1} @self
  - effect:particles{p=reddust;color=#ffffff;amount=20;hS=0.5;vS=0.5;speed=0;y=1;fo=1} @self
  - modifymobscore{o=DTGauge;a=SUBTRACT;v=2}
  - skill{s=UpdateDTGauge}
  - delay 10
  - sound{s=entity.zombie.attack_door_wood} @self
  - projectile{onTick=HandgunChargedBullet-Tick;onHit=HandgunChargedBullet-Hit;v=18;i=1;hR=1;vR=1} @target
  - effect:particles{p=reddust;amount=80;hS=1.5;vS=1.5;speed=0;y=1;fo=0.5} @self
  - effect:particles{p=reddust;color=#FA8072;amount=40;hS=1;vS=1;speed=0;y=1;fo=1} @self
  - effect:particles{p=reddust;color=#ffffff;amount=20;hS=0.5;vS=0.5;speed=0;y=1;fo=1} @self
  - modifymobscore{o=DTGauge;a=SUBTRACT;v=2}
  - skill{s=UpdateDTGauge}
HandgunChargedBullet-Tick:
  Skills:
  - effect:particles{p=reddust;amount=20;hS=0.2;vS=0.2;speed=0;y=1;fo=0.5} @origin
HandgunChargedBullet-Hit:
  Skills:
  - skill{s=Handguns-ChargeShot-DamageCalculation}
  
Handguns-ChargeShot-DamageCalculation:
  Skills:
  - skill{s=Handguns-ChargeShot-DamageLevel1}
  - skill{s=Handguns-ChargeShot-DamageLevel2}
  - skill{s=Handguns-ChargeShot-DamageLevel3}
  
Handguns-ChargeShot-DamageLevel1:
  LegacyConditions:
  - mobscore EAILevel;=1
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=20}
Handguns-ChargeShot-DamageLevel2:
  LegacyConditions:
  - mobscore EAILevel;=2
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=25}
Handguns-ChargeShot-DamageLevel3:
  LegacyConditions:
  - mobscore EAILevel;=3
  Skills:
  - shoot{type=SNOWBALL;velocity=5;damage=30}