em_cpbrute_stepsound:
  Conditions:
  - variableEquals{var=caster.skillxd;value="none"} true
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  - variableEquals{var=caster.casting;value="1"} false
  - onground true
  Skills:
  - sound{s=entity.skeleton.step;p=0.75;v=0.5} @selflocation 
  - sound{s=entity.hoglin.step;p=0.85;v=0.5} @selflocation
em_cpbrute_stepsound_run:
  Conditions:
#  - variableEquals{var=caster.skillxd;value="rage2"} true
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  - onground true
  Skills:
  - sound{s=entity.skeleton.step;p=0.75;v=0.5} @selflocation
  - sound{s=entity.hoglin.step;p=0.85;v=1} @selflocation

cpbrute_hp_check:
  Cooldown: 9999
  Conditions:
  - playersinradius{a=>2;r=60} true
  Skills:
  - delay 5
  - skill{s=cpbrute_hp_checkB} @pir{r=80} #MODIFY THE RANGE TO CHECK FOR PLAYERS
# GUIDE TO CUSTOMIZE HEALTH SCALING
cpbrute_hp_checkB:
  Conditions:
  Skills:
  - setvariable{var=skill.amount_targets;val=<skill.targets>}
  - setmaxhealth{amount=<caster.var.eichpee>+20*<skill.var.amount_targets>;mode=SCALE} @self
# AMOUNT = (BASE HEALTH, modified in mob's hp) + (ADDITIONAL NET HEALTH PER PLAYER IN RANGE) * <skill.var.amount_targets>
# (The last argument is just the variable for number of players, don't touch it.)

cpbrute_idlesounds:
  Cooldown: 6
  Conditions:
  - variableEquals{var=caster.skillxd;value="none"} true
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=cpbrute_phonado} false
  Skills:
  - delay 1to25
  - Aura{auraName=cpbrute_phonado;duration=150} @self
  - sound{s=emforgottenbrute:custom.corruptedbrute.idle;p=<random.float.0.8to1.1>;v=1.3} @selflocation
# HURTSKILLS
hurtfxcpbrute:
  Conditions:
  - damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT} false
  - DamageAmount{damageamount=>2} true
  Skills:
  - randomskill{s=[
      - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-2.2}
    ],
      [
      - summon{mob=darkbloodspill_2;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.2}
    ],
      [
      - summon{mob=darkbloodspill_2a;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.2}
    ],
      [
      - summon{mob=darkbloodspill_2b;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.2}
    ],
      [
      - summon{mob=darkbloodspill_2c;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.2}
    ],
      [
      - summon{mob=darkbloodspill_2d;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.2}
    ];sync=true}

#hurt: hurt1:
hurt1cpbrute:
  Cooldown: 0.5
  Skills:
  - Aura{auraName=nule_parry;duration=12;delay=1;mergeSameCaster=true;refreshduration=true} @self 0.9 ?!hasaura{n=nule_parry}
  - Aura{auraName=nule_parry;duration=30;delay=1;mergeSameCaster=true;refreshduration=true} @self 0.9 ?hasaura{n=nule_parry} ?!hasaura{n=parried}

  - skill{s=cpbrute_backhurtCLEAR;sync=true} @Trigger 0.25
  - variableadd{var=caster.hitrec;amount=1} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=hurt1;lo=6;remove=true} @self
  - state{state=hurt2;lo=6;remove=true} @self
  - state{state=hurt3;lo=6;remove=true} @self
  - state{state=hurt4;lo=6;remove=true} @self
  - randomskill{s=[
      - state{state=hurt1;li=0;lo=0} @self
    ],
      [
      - state{state=hurt2;li=0;lo=0} @self
    ],
      [
      - state{state=hurt4;li=0;lo=0} @self
    ],
      [
      - state{state=hurt3;li=0;lo=0} @self
    ]}
  - skill{s=countertacked_cpbrute_A;cooldown=2;sync=true} @self ?!hasaura{n=nule_parry} ?variableEquals{var=caster.vulnerable;value="1"} ?DamageAmount{damageamount=>2}
  - skill{s=countertacked_cpbrute_A;cooldown=2;sync=true} @self 0.3 ?hasaura{n=nule_parry} ?variableEquals{var=caster.vulnerable;value="1"} ?DamageAmount{damageamount=>2}
  
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=40;mergeSameCaster=true} @self 0.15 ?variableInRange{var=caster.hitrec;value=5to8}
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=40;mergeSameCaster=true} @self 0.28 ?variableInRange{var=caster.hitrec;value=>8}
  - sound{s=emforgottenprowler:custom.corruptedprowler.hurt;p=<random.float.0.9to1.1>;v=1.5} @selflocation 0.85
  - skill{s=hurtbad2_cpbrute} @self 0.25 ?!hasaura{n=nule_parry} ?hasaura{n=hurtedbad} ?DamageAmount{damageamount=>2} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}
  - skill{s=hurtbad2_cpbrute} @self 0.08 ?hasaura{n=nule_parry} ?hasaura{n=hurtedbad} ?DamageAmount{damageamount=>2} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}

  - skill{s=cpbrute_hurtbad} @self <60% 0.11 ?!hasaura{n=parried} ?!hasaura{n=nule_parry} ?DamageAmount{damageamount=>2} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}
  - skill{s=cpbrute_hurtbad} @self <60% 0.04 ?!hasaura{n=parried} ?hasaura{n=nule_parry} ?DamageAmount{damageamount=>2} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}

  - skill{s=cpbrute_hurtbad} @self >60% 0.07 ?!hasaura{n=parried} ?!hasaura{n=nule_parry} ?DamageAmount{damageamount=>2} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}
  - skill{s=cpbrute_hurtbad} @self >60% 0.03 ?!hasaura{n=parried} ?hasaura{n=nule_parry} ?DamageAmount{damageamount=>2} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}
  
  - skill{s=cpbrute_hurtbad} @self 0.25 ?hasaura{n=parried} ?!hasaura{n=nule_parry} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}
  - skill{s=cpbrute_hurtbad} @self 0.08 ?hasaura{n=parried} ?hasaura{n=nule_parry} ?!damagecause{c=FIRE_TICK,CAMPFIRE,FIRE,CRAMMING,CONTACT}


cpbrute_firedamage:
  Conditions: 
  - isburning{} true
  - hasaura{n=firecpbrute} false
  Skills:
  - submodel{mid=em_corruptedbrute;partid=left_rotterdam;submodelid=em_corruptedbrute;subpartid=body_fire;remove=false} @self
  - Aura{auraName=firecpbrute;duration=4000;onTick=cpbrute_firedamage_tick;interval=10} @self
#  - damagecause{c=FIRE_TICK} true
cpbrute_firedamage_tick:
  Conditions:
  - isburning{} false
  Skills:
  - auraremove{aura=firecpbrute} @self
  - submodel{mid=em_corruptedbrute;partid=body_fire;submodelid=em_corruptedbrute;subpartid=body_fire;remove=true} @self
#HURTBADskills
cpbrute_hurtbad:
  Cooldown: 9
  Conditions:
  - variableEquals{var=caster.casting;value="1"} false
  - variableEquals{var=caster.running;value="2"} false
  - hasaura{n=hurtedbad} false
  - hasaura{n=hurtenedbad} false
  Skills:
  - message{m="Hurt B";delay=0} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - lockmodel{l=true;delay=0} @Self
  - setstance{stance=casting} @self
  - skill{s=cpbrute_hurtCLEAR;sync=true} 0.35
  - variableadd{var=caster.hitrec;amount=2} @self
  - variableadd{var=caster.combor;amount=1} @self
  - variableadd{var=caster.combor;amount=1} @self 0.5
  - variableadd{var=caster.ragestacks;amount=1} @self 0.9 ?variableEquals{var=caster.rage;value="1"}
  - variableadd{var=caster.ragestacks;amount=1} @self 0.7 ?variableEquals{var=caster.rage;value="1"}
  - variableadd{var=caster.ragestacks;amount=1;cooldown=1.5} @self 0.5 ?variableEquals{var=caster.rage;value="1"}
  - spin{d=13;v=0} @self
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?variableEquals{var=caster.casting;value="0"} 
  - setvariable{var=caster.skillxd;value="hurtB";t=string} @Self 
  - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-2.2}
  - randomskill{s=[
      - state{state=hurtbad1;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtbad2;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtbad3;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtbad4;li=3;lo=8;n=false;speed=1} @self
    ];sync=true}
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - potion{type=SLOW;duration=1;level=0;p=false;force=true} @Self
  - potion{type=SLOW;duration=40;level=7;p=false;force=true;delay=1} @Self
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.hurt;p=0.84;v=1.5;cooldown=2} @selflocation ############SOUND
  - sound{s=emforgottenbrute:custom.corruptedbrute.hurtedbad;p=<random.float.0.9to1.1>;v=1.6} @selflocation
#STATEREMOVE
  - state{remove=true;s=rage;lo=3;n=false} @self
  - state{remove=true;s=attack;lo=3;n=false} @self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack3b;lo=3;n=false} @self
  - state{remove=true;s=attack3c;lo=3;n=false} @self
  - state{remove=true;state=attack5;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack5_fast;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack4;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack4b;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack4b_corrector;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack6_cast;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack7_cast;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack7;lo=3;n=false;speed=1} @self
  - state{remove=true;state=attack8;lo=3;n=false;speed=1} @self
  - state{state=attackb1;li=0;lo=0;remove=true} @self
  - state{state=attackb2;li=0;lo=0;remove=true} @self
  - state{state=attackb3_a;li=0;lo=0;remove=true} @self
  - state{state=attackb3_b;li=0;lo=0;remove=true} @self
  - state{remove=true;state=attack6_channel;lo=3;n=false;speed=1} @self
  - Aura{auraName=bruttackrest2;duration=32} @self
#
  - Aura{auraName=hurtedbad;duration=36} @self
  - delay 12
  - skill{s=[
    - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=60;mergeSameCaster=true} @self
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self ?stance{s=casting}
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - Aura{auraName=bruttackrest;duration=20} @self
    - lockmodel{l=false;delay=0} @Self];sync=false} @Self 0.25 ?variableEquals{var=caster.skillxd;value="hurtB"}
  - spin{d=21;v=0} @self ?variableEquals{var=caster.hurtened;value="1"} 
  - randomskill{s=bruttack4_cpbrute,bruttack2_cpbrute_starter;repeat=2;repeatinterval=5} @LivingInCone{a=110.0;r=6.5;rot=0.0;ignore=samefaction}
  - skill{s=cpbrute_rage_trigger} @Self =60%-95% 0.45 ?!variableEquals{var=caster.skillxd;value="hurtedvbad"} ?variableEquals{var=caster.skillxd;value="hurtB"}
  - skill{s=cpbrute_rage_trigger} @Self =30%-60% 0.55 ?!variableEquals{var=caster.skillxd;value="hurtedvbad"} ?variableEquals{var=caster.skillxd;value="hurtB"}
  - skill{s=cpbrute_rage_trigger} @Self <30% 0.65 ?!variableEquals{var=caster.skillxd;value="hurtedvbad"} ?variableEquals{var=caster.skillxd;value="hurtB"}
  - delay 21
  - setvariable{var=caster.hurtened;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="hurtB"}
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="hurtB"}
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="hurtB"}
  - lockmodel{l=false;delay=0} @Self ?variableEquals{var=caster.skillxd;value="hurtB"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="hurtB"}
  - skill{s=meleecpbrutetrigger2;cooldown=1;sync=false} @Trigger 0.6
  - skill{s=cpbrute_rage_trigger} @Self =60%-95% 0.65 ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - skill{s=cpbrute_rage_trigger} @Self =30%-60% 0.75 ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - skill{s=cpbrute_rage_trigger} @Self <30% 0.85 ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - delay 1
  - potion{type=SLOW;duration=12;level=3;p=false;force=true;delay=0} @Self ?!variableEquals{var=caster.skillxd;value="rage1"} ?variableEquals{var=caster.rage;value="1"} ?!hasaura{n=hurtenedbad} ?!variableEquals{var=caster.running;value="2"}

####

hurtedbad_antilunge1:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} true
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} true
  Skills:
  - lunge{v=-0.15} @forward{f=-10}
hurtedbad_antilunge2:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} true
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} true
  Skills:
  - lunge{v=-0.07} @forward{f=-10}

#HURTEDSKILLSVERYBAD


fov_test:
  TriggerConditions:
  - fieldofview{angle=180} orElseCast hurtbad2_cpbrute_back
  Skills:
  - message{m="Within 180"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

hurtbad2_cpbrute:
  Cooldown: 4
  Conditions:
  - hasaura{n=hurtedbad} true
  TriggerConditions:
  - fieldofview{angle=160} orElseCast hurtbad2_cpbrute_back
  Skills:
  - message{m="Hurt BAD";delay=0} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - lockmodel{l=true;delay=0} @Self
  - spin{d=30;v=0} @self
  - Aura{auraName=hurtenedbad;duration=90} @self
  - Aura{auraName=bruttackrest2;duration=60} @self
  - message{m="Casted &eHurtedBad"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{stance=casting} @self
  
  - setvariable{var=caster.skillxd;value="hurtedvbad";t=string} @Self
  - variableadd{var=caster.ragestacks;amount=1} @self 0.9 ?variableEquals{var=caster.rage;value="1"}
  - variableadd{var=caster.ragestacks;amount=1} @self 0.7 ?variableEquals{var=caster.rage;value="1"}
  - variableadd{var=caster.ragestacks;amount=1;cooldown=1.5} @self 0.5 ?variableEquals{var=caster.rage;value="1"}

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.hurt;p=1;v=1.5} @selflocation
  - sound{s=emforgottenbrute:custom.corruptedbrute.hurtedbad;p=<random.float.0.9to1.1>;v=1.6} @selflocation

  - variableadd{var=caster.hitrec;amount=4} @self
  - randomskill{s=[
      - state{state=hurtverybad1;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtverybad2;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtverybad3;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtverybad4;li=3;lo=8;n=false;speed=1} @self
    ];sync=true}
  - Aura{auraName=parried;duration=45} @self
  - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @Forward{y=-2.4;f=0.2;sideOffset=0.7}
  - summon{mob=darkbloodspill_1;amount=1;noise=1.5;r=1.3;yr=0.5;delay=1} @Forward{y=-2.4;f=0.1;sideOffset=0.4}
  - summon{mob=darkbloodspill_1;amount=1;noise=2.5;r=1.2;yr=0.5;delay=2} @Forward{y=-2.4;f=0;sideOffset=0.4}
  - summon{mob=darkbloodspill_1;amount=1;noise=3.5;r=1.2;yr=0.5;delay=3} @Forward{y=-2.4;f=0;sideOffset=0.4}
  #
  - potion{type=SLOW;duration=58;level=15;p=false;force=true} @Self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  #
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - setvariable{var=caster.countered;value="1";t=integer} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - Aura{auraName=bruttackrest2;duration=56} @self
  - skill{s=hurtedbad_antilunge1;delay=1;repeat=14;repeatInterval=1} @Self
  - skill{s=hurtedbad_antilunge2;repeat=12;repeatInterval=1;delay=15} @Self
  - delay 30
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=60;mergeSameCaster=true} @self 0.4
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self ?stance{s=casting}
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - lockmodel{l=false;delay=0} @Self
    - auraremove{aura=parried} @self
    - Aura{auraName=bruttackrest;duration=30} @self
    - setvariable{var=caster.skillxd;value="none";t=string} @Self];sync=false} @Self 0.25
  - spin{d=24;v=0} @self ?hasaura{n=parried}
  - skill{s=meleecpbrutetrigger2;cooldown=1;sync=false} @Trigger 0.6
  - skill{s=cpbrute_rage_trigger} @Self =60%-95% 0.56
  - skill{s=cpbrute_rage_trigger} @Self =30%-60% 0.65
  - skill{s=cpbrute_rage_trigger} @Self <30% 0.75
  - delay 24
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - setvariable{var=caster.skillxd;value="none";t=string} @Self
    - lockmodel{l=false;delay=0} @Self ];sync=false} @Self ?variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - skill{s=meleecpbrutetrigger2;cooldown=1;sync=false} @Trigger 0.6
  - skill{s=cpbrute_rage_trigger} @Self =60%-95% 0.35
  - skill{s=cpbrute_rage_trigger} @Self =30%-60% 0.4
  - skill{s=cpbrute_rage_trigger} @Self <30% 0.5


hurtedbad_antiantilunge1:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} true
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} true
  Skills:
  - lunge{v=0.15} @forward{f=10}
hurtedbad_antiantilunge2:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} true
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} true
  Skills:
  - lunge{v=0.07} @forward{f=10}

hurtbad2_cpbrute_back:
  Cooldown: 4
  Conditions:
  - hasaura{n=hurtedbad} true
  TriggerConditions:
  - fieldofview{angle=160} false
  Skills:
  - message{m="Hurt BAD (back)";delay=0} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - lockmodel{l=true;delay=0} @Self
  - spin{d=31;v=0} @self
  - Aura{auraName=hurtenedbad;duration=90} @self
  - message{m="Casted &eHurtedBad &bBACK"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{stance=casting} @self

  - setvariable{var=caster.skillxd;value="hurtedvbad";t=string} @Self
  - variableadd{var=caster.ragestacks;amount=1} @self 0.9 ?variableEquals{var=caster.rage;value="1"}
  - variableadd{var=caster.ragestacks;amount=1} @self 0.7 ?variableEquals{var=caster.rage;value="1"}
  - variableadd{var=caster.ragestacks;amount=1;cooldown=1.5} @self 0.5 ?variableEquals{var=caster.rage;value="1"}

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.hurt;p=1;v=1.5} @selflocation 

  - variableadd{var=caster.hitrec;amount=4} @self
  - randomskill{s=[
      - state{state=hurtverybad1_back;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtverybad2_back;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtverybad3_back;li=3;lo=8;n=false;speed=1} @self
    ],
      [
      - state{state=hurtverybad4_back;li=3;lo=8;n=false;speed=1} @self
    ];sync=true}
  - Aura{auraName=parried;duration=45} @self
  - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @Forward{y=-2;f=0.2;sideOffset=0.7}
  - summon{mob=darkbloodspill_1;amount=1;noise=1.5;r=1.3;yr=0.5;delay=1} @Forward{y=-2;f=0.1;sideOffset=0.4}
  - summon{mob=darkbloodspill_1;amount=1;noise=2.5;r=1.2;yr=0.5;delay=2} @Forward{y=-2;f=0;sideOffset=0.4}
  - summon{mob=darkbloodspill_1;amount=1;noise=3.5;r=1.2;yr=0.5;delay=3} @Forward{y=-2;f=0;sideOffset=0.4}
  #
  - potion{type=SLOW;duration=54;level=15;p=false;force=true} @Self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  #
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - setvariable{var=caster.countered;value="1";t=integer} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - Aura{auraName=bruttackrest2;duration=56} @self
  - skill{s=hurtedbad_antiantilunge1;delay=1;repeat=14;repeatInterval=1} @Self
  - skill{s=hurtedbad_antiantilunge2;repeat=12;repeatInterval=1;delay=15} @Self
  - delay 30
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=60;mergeSameCaster=true} @self 0.4
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self ?stance{s=casting}
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - Aura{auraName=bruttackrest;duration=30} @self
    - auraremove{aura=parried} @self
    - lockmodel{l=false;delay=0} @Self
    - setvariable{var=caster.skillxd;value="none";t=string} @Self];sync=false} @Self 0.25
  - spin{d=20;v=0} @self ?hasaura{n=parried}
  - skill{s=meleecpbrutetrigger2;cooldown=1;sync=false} @Trigger 0.6
  - skill{s=cpbrute_rage_trigger} @Self =60%-95% 0.56
  - skill{s=cpbrute_rage_trigger} @Self =30%-60% 0.65
  - skill{s=cpbrute_rage_trigger} @Self <30% 0.75
  - delay 20
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - lockmodel{l=false;delay=0} @Self
    - setvariable{var=caster.skillxd;value="none";t=string} @Self];sync=false} @Self ?variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - skill{s=meleecpbrutetrigger2;cooldown=1;sync=false} @Trigger 0.6
  - skill{s=cpbrute_rage_trigger} @Self =60%-95% 0.35
  - skill{s=cpbrute_rage_trigger} @Self =30%-60% 0.4
  - skill{s=cpbrute_rage_trigger} @Self <30% 0.5
#DEATH

cpbrute_death:
  Skills:
  - sound{s=emforgottenbrute:custom.corruptedbrute.death;p=<random.float.0.8to1.1>;v=1.6} @selflocation
  - setstance{stance=casting} @self
  - setvariable{var=caster.skillxd;value="decapitation";t=string} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - randomskill{s=[
      - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2a;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2b;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2c;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2d;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ];sync=true;repeat=8;repeatinterval=1}
  - summon{mob=darkbloodspill_1;amount=1;noise=1;r=0.8;yr=0.3;repeat=3;repeatinterval=1} @SelfLocation{y=-2.2}
  
  - randomskill{s=[
      - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
    ],
      [
      - summon{mob=darkbloodspill_2;amount=1;noise=0.5;r=0.6;yr=0} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
    ],
      [
      - summon{mob=darkbloodspill_2a;amount=1;noise=0.5;r=0.6;yr=0} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
    ],
      [
      - summon{mob=darkbloodspill_2b;amount=1;noise=0.5;r=0.6;yr=0} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
    ],
      [
      - summon{mob=darkbloodspill_2c;amount=1;noise=0.5;r=0.6;yr=0} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
    ],
      [
      - summon{mob=darkbloodspill_2d;amount=1;noise=0.5;r=0.6;yr=0} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
    ];sync=true;repeat=4;repeatinterval=1;delay=39}
  - summon{mob=darkbloodspill_1;amount=1;noise=1;r=0.8;yr=0.3;repeat=3;repeatinterval=1;delay=39} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
  - delay 41
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.landshockwave;pitch=0.9;v=2} @Origin
  - skill{s=cpbrute_death_knockback;delay=2;repeat=2;repeatInterval=1} @EntitiesNearOrigin{r=10;ignore=samefaction}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=0.5;r=0.6;yr=0;repeat=1;repeatinterval=1} @EntitiesNearOrigin{r=12;ignore=samefaction}
  - summon{mob=cpblood_supershockwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-3}
  - summon{mob=cpblood_shockerwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-3}
cpbrute_death_knockback:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=6to12} castinstead cpbrute_death_knockback2
  - distance{d=0to6} true
  - hasaura{n=hit_cpbrute_death} false
  Skills:
  
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - basedamage{m=0.1;ignorearmor=false;preventknockback=true}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=1;r=0.5;yr=0} @TargetedTarget{y=-1}
  
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=-0.5;velocityY=2} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_cpbrute_death;duration=20} @TargetedTarget

cpbrute_death_knockback2:
  Skills:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=6to12} true
  - hasaura{n=hit_cpbrute_death} false
  Skills:
  
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=1;r=0.5;yr=0;repeat=1;repeatinterval=1} @TargetedTarget{y=-1}
  
  #THROW
  - potion{type=LEVITATION;duration=2;level=2;p=false;delay=0}
  - throw{velocity=-0.5;velocityY=1} @TargetedTarget
  - potion{type=LEVITATION;duration=2;level=1;p=false;delay=2}
  - potion{type=LEVITATION;duration=2;level=0;p=false;delay=4}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=6}
  - potion{type=SLOW;duration=10;lvl=7}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=10}
  - potion{type=SLOW;duration=10;level=0;p=false;force=true;delay=30}

  - Aura{auraName=hit_cpbrute_death;duration=20} @TargetedTarget
#DECAPITATION

decapitate_cpbrute:
  Skills:
  - sound{s=emforgottenbrute:custom.corruptedbrute.death;p=<random.float.0.9to1.1>;v=1.4} @Self
  - sound{s=entity.skeleton.hurt;p=1.7;v=1.5;delay=0} @selflocation
  - randomskill{s=[
      - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2a;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2b;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2c;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ],
      [
      - summon{mob=darkbloodspill_2d;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0.1}
    ];sync=true;repeat=2;repeatinterval=1}
  - summon{mob=darkbloodspill_1;amount=1;noise=1;r=0.8;yr=0.3;repeat=3;repeatinterval=1} @SelfLocation{y=-2.2}
  - lunge{v=-0.0000000001;repeat=60;repeatInterval=1} @forward{f=0;y=-5} 0
  - RunAIGoalSelector{goal=clear} @self ~onSpawn
  - setAI{ai=false}
  - sound{s=entity.skeleton.hurt;p=1.1;v=1.5;delay=13} @selflocation
  - sound{s=entity.skeleton.hurt;p=0.82;v=1.5;delay=22} @selflocation

  - sound{s=entity.skeleton.death;p=0.9;v=1.5;delay=36} @selflocation
  - summon{mob=darkbloodspill_1;amount=1;noise=1;r=0.8;yr=0.3;repeat=3;repeatinterval=2;delay=36} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=GLOBAL;y=-4;z=0.5}
  - Aura{auraName=bruttackrest;duration=150} @self
  - Aura{auraName=bruttackrest2;duration=150} @self
  - Aura{auraName=countertackrest;duration=150} @self
  - setstance{stance=casting} @self
  - setvariable{var=caster.skillxd;value="decapitation";t=string} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - lockmodel{l=true;delay=0} @Self
  - effect:particles{p=block_crack;m=black_wool;a=60;hs=0.3;y=1.85;vs=0.3;s=0.2} @Self
  - effect:particles{p=block_crack;m=black_wool;a=3;hs=0.1;y=0;vs=0.1;s=0.2;repeat=40;repeatInterval=1} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=LOCAL;y=0}
  - potion{type=SLOW;duration=120;level=20;p=false;force=true} @Self
  - potion{type=DAMAGE_RESISTANCE;duration=80;level=20;p=false;force=true} @Self
  - state{s=decapitation;li=1;lo=3;n=false} @self
  - submodel{mid=em_corruptedbrute;partid=head_decapitation_control;submodelid=em_corruptedbrute;subpartid=head_decapit;remove=false} @self
  - submodel{mid=em_corruptedbrute;partid=head;submodelid=em_corruptedbrute;subpartid=head;remove=true} @self
  - changepart{m=em_corruptedbrute;pid=head_decapit;nm=em_corruptedbrute;npid=head2;delay=20} @self
  - changepart{m=em_corruptedbrute;pid=jaw_decapit;nm=em_corruptedbrute;npid=jaw2;delay=20} @self
  - changepart{m=em_corruptedbrute;pid=hip;nm=em_corruptedbrute;npid=hip2;delay=20} @self
  - effect:particles{p=reddust;c=#BEF8E5;a=8;s=20;hs=0.35;vs=0.3;y=0;sideOffset=0;Size=1.1;delay=20;repeat=25;repeatinterval=1} @ModelPart{m=em_corruptedbrute;p=head_decapit;offset=GLOBAL;y=0.3;z=0.5}
  - effect:particles{p=reddust;c=#BEF8E5;a=12;s=20;hs=0.25;vs=0.2;y=0;sideOffset=0;Size=1.2;delay=20;repeat=4;repeatinterval=1} @ModelPart{m=em_corruptedbrute;p=decapitation_marker;offset=LOCAL;y=0.8;z=0.3}
  - effect:particles{particle=cloud;amount=150;hS=1.1;vS=0.55;speed=0;size=4.5;sideOffset=0;delay=100} @ModelPart{m=em_corruptedbrute;p=hip;offset=LOCAL;y=0}
  - effect:particles{particle=cloud;amount=60;hS=0.6;vS=0.2;speed=0;size=4.5;sideOffset=0;delay=100} @ModelPart{m=em_corruptedbrute;p=head_decapit;offset=LOCAL;y=0}
  - effect:particles{p=reddust;c=#BEF8E5;a=12;s=20;hs=0.25;vs=0.2;y=0;sideOffset=0;Size=0.8;delay=1;repeat=70;repeatinterval=1} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=LOCAL;y=0.2;z=-0.2}
  - delay 38
  - dropitem{i=cpbrute_drops} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.landshockwave;pitch=0.9;v=2} @Origin
  - skill{s=cpbrute_death_knockback;delay=2;repeat=2;repeatInterval=1} @EntitiesNearOrigin{r=10;ignore=samefaction}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=0.5;r=0.6;yr=0;repeat=1;repeatinterval=1} @EntitiesNearOrigin{r=12;ignore=samefaction}
  - summon{mob=cpblood_supershockwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-3}
  - summon{mob=cpblood_shockerwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-3}
  - delay 62
  - model{mid=em_corruptedbrute;s=idle;remove=true} @self ~onSpawn 1
  - remove @Self
#######



cpbrute_backhurtCLEAR:
  Cooldown: 9
  Conditions:
  - hasaura{n=changedThreat} false
  TriggerConditions:
  - FieldOfView{angle=120;r=0} false
  Skills:
  - Aura{auraName=changedThreat;duration=220} @self
  - clearThreat{} @self
  - threat{amount=150} @TargetedTarget
cpbrute_hurtCLEAR:
  Cooldown: 6
  Conditions:
  - hasaura{n=changedThreat} false
  TriggerConditions:
  - FieldOfView{angle=30;r=0} false
  Skills:
  - Aura{auraName=changedThreat;duration=200} @self
  - clearThreat{} @self
  - threat{amount=100} @TargetedTarget

hurtgencpbrute:
  Cooldown: 0
  Conditions:
  - damagecause{c=PROJECTILE} true
  Skills:
  - skill{s=hurtgencpbruteCLEAR;sync=true} @Trigger 0.15
  - variableadd{var=caster.projrec;amount=1} @self
  - variableadd{var=caster.projrec;amount=1} @self 0.5
  - Aura{auraName=checkruncpbrute;onTick=cpbrute_runprotocolcheck;interval=30;duration=99999} @self 0.15 ?variableInRange{var=caster.projrec;value=>15} ?!hasaura{n=checkruncpbrute}
  - variableadd{var=caster.runstacks;amount=1} @self
  - skill{s=hurtgencpbrute_addstacksd1} @Trigger
  - message{m="Runstacks <caster.var.runstacks> STACKS"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - velocity{m=set;x=0;y=0;z=0;repeat=2;Repeatinterval=1} @self
  - variableadd{var=caster.combor;amount=2} @self
  - randomskill{s=cpbrute_rage_trigger,bruttack6_cpbrute;sync=true} @Trigger 0.3 <50%
  - randomskill{s=cpbrute_rage_trigger,bruttack6_cpbrute,cpbrute_rage_trigger;sync=true} @Trigger 0.3 >50%

hurtgencpbrute_addstacksd1:
  TriggerConditions:
  - distance{d=5to13} true
  - distance{d=>13} castinstead hurtgencpbrute_addstacksd2
  Skills:
  - variableadd{var=caster.runstacks;amount=1} @self
  - variableadd{var=caster.runstacks;amount=1} @self 0.5
hurtgencpbrute_addstacksd2:
  TriggerConditions:
  - distance{d=>12} true
  Skills:
  - variableadd{var=caster.runstacks;amount=1} @self
  - variableadd{var=caster.runstacks;amount=1} @self 0.9
  - variableadd{var=caster.runstacks;amount=1} @self 0.7
  - variableadd{var=caster.runstacks;amount=1} @self 0.5
hurtgencpbruteCLEAR:
  Skills:
  - clearThreat{} @self
  - threat{amount=100} @Trigger
hurtgencpbrute2:
  Cooldown: 0
  Conditions:
  - damagecause{c=PROJECTILE} false
  TriggerConditions:
  - distance{d=>5} true
  Skills:
  - Aura{auraName=checkruncpbrute;onTick=cpbrute_runprotocolcheck;interval=30;duration=99999} @self 0.15 ?variableInRange{var=caster.projrec;value=>15} ?!hasaura{n=checkruncpbrute}
  - skill{s=hurtgencpbruteCLEAR;sync=true} @Trigger 0.25
  - variableadd{var=caster.projrec;amount=1} @self
  - variableadd{var=caster.projrec;amount=1} @self 0.5
  
  - variableadd{var=caster.runstacks;amount=2} @self
  - skill{s=hurtgencpbrute_addstacksd1} @Trigger
  - velocity{m=set;x=0;y=0;z=0;repeat=2;Repeatinterval=1} @self
  - variableadd{var=caster.combor;amount=2} @self
  - skill{s=cpbrute_rage_trigger;sync=false} @Trigger 0.3
  - stun{d=1;f=false;stopai=false} @Self

outrun_discharge_cpbrute:
  Cooldown: 8
  TargetConditions:
  - lineofsight true
  Skills:
  - variablesubtract{var=caster.hitrec;amount=1} @self ?variableInRange{var=caster.hitrec;value=>0}
  - variablesubtract{var=caster.hitrec;amount=1} @self 0.7 ?variableInRange{var=caster.hitrec;value=>0}
  - variablesubtract{var=caster.hitrec;amount=1} @self 0.4 ?variableInRange{var=caster.hitrec;value=>0}
  - message{m="FallenPirobo Hitrec: <caster.var.hitrec>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
outrun_aleviate_cpbrute:
  TargetConditions:
  - lineofsight true
  Skills:
  - variablesubtract{var=caster.hitrec;amount=1} @self 0.8 ?variableInRange{var=caster.hitrec;value=>0}
  - message{m="Hitrec <caster.var.projrec> SUBTRACT-1"} @PlayersNearOrigin{r=75}  0 #DEBUGMESSAGE

## MELEE TRIGGERS

meleecpbrutetrigger:
  Cooldown: 2
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - variableEquals{var=caster.rage;value="1"} CastInstead meleecpbrutetrigger2
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  - variableEquals{var=caster.casting;value="1"} false
  - variableEquals{var=caster.running;value="2"} false
  Skills:
  - delay 1to30
  - delay <random.1to24>
  - randomskill{s=bruttack1_cpbrute,bruttack1_cpbrute,bruttack2_cpbrute_starter;sync=false} @LivingInCone{a=110.0;r=6.5;rot=0.0;ignore=samefaction}
  - randomskill{s=bruttack1_cpbrute,bruttack1_cpbrute,bruttack2_cpbrute_starter;sync=false} @LivingInCone{a=200.0;r=1.5;rot=0.0;ignore=samefaction}
#  - randomskill{s=bruttack2_cpbrute_starter;sync=false} @LivingInCone{a=110.0;r=6.5;rot=0.0;ignore=samefaction}

meleecpbrutetrigger2:
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - variableEquals{var=caster.rage;value="1"} true
  - variableEquals{var=caster.running;value="2"} false
  Skills:
  - delay <random.1to15>
#  - randomskill{s=bruttack1_cpbrute;sync=false} @LivingInCone{a=110.0;r=6.5;rot=0.0;ignore=samefaction}
  - randomskill{s=bruttack1_cpbrute,bruttack1_cpbrute,bruttack2_cpbrute_starter,bruttack3_cpbrute,bruttack4_cpbrute,bruttack5_cpbrute,bruttack6_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute;sync=false} @LivingInCone{a=110.0;r=5.5;rot=0.0;ignore=samefaction}
  - randomskill{s=bruttack1_cpbrute,bruttack1_cpbrute,bruttack2_cpbrute_starter,bruttack3_cpbrute,bruttack4_cpbrute,bruttack5_cpbrute;sync=false,bruttack7_cpbrute,bruttack7_cpbrute} @LivingInCone{a=200.0;r=1.5;rot=0.0;ignore=samefaction}

###################################################
#
#
#
#
#
#
#
#
#
#
#
cpbrute_sdppcheck:
  Cooldown: 0.3
  Conditions:
  - playersinradius{a=>0;r=7}
  - variableEquals{var=caster.statueform;value="1"} false
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false
  Skills:
  - effect:particles{particle=reddust;color=#03c982;amount=2;hS=0.01;vS=0.01;size=0.75;forwardOffset=0.4;y=1.5} @Self 0 #DEBUGPARTICLES
  - skill{s=cpbrute_sdpcheckB;sync=true;delay=6;repeat=0;repeatinterval=3} @PlayersInRadius{r=7;limit=2;Sort=NEAREST;conditions=[  - distance{d=4to7}]}
  - skill{s=cpbrute_sdpcheckA;sync=true;delay=4;repeat=2;repeatinterval=3} @PlayersInRadius{r=4;limit=2;Sort=NEAREST;conditions=[  - distance{d=2to4}  - Moving{} true  - targetinlineofsight{} true]}
cpbrute_sdpcheckB:
  Conditions:
  - hasaura{n=ShieldennblockA} false
  TargetConditions:
  - isSprinting{} true
  - distance{d=0to5}
  Skills:
  - skill{s=[
    - look{headOnly=false;immediately=true;repeat=5;repeatInterval=1} @TargetedTarget 0

    - skill{s=cpbrutecommuterdefense;sync=false} @TargetedTarget
    - message{m="&e<caster.name> &bcast &ccpbrute_sdppcheckB &e@<target.name>"} @PlayersNearOrigin{r=75} 0
    - Aura{auraName=ShieldennblockA;duration=20} @self];sync=true} @TargetedTarget{limit=1;Sort=NEAREST} 0 #DEBUGMESSAGESPECIAL
  - effect:particles{particle=reddust;color=#1dd7ee;amount=105;hS=0.1;vS=0.1;size=0.8;repeat=1;repeatinterval=1} @Self 0 #DEBUGPARTICLES
cpbrute_sdpcheckA:
  Conditions:
  - hasaura{n=backstepB} false
  - hasaura{n=ShieldennblockB} false
  TargetConditions:
  - distance{d=0to3}
  Skills:
  - skill{s=[
    - look{headOnly=false;immediately=true;repeat=5;repeatInterval=1} @TargetedTarget 0

    - skill{s=cpbrutecommuterdefense;sync=false} @TargetedTarget
    - message{m="&e<caster.name> &bcast &ccpbrute_sdppcheckA &e@<target.name>"} @TargetedTarget 0
    - Aura{auraName=ShieldennblockB;duration=15} @self];sync=true} @TargetedTarget{limit=1;Sort=NEAREST} 0 #DEBUGMESSAGESPECIAL
  - effect:particles{particle=reddust;color=#1dd7ee;amount=105;hS=0.1;vS=0.1;size=0.8;repeat=1;repeatinterval=1} @Self 0 #DEBUGPARTICLES


# COMMUTER

cpbrutecommuterdefense:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.rage;value="1"} castinstead cpbrutecommuterdefenserage
  TargetConditions:
  - FieldOfView{angle=110;r=0} orElseCast cpbrutecommuterdefenseRear
  Skills:
  - message{m="&e<caster.name> &bcast &ccpbrutecommuterdefense &e@<target.name>"} @TargetedTarget 0 #DEBUGMESSAGE
  - randomskill{s=bruttack4_cpbrute,bruttack1_cpbrute,bruttack2_cpbrute_starter,bruttack7_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute} @TargetedTarget
cpbrutecommuterdefenseRear:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false
  - variableEquals{var=caster.running;value="2"} false
  Skills:
  - message{m="Castenedd &DCOUNTER defenseRear"} @PlayersNearOrigin{r=75} 1
  - skill{s=commutercpbruteCLEAR;sync=true} @TargetedTarget 0.45
  - randomskill{s=countertack1_cpbrute,countertack2_cpbrute} @TargetedTarget #CHANGE

cpbrutecommuterdefenserage:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false
  - variableEquals{var=caster.rage;value="1"} true
  - variableEquals{var=caster.running;value="2"} false
  TargetConditions:
  - FieldOfView{angle=110;r=0} orElseCast cpbrutecommuterdefenseRear
  Skills:
  - randomskill{s=bruttack4_cpbrute,bruttack6_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute} @TargetedTarget #CHANGE

commutercpbruteCLEAR:
  Skills:
  - clearThreat{} @self
  - threat{amount=150} @TargetedTarget




#COUNTERATTACKCS ===




#

#


#

hurt_ricostilla_cpbrute:
  Cooldown: 1
  TriggerConditions:
  - fieldofview{angle=45} false
  Skills:
  - message{m="&bRicostilla Damaged"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - skill{s=countertacked_cpbrute_A;sync=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.hurt;p=0.5;v=1.5} @selflocation 
  

countertacked_cpbrute_A:
  Conditions:
  - damagecause{c=PROJECTILE} false
  - damagecause{c=FIRE} false
  - variableEquals{var=caster.vulnerable;value="1"} true
  - variableEquals{var=caster.skillxd;value="bruttack1"} castinstead cakd_cpbrute_cattack1
  - variableEquals{var=caster.skillxd;value="run_attack"} castinstead cakd_cpbrute_cattack3
  - variableEquals{var=caster.skillxd;value="bruttack2"} castinstead cakd_cpbrute_cattack2
  - variableEquals{var=caster.skillxd;value="bruttack3"} castinstead cakd_cpbrute_cattack3
  - variableEquals{var=caster.skillxd;value="bruttack4"} castinstead cakd_cpbrute_cattack3
  - variableEquals{var=caster.skillxd;value="bruttack5"} castinstead cakd_cpbrute_cattack3
  - variableEquals{var=caster.skillxd;value="bruttack6"} castinstead cakd_cpbrute_cattack3
  Skills:
  - message{m="Casted &ecountertacked_cpbrute_A"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

cakd_antilunge1:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} true
  Skills:
  - lunge{v=-0.1} @forward{f=-10}
  - propel{v=0.15;repeat=4;repeatInterval=1} @forward{f=10} 0
  - message{m="Saltum 1"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
cakd_cpbrute_cattack1:
  Cooldown: 3
  Conditions:
  - hasaura{n=nule_parry} false
  TriggerConditions:
  - fieldofview{angle=52} false
  Skills:
  - Aura{auraName=nule_parry;duration=52} @self
  - setstance{stance=casting} @self
#  - setAI{ai=false} @Self
  - summon{mob=darkbloodspill_1;amount=1;noise=2;r=1.5;yr=0.4;repeat=15;repeatInterval=1} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=GLOBAL;x=0;y=-3.2;z=-0.5}
  - effect:particles{p=reddust;c=#BEF8E5;a=32;s=20;hs=0.45;vs=0.3;y=0;sideOffset=0;Size=1.2;delay=0;repeat=10;repeatInterval=1} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=GLOBAL;y=0.1;z=-0.5}
  
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=1.4;delay=0} @self
  - sound{s=emforgottenbrute:custom.corruptedbrute.countertacked;p=<random.float.0.8to1.1>;v=1.6} @selflocation 
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.gritus;p=0.7;v=2} @selflocation 
  - bodyclamp{m=em_corruptedbrute;c=0} @self

  - message{m="Casted &eCountered attack 1"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - setstance{stance=casting} @self
  - setvariable{var=caster.skillxd;value="cattack1";t=string} @Self
  - variableadd{var=caster.hitrec;amount=3} @self
  - state{s=attack1_ricostilled;li=1;lo=3;n=false} @self
  - Aura{auraName=parried;duration=52} @self
  - spin{d=38;v=0;delay=0} @self
  - lockmodel{l=true;delay=0} @Self
  - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @Forward{y=-2.4;f=1;sideOffset=0.7}
  #
  - potion{type=SLOW;duration=55;level=8;p=false;force=true} @Self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  #
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - setvariable{var=caster.countered;value="1";t=integer} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - setvariable{var=caster.casting;value="0";t=integer;delay=6} @Self
  - skill{s=cakd_antilunge1;delay=2;repeat=3;repeatInterval=1} @Self
  - delay 32
  
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self
    - auraremove{aura=parried} @self

    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - setvariable{var=caster.skillxd;value="none";t=string} @Self
    - skill{s=countertack1_cpbrute} @Trigger{conditions=[  - distance{d=0to5} true ]}
    - delay 1
    - skill{s=unlock_cpbrute_postcountered} @Self ];sync=false} @Self 0.7
  #SPECIALDEGBUGMESSAGE
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=60;mergeSameCaster=true} @self 0.4
  - delay 6

  - spin{d=21;v=0;delay=0} @self ?hasaura{n=parried}
    
  - delay 18
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - lockmodel{l=false;delay=0} @Self
    - bodyclamp{m=em_corruptedbrute;c=50} @self];sync=false} @Self ?variableEquals{var=caster.skillxd;value="cattack1"}
  

unlock_cpbrute_postcountered:
  Conditions:
  - variableEquals{var=caster.skillxd;value="countertack1"} false
  - variableEquals{var=caster.skillxd;value="countertack2"} false
  - variableEquals{var=caster.skillxd;value="countertack3"} false
  - variableEquals{var=caster.skillxd;value="countertack4"} false
  - variableEquals{var=caster.skillxd;value="countertack5"} false
  Skills:
  - lockmodel{l=false;delay=0} @Self
  - bodyclamp{m=em_corruptedbrute;c=50} @self
cakd_cpbrute_cattack2:
  Cooldown: 3
  Conditions:
  - hasaura{n=nule_parry} false
  TriggerConditions:
  - fieldofview{angle=60;rotation=30} false
  Skills:
  - Aura{auraName=nule_parry;duration=52} @self
  - summon{mob=darkbloodspill_1;amount=1;noise=2;r=1.5;yr=0.4;repeat=15;repeatInterval=1} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=GLOBAL;x=0;y=-3.2;z=-0.5}
  - effect:particles{p=reddust;c=#BEF8E5;a=32;s=20;hs=0.45;vs=0.3;y=0;sideOffset=0;Size=1.2;delay=0;repeat=10;repeatInterval=1} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=GLOBAL;y=0.1;z=-0.5}
  
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=1.4;delay=0} @self

  - sound{s=emforgottenbrute:custom.corruptedbrute.countertacked;p=<random.float.0.8to1.1>;v=1.6} @selflocation
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.gritus;p=0.7;v=2} @selflocation 
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  
  - message{m="Casted &eCountered attack 2"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - setstance{stance=casting} @self ?stance{s=normal}
  - setvariable{var=caster.skillxd;value="cattack2";t=string} @Self
  - variableadd{var=caster.hitrec;amount=3} @self
  - state{s=attack2_ricostilled;li=1;lo=3;n=false} @self
  - Aura{auraName=parried;duration=52} @self
  - spin{d=38;v=0;delay=0} @self
  - lockmodel{l=true;delay=0} @Self
  - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @Forward{y=-2.4;f=1;sideOffset=0.7}
  #
  - potion{type=SLOW;duration=55;level=8;p=false;force=true} @Self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack3_start;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  #
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - setvariable{var=caster.countered;value="1";t=integer} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - skill{s=cakd_antilunge1;delay=2;repeat=3;repeatInterval=1} @Self
  - delay 32
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=60;mergeSameCaster=true} @self 0.4
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self

    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - setvariable{var=caster.skillxd;value="none";t=string} @Self
    - skill{s=countertack2_cpbrute} @Trigger{conditions=[  - distance{d=0to5} true ]}
    - delay 1
    - skill{s=unlock_cpbrute_postcountered} @Self ];sync=false} @Self 0.7
  - spin{d=21;v=0;delay=6} @self ?!variableEquals{var=caster.skillxd;value="countertack2"}
    #SPECIALDEGBUGMESSAGE
  - delay 24
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - lockmodel{l=false;delay=0} @Self
    - bodyclamp{m=em_corruptedbrute;c=50} @self];sync=false} @Self ?variableEquals{var=caster.skillxd;value="cattack2"}


cakd_cpbrute_cattack3:
  Cooldown: 3
  Conditions:
  - hasaura{n=nule_parry} false
  Skills:
  - Aura{auraName=nule_parry;duration=52} @self
  - summon{mob=darkbloodspill_1;amount=1;noise=2;r=1.5;yr=0.4;repeat=15;repeatInterval=1} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=GLOBAL;x=0;y=-3.2;z=-0.5}
  - effect:particles{p=reddust;c=#BEF8E5;a=32;s=20;hs=0.45;vs=0.3;y=0;sideOffset=0;Size=1.2;delay=0;repeat=10;repeatInterval=1} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=GLOBAL;y=0.1;z=-0.5}
  
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=1.4;delay=0} @self

  - sound{s=emforgottenbrute:custom.corruptedbrute.countertacked;p=<random.float.0.8to1.1>;v=1.6} @selflocation
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.gritus;p=0.7;v=2} @selflocation 
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - message{m="Casted &eCountered attack 3"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{stance=casting} @self ?stance{s=normal}
  - setvariable{var=caster.skillxd;value="cattack3";t=string} @Self
  - variableadd{var=caster.hitrec;amount=3} @self
  - state{s=attack3_ricostilled;li=1;lo=3;n=false} @self
  - Aura{auraName=parried;duration=52} @self
  - spin{d=38;v=0;delay=0} @self
  - lockmodel{l=true;delay=0} @Self
  - summon{mob=darkbloodspill_1;amount=1;noise=0.5;r=0.6;yr=0} @Forward{y=-2.4;f=1;sideOffset=0.7}
  #
  - potion{type=SLOW;duration=55;level=8;p=false;force=true} @Self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack3_start;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  #
  - setvariable{var=caster.hurtened;value="1";t=integer} @Self
  - setvariable{var=caster.countered;value="1";t=integer} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - skill{s=cakd_antilunge1;delay=2;repeat=3;repeatInterval=1} @Self
  - delay 32
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=60;mergeSameCaster=true} @self 0.4
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self

    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - skill{s=countertack1_cpbrute} @Trigger{conditions=[  - distance{d=0to5} true ]}
    - delay 1
    - skill{s=unlock_cpbrute_postcountered} @Self ];sync=false} @Self 0.7
  - spin{d=21;v=0;delay=6} @self ?!variableEquals{var=caster.skillxd;value="countertack1"}
    #SPECIALDEGBUGMESSAGE
  - delay 24
  - skill{s=[
    - setvariable{var=caster.hurtened;value="0";t=integer} @Self
    - setstance{stance=normal} @self
    - setvariable{var=caster.casting;value="0";t=integer} @Self
    - lockmodel{l=false;delay=0} @Self
    - bodyclamp{m=em_corruptedbrute;c=50} @self];sync=false} @Self ?variableEquals{var=caster.skillxd;value="cattack3"}


# OUTSOURCING PARTICLES
cpbrute_vulnerabilityFX:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - hasaura{n=parried} false
  Skills:
  - effect:particles{p=reddust;c=#BEF8E5;a=5;s=20;hs=0.45;vs=0.3;y=0;sideOffset=0;Size=0.7} @ModelPart{m=em_corruptedbrute;p=back_costillums;offset=LOCAL;y=0.1;z=-0.4}
# NORMAL COMBO ATTACKS

bruttack1_cpbrute:
  Cooldown: 5
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=40} true
  Skills:
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.55;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack1;li=2;lo=10;n=false;speed=1} @self 
#
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  
#
  - setvariable{var=caster.comboa;value="1";t=integer} @Self ?variableEquals{var=caster.comboa;value="0"}
  - setvariable{var=caster.skillxd;value="bruttack1";t=string;delay=0} @Self
  - potion{type=SLOW;duration=42;level=7;p=false;force=true} @Self

  - look{headOnly=false;immediately=false;repeat=9;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=10} @Self
  - spin{d=32;v=0;delay=10} @self
  - lockmodel{l=true;delay=10} @Self
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=31} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=31} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=30} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=55} @self
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=30}
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=55} @Self
  - message{m="NOVULNERABLE";delay=55} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - delay 11
  - sound{s=emforgottenbrute:custom.corruptedbrute.efforta;p=<random.float.0.8to1.1>;v=1.4} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 7

  - skill{s=bruttack1_adaptivelunge;delay=0} @LivingInCone{a=180.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} 
  - delay 2

  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - setvariable{var=caster.casting;value="1";t=integer;delay=2} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=2;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk1FX_A;delay=1} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 3
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=outrun_aleviate_cpbrute;sync=true} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=bruttack1_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=bruttack1_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=200.0;r=1.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1.6;v=1} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk1FX_B} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 18

  - setvariable{var=caster.casting;value="0";t=integer} @Self ?!variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}
  - setstance{stance=normal} @self ?!variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}

  - randomskill{s=bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute;sync=false;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.3 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - delay 1
  - spin{d=33;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="bruttack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"}
  - potion{type=SLOW;duration=36;level=7;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="bruttack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  
  - delay 19
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=6;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="bruttack1"}
  - delay 14
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack1"} variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - lockmodel{l=false;delay=0} @Self ?variableEquals{var=caster.skillxd;value="bruttack1"} ?!variableEquals{var=caster.skillxd;value="countertack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}
  

countertack1_cpbrute:
  Cooldown: 4
  Conditions:
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=countertackrest} false
  TriggerConditions:
  - fieldofview{angle=160} castinstead bruttack3_cpbrute
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=160} castinstead bruttack3_cpbrute
  Skills:
  - Aura{auraName=largecast;duration=60} @self
  - Aura{auraName=countertackrest;duration=80} @self
  - setstance{stance=casting} @self
  - setvariable{var=caster.casting;value="1";t=integer;delay=0} @Self
  - setvariable{var=caster.skillxd;value="countertack1";t=string;delay=0} @Self
  - setAI{ai=false} @Self
  - lockmodel{l=false;delay=3} @Self
  - message{m="Castenedd &5COUNTER attack 1"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.55;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack1_ricostilled_counterattack;li=1;lo=10;n=false;speed=1} @self
  - setrotation{relative=false;pitch=0;delay=15} @Self
  - setAI{ai=true;delay=23} @Self
  - spin{d=18;v=-11;delay=5} @self
  #
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack3_start;lo=3;n=false} @self
  - state{remove=true;s=attack3_ricostilled;lo=6;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  
  #
  - setvariable{var=caster.comboa;value="1";t=integer} @Self ?variableEquals{var=caster.comboa;value="0"}
  
  - potion{type=SLOW;duration=41;level=7;p=false;force=true} @Self

  - look{headOnly=false;immediately=false;repeat=18;repeatInterval=1;delay=23} @TargetedTarget
  - spin{d=55;v=0;delay=25} @self
  - lockmodel{l=true;delay=25} @Self
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=31} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=31} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=30} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=55} @self
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=30}
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=55} @Self
  
  - message{m="NOVULNERABLE";delay=55} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - delay 17
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=2;repeatinterval=1}
  - skill{s=bruttack1_adaptivelunge;delay=0} @LivingInCone{a=160.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 2
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - setvariable{var=caster.casting;value="1";t=integer;delay=2} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=2;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk1FX_A;delay=1} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 1
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=bruttack1_cripple_cpbrute;sync=true} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=outrun_aleviate_cpbrute;sync=true} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=counterbruttack1_cpbrute_hit;sync=true;repeat=4;repeatinterval=1} @LivingInCone{a=180.0;r=6;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=counterbruttack1_cpbrute_hit;sync=true;repeat=4;repeatinterval=1} @LivingInCone{a=200.0;r=1.6;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - sudoskill{s=[
    - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-0;ForwardOffset=0.3}];sync=true} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1.6;v=1} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk1FX_B} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 18
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="countertack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"}
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="countertack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"}

  - randomskill{s=bruttack2_cpbrute;sync=false;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.3 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - delay 1
  - spin{d=30;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="countertack1"} 
  - potion{type=SLOW;duration=20;level=7;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="countertack1"} 
  - delay 20
  - potion{type=SLOW;duration=18;level=3;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="countertack1"}
  
  
  - delay 12
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="countertack1"}
  - lockmodel{l=false;delay=0} @Self ?variableEquals{var=caster.skillxd;value="countertack1"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="countertack1"}
  

bruttack1_cpbrute_hit:
  TargetConditions:
  - hasaura{n=hit_bruttack1_cpbrute} false
  - samefaction false
  Skills:
  - skill{s=outrun_aleviate_cpbrute;sync=true} @TargetedTarget
  - basedamage{m=0.3;ignorearmor=true;preventknockback=true;preventimmunity=true}
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true;preventimmunity=true} @TargetedTarget{conditions=[  - distance{d=<1.6} true ]}
  - basedamage{m=2;ignorearmor=false;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=2;v=2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2}
  - sudoskill{s=[
    - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.3;ForwardOffset=0.3}];sync=true}
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=1;r=1.3;yr=0} @TargetedTarget
  - randomskill{s=[
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ];sync=true;repeat=3;repeatInterval=1} @TargetedTarget
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=5;velocityY=3} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=15;lvl=7}
  - potion{type=SLOW;duration=30;level=4;p=false;force=true;delay=15}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=45}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=65}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=0;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack1_cpbrute;duration=20} @TargetedTarget
  - delay <random.19to26>
  - randomskill{s=bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute,bruttack4_cpbrute,bruttack5_cpbrute,bruttack7_cpbrute;sync=false;repeat=4;repeatinterval=4} @LivingInCone{a=100.0;r=6.4;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.75 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}

counterbruttack1_cpbrute_hit:
  TargetConditions:
  - hasaura{n=hit_counterbruttack1_cpbrute} false
  Skills:
  - basedamage{m=0.3;ignorearmor=true;preventknockback=true;preventimmunity=true}
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true;preventimmunity=true} @TargetedTarget{conditions=[  - distance{d=<1.6} true ]}
  - basedamage{m=2;ignorearmor=false;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=2;v=2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2}
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=1;r=1.3;yr=0} @TargetedTarget
  - randomskill{s=[
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ];sync=true;repeat=3;repeatInterval=1} @TargetedTarget
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=2;velocityY=5} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=15;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=15}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=35}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=55}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=75}

  - Aura{auraName=hit_counterbruttack1_cpbrute;duration=20} @TargetedTarget

  - delay <random.19to30>

  - randomskill{s=bruttack2_cpbrute,bruttack2_cpbrute,bruttack6_cpbrute,bruttack4_cpbrute,bruttack5_cpbrute,bruttack7_cpbrute;sync=false;repeat=4;repeatinterval=4} @LivingInCone{a=100.0;r=6.4;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.75 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}

countertack2_cpbrute:
  Cooldown: 4
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  - variableEquals{var=caster.casting;value="1"} false
  - variableEquals{var=caster.running;value="2"} false
  - hasaura{n=countertackrest} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=160} castinstead bruttack2_cpbrute
  Skills:
  - Aura{auraName=largecast;duration=60} @self
  - Aura{auraName=countertackrest;duration=80} @self
  - setstance{stance=casting} @self
  - setvariable{var=caster.casting;value="1";t=integer;delay=0} @Self
  - setvariable{var=caster.skillxd;value="countertack2";t=string;delay=0} @Self
  - setAI{ai=false} @Self
  - lockmodel{l=false;delay=2} @Self
  - message{m="Castenedd &5COUNTER attack 2"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.55;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack2_ricostilled_counterattack;li=1;lo=10;n=false;speed=1} @self
  - setrotation{relative=false;pitch=0;delay=15} @Self
  - setAI{ai=true;delay=23} @Self
  - spin{d=18;v=11;delay=5} @self
  #
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack3_start;lo=3;n=false} @self
  - state{remove=true;s=attack3_ricostilled;lo=6;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  
  #
  - setvariable{var=caster.comboa;value="1";t=integer} @Self ?variableEquals{var=caster.comboa;value="0"}
  
  - potion{type=SLOW;duration=41;level=7;p=false;force=true} @Self

  - look{headOnly=false;immediately=false;repeat=18;repeatInterval=1;delay=23} @TargetedTarget
  - spin{d=55;v=0;delay=25} @self
  - lockmodel{l=true;delay=25} @Self
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=31} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=31} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=30} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=55} @self
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=30}
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=55} @Self
  - message{m="NOVULNERABLE";delay=55} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - delay 17
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=2;repeatinterval=1}
  - skill{s=bruttack1_adaptivelunge;delay=0} @LivingInCone{a=160.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 2
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - setvariable{var=caster.casting;value="1";t=integer;delay=2} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=2;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk1FX_A;delay=1} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 1
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=bruttack1_cripple_cpbrute;sync=true} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=outrun_aleviate_cpbrute;sync=true} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=counterbruttack2_cpbrute_hit;sync=true;repeat=4;repeatinterval=1} @LivingInCone{a=180.0;r=6;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=counterbruttack2_cpbrute_hit;sync=true;repeat=4;repeatinterval=1} @LivingInCone{a=200.0;r=1.6;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1.6;v=1} @LivingInCone{a=160.0;r=5.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk1FX_B} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 18
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="countertack2"} ?!variableEquals{var=caster.skillxd;value="bruttack2"}
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="countertack2"} ?!variableEquals{var=caster.skillxd;value="bruttack2"}

  - randomskill{s=bruttack3_cpbrute;sync=false;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.3 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - delay 1
  - potion{type=SLOW;duration=20;level=7;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="countertack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - delay 20
  - potion{type=SLOW;duration=18;level=3;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="countertack1"} ?!variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  
  
  - delay 12
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="countertack2"}
  - lockmodel{l=false;delay=0} @Self ?variableEquals{var=caster.skillxd;value="countertack2"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="countertack2"}
  

counterbruttack2_cpbrute_hit:
  TargetConditions:
  - hasaura{n=hit_counterbruttack2_cpbrute} false
  Skills:
  - basedamage{m=0.3;ignorearmor=true;preventknockback=true;preventimmunity=true}
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true;preventimmunity=true} @TargetedTarget{conditions=[  - distance{d=<1.6} true ]}
  - basedamage{m=2;ignorearmor=false;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=2;v=2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2}
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=1;r=1.3;yr=0} @TargetedTarget
  - randomskill{s=[
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ];sync=true;repeat=3;repeatInterval=1} @TargetedTarget
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=1;velocityY=3} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=15;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=15}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=35}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=55}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=75}

  - Aura{auraName=hit_counterbruttack2_cpbrute;duration=20} @TargetedTarget

  - delay <random.19to30>

  - randomskill{s=bruttack3_cpbrute,bruttack3_cpbrute,bruttack6_cpbrute,bruttack4_cpbrute,bruttack5_cpbrute,bruttack7_cpbrute;sync=false;repeat=4;repeatinterval=4} @LivingInCone{a=100.0;r=6.4;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.75 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}


bruttack2_cpbrute:
  Cooldown: 4
  Conditions:
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=80} true
  Skills:
  - lockmodel{l=false;delay=0} @Self
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack2;li=1;lo=10;n=false;speed=1} @self
  - state{state=attack2_parrying;li=1;lo=10;n=false;speed=1} @self ?variableEquals{var=caster.parrying;value="1"}
#
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying_start;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self

  - state{remove=true;s=attack1_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack2_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack1_ricostilled_counterattack;lo=3;n=false} @self
  - state{remove=true;s=attack2_ricostilled_counterattack;lo=3;n=false} @self
  - state{remove=true;s=attack3_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack4_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack5_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack6_ricostilled;lo=3;n=false} @self
#
  - setvariable{var=caster.comboa;value="2";t=integer} @Self ?variableEquals{var=caster.comboa;value="1"}
  - setvariable{var=caster.skillxd;value="bruttack2";t=string;delay=0} @Self
  - potion{type=SLOW;duration=44;level=7;p=false;force=true} @Self
  
  - look{headOnly=false;immediately=false;repeat=10;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=10} @Self

  - spin{d=34;v=0;delay=10} @self

  - lockmodel{l=true;delay=10} @Self


  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=44} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=44} @Self
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=62} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=44} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=62} @self

  - message{m="NOVULNERABLE";delay=62} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=18;repeatinterval=1;delay=44}


  - delay 10
  - sound{s=emforgottenbrute:custom.corruptedbrute.efforta;p=<random.float.0.8to1.1>;v=1.4} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 7
  
  - skill{s=bruttack1_adaptivelunge;delay=1} @LivingInCone{a=160.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer;delay=2} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=1.8;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk2FX_A;delay=2} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 3
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=bruttack1_cripple_cpbrute;sync=true} @LivingInCone{a=160.0;r=3.9;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} 
  - skill{s=outrun_aleviate_cpbrute;sync=true} @LivingInCone{a=160.0;r=3.9;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=bruttack2_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=bruttack2_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=200.0;r=1.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=160.0;r=3.9;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk2FX_B} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 16
  
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setstance{stance=normal} @self ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  
  - randomskill{s=bruttack3_cpbrute,bruttack3_cpbrute,bruttack3_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=160.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 3
  - spin{d=32;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="bruttack5"} ?!variableEquals{var=caster.skillxd;value="bruttack6"}
  - potion{type=SLOW;duration=38;level=7;p=false;force=true;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}

  - delay 25
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=6;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="bruttack2"}
  - delay 6
  
  - potion{type=SLOW;duration=6;level=3;p=false;force=true;delay=2} @Self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="countertack1"} ?!variableEquals{var=caster.skillxd;value="bruttack5"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - lockmodel{l=false;delay=0} @Self ?!variableEquals{var=caster.skillxd;value="countertack1"} ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack5"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}

bruttack2_cpbrute_hit:
  TargetConditions:
  - hasaura{n=hit_bruttack2_cpbrute} false
  Skills:
  - basedamage{m=0.3;ignorearmor=true;preventknockback=true;preventimmunity=true}
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true;preventimmunity=true} @TargetedTarget{conditions=[  - distance{d=<1.6} true ]}
  - basedamage{m=2;ignorearmor=false;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.4;v=2} @TargetedTarget
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2} @TargetedTarget
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=1;r=1.3;yr=0} @TargetedTarget
  - randomskill{s=[
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ];sync=true;repeat=3;repeatInterval=1} @TargetedTarget
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=2;velocityY=2} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=15;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=15}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=35}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=55}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=75}

  - Aura{auraName=hit_bruttack2_cpbrute;duration=20} @TargetedTarget

  - delay <random.16to24>

  - randomskill{s=bruttack3_cpbrute,bruttack3_cpbrute,bruttack3_cpbrute,bruttack3_cpbrute,bruttack5_cpbrute,bruttack6_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.75 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
bruttack2_cpbrute_starter:
  Cooldown: 4
  Conditions:
  - stance{s=casting} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=40} true
  Skills:
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self

  - state{state=attack2_start;li=1;lo=10;n=false;speed=1} @self

#
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying_start;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self

  - state{remove=true;s=attack1_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack2_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack1_ricostilled_counterattack;lo=3;n=false} @self
  - state{remove=true;s=attack2_ricostilled_counterattack;lo=3;n=false} @self
  - state{remove=true;s=attack3_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack4_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack5_ricostilled;lo=3;n=false} @self
  - state{remove=true;s=attack6_ricostilled;lo=3;n=false} @self
#
  - setvariable{var=caster.comboa;value="1";t=integer} @Self ?variableEquals{var=caster.comboa;value="0"}
  - setvariable{var=caster.skillxd;value="bruttack2";t=string;delay=0} @Self
  - potion{type=SLOW;duration=44;level=7;p=false;force=true} @Self
  
  - look{headOnly=false;immediately=false;repeat=10;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=10} @Self
  - spin{d=65;v=0;delay=10} @self
  - lockmodel{l=true;delay=10} @Self

  
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=44} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=44} @Self
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=62} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=44} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=62} @self

  - message{m="NOVULNERABLE";delay=62} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=18;repeatinterval=1;delay=44}

  
  - delay 10
  - sound{s=emforgottenbrute:custom.corruptedbrute.efforta;p=<random.float.0.8to1.1>;v=1.4} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 7

  - skill{s=bruttack1_adaptivelunge;delay=1} @LivingInCone{a=160.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer;delay=2} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=1.8;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk2FX_A;delay=2} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 3
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=bruttack1_cripple_cpbrute;sync=true} @LivingInCone{a=160.0;r=3.9;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} 
  - skill{s=outrun_aleviate_cpbrute;sync=true} @LivingInCone{a=160.0;r=3.9;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  
  - skill{s=bruttack2_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=bruttack2_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=200.0;r=1.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=160.0;r=3.9;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest}
  - skill{s=cpbrute_atk2FX_B} @self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest} ### EFFECTENN
  - delay 16
  
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setstance{stance=normal} @self ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  
  - randomskill{s=bruttack3_cpbrute,bruttack3_cpbrute,bruttack3_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=160.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 3
  - potion{type=SLOW;duration=32;level=7;p=false;force=true;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}

  - delay 31
  - potion{type=SLOW;duration=6;level=3;p=false;force=true;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="countertack1"} ?!variableEquals{var=caster.skillxd;value="bruttack5"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - lockmodel{l=false;delay=0} @Self ?!variableEquals{var=caster.skillxd;value="countertack1"} ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack5"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack2"} ?!variableEquals{var=caster.skillxd;value="bruttack3"}


bruttack3_cpbrute:
  Cooldown: 6
  Conditions:
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=40} true
  Skills:
  - lockmodel{l=false;delay=0} @Self
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0;repeat=10;repeatinterval=1} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack3;li=1;lo=10;n=false;speed=1} @self
  - skill{s=bruttack1_adaptivelunge_execute;repeat=3;repeatInterval=1;delay=1} @forward{f=10}
  #STATEREMOTION
  - state{remove=true;s=attack7;lo=3} @self
  - state{remove=true;s=attack5;lo=3} @self
  - state{remove=true;s=attack6;lo=3} @self
  - state{remove=true;s=attack4;lo=3} @self
  - state{remove=true;s=attack1_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=attack2_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  #
  - setvariable{var=caster.comboa;value="3";t=integer} @Self ?variableEquals{var=caster.comboa;value="2"}
  - setvariable{var=caster.skillxd;value="bruttack3";t=string;delay=0} @Self
  - potion{type=SLOW;duration=75;level=7;p=false;force=true} @Self
  - look{headOnly=false;immediately=false;repeat=9;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=10} @Self
  - spin{d=44;v=0;delay=10} @self
  - lockmodel{l=true;delay=6} @Self #LOCKMODEL

  - sound{s=emforgottenbrute:custom.corruptedbrute.effortb;p=<random.float.0.8to1.1>;v=1.6} @selflocation 0.75 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=30} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=30} @Self
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=53} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=30} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=53} @self ?!hasaura{n=bruttackrest2}
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=30}
  - message{m="NOVULNERABLE";delay=53} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - delay 17
  - skill{s=bruttack1_adaptivelunge;delay=0} @LivingInCone{a=180.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 3
  - Aura{auraName=bruttackrest;duration=60} @self
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=<random.float.1.3to1.6>;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2} 0
  - skill{s=cpbrute_atk3FX_A;delay=3} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 2
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 1
  - skill{s=cpbrute_atk3FX_B;delay=0} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  #
  - skill{s=bruttack3_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=50.0;r=4.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - skill{s=bruttack3_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=100.0;r=1.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  #

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=40.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 23
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
#  - randomskill{s=attack2cpbrute,bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1
  - spin{d=30;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="bruttack3"}
  - potion{type=SLOW;duration=37;level=15;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="bruttack3"}
  
  - delay 9
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=6;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="bruttack3"}
  - delay 11
  - lockmodel{l=false;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  
bruttack3_cpbrute_hit:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - hasaura{n=hit_bruttack3_cpbrute} false
  Skills:
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=0.3;ignorearmor=true;preventknockback=true;preventimmunity=true}
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true;preventimmunity=true} @TargetedTarget{conditions=[  - distance{d=<1.6} true ]}
  - basedamage{m=2.7;ignorearmor=false;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.4;v=2} @TargetedTarget
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2} @TargetedTarget
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=1;r=1.3;yr=0} @TargetedTarget
  - randomskill{s=[
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ];sync=true;repeat=3;repeatInterval=1} @TargetedTarget
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=8;velocityY=-6} @TargetedTarget
#  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
#  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
#  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - stun{d=40;f=false;stopai=false} @TargetedTarget
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack3_cpbrute;duration=20} @TargetedTarget

  - delay <random.20to24>
  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
  - randomskill{s=bruttack5_cpbrute,bruttack6_cpbrute,bruttack7_cpbrute;sync=true;repeat=3;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}

cpbruteattack3hit:
  TargetConditions:
  - samefaction false
  Skills:
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.1;yr=0} @ProjectileForward{y=-1.7;f=0.9}
  - skill{s=outrun_discharge_cpbrute} @EntitiesNearOrigin{r=3;limit=1;sort=NEAREST;ignore=samefaction}
  - basedamage{m=2.2;ignorearmor=false}
  - basedamage{m=0.07;ignorearmor=true;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=2;v=2}
  - throw{velocity=2;velocityY=1} 
  - potion{type=LEVITATION;duration=9;level=1;p=false;delay=0} 
  - potion{type=LEVITATION;duration=5;level=0;p=false;delay=9}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=14}
  - potion{type=SLOW;duration=16;lvl=7;particles=false}
  - potion{type=SLOW;duration=40;lvl=4;delay=16;p=false}
  - potion{type=SLOW;duration=20;lvl=3;delay=56;p=false}
  - potion{type=SLOW;duration=20;lvl=2;delay=76;p=false} 0.5
  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=110.0;r=5;rot=0.0;ignore=samefaction} 0.35

bruttack4_cpbrute:
  Cooldown: 4
  Conditions:
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=40} true
  Skills:
  - lockmodel{l=false;delay=0} @Self
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0;repeat=10;repeatinterval=1} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack4;li=1;lo=10;n=false;speed=1} @self
  - skill{s=bruttack1_adaptivelunge_execute;repeat=3;repeatInterval=1;delay=1} @forward{f=10}
  #STATEREMOTION
  - state{remove=true;s=attack7;lo=3} @self
  - state{remove=true;s=attack5;lo=3} @self
  - state{remove=true;s=attack6;lo=3} @self
  - state{remove=true;s=attack1_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=attack2_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  #
  - setvariable{var=caster.comboa;value="3";t=integer} @Self ?variableEquals{var=caster.comboa;value="2"}
  - setvariable{var=caster.skillxd;value="bruttack4";t=string;delay=0} @Self
  - potion{type=SLOW;duration=75;level=7;p=false;force=true} @Self
  - look{headOnly=false;immediately=false;repeat=9;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=10} @Self
  - spin{d=44;v=0;delay=10} @self
  - lockmodel{l=true;delay=6} @Self #LOCKMODEL
  - sound{s=emforgottenbrute:custom.corruptedbrute.effortb;p=<random.float.0.8to1.1>;v=1.6} @selflocation 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=30} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=30} @Self
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=53} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=30} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=53} @self ?!hasaura{n=bruttackrest2}
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=30}
  - message{m="NOVULNERABLE";delay=53} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - delay 17
  - skill{s=bruttack1_adaptivelunge2_execute;repeat=1;repeatInterval=1;delay=0} @forward{f=10}
  - skill{s=bruttack1_adaptivelunge;delay=0} @LivingInCone{a=180.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 3
  - Aura{auraName=bruttackrest;duration=60} @self
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=<random.float.1.3to1.6>;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2} 0
  - skill{s=cpbrute_atk3FX_A;delay=3} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 2
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 1
  - skill{s=cpbrute_atk3FX_B;delay=0} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  #
  - skill{s=bruttack4_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=60.0;r=4.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - skill{s=bruttack4_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=200.0;r=1.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  #

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=40.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 23
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
#  - randomskill{s=attack2cpbrute,bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1
  - spin{d=30;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="bruttack4"}
  - potion{type=SLOW;duration=37;level=15;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="bruttack4"}
  
  - delay 9
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=6;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="bruttack4"}
  - delay 12
  - lockmodel{l=false;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
bruttack4_cpbrute_hit:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - hasaura{n=hit_bruttack3_cpbrute} false
  Skills:
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=0.3;ignorearmor=true;preventknockback=true;preventimmunity=true}
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true;preventimmunity=true} @TargetedTarget{conditions=[  - distance{d=<1.6} true ]}
  - basedamage{m=2.7;ignorearmor=false;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.4;v=2} @TargetedTarget
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2} @TargetedTarget
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=1;r=1.3;yr=0} @TargetedTarget
  - randomskill{s=[
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ];sync=true;repeat=3;repeatInterval=1} @TargetedTarget
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=8;velocityY=-6} @TargetedTarget
#  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
#  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
#  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - stun{d=40;f=false;stopai=false} @TargetedTarget
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack3_cpbrute;duration=20} @TargetedTarget

  - delay <random.20to24>
  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
#  - randomskill{s=bruttack3_cpbrute,bruttack3_cpbrute,bruttack3_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}

# Charges with both hands, unleashing a powerful shockwave in front that damages and knocks opponets airborne.
bruttack5_cpbrute:
  Cooldown: 14
  Conditions:
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest2} false
  - hasaura{n=bruttackrest3} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=40} true
  Skills:
  - Aura{auraName=bruttackrest;duration=100} @self
  - lockmodel{l=false;delay=0} @Self
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0;repeat=10;repeatinterval=1} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack5;li=1;lo=10;n=false;speed=1} @self
  - skill{s=bruttack1_adaptivelunge_execute;repeat=3;repeatInterval=1;delay=1} @forward{f=10}
  #STATEREMOTION
  - state{remove=true;s=attack7;lo=3} @self
  - state{remove=true;s=attack6;lo=3} @self
  - state{remove=true;s=attack4;lo=3} @self
  - state{remove=true;s=attack1_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=attack2_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  #
  - setvariable{var=caster.comboa;value="3";t=integer} @Self ?variableEquals{var=caster.comboa;value="2"}
  - setvariable{var=caster.skillxd;value="bruttack5";t=string;delay=0} @Self
  - potion{type=SLOW;duration=75;level=7;p=false;force=true} @Self
  - look{headOnly=false;immediately=false;repeat=10;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=10} @Self
  - spin{d=41;v=0;delay=10} @self
  - lockmodel{l=true;delay=10} @Self #LOCKMODEL
  - sound{s=emforgottenbrute:custom.corruptedbrute.effortc;p=<random.float.0.8to1.1>;v=1.6} @selflocation 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=30} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=30} @Self
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=53} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=30} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=53} @self ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=30}
  - message{m="NOVULNERABLE";delay=53} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - delay 29
  - skill{s=bruttack1_adaptivelunge2_execute;repeat=1;repeatInterval=1;delay=0} @forward{f=10}
  - skill{s=bruttack1_adaptivelunge;delay=0} @LivingInCone{a=180.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - delay 1
  - Aura{auraName=bruttackrest;duration=60} @self
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=<random.float.1.3to1.6>;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}  0
  - skill{s=cpbrute_atk3FX_A;delay=3} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - delay 2
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
#  - summon{mob=cpblood_supershockwave1;amount=1;noise=1;r=1.3;yr=0} @Forward{f=4.2;y=-2} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
#  - summon{mob=cpblood_shockerwave1;amount=1;noise=1;r=1.3;yr=0} @Forward{f=4.2;y=-2} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - setrotation{relative=false;pitch=0;delay=0} @Self
  - totem{charges=1;onStart=[
    - skill{s=bruttack5_cpbrute_hit;delay=2;repeat=2;repeatInterval=1} @EntitiesNearOrigin{r=10;ignore=samefaction}
    - summon{mob=cpblood_dustmarker1;amount=1;noise=0.5;r=0.6;yr=0;repeat=1;repeatinterval=1} @EntitiesNearOrigin{r=12;ignore=samefaction}
    - summon{mob=cpblood_supershockwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-4}
    - summon{mob=cpblood_shockerwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-4}
    - delay 2
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.4;v=2} @SelfLocation
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2} @SelfLocation
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.landshockwave;pitch=1;v=2} @Origin
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.landshockwave;pitch=1;v=2} @Origin];duration=2} @Forward{f=4.2;y=0} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - delay 2 #38
  - skill{s=cpbrute_atk3FX_B;delay=0} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  # I M P A C T O

  
#  - skill{s=bruttack5_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=60.0;r=4.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
#  - skill{s=bruttack5_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=200.0;r=1.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  #

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=40.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - delay 23 #51
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="bruttack5"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="bruttack5"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - randomskill{s=bruttack2_cpbrute_starter,bruttack1_cpbrute,bruttack3_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.3 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=hurtenedbad}
  - spin{d=22;v=0;delay=1} @self ?variableEquals{var=caster.skillxd;value="bruttack5"}
  - potion{type=SLOW;duration=24;level=15;p=false;force=true;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack5"}
  
  - delay 10
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=6;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="bruttack5"}
  - delay 12
  - lockmodel{l=false;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack5"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack5"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack5"}
bruttack5_cpbrute_hit:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=7to10} castinstead bruttack5_cpbrute_hit3
  - distance{d=4to7} castinstead bruttack5_cpbrute_hit2
  - distance{d=0to4} true
  - hasaura{n=hit_bruttack5a_cpbrute} false
  Skills:
  
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=0.4;ignorearmor=true;preventknockback=true;preventimmunity=true} 
  - basedamage{m=3.5;ignorearmor=false;preventknockback=true}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=1;r=0.5;yr=0} @TargetedTarget
  
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=-0.5;velocityY=15} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
#  - stun{d=40;f=true} @TargetedTarget
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack5a_cpbrute;duration=20} @TargetedTarget

  - delay <random.25to35>
#  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
  - randomskill{s=bruttack7_cpbrute,bruttack7_cpbrute,bruttack3_cpbrute;sync=true;repeat=10;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
bruttack5_cpbrute_hit2:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=4to7} true
  - hasaura{n=hit_bruttack5a_cpbrute} false
  Skills:
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=1.5;ignorearmor=false;preventknockback=true}
  - basedamage{m=0.1;ignorearmor=true;preventknockback=true;preventimmunity=true} 
  
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=4;velocityY=10} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack5a_cpbrute;duration=20} @TargetedTarget

  - delay <random.25to35>
#  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
  - randomskill{s=bruttack7_cpbrute,bruttack7_cpbrute,bruttack3_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}

bruttack5_cpbrute_hit3:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=7to10} true
  - hasaura{n=hit_bruttack5a_cpbrute} false
  Skills:
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true}

  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=6;velocityY=2} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack5a_cpbrute;duration=20} @TargetedTarget

  - delay <random.25to35>
#  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
  - randomskill{s=bruttack7_cpbrute,bruttack7_cpbrute,bruttack3_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}

###
# Channels for a moment, and then stomps the ground, creating a shockwave that creates replicas in a line in front.
bruttack6_cpbrute:
  Cooldown: 15
  Conditions:
  - variableEquals{var=caster.running;value="2"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest3} false
  TargetConditions:
  - distance{d=0to20} true
  - fieldofview{angle=40} true
  Skills:
  - Aura{auraName=bruttackrest;duration=120} @self
  - lockmodel{l=false;delay=0} @Self
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0;repeat=10;repeatinterval=1} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack6;li=1;lo=10;n=false;speed=1} @self

  #STATEREMOTION
  - state{remove=true;s=attack7;lo=3} @self
  - state{remove=true;s=attack5;lo=3} @self
  - state{remove=true;s=attack4;lo=3} @self
  - state{remove=true;s=attack1_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=attack2_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  #
  - setvariable{var=caster.comboa;value="3";t=integer} @Self ?variableEquals{var=caster.comboa;value="2"}
  - setvariable{var=caster.skillxd;value="bruttack6";t=string;delay=0} @Self
  - potion{type=SLOW;duration=21;level=3;p=false;force=true} @Self
  - look{headOnly=false;immediately=false;repeat=10;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=10} @Self
  - spin{d=43;v=0;delay=10} @self
  - lockmodel{l=true;delay=10} @Self #LOCKMODEL
  - sound{s=emforgottenbrute:custom.corruptedbrute.effortb;p=<random.float.0.8to1.1>;v=1.6} @selflocation 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=30} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=30} @Self
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=53} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=30} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=53} @self ?!hasaura{n=bruttackrest2}
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=30}
  - message{m="NOVULNERABLE";delay=53} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - effect:particles{p=reddust;c=#BEF8E5;a=7;s=20;hs=0.25;vs=0.25;y=0;sideOffset=0;Size=0.7;repeat=20;repeatinterval=1} @ModelPart{m=em_corruptedbrute;p=left_foot;offset=LOCAL;y=0.1;z=0.3}
  - delay 20
  - potion{type=SLOW;duration=33;level=7;p=false;force=true} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - skill{s=bruttack1_adaptivelunge2_execute;repeat=1;repeatInterval=1;delay=0} @forward{f=10}
  - skill{s=bruttack1_adaptivelunge;delay=0} @LivingInCone{a=180.0;r=7;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1
  - Aura{auraName=bruttackrest;duration=60} @self
  - delay 4
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=<random.float.1.3to1.6>;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2} 0
  - skill{s=cpbrute_atk3FX_A;delay=3} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 2 #27
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
#  - summon{mob=cpblood_supershockwave1;amount=1;noise=1;r=1.3;yr=0} @Forward{f=4.2;y=-2} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
#  - summon{mob=cpblood_shockerwave1;amount=1;noise=1;r=1.3;yr=0} @Forward{f=4.2;y=-2} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - setrotation{relative=false;pitch=0;delay=0} @Self
  - totem{charges=1;onStart=[
    - skill{s=bruttack6_cpbrute_hit;delay=2;repeat=2;repeatInterval=1} @EntitiesNearOrigin{r=7;ignore=samefaction}
    - summon{mob=cpblood_dustmarker1;amount=1;noise=0.5;r=0.6;yr=0;repeat=1;repeatinterval=1} @EntitiesNearOrigin{r=12;ignore=samefaction}
    - summon{mob=cpblood_supershockwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-4}
    - summon{mob=cpblood_shockerwave1;amount=1;noise=1;r=1.3;yr=0} @origin{y=-4}
    - delay 2
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.4;v=2} @SelfLocation
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2} @SelfLocation
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.landshockwave;pitch=1;v=2} @Origin
    - sound{s=emforgottenterrorsv1:custom.forgottenterrors.landshockwave;pitch=1;v=2} @Origin];duration=2} @Forward{f=3.5;y=0;sideOffset=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 2 #29
  - projectile{bulletType=BLOCK;material=LIGHT;onTick=cpbrute_atk6_tick;mr=18;v=8;i=14;hR=1.6;hp=true;hnp=true;vR=3;sB=false;sE=false;hs=true;d=150;syo=0;hfs=0.05;delay=14;sfo=4} @Forward{f=5;y=0.0} ?!variableEquals{var=caster.hurtened;value="1"} 1
#  - projectile{bulletType=BLOCK;material=LIGHT;onTick=fdefenderattack4tick1;onEnd=fdefenderattack4enD;mr=25;v=16;i=1;hR=1.6;hp=true;hnp=false;vR=3;sB=false;sE=true;hs=true;d=150;syo=0;hfs=0.05} @Forward{f=5;y=0.0} ?!variableEquals{var=caster.hurtened;value="1"}
  - skill{s=cpbrute_atk3FX_B;delay=0} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
# I M P A C T O

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=40.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 23 #52
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="bruttack6"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="bruttack6"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - randomskill{s=bruttack2_cpbrute_starter,bruttack1_cpbrute,bruttack3_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.3 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1 #53
  - spin{d=22;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="bruttack6"}
  - potion{type=SLOW;duration=24;level=15;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="bruttack6"}
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=6;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="bruttack6"}
  - delay 10 #63
  - delay 13 #75
  - lockmodel{l=false;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack6"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack6"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack6"}
bruttack6_cpbrute_hit:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=6to8} castinstead bruttack6_cpbrute_hit3
  - distance{d=3to6} castinstead bruttack6_cpbrute_hit2
  - distance{d=0to3} true
  - hasaura{n=hit_bruttack6a_cpbrute} false
  Skills:
  
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=0.4;ignorearmor=true;preventknockback=true;preventimmunity=true} 
  - basedamage{m=3;ignorearmor=false;preventknockback=true}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=1;r=0.5;yr=0} @TargetedTarget
  
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=-0.5;velocityY=10} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack6a_cpbrute;duration=5} @TargetedTarget

  - delay <random.25to35>
#  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
  - randomskill{s=bruttack7_cpbrute,bruttack7_cpbrute,bruttack7_cpbrute,bruttack3_cpbrute,bruttack4_cpbrute,bruttack1_cpbrute,bruttack2_cpbrute_starter;sync=true;repeat=10;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
bruttack6_cpbrute_hit2:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=3to6} true 
  - hasaura{n=hit_bruttack6a_cpbrute} false
  Skills:
  
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - skill{s=outrun_discharge_cpbrute} 0.4 
  - basedamage{m=1.3;ignorearmor=false;preventknockback=true}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=1;r=0.5;yr=0} @TargetedTarget
  
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=2;velocityY=4} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
#  - stun{d=40;f=true} @TargetedTarget
  - potion{type=SLOW;duration=55;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=55}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=75}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=95}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=115}

  - Aura{auraName=hit_bruttack6a_cpbrute;duration=20} @TargetedTarget

  - delay <random.25to35>
#  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
  - randomskill{s=bruttack7_cpbrute,bruttack7_cpbrute,bruttack3_cpbrute,bruttack4_cpbrute,bruttack1_cpbrute;sync=true;repeat=10;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
bruttack6_cpbrute_hit3:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - distance{d=6to8} true 
  - hasaura{n=hit_bruttack6a_cpbrute} false
  Skills:
  
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - skill{s=outrun_discharge_cpbrute} 0.4 
  - basedamage{m=0.1;ignorearmor=false;preventknockback=true}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=1;r=0.5;yr=0} @TargetedTarget
  
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=2;velocityY=4} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}

  - potion{type=SLOW;duration=55;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=55}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=75}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=95}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=115}

  - Aura{auraName=hit_bruttack6a_cpbrute;duration=20} @TargetedTarget

  - delay <random.25to35>

  - randomskill{s=bruttack7_cpbrute,bruttack7_cpbrute,bruttack3_cpbrute,bruttack4_cpbrute,bruttack1_cpbrute;sync=true;repeat=10;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}

cpbrute_atk6_tick:
  Skills:
  - skill{s=projectile6_cpbrute_hit;delay=1;repeat=2;repeatInterval=1} @EntitiesNearOrigin{r=5;ignore=samefaction}
  - summon{mob=cpblood_ravagemarker2;amount=1;noise=1;r=0.5;yr=0} @Origin{y=-2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashtick;pitch=0.8;v=2} @Origin
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.landshockwave;pitch=0.7;v=2} @Origin
projectile6_cpbrute_hit:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - hasaura{n=hit_bruttack6a_cpbrute} false
  Skills:
  # blinkpik123 , Excited.Workable.Cyst.Full.Ladder , 123123 , 2126 , 10445
  - effect:particles{particle=reddust;color=#BEF8E5;amount=5;hS=0.2;vS=0.2;size=1;repeat=5;repeatinterval=1} @Origin{y=0}
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=0.4;ignorearmor=true;preventknockback=true;preventimmunity=true} 
  - basedamage{m=1.7;ignorearmor=false;preventknockback=true}
  - summon{mob=cpblood_dustmarker1;amount=1;noise=1;r=0.5;yr=0} @TargetedTarget
  
  #THROW
  - potion{type=LEVITATION;duration=5;level=6;p=false;delay=0}
  - throw{velocity=-0.5;velocityY=8} @TargetedTarget
  - potion{type=LEVITATION;duration=5;level=3;p=false;delay=5}
  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
  - potion{type=SLOW_FALLING;duration=8;level=0;p=false;delay=15}
#  - stun{d=40;f=true} @TargetedTarget
  - potion{type=SLOW;duration=55;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=55}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=75}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=95}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=115}

  - Aura{auraName=hit_bruttack6a_cpbrute;duration=20} @TargetedTarget

  - delay <random.25to35>
#  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
  - randomskill{s=bruttack7_cpbrute,bruttack4_cpbrute,bruttack3_cpbrute,bruttack5_cpbrute;sync=true;repeat=10;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.5 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}

bruttack7_cpbrute:
  Cooldown: 4
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableInRange{var=caster.hitrec;value=>2} true
  - variableEquals{var=caster.casting;value="1"} false
  - hasaura{n=bruttackrest} false
  TargetConditions:
  - distance{d=0to3.7} true
  - fieldofview{angle=80} true
  Skills:
  - lockmodel{l=false;delay=0} @Self
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0;repeat=10;repeatinterval=1} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=2;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - state{state=attack7;li=1;lo=10;n=false;speed=1} @self
  - skill{s=cpbrute_bruttacks_recoverylunge;repeat=4;repeatInterval=1;delay=1} @forward{f=10}
  #STATEREMOTION
  - state{remove=true;s=attack5;lo=3} @self
  - state{remove=true;s=attack6;lo=3} @self
  - state{remove=true;s=attack4;lo=3} @self
  - state{remove=true;s=attack1_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=attack2_ricostilled_counterattack;lo=3} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  #
  - setvariable{var=caster.comboa;value="3";t=integer} @Self ?variableEquals{var=caster.comboa;value="2"}
  - setvariable{var=caster.skillxd;value="bruttack7";t=string;delay=0} @Self
  - potion{type=SLOW;duration=42;level=7;p=false;force=true} @Self
  - look{headOnly=false;immediately=false;repeat=14;repeatInterval=1} @TargetedTarget
  - setrotation{relative=false;pitch=0;delay=15} @Self
  - spin{d=35;v=0;delay=15} @self
  - lockmodel{l=true;delay=15} @Self #LOCKMODEL
  - sound{s=emforgottenbrute:custom.corruptedbrute.effortb;p=<random.float.0.8to1.1>;v=1.6} @selflocation 0.7 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}

  - message{m="NOVULNERABLE";delay=53} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - delay 11
  

  - delay 3
  - Aura{auraName=bruttackrest;duration=60} @self
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=<random.float.1.3to1.6>;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2} 0
  - delay 2
  - skill{s=cpbrute_atk7FX_A;delay=0} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  #
  - skill{s=bruttack7_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=60.0;r=4;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - skill{s=bruttack7_cpbrute_hit;sync=true;repeat=2;repeatinterval=1} @LivingInCone{a=200.0;r=1.6;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  #

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=40.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} ?!hasaura{n=bruttackrest2}
  - delay 6
  - skill{s=bruttack1_adaptivelunge_execute;repeat=4;repeatInterval=1;delay=0} @forward{f=10}
  - delay 14
  #DELAY40
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="bruttack7"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="bruttack7"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - delay 1
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=8;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="bruttack7"}
  
#  - randomskill{s=attack2cpbrute,bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - spin{d=18;v=0;delay=1} @self ?variableEquals{var=caster.skillxd;value="bruttack7"}
  - potion{type=SLOW;duration=18;level=15;p=false;force=true;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack7"}

  
  - delay 18
  - lockmodel{l=false;delay=1} @Self ?variableEquals{var=caster.skillxd;value="bruttack7"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="bruttack7"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="bruttack7"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
bruttack7_cpbrute_hit:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - hasaura{n=bruttackrest2} false
  TargetConditions:
  - hasaura{n=hit_bruttack7_cpbrute} false
  Skills:
  - skill{s=outrun_discharge_cpbrute} 0.4
  - basedamage{m=0.3;ignorearmor=true;preventknockback=true;preventimmunity=true}
  - basedamage{m=0.7;ignorearmor=false;preventknockback=true;preventimmunity=true} @TargetedTarget{conditions=[  - distance{d=<1.6} true ]}
  - basedamage{m=2.7;ignorearmor=false;preventknockback=true}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.4;v=2} @TargetedTarget
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.grandslashcast;pitch=1.6;v=2} @TargetedTarget
  - summon{mob=cpblood_expFXmarker1;amount=1;noise=1;r=1.3;yr=0} @TargetedTarget
  - randomskill{s=[
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ],
      [
      - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @TargetedLocation{y=-1.5} 0.7
    ];sync=true;repeat=3;repeatInterval=1} @TargetedTarget
  #THROW
  - potion{type=LEVITATION;duration=5;level=4;p=false;delay=0}
  - throw{velocity=6;velocityY=12} @TargetedTarget
#  - potion{type=LEVITATION;duration=5;level=2;p=false;delay=5}
#  - potion{type=LEVITATION;duration=5;level=1;p=false;delay=10}
#  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=15}
  - potion{type=SLOW;duration=40;lvl=7}
  - potion{type=SLOW;duration=20;level=4;p=false;force=true;delay=40}
  - potion{type=SLOW;duration=20;level=3;p=false;force=true;delay=60}
  - potion{type=SLOW;duration=20;level=2;p=false;force=true;delay=80}
  - potion{type=SLOW;duration=20;level=1;p=false;force=true;delay=100}

  - Aura{auraName=hit_bruttack7_cpbrute;duration=20} @TargetedTarget

  - delay <random.20to24>
#  - randomskill{s=cpbrute_rage_trigger;delay=0;repeat=4;repeatinterval=8} @LivingInCone{a=180.0;r=5;rot=0.0;ignore=samefaction} 0.35
#  - randomskill{s=bruttack3_cpbrute,bruttack3_cpbrute,bruttack3_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  



#ADAPTIVELUNGES

cpbrute_bruttacks_recoverylunge:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  Skills:
  - propel{v=0.06} @forward{f=10}

bruttack1_adaptivelunge:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  TargetConditions:
  - distance{d=<1.6} false
  - distance{d=<4} orElseCast bruttack1_adaptivelunge2
  Skills:
  - lunge{v=0.42;repeat=4;repeatInterval=1} @forward{f=10} 0
  - skill{s=bruttack1_adaptivelunge_execute;repeat=4;repeatInterval=1} @forward{f=10}
  - message{m="&eMade by &l&eEndesman"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
bruttack1_adaptivelunge_execute:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  Skills:
  - propel{v=0.15;repeat=4;repeatInterval=1} @forward{f=10}
bruttack1_adaptivelunge2:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  TargetConditions:
  - distance{d=<8} orElseCast bruttack1_adaptivelunge2
  Skills:
  - lunge{v=0.58;repeat=7;repeatInterval=1} @forward{f=10} 0
  - skill{s=bruttack1_adaptivelunge2_execute;repeat=7;repeatInterval=1} @forward{f=10}
  - message{m="Saltum 2"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
bruttack1_adaptivelunge2_execute:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  Skills:
  - propel{v=0.25;repeat=7;repeatInterval=1} @forward{f=10}



bruttack1_cripple_cpbrute:
  Skills:
  - actionmessage{m="&E&LKNOCKED AIRBORNE!";delay=0}
  - potion{type=LEVITATION;duration=2;level=4;p=false;delay=0}
  - throw{velocity=1;velocityY=2} ?distance{d=0to3}
  - potion{type=LEVITATION;duration=2;level=2;p=false;delay=2}
  - potion{type=LEVITATION;duration=1;level=1;p=false;delay=4}
  - potion{type=SLOW_FALLING;duration=5;level=0;p=false;delay=5}
  - potion{type=SLOW;duration=10;lvl=7}
  - potion{type=SLOW;duration=20;level=0;p=false;force=true;delay=10}

#
#
#
#
#################################################
#################################################
#
#
#
#
#
#
#
#
#
#
#
#RAGETRIGGERS

cpbrute_rage_trigger:
  Cooldown: 13
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
  - variableEquals{var=caster.casting;value="1"} false
  - variableInRange{var=caster.runstacks;value=>5} castinstead cpbrute_rage_trigger_runner
  Skills:
  - setvariable{var=caster.skillxd;value="rage1";t=string} @Self
  - lockmodel{l=false;delay=2} @Self
  - lockmodel{l=true;delay=15} @Self
  - message{m="&cpbrute &bcasting &aRage_trigger"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{stance=casting} @self

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.gritus;p=0.3;v=2;delay=14} @selflocation
  - sound{s=emforgottenbrute:custom.corruptedbrute.rage;p=<random.float.0.9to1.1>;v=2.5;delay=14} @selflocation 
  - potion{type=SLOW;duration=50;level=55;p=false;force=true} @Self
  
  - state{state=rage;li=3;lo=10;n=false;speed=1} @self 
  - bodyclamp{m=em_corruptedbrute;c=0} @self

  
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  

  - look{headOnly=false;immediately=false;repeat=15;repeatInterval=1} @TargetedTarget

  #
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  - delay 10
  - Aura{auraName=shieldercpbrute;onTick=cpbrute_sdppcheck;interval=7;duration=140;mergeSameCaster=true} @self 0.8
  - DefaultState{type=WALK;state=walk_fast;li=3;lo=2} @self ?!variableEquals{var=caster.running;value="2"} ?!variableEquals{var=caster.running;value="1"}
  - setspeed{speed=1.34;type=walking} @Self ?!variableEquals{var=caster.running;value="2"} ?!variableEquals{var=caster.running;value="1"}
  - Aura{desot=true;auraName=checkragecpbrute;onTick=cpbrute_rageproximitycheck;onEnd=cpbrute_rageproximitycheckEND;interval=22;duration=400} @self
  - setvariable{var=caster.ragestacks;value="11";t=integer} @Self ?variableInRange{var=caster.ragestacks;value=<10}
  - setvariable{var=caster.rage;value="1";t=integer} @Self
  - delay 2
  - setvariable{var=caster.casting;value="0";t=integer;delay=0} @Self ?variableEquals{var=caster.skillxd;value="rage1"} ?!variableEquals{var=caster.skillxd;value="hurtedvbad"}
  - randomskill{s=bruttack5_cpbrute,bruttack4_cpbrute,bruttack3_cpbrute,bruttack6_cpbrute,bruttack6_cpbrute,bruttack5_cpbrute;sync=false} @LivingInCone{a=110.0;r=5;rot=0.0;ignore=samefaction} 0.4
  - delay 18
  - skill{s=cpbrute_bruttacks_recoverylunge;sync=true;repeat=6;repeatinterval=1} ?variableEquals{var=caster.skillxd;value="rage1"}
  
  - delay 14
  - setstance{stance=normal} @self ?variableEquals{var=caster.skillxd;value="rage1"}
  - lockmodel{l=false;delay=0} @Self ?variableEquals{var=caster.skillxd;value="rage1"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="rage1"} ?!variableEquals{var=caster.skillxd;value="bruttack3"} ?!variableEquals{var=caster.skillxd;value="bruttack4"} ?!variableEquals{var=caster.skillxd;value="bruttack1"}
  - setvariable{var=caster.casting;value="0";t=integer} @Self ?variableEquals{var=caster.skillxd;value="rage1"}
  - delay 1
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="rage1"} 
  


cpbrute_rageproximitycheck:
  Conditions:
  - targetwithin{d=4} castinstead cpbrute_rageproximitycheckb
  - incombat orElseCast cpbrute_rageproximitycheck_nocombat
  - variableInRange{var=caster.ragestacks;value=<1} castinstead cpbrute_rageproximitycheckc
  Skills:
  - variablesubtract{var=caster.ragestacks;amount=1} @self 0.6
  - message{m="ragestax <caster.var.ragestacks> STACKS"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
cpbrute_rageproximitycheck_nocombat:
  Conditions:
  - variableEquals{var=caster.rage;value="1"} true
  - incombat false
  Skills:
  - auraremove{aura=checkragecpbrute} @self
  - auraremove{aura=checkragecpbrute1b} @self
  - Aura{auraName=ragecooldown;duration=40} @self
  - effect:particles{particle=reddust;color=#e2eb32;amount=15;hS=0.1;vS=0.1;size=0.8;repeat=2;repeatinterval=1} @Origin{y=2.4} 0 #DEBUG
  - setvariable{var=caster.rage;value="0";t=integer} @Self
  
  - potion{type=SLOW;duration=8;level=5;p=false;force=true} @Self ?!stance{s=casting} ?variableEquals{var=caster.skillxd;value="none"} ?!haspotioneffect{type=SLOW}
  - DefaultState{type=WALK;state=walk;li=3;lo=2} @self ?!variableEquals{var=caster.running;value="2"} ?!variableEquals{var=caster.running;value="1"}
  - DefaultState{type=IDLE;state=idle;li=3;lo=2;delay=1} @self
  - setspeed{speed=1;type=walking} @self
cpbrute_rageproximitycheckb:
  Conditions:
  - targetwithin{d=4} true
  - variableEquals{var=caster.running;value="2"} false
  Skills:
  - variablesubtract{var=caster.ragestacks;amount=1} @self 0.6
  - variablesubtract{var=caster.ragestacks;amount=1} @self 0.3 ?targetwithin{d=3}
  - variablesubtract{var=caster.ragestacks;amount=1} @self 0.1
  - skill{s=[
    - auraremove{aura=checkragecpbrute} @self
    - auraremove{aura=checkragecpbrute1b} @self
    - setvariable{var=caster.rage;value="0";t=integer} @Self
    - Aura{auraName=ragecooldown;duration=120} @self
    - setvariable{var=caster.ragestacks;value="0";t=integer} @Self
    - potion{type=SLOW;duration=8;level=5;p=false;force=true} @Self ?!stance{s=casting} ?variableEquals{var=caster.skillxd;value="none"} ?!haspotioneffect{type=SLOW} 
    
    - DefaultState{type=WALK;state=walk;li=3;lo=2} @self
    - DefaultState{type=IDLE;state=idle;li=3;lo=2;delay=1} @self
    - setspeed{speed=1;type=walking} @self];sync=true} @self 0.16 ############## 0.25

cpbrute_rageproximitycheckc:
  Conditions:
  - variableEquals{var=caster.rage;value="1"} true
  Skills:
  - auraremove{aura=checkragecpbrute} @self
  - auraremove{aura=checkragecpbrute1b} @self
  - Aura{auraName=ragecooldown;duration=120} @self
  - effect:particles{particle=reddust;color=#e2eb32;amount=15;hS=0.1;vS=0.1;size=0.8;repeat=2;repeatinterval=1} @Origin{y=2.4} 0 #DEBUG
  - setvariable{var=caster.rage;value="0";t=integer} @Self
  - setvariable{var=caster.ragestacks;value="0";t=integer} @Self
  - potion{type=SLOW;duration=8;level=5;p=false;force=true} @Self ?!stance{s=casting} ?variableEquals{var=caster.skillxd;value="none"} ?!haspotioneffect{type=SLOW}
  
  - DefaultState{type=WALK;state=walk;li=3;lo=2} @self ?!variableEquals{var=caster.running;value="2"} ?!variableEquals{var=caster.running;value="1"}
  - DefaultState{type=IDLE;state=idle;li=3;lo=2;delay=1} @self
  - setspeed{speed=1;type=walking} @self
cpbrute_rageproximitycheckEND:
  Conditions:
  - variableEquals{var=caster.rage;value="1"} true
  Skills:
  - Aura{auraName=ragecooldown;duration=120} @self
  - effect:particles{particle=reddust;color=#e2eb32;amount=15;hS=0.1;vS=0.1;size=0.8;repeat=2;repeatinterval=1} @Origin{y=2.4} 0 #DEBUG
  - setvariable{var=caster.rage;value="0";t=integer} @Self
  - setvariable{var=caster.ragestacks;value="0";t=integer} @Self
  - potion{type=SLOW;duration=8;level=5;p=false;force=true} @Self ?!stance{s=casting} ?variableEquals{var=caster.skillxd;value="none"} ?!haspotioneffect{type=SLOW}
  
  - DefaultState{type=WALK;state=walk;li=3;lo=2} @self ?!variableEquals{var=caster.running;value="2"} ?!variableEquals{var=caster.running;value="1"}
  - DefaultState{type=IDLE;state=idle;li=3;lo=2;delay=1} @self
  - setspeed{speed=1;type=walking} @self
cpbrute_rageproximitycheckd:
  Conditions:
  - variableEquals{var=caster.rage;value="1"} true
  Skills:
  - auraremove{aura=checkragecpbrute} @self
  - auraremove{aura=checkragecpbrute1b} @self
  - Aura{auraName=ragecooldown;duration=180} @self
  - effect:particles{particle=reddust;color=#e2eb32;amount=15;hS=0.1;vS=0.1;size=0.8;repeat=2;repeatinterval=1} @Origin{y=2.4} 0 #DEBUG
  - setvariable{var=caster.rage;value="0";t=integer} @Self
  - setvariable{var=caster.ragestacks;value="0";t=integer} @Self
  
  - potion{type=SLOW;duration=8;level=5;p=false;force=true} @Self ?!stance{s=casting} ?variableEquals{var=caster.skillxd;value="none"} ?!haspotioneffect{type=SLOW}
  - DefaultState{type=WALK;state=walk;li=3;lo=2} @self ?!variableEquals{var=caster.running;value="2"} ?!variableEquals{var=caster.running;value="1"}
  - DefaultState{type=IDLE;state=idle;li=3;lo=2;delay=1} @self
  - setspeed{speed=1;type=walking} @self

####RUNNER PROTOCOL

cpbrute_runprotocolcheck:
  Conditions:
  - incombat true
  - targetwithin{d=5} false
  - variableEquals{var=caster.running;value="2"} false
  Skills:
  - skill{s=cpbrute_runprotocol_addstacks;sync=true} 
  - randomskill{s=cpbrute_rage_trigger_runner;sync=true} @Target 0.6 ?variableInRange{var=caster.runstacks;value=>10} true
cpbrute_runprotocol_addstacks:
  Conditions:
  - hasaura{n=rageprotocoled} false
  Skills:
  - variableadd{var=caster.runstacks;amount=1} @self 0.9
  - variableadd{var=caster.runstacks;amount=1} @self 0.4 ?variableInRange{var=caster.runstacks;value=>4}
  - variableadd{var=caster.runstacks;amount=1} @self 0.7 ?targetnotwithin{d=12}
  - variableadd{var=caster.runstacks;amount=1} @self 0.56 ?targetnotwithin{d=18}

cpbrute_rage_trigger_runner:
  Cooldown: 4
  Conditions:
  - hasaura{n=rageprotocoled} false
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false  
  - stance{s=casting} false
  - stance{s=normal} true
  Skills:
  - Aura{auraName=rageprotocoled;duration=200} @self
  - message{m="&cpbrute &bcasting &acpbrute_rage_trigger_runner&f. Checking..."} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - skill{s=cpbrute_rageprotocol_execute;sync=true} @Target 0.8
# DEBUG #REMOVE
cpbrute_rage_trigger_runner2:
  Cooldown: 4
  Conditions:
  - hasaura{n=rageprotocoled} false
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false  
  - stance{s=casting} false
  - stance{s=normal} true
  Skills:
  - variableadd{var=caster.runstacks;amount=10}
  - message{m="&cpbrute &bcasting &acpbrute_rage_trigger_runner&f. CASTING ..."} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - skill{s=cpbrute_rageprotocol_execute;sync=true} @Target 1
cpbrute_rageprotocolb:
  Cooldown: 12
  Conditions:
  - hasaura{n=rageprotocoled} false
  - variableInRange{var=caster.combor;value=>30} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false
  - stance{s=casting} false
  - stance{s=normal} true
  Skills:
  - Aura{auraName=rageprotocoled;duration=200} @self
  - threat{amount=300} @Trigger
  - message{m="&cFallen &bcasting &acpbrute_rageprotocol&f. Checking..."} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - skill{s=cpbrute_rageprotocol_execute;sync=true} @trigger
cpbrute_rageprotocol_execute:
  Conditions:
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.casting;value="1"} false
  - stance{s=casting} false
  - stance{s=normal} true
  TargetConditions:
  - distance{d=0to5} castinstead bruttack3_cpbrute
  Skills:
  - setvariable{var=caster.running;value="2";t=integer} @Self #RUNNING STATE 2
  - message{m="&cFallen &bcasting &acpbrute_rageprotocol&c_execute&f. EXECUTING"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - state{state=run_stop;coldown=4;li=1;lo=4;n=false;speed=1.3} @self ?variableEquals{var=caster.running;value="0"}
  - setstance{stance=casting} @self

  - sound{s=entity.phantom.death;p=0.55;v=1;delay=14} @SelfLocation
  - sound{s=emforgottenbrute:custom.corruptedbrute.frenzy;p=<random.float.0.9to1.1>;v=3.5;delay=14} @selflocation 
  
  - potion{type=SLOW;duration=35;level=45;p=false;force=true} @Self
  - potion{type=SLOW;duration=10;level=3;p=false;force=true;delay=35} @Self
  - state{state=rage_run;li=3;lo=0;n=false;speed=1} @self
  - state{state=run;li=0;lo=10;delay=47} @self
  - lockmodel{l=false;delay=40} @Self 
  - bodyclamp{m=em_corruptedbrute;c=0} @self

  - setvariable{var=caster.skillxd;value="rage2";t=string;delay=0} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - setvariable{var=caster.casting;value="0";t=integer;delay=35} @Self

  - look{headOnly=false;immediately=false;repeat=10;repeatInterval=1} @TargetedTarget

  #
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack4;lo=3;n=false} @self
  - state{remove=true;s=backstep;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  - delay 10
  - setvariable{var=caster.ragestacks;value="11";t=integer} @Self ?variableInRange{var=caster.ragestacks;value=<10}
  - setvariable{var=caster.rage;value="1";t=integer} @Self
#  - skill{s=cpbrute_rageprotocol_checktfrontFOV;sync=true} @LivingInCone{a=160.0;r=4;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST}
  # REMOVE STATES
  # xd
  - delay 6
  - skill{s=cpbrute_rageprotocol_checktfrontFOV;sync=true} @LivingInCone{a=160.0;r=4;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST}
  - delay 6
  - Aura{auraName=particles_cpbrute_rvgprotocol;onTick=pfx_cpbrute_rvgprotocol;interval=1;duration=99999} @self
  - Aura{auraName=runstance2_cpbrute_trigger;onTick=cpbrute_rageprotocol_checktfront;interval=2;duration=99999} @self
  - setspeed{speed=2;type=walking} @Self
  - delay 80
  - skill{s=run_attack_cpbrute;sync=true} @LivingInCone{a=56.0;r=4;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} 0.6 ?variableEquals{var=caster.running;value="2"}
  - delay 20
  - skill{s=cpbrute_ravagerun_stop;sync=true} @Self 0.8 ?variableEquals{var=caster.running;value="2"}
  - delay 20
  - skill{s=cpbrute_ravagerun_stop;sync=true} @Self 1 ?variableEquals{var=caster.running;value="2"}
pfx_cpbrute_rvgprotocol:
  Skills:
  - effect:particles{particle=reddust;color=#BEF8E5;amount=2;hS=0.01;vS=0.01;size=0.75;forwardOffset=0.4} @ModelPart{m=em_corruptedbrute;p=eye1;offset=LOCAL;y=0}
  - effect:particles{particle=reddust;color=#BEF8E5;amount=2;hS=0.01;vS=0.01;size=0.75;forwardOffset=0.4} @ModelPart{m=em_corruptedbrute;p=eye2;offset=LOCAL;y=0}
  - effect:particles{particle=reddust;color=#BEF8E5;amount=4;hS=0.1;vS=0.1;size=1.1} @ModelPart{m=em_corruptedbrute;p=right_clawmarker;offset=LOCAL;y=0}
  - effect:particles{particle=reddust;color=#BEF8E5;amount=2;hS=0.1;vS=0.1;size=0.9} @ModelPart{m=em_corruptedbrute;p=left_clawmarker;offset=LOCAL;y=0}

cpbrute_rageprotocol_checktfront:
  Skills:
  - setvariable{var=caster.stance;type=STRING;value="<caster.stance>"} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bStance <caster.var.stance>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bSkillxd <caster.var.skillxd>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - message{m="&cCorruptedbrute &bcasting &acpbrute_rageprotocol_checktfront <random.1to5>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - skill{s=cpbrute_rageprotocol_checktfrontFOV} @LivingInCone{a=65.0;r=7;rot=0.0;ignore=samefaction;limit=2;sort=NEAREST}
  - skill{s=cpbrute_rageprotocol_checktfrontFOV} @LivingInCone{a=160.0;r=4;rot=0.0;ignore=samefaction;limit=2;sort=NEAREST}
  - skill{s=cpbrute_rageprotocol_checktfrontFOV} @LivingEntitiesInRadius{r=2;ignore=samefaction;limit=2;sort=NEAREST}
cpbrute_rageprotocol_checktfrontFOV:
  Conditions:
  - hasaura{n=ravagingxd} false
  TargetConditions:
  - distance{d=0to5} castinstead run_attack_cpbruteB
  - fieldofview{angle=190} true
  - distance{d=5to9} true
  Skills:
  - state{state=run_arm_catch;li=1;lo=4;n=false;speed=1} @self
  - Aura{auraName=ravagingxd;duration=60} @self
  - setstance{s=casting} @Self
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - auraremove{aura=runstance2_cpbrute_trigger} @self
  - clearThreat{} @self
  - threat{amount=100} @TargetedTarget
#  - look{headOnly=false;immediately=false;repeat=9;repeatInterval=1} @TargetedTarget
  - message{m="&cFallen &bcasting &acpbrute_rageprotocol_checktfrontFOV &5RAVAGING"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - potion{type=SLOW;duration=28;level=7;p=false;force=true} @Self
  - effect:particles{p=reddust;color=#b0e0e6;a=13;speed=0.00;hs=0.15;vs=0.1;y=0;forwardOffset=0.0000;Size=0.9;sideOffset=0.0000;repeat=9;repeatinterval=1} @Self{y=2} 0 #DEBUGPARTICLES
  - skill{s=lunge_cpbrute_checktfrontFOV;sync=false;repeat=25;repeatinterval=1}
  - lockmodel{l=true;delay=0} @Self #LOCKMODEL
  - spin{d=25;v=0} @self
  
  - delay 6
  - Aura{auraName=runstance3_cpbrute_trigger;onTick=cpbrute_rageprotocol_attackfront;interval=2;duration=100} @self
  - delay 4
#  - skill{s=run_attack_cpbrute;sync=false;repeat=14;repeatinterval=2} @LivingInCone{a=140;r=5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST}
#  - skill{s=run_attack_cpbrute;sync=false;repeat=14;repeatinterval=2} @LivingInCone{a=220;r=0.6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST}
  - delay 15
  - skill{s=cpbrute_rageprotocol_checkfailureFOV;repeat=6;repeatinterval=3} @LivingInCone{a=65.0;r=4;rot=0.0;ignore=samefaction;limit=2;sort=NEAREST}
  
cpbrute_rageprotocol_checkfailureFOV:
  Conditions:
  - variableEquals{var=caster.running;value="2"} true
  - targets{a=>0} orElseCast cpbrute_ravagerun_stop
  Skills:
  - message{m="&cCorruptedbrute &bTém target"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
cpbrute_rageprotocol_attackfront:
  Skills:
  - setvariable{var=caster.stance;type=STRING;value="<caster.stance>"} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bStance <caster.var.stance>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bSkillxd <caster.var.skillxd>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - message{m="&cCorruptedbrute &bcasting &aATAQUE HIJUEPRRA <random.1to5>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  
  - skill{s=run_attack_cpbrute} @LivingInCone{a=75.0;r=4;rot=0.0;ignore=samefaction;limit=2;sort=NEAREST}
  - skill{s=run_attack_cpbrute} @LivingInCone{a=160.0;r=2.6;rot=0.0;ignore=samefaction;limit=2;sort=NEAREST}
  - skill{s=run_attack_cpbrute} @LivingEntitiesInRadius{r=1.5;ignore=samefaction;limit=2;sort=NEAREST}
lunge_cpbrute_checktfrontFOV:
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - variableEquals{var=caster.skillxd;value="bruttack5"} false
  - variableEquals{var=caster.running;value="2"} true
  Skills:
  - lunge{v=0.42;vy=0.002} @forward{f=10;y=1} 1
lunge_cpbrute_checktfrontFOV2:
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - variableEquals{var=caster.skillxd;value="bruttack5"} true
  Skills:
  - lunge{v=0.54;vy=0.002} @forward{f=10;y=1} 1
run_attack_cpbrute:
  Cooldown: 4
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} false
  - stance{s=normal} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableEquals{var=caster.casting;value="1"} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=200} true
  Skills:
  - message{m="&cCorruptedbrute &bcasting &6run_attack_cpbrute"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - auraremove{aura=runstance2_cpbrute_trigger} @self #Removes ravager protocol
  - auraremove{aura=runstance3_cpbrute_trigger} @self #Removes ravager protocol
  - setvariable{var=caster.running;value="0";t=integer} @Self
  - setvariable{var=caster.runstacks;value="0";t=integer} @Self

  - setvariable{var=caster.skillxd;value="run_attack";t=string;delay=0} @Self

  - spin{d=35;v=0;delay=5} @self
  - lockmodel{l=true;delay=10} @Self
  - look{headOnly=false;immediately=false;repeat=5;repeatInterval=1} @TargetedTarget

  - state{state=run_hit;li=1;lo=10;n=false;speed=1} @self
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - state{remove=true;s=run_arm_catch;lo=1;n=false;frame=0} @self
  - skill{s=lunge_cpbrute_checktfrontFOV2;repeat=4;repeatinterval=1} @LivingInCone{a=120.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
  #STATEREMOTION
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=backstep;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  - setspeed{speed=1;type=walking} @Self
  #
  - setvariable{var=caster.comboa;value="1";t=integer} @Self ?variableEquals{var=caster.comboa;value="0"}
  
  - potion{type=SLOW;duration=40;level=7;p=false;force=true} @Self
  
  - sound{s=emforgottenbrute:custom.corruptedbrute.effortb;p=<random.float.0.8to1.1>;v=1.6} @selflocation 0.84 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=16} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=16} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=16} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=42} @self
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=16}
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=42} @Self
  - message{m="NOVULNERABLE";delay=42} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - Aura{auraName=bruttackrest;duration=40} @self
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=<random.float.1.3to1.6>;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} 0
  - skill{s=cpbrute_atkrunFX_A;delay=3} @Self
  - skill{s=cpbrute_atk3FX_A;delay=3} @Self
  - skill{s=cpbrute_atk3FX_B;delay=3} @Self
  - delay 2
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1
  # 7TICKS
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - projectile{onTick=cpbruteattack3tick;onHit=cpbruteattack3hit;mr=4;v=30;i=1;hR=1.6;vR=0.8;hp=true;hnp=true;sB=false;sE=false;hs=false;d=150;syo=1;sso=0.5} @Forward{f=5;y=0.0} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - projectile{onTick=cpbruteattack3tick2;mr=4;v=30;i=3;hR=1.6;hp=true;hnp=true;vR=3;sB=false;sE=false;hs=true;d=150;syo=0;hfs=0.1;sso=0.5} @Forward{f=5;y=0.0} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  #

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - skill{s=bruttack1_cripple_cpbrute;sync=true} @LivingInCone{a=45.0;r=4.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
  - skill{s=outrun_aleviate_cpbrute;sync=true} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - basedamage{m=1.9;ignorearmor=false} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - sudoskill{s=[
    - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.3;ForwardOffset=0.3}];sync=true} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 32
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - auraremove{aura=particles_cpbrute_rvgprotocol} @self
  - setvariable{var=caster.casting;value="0";t=integer} @Self
  - setstance{stance=normal} @self

#  - randomskill{s=attack2cpbrute,bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1 #40 ticks
  - spin{d=15;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - potion{type=SLOW;duration=10;level=4;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - delay 10
  - potion{type=SLOW;duration=6;level=9;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}
  
  
  - delay 14 #57

  - lockmodel{l=false;delay=1} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}

run_attack_cpbruteB:
  Cooldown: 4
  Conditions:
  - variableEquals{var=caster.skillxd;value="hurtedvbad"} false
  - stance{s=casting} true
  - variableEquals{var=caster.hurtened;value="1"} false
  - variableEquals{var=caster.skillxd;value="decapitation"} false
#  - variableEquals{var=caster.casting;value="1"} false
  TargetConditions:
  - distance{d=0to7} true
  - fieldofview{angle=200} true
  Skills:
  - message{m="&cCorruptedbrute &bcasting &6run_attack_cpbrut B"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{stance=casting} @self
  - bodyclamp{m=em_corruptedbrute;c=0} @self
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.channelstun;p=1.2;v=1} ######SOUND
  - state{remove=true;s=run_roll;lo=1;n=false;frame=0} @self
  - variableadd{var=caster.combor;amount=1} @self
  - auraremove{aura=runstance2_cpbrute_trigger} @self #Removes ravager protocol
  - auraremove{aura=runstance3_cpbrute_trigger} @self #Removes ravager protocol
  - setvariable{var=caster.running;value="0";t=integer} @Self
  - setvariable{var=caster.runstacks;value="0";t=integer} @Self

  - setvariable{var=caster.skillxd;value="run_attack";t=string;delay=0} @Self

  - spin{d=35;v=0;delay=5} @self
  - lockmodel{l=true;delay=10} @Self
  - look{headOnly=false;immediately=false;repeat=5;repeatInterval=1} @TargetedTarget

  - state{state=run_hit;li=1;lo=10;n=false;speed=1} @self
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - state{remove=true;s=run_arm_catch;lo=1;n=false;frame=0} @self
  - skill{s=lunge_cpbrute_checktfrontFOV2;repeat=4;repeatinterval=1} @LivingInCone{a=120.0;r=6;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
  #STATEREMOTION
  - state{remove=true;s=attack1;lo=3;n=false} @self
  - state{remove=true;s=attack2;lo=3;n=false} @self
  - state{remove=true;s=attack2_start;lo=3;n=false} @self
  - state{remove=true;s=backstep;lo=3;n=false} @self
  - state{remove=true;s=attack3;lo=3;n=false} @self
  - state{remove=true;s=attack1_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack2_parrying;lo=3;n=false} @self
  - state{remove=true;s=attack3_parrying;lo=3;n=false} @self
  - state{remove=true;s=hurtbad1;lo=3;n=false} @self
  - state{remove=true;s=hurtbad2;lo=3;n=false} @self
  - state{remove=true;s=hurtbad3;lo=3;n=false} @self
  - state{remove=true;s=hurtbad4;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad1;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad2;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad3;lo=3;n=false} @self
  - state{remove=true;s=hurtverybad4;lo=3;n=false} @self
  - setspeed{speed=1;type=walking} @Self
  #
  - setvariable{var=caster.comboa;value="1";t=integer} @Self ?variableEquals{var=caster.comboa;value="0"}
  
  - potion{type=SLOW;duration=40;level=7;p=false;force=true} @Self
  
  - sound{s=emforgottenbrute:custom.corruptedbrute.effortb;p=<random.float.0.8to1.1>;v=1.6} @selflocation 0.82 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
  - message{m="VULNERABLE &dMADE BY ENDESMAN";delay=16} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setvariable{var=caster.vulnerable;value="1";t=integer;delay=16} @Self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=7;delay=16} @self
  - hitboxconfig{m=em_corruptedbrute;p=ob_ricostilla;pass=2;delay=42} @self
  - skill{s=cpbrute_vulnerabilityFX;sync=true;repeat=25;repeatinterval=1;delay=16}
  - setvariable{var=caster.vulnerable;value="0";t=integer;delay=42} @Self
  - message{m="NOVULNERABLE";delay=42} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

  - Aura{auraName=bruttackrest;duration=40} @self
  - delay 4
  - setvariable{var=caster.casting;value="1";t=integer} @Self ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.herostun;p=<random.float.1.3to1.6>;v=1} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2} 0
  - skill{s=cpbrute_atkrunFX_A;delay=3} @Self
  - skill{s=cpbrute_atk3FX_A;delay=3} @Self
  - skill{s=cpbrute_atk3FX_B;delay=3} @Self
  - delay 2
  
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attack4reaper;p=<random.float.1to1.4>;v=1.5;cooldown=2} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1
  # 7TICKS
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - projectile{onTick=cpbruteattack3tick;onHit=cpbruteattack3hit;mr=4;v=30;i=1;hR=1.6;vR=0.8;hp=true;hnp=true;sB=false;sE=false;hs=false;d=150;syo=1;sso=0.5} @Forward{f=5;y=0.0} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - projectile{onTick=cpbruteattack3tick2;mr=4;v=30;i=3;hR=1.6;hp=true;hnp=true;vR=3;sB=false;sE=false;hs=true;d=150;syo=0;hfs=0.1;sso=0.5} @Forward{f=5;y=0.0} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  #

  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.attackwindup;p=1;v=1} @selflocation ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - skill{s=bruttack1_cripple_cpbrute;sync=true} @LivingInCone{a=45.0;r=4.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  
  - skill{s=outrun_aleviate_cpbrute;sync=true} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} 0.8 ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - basedamage{m=1.9;ignorearmor=false} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - sudoskill{s=[
    - summon{mob=cpblood_expFXmarker1;amount=1;noise=0.5;r=0.6;yr=0} @SelfLocation{y=-1.3;ForwardOffset=0.3}];sync=true} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - sound{s=emforgottenterrorsv1:custom.forgottenterrors.slashhitb;p=1;v=1} @LivingInCone{a=45.0;r=5.5;rot=0.0;ignore=samefaction} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 32
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - auraremove{aura=particles_cpbrute_rvgprotocol} @self
  - setvariable{var=caster.casting;value="0";t=integer} @Self
  - setstance{stance=normal} @self

#  - randomskill{s=attack2cpbrute,bruttack2_cpbrute,bruttack2_cpbrute,bruttack2_cpbrute;sync=true;repeat=2;repeatinterval=4} @LivingInCone{a=100.0;r=5.5;rot=0.0;ignore=samefaction;limit=1;sort=NEAREST} ?!variableEquals{var=caster.hurtened;value="1"} ?!hasaura{n=bruttackrest2}
  - delay 1 #40 ticks
  - spin{d=15;v=0;delay=0} @self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - potion{type=SLOW;duration=10;level=4;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - delay 10
  - potion{type=SLOW;duration=6;level=9;p=false;force=true;delay=0} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}
  
  
  - delay 14 #57

  - lockmodel{l=false;delay=1} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - bodyclamp{m=em_corruptedbrute;c=50} @self ?variableEquals{var=caster.skillxd;value="run_attack"}
  - setvariable{var=caster.skillxd;value="none";t=string} @Self ?variableEquals{var=caster.skillxd;value="run_attack"}
  
cpbrute_ravagerun_stop:
  Cooldown: 5
  Conditions:
  - variableEquals{var=caster.running;value="2"} true
  - stance{s=normal} orElseCast cpbrute_ravagerun_stopB
  Skills:
  - message{m="&cCorruptedbrute &bcasting &dcpbrute_ravagerun_stop"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{s=casting} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - auraremove{aura=runstance2_cpbrute_trigger} @self
  - auraremove{aura=runstance3_cpbrute_trigger} @self
  - setvariable{var=caster.running;value="0";t=integer} @Self
  - setvariable{var=caster.runstacks;value="0";t=integer} @Self
  - spin{d=40;v=0} @self
  - lunge{v=0.44;vy=0.002;repeat=4;repeatinterval=1} @forward{f=10;y=1} 1
  - lunge{v=0.24;vy=0.002;repeat=6;repeatinterval=1;delay=5} @forward{f=10;y=1} 1
  - lockmodel{l=false;delay=40} @Self
  - setspeed{speed=1;type=walking} @Self
  - auraremove{aura=particles_cpbrute_rvgprotocol} @self
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - state{remove=true;s=run_arm_catch;lo=1;n=false;frame=0} @self
  - state{state=run_fail;li=1;lo=4;n=false;speed=1} @self
  - potion{type=SLOW;duration=40;level=7;p=false;force=true} @Self
  - delay 40
  - auraremove{aura=runstance3_cpbrute_trigger} @self
  - setvariable{var=caster.casting;value="0";t=integer} @Self
  - setvariable{var=caster.skillxd;value="none";t=string} @Self
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - setstance{s=normal} @Self
  - setvariable{var=caster.stance;type=STRING;value="<caster.stance>"} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bStance <caster.var.stance>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bSkillxd <caster.var.skillxd>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bCASTING? <caster.var.casting>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE

cpbrute_ravagerun_stopB:
  Cooldown: 5
  Conditions:
  - variableEquals{var=caster.running;value="2"} true
  - stance{s=casting} true
  Skills:
  - message{m="&cCorruptedbrute &bcasting &dcpbrute_ravagerun_stop"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - setstance{s=casting} @Self
  - setvariable{var=caster.casting;value="1";t=integer} @Self
  - auraremove{aura=runstance2_cpbrute_trigger} @self
  - auraremove{aura=runstance3_cpbrute_trigger} @self
  - setvariable{var=caster.running;value="0";t=integer} @Self
  - setvariable{var=caster.runstacks;value="0";t=integer} @Self
  - spin{d=40;v=0} @self
  - lunge{v=0.44;vy=0.002;repeat=4;repeatinterval=1} @forward{f=10;y=1} 1
  - lunge{v=0.24;vy=0.002;repeat=6;repeatinterval=1;delay=5} @forward{f=10;y=1} 1
  - lockmodel{l=false;delay=40} @Self
  - setspeed{speed=1;type=walking} @Self
  - auraremove{aura=particles_cpbrute_rvgprotocol} @self
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - state{remove=true;s=run_arm_catch;lo=1;n=false;frame=0} @self
  - state{state=run_fail;li=1;lo=4;n=false;speed=1} @self
  - potion{type=SLOW;duration=40;level=7;p=false;force=true} @Self
  - delay 40
  - auraremove{aura=runstance3_cpbrute_trigger} @self
  - setvariable{var=caster.casting;value="0";t=integer} @Self
  - setvariable{var=caster.skillxd;value="none";t=string} @Self
  - state{remove=true;s=run;lo=1;n=false;frame=0} @self
  - setstance{s=normal} @Self
  - setvariable{var=caster.stance;type=STRING;value="<caster.stance>"} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bStance <caster.var.stance>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bSkillxd <caster.var.skillxd>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
  - message{m="&cCorruptedbrute &bCASTING? <caster.var.casting>"} @PlayersNearOrigin{r=75} 0 #DEBUGMESSAGE
#
#
#
#
#
########################################
#     #           #         #          #
#     #           #         #          #
#     #                                #
#     #                                #
#     #                                # ########################
#     #                                ############################################################
#     #                                #
#     #                                #
#     #                                #
########################################
#
#
#
#
#
#
#


#123123