ACTOR GoddessMainyu : GenericBoss 17501
{
FloatSpeed 8
Speed 8
Health 200000
Mass 0x7FFFFFFF
DamageFactor "PlayerNemesisPlasma", 0.0
DamageFactor "Legendary", 0.0
DamageFactor "Melee", 0.05
DamageFactor "Crush", 0.1
DamageFactor "Acid", 0.05
DamageFactor "Ice", 0.0
DamageFactor "Fire", 0.0
DamageFactor "Poison", 0.0
DamageFactor "PoisonCloud", 0.0
DamageFactor "Electric", 0.001
DamageFactor "Disintegrate", 0.001
DamageFactor "DrainLife", 0.0
DamageFactor "Extreme", 0.0
DamageFactor "Player", 0.1
DamageFactor "Players", 0.02
DamageFactor "PyroShot", 0.0
DamageFactor "PlayerPyro", 0.0
DamageFactor "PDTPuff", 0.0
DamageFactor "Explosion", 0.1
DamageFactor "NuclearFire", 0.01
DamageFactor "BFG9500Ball", 0.25
DamageFactor "BFGSplash", 0.25
DamageFactor "UpBFG9500Ball", 0.25
DamageFactor "UpBFGSplash", 0.15
DamageFactor "PDTBFG", 0.03
DamageFactor "PDTBFGTracer", 0.03
DamageFactor "PlayerDevBall", 0.02
DamageFactor "PlayerDevBall2", 0.02
DamageFactor "PlayerDevTracer", 0.02
DamageFactor "PlayerBHole", 0.05
DamageFactor "LegendaryPlayer", 0.015
DamageFactor "PlayerHellfire", 0.1
DamageFactor "SuperWeapon", 0.0
DamageFactor "LegendaryGuruPlayer", 0.015
DamageFactor 0.1
DamageFactor "PlayerDTRG", 0.0
DamageFactor "Cursed", 0.05
DamageFactor "Hackroid", 0.03
DamageFactor "SatanGuard", 0.0
DamageFactor "Moloch", 0.0
DamageFactor "ZombieDev", 0.0
DamageFactor "Terminator", 0.0
DamageFactor "Legendary1", 0.0
DamageFactor "LegendaryGuru", 0.0
DamageFactor "UltimateLegendary", 0.0
DamageFactor "Cybers", 0.0
DamageFactor "Hell", 0.0
DamageFactor "Commander", 0.0
DamageFactor "Baby15K", 0.0
DamageFactor "Cyber10K", 0.0
DamageFactor "DemolisherEx", 0.0
DamageFactor "DarkDemoEx", 0.0
DamageFactor "CerChainguns", 0.0
DamageFactor "CerEnergyBall", 0.0
DamageFactor "HellComet", 0.0
DamageFactor "HFCyber", 0.0
DamageFactor "DBFG2", 0.0
DamageFactor "DBFG10K2", 0.0
DamageFactor "DBFGSplash2", 0.0
DamageFactor "PlayerDBFG2", 0.0
DamageFactor "PlayerDBFG10K2", 0.0
DamageFactor "PlayerDBFGSplash2", 0.0
DamageFactor "TrueLegendaryDamage", 0.1
DamageFactor "TrueLegendaryPlayer", 0.1
DamageFactor "NemesisBall", 0.04
Species "Mainyu"
ActiveSound "Mainyu/Active"
//DeathSound "Mainyu/Death"
SeeSound "Mainyu/Sight"
PainSound "Mainyu/Pain"
//AttackSound "MReimu/TeleportIn"
Painchance 4
Painchance "Melee", 256
PainChance "PlayerDBFG2", 256
PainChance "PlayerDBFG210K", 256
PainChance "PlayerDBFG10K2", 256
PainChance "DBFG210K", 256
PainChance "DBFG2Splash", 256
PainChance "DBFG2", 256
PainChance "DBFG", 256
PainChance "PlayerDBFG", 256
PainChance "DBFG10K2", 256
MeleeThreshold 200
MeleeRange 120
Obituary "%o was erased from existance by GoddessMainyu."
HitObituary "%o's was purged and had his soul purified by GoddessMainyu."
Tag "\c[d8]Mainyu, Goddess of the Divine Realm\c-"
+BOSSDEATH
+NORADIUSDMG
+NOTIMEFREEZE
+MISSILEMORE
+MISSILEEVENMORE
+NOTELEFRAG
+QUICKTORETALIATE
+DONTRIP
+NOFEAR
+CANTSEEK
+ALWAYSFAST
+SEEINVISIBLE
+NOICEDEATH
var int user_music;
var int user_missile;
var int user_teleloop;
var int user_mode;
var int user_script;
var int user_rage;
var int user_currenthp;
var int user_effects;
var int user_CheckPower;
var int user_LastStand;
States
{
  Spawn:
  SpawnLoop:
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_Gravity
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_ChangeFlag("FLOAT",0)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
    MAIS A 1 A_LookEx(LOF_FULLVOLSEESOUND,0,0,0,360,"See2")
	Loop
  See2:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,1782,1113)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_SpawnItemEx("MainyuBarrier",0,0,50)
    MAIS BC 10
    MAIS D 44
	TNT1 A 0 A_SpawnItem("MainyuLightning")
    MAIS EFGH 6
    MAIS IJKLMNOPQ 4
    TNT1 A 0 A_SpawnItemEx("MainyuSparkleSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_ChangeFlag("ALWAYSFAST",0)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_NoGravity
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	TNT1 A 0 A_ChangeFlag("FLOAT",1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
    Goto See
  Idle:
	TNT1 A 0 A_Look
    MAIN ABCD 2 A_Wander
	TNT1 A 0 A_Look
    MAIN EFGH 2 A_Wander
	TNT1 A 0 A_Look
    MAIN IJKL 2 A_Wander
	TNT1 A 0 A_Look
    MAIN MNOP 2 A_Wander
	TNT1 A 0 A_Look
    MAIN QRST 2 A_Wander
	TNT1 A 0 A_Look
    MAIN UVWX 2 A_Wander
	TNT1 A 0 A_Look
    MAIN "YZ[]" 2 A_Wander
	Loop
  See:
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_ChangeFlag("FRIGHTENED",0)
	TNT1 A 0 A_FadeIn(1.0)
	TNT1 A 0 A_NoGravity
	TNT1 A 0 A_ChangeFlag("FLOAT",1)
	TNT1 A 0 A_Stop
	TNT1 A 0 A_JumpIf(user_LastStand == 1,2)
	TNT1 A 0 A_JumpIfHealthLower(150000, "LastStand")
	TNT1 A 0 A_Jump(30,"Teleport","ChaseTeleport")
    MAIN ABCDEFGHIJKLMN 2 A_Chase
	TNT1 A 0 A_Jump(30,"Teleport","ChaseTeleport")
	MAIN "OPQRSTUVWXYZ[]" 2 A_Chase
    Loop
   CheckPower:
	   TNT1 A 0 A_SetUserVar("user_CheckPower",1)
       TNT1 A 0 A_JumpIfInTargetInventory("NexusStrength",1,"CheckPower2")
       Goto See
   CheckPower2:
       TNT1 A 0 A_JumpIfInTargetInventory("TerminatorDamage2",1,"FinalTruePower")
       Goto TruePower
   TruePower:
       //TNT1 A 0 A_GiveInventory("GodFinalBattleResistanceGiver3",1)
	   //TNT1 A 0 A_GiveInventory("Health",10000)
       Goto See
   FinalTruePower:
       //TNT1 A 0 A_GiveInventory("GodFinalBattleResistanceGiver6",1)
	   //TNT1 A 0 A_GiveInventory("Health",20000)
       Goto See
   LastStand:
       TNT1 A 0 A_SetUserVar("user_LastStand",1)
	   MAI2 N 5
       TNT1 A 0 A_GiveInventory("GodsFinalBattleShield5",1)
	   TNT1 A 0 A_GiveInventory("GodsFullImunityGiver5",1)
	   MAI2 N 40
	   MAIN ABC 2 A_Chase
       Goto See
   TrueLastStand:
       TNT1 A 0 A_JumpIfInTargetInventory("NexusSpread",1,"FinalTrueLastStand")
       TNT1 A 0 A_GiveInventory("GodsFinalBattleShield5",1)
	   TNT1 A 0 A_GiveInventory("GodsFullImunityGiver5",1)
	   TNT1 A 0 A_GiveInventory("Health",2000)
       Goto See
   FinalTrueLastStand:
       TNT1 A 0 A_GiveInventory("GodsFinalBattleShield5",1)
	   TNT1 A 0 A_GiveInventory("GodsFullImunityGiver5",1)
	   TNT1 A 0 A_GiveInventory("Health",5000)
       Goto See
  Teleport:
	TNT1 A 0 A_RemoveChildren(1)
	MAI7 J 1 A_UnSetShootable
	TNT1 A 0 A_PlaySound("MReimu/TeleportOut",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	MAI7 JKKKLLLMMM 1 A_FadeOut(0.1,0)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 A 0 A_PlaySound("MReimu/TeleportIn",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	MAI7 MMMLLLKKKJ 1 A_FadeIn(0.1)
    TNT1 A 0 A_SpawnItemEx("MainyuSparkleSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	MAI7 J 1 A_SetShootable
	Goto See
  ChaseTeleportAfraid:
	TNT1 A 0 A_ChangeFlag("FRIGHTENED",1)
  ChaseTeleport:
	TNT1 A 0 A_RemoveChildren(1)
	MAI7 A 1 A_UnSetShootable
	TNT1 A 0 A_PlaySound("MReimu/TeleportOut",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	MAI7 JKKKLLLMMM 1 A_FadeOut(0.1,0)
	TNT1 A 0 A_SetUserVar("user_teleloop",random(0,100))
	TNT1 A 0 A_JumpIf(user_rage == 1,2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_ChangeFlag("NOCLIP",1)
  ChaseTeleportLoop:
	TNT1 A 0 A_JumpIf(user_teleloop >= 300,"ChaseTeleportEnd")	 
	TNT1 A 0 A_SetUserVar("user_teleloop",user_teleloop+1)
	TNT1 A 0 A_Jump(254,2)
	TNT1 A 0 A_Playsound("Mainyu/Laugh",2)
	TNT1 AAA 0 A_Chase("ChaseTeleportEnd","",CHF_NOPLAYACTIVE)
	TNT1 A 1 A_Chase("ChaseTeleportEnd","",CHF_NOPLAYACTIVE)
	Loop
  ChaseTeleportEnd:
	TNT1 A 0 A_ChangeFlag("FRIGHTENED",0)
	TNT1 A 0 A_PlaySound("MReimu/TeleportIn",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	MAI7 MMMLLLKKKJ 1 A_FadeIn(0.1)
    TNT1 A 0 A_SpawnItemEx("MainyuSparkleSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_ChangeFlag("NOCLIP",0)
	MAI7 J 1 A_SetShootable
	Goto See
  ChaseTeleportAfraid.Black:
	TNT1 A 0 A_ChangeFlag("FRIGHTENED",1)
  ChaseTeleport.Black:
	TNT1 A 0 A_RemoveChildren(1)
	2MA7 A 1 A_UnSetShootable
	TNT1 A 0 A_PlaySound("MReimu/TeleportOut",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	2MA7 JKKKLLLMMM 1 A_FadeOut(0.1,0)
	TNT1 A 0 A_SetUserVar("user_teleloop",random(0,100))
	TNT1 A 0 A_JumpIf(user_rage == 1,2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_ChangeFlag("NOCLIP",1)
  ChaseTeleportLoop.Black:
	TNT1 A 0 A_JumpIf(user_teleloop >= 300,"ChaseTeleportEnd.Black")	 
	TNT1 A 0 A_SetUserVar("user_teleloop",user_teleloop+1)
	TNT1 A 0 A_Jump(252,2)
	TNT1 A 0 A_Playsound("Mainyu/Laugh")
	TNT1 A 1 A_Chase("ChaseTeleportEnd.Black","",CHF_NOPLAYACTIVE)
	Loop
  ChaseTeleportEnd.Black:
	TNT1 A 0 A_ChangeFlag("FRIGHTENED",0)
	TNT1 A 0 A_PlaySound("MReimu/TeleportIn",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	2MA7 MMMLLLKKKJ 1 A_FadeIn(0.1)
    TNT1 A 0 A_SpawnItemEx("MainyuFireSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_ChangeFlag("NOCLIP",0)
	2MA7 A 1 A_SetShootable
	Goto See
  Pain:
	TNT1 A 0 A_Jump(30,"Teleport","ChaseTeleportAfraid")
	TNT1 A 0 A_Pain
	TNT1 A 0 A_Jump(256,"PainFrame1","PainFrame2")
    Goto See
  PainFrame1:
	MAI2 W 8
    Goto See
  PainFrame2:
	MAI2 "X" 8
    Goto See
  Pain.Black:
	TNT1 A 0 A_Jump(30,"Teleport.Black","ChaseTeleportAfraid.Black")
	TNT1 A 0 A_Pain
	TNT1 A 0 A_Jump(256,"PainFrame1.Black","PainFrame2.Black")
    Goto See
  PainFrame1.Black:
	2MA2 W 8
    Goto See
  PainFrame2.Black:
	2MA2 "X" 8
    Goto See
  Pain.Melee:
	TNT1 A 0 A_JumpIf(user_mode == 1,"PainMelee.Black")
	TNT1 A 0 A_Jump(192,"SuperMelee")
	Goto Missile
  PainMelee.Black:
	TNT1 A 0 A_Jump(192,"SuperMelee.Black")
	Goto Missile
  Pain.PlayerDBFG10K2:
  Pain.DBFG10K2:
  Pain.DBFG:
  Pain.PlayerDBFG:
  Pain.DBFG2:
  Pain.PlayerDBFG210K:
  Pain.DBFG210K:
  Pain.DBFG2Splash:
  Pain.PlayerDBFG2:
	TNT1 A 0 A_PlaySound("Mainyu/Sword",1)
	TNT1 A 0 A_CustomMissile("PlayerBlueTrueLeg10kBall1",32)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_GiveInventory("Health",500)
	TNT1 A 0 A_JumpIfCloser(350,"ChargeMelee")
	Goto See
  TryMassElectricSpawn:
	TNT1 A 0 A_JumpIf(user_mode == 1,"MassElectricSpawn")
	TNT1 A 0 A_RemoveChildren(1)
    TNT1 A 0 A_SpawnItemEx("MainyuFireSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("MReimuCastEffect2Black",0,0,50)
    TNT1 A 0 A_PlaySound("Mainyu/Transform")
	TNT1 A 0 A_SetUserVar("user_mode",1)
	Goto MassElectricSpawn
  TryShockwave:
	TNT1 A 0 A_JumpIf(user_mode == 0,"ShockwaveContinue")
	TNT1 A 0 A_RemoveChildren(1)
    TNT1 A 0 A_SpawnItemEx("MainyuSparkleSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 ACS_NamedExecuteAlways("MainyuTag",0,2)
	TNT1 A 0 A_SpawnItemEx("MReimuCastEffect2",0,0,50)
    TNT1 A 0 A_PlaySound("Mainyu/Transform")
	TNT1 A 0 A_SetUserVar("user_mode",0)
	Goto ShockwaveContinue
  TryVoidTravel:
	TNT1 A 0 A_JumpIf(user_mode == 1,"VoidTravel.Black")
	Goto VoidTravel
  ChargeMelee:
	TNT1 A 0 A_PlaySound("Mainyu/Melee",7)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,20,1,1)
	TNT1 A 0 A_Recoil(-80)
  Melee:
	TNT1 A 0 A_JumpIf(user_mode == 1,"Melee.Black")
	TNT1 A 0 A_JumpIfInTargetInventory("IsPlayer",1,2)
	TNT1 A 0 A_Jump(64,"SuperMelee")
    MAI3 AB 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 2 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"MainyuLeech",120)
	MAI3 E 3 Fast A_CustomMeleeAttack(random(600,750),"Mainyu/Meleehit","none","Mainyu")
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	MAI3 FG 2 Fast
	TNT1 A 0 A_JumpIfCloser(300,"ContinueMelee")
	MAI3 HIJKL 2
	Goto See
  ContinueMelee:
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	MAI3 OP 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	MAI3 QR 2 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"MainyuLeech",120)
	MAI3 S 3 A_CustomMeleeAttack(random(600,750),"Mainyu/Meleehit","none","Mainyu")
	MAI3 TU 2 Fast
	TNT1 A 0 A_JumpIfCloser(300,"ContinueMelee2")
	MAI3 VWXYZ 2 Fast
	Goto See
  ContinueMelee2:
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	MAI4 ABCD 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	MAI4 EF 2 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"MainyuLeech",120)
	MAI4 G 3 A_CustomMeleeAttack(random(600,750),"Mainyu/Meleehit","none","Mainyu")
	MAI4 HIJKLMNOP 2 Fast
	Goto See
  SuperMelee:
	MAI5 MNO 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI5 PQ 4 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"SuperMainyuLeech",120)
	MAI5 R 5 A_CustomMeleeAttack(random(4000,6000),"Mainyu/Meleehit","none","Mainyu")
	MAI5 STUVW 3 Fast
	Goto See
  Melee.Black:
	TNT1 A 0 A_JumpIfInTargetInventory("IsPlayer",1,2)
	TNT1 A 0 A_Jump(64,"SuperMelee.Black")
    2MA3 AB 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	2MA3 CD 2 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"MainyuLeech",120)
	2MA3 E 3 A_CustomMeleeAttack(random(600,750),"Mainyu/Meleehit","none","Mainyu")
	2MA3 FG 2 Fast
	TNT1 A 0 A_JumpIfCloser(300,"ContinueMelee.Black")
	2MA3 HIJKL 2 Fast
	Goto See
  ContinueMelee.Black:
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	2MA3 OP 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	2MA3 QR 2 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"MainyuLeech",120)
	2MA3 S 3 Fast A_CustomMeleeAttack(random(600,750),"Mainyu/Meleehit","none","Mainyu")
	2MA3 TU 2 Fast
	TNT1 A 0 A_JumpIfCloser(300,"ContinueMelee2.Black")
	2MA3 VWXYZ 2 Fast
	Goto See
  ContinueMelee2.Black:
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	2MA4 ABCD 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,5,1,1)
	TNT1 A 0 A_Recoil(-40)
	2MA4 EF 2 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"MainyuLeech",120)
	2MA4 G 3 Fast A_CustomMeleeAttack(random(600,750),"Mainyu/Meleehit","none","Mainyu")
	2MA4 HIJ 2 Fast
	//TNT1 A 0 A_JumpIfCloser(300,"ContinueMelee3.Black")
	2MA4 KLMNOP 2 Fast
	Goto See
  SuperMelee.Black:
	2MA5 MNO 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	2MA5 PQ 4 Fast
	TNT1 A 0 A_CustomBulletAttack(0,0,1,0,"SuperMainyuLeech",120)
	2MA5 R 5 A_CustomMeleeAttack(random(4000,6000),"Mainyu/Meleehit","none","Mainyu")
	2MA5 STUVW 3 Fast
	Goto See
  Missile:
	TNT1 A 0 A_JumpIfCloser(350,"ChargeMelee")
	TNT1 A 0 A_Jump(100,"Teleport","ChaseTeleport")
	TNT1 A 0 A_Jump(128,"SwordProjectiles","BlueBombs")
	Goto NormalAttack
  Missile.Black:
	TNT1 A 0 A_Jump(256,"Missile")
  NormalAttack:
    TNT1 A 0 A_JumpIfHealthLower(150000, "NormalAttackEnraged")
	TNT1 A 0 A_Jump(128,"NormalAttack2")
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 4 Fast
	MAI2 DDDDDDDDEEEEEEEEFFFFFFFF 1 A_CustomMissile("GoddessMainyuDivineRifleShot",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 4 Fast
	Goto See
  NormalAttack2:
    TNT1 A 0 A_JumpIfHealthLower(150000, "NormalAttackEnraged2")
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 4 Fast
	MAI2 DDDDDDDDEEEEEEEEFFFFFFFF 1 A_CustomMissile("NemesisCyberBFG9500Ball",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 4 Fast
	Goto See
  NormalAttackEnraged:
    TNT1 A 0 A_Jump(128,"NormalAttackEnraged2")
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 2 Fast
	MAI2 DDDDDDDDEEEEEEEEFFFFFFFF 1 A_CustomMissile("GoddessMainyuDivineRifleShot",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 2 Fast
	TNT1 A 0 A_SetInvulnerable
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 3 Fast
	MAI2 DDEEFF 3 A_CustomMissile("GoddessMainyuDivineBomb",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 2 Fast
	MAI3 AB 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	TNT1 A 0 A_UnSetInvulnerable
	MAI3 FG 4 Fast
	Goto See
  NormalAttackEnraged2:
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 2 Fast
	MAI2 DDDDDDDDEEEEEEEEFFFFFFFF 1 A_CustomMissile("NemesisCyberBFG9500Ball",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 2 Fast
	TNT1 A 0 A_SetInvulnerable
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 3 Fast
	MAI2 DDEEFF 3 A_CustomMissile("GoddessMainyuDivineBomb",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 2 Fast
	MAI3 AB 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("VHellsmithLightningProj",32)
	TNT1 A 0 A_UnSetInvulnerable
	MAI3 FG 4 Fast
	Goto See
  BlueBombs:
    TNT1 A 0 A_JumpIfHealthLower(150000, "BlueBombsEnraged")
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 4 Fast
	MAI2 DDEEFF 4 A_CustomMissile("GoddessMainyuDivineBomb",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 4 Fast
	Goto See
  BlueBombsEnraged:
	TNT1 A 0 A_PlaySound("Mainyu/Attack1",2)
	MAI2 ABC 4 Fast
	MAI2 DDEEFF 2 A_CustomMissile("GoddessMainyuDivineBomb",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-1,1))
	MAI2 GHIJK 1 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	Goto See
  PortalProjectilesEnd:
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	MAI7 LKJ 4 Fast
	Goto See
  PortalProjectilesRage:
	TNT1 A 0 A_PlaySound("Mainyu/Attack7",2)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_SpawnItemEx("MainyuWhitePortal",0,0,100)
	MAI7 JKLM 5 Fast
	TNT1 A 0 A_SetUserVar("user_missile",0)
  PortalProjectilesRageLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 7,"PortalProjectilesEnd")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	TNT1 A 0 A_SpawnItemEx("MainyuWhitePortal",0,0,100)
	MAI7 MMMMM 4 A_CustomMissile("MainyuPortalProjectileBig",100,0,random(-25,25),CMF_OFFSETPITCH,random(-4,4))
	Loop
  Shockwave:
	TNT1 A 0 A_JumpIfCloser(850,"ShockwaveContinue")
	Goto PortalProjectiles
  ShockwaveContinue:
	TNT1 A 0 A_PlaySound("Mainyu/Attack4",2)
	MAI2 ABC 6 Fast
	TNT1 A 0 A_PlaySound("Mainyu/FloorshitCharge",7)
	TNT1 A 0 A_SpawnItemEx("MainyuFloorshitCharge",0,0,40)
	MAI2 DEFGHIJKL 3 Fast
	TNT1 A 0 ThrustThingZ(0,25,0,1)
	MAI7 ABC 7 Fast
	TNT1 A 0 A_Stop
	MAI7 DE 7 Fast
	TNT1 A 0 A_CustomMissile("MainyuShockwaveExplodeBig",-100,0,0,CMF_AIMDIRECTION|CMF_TRACKOWNER)
	MAI7 FGHI 6 Fast
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	Goto See
  SwordProjectiles:
    TNT1 A 0 A_JumpIfHealthLower(150000, "SwordProjectilesEnraged")
	TNT1 A 0 A_Jump(128,"SwordProjectiles2")
	TNT1 A 0 A_PlaySound("Mainyu/Attack10",2)
    MAI3 AB 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 4 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 FG 4 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 4 Fast
	MAI3 S 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 TU 4 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 4 Fast
	MAI4 G 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 AB 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 FG 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 4 Fast
	MAI3 S 6 A_CustomMissile("T3DBFGBall",32)
	MAI3 TU 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 4 Fast
	MAI4 G 6 A_CustomMissile("T3DBFGBall",32)
	MAI4 HIJKLMNOP 3 Fast
	Goto See
  SwordProjectiles2:
    TNT1 A 0 A_JumpIfHealthLower(150000, "SwordProjectilesEnraged")
	TNT1 A 0 A_PlaySound("Mainyu/Attack10",2)
    MAI3 AB 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 4 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("VHellsmithLightningProj",32)
	MAI3 FG 4 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 4 Fast
	MAI3 S 6 A_CustomMissile("VHellsmithLightningProj",32)
	MAI3 TU 4 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 4 Fast
	MAI4 G 6 A_CustomMissile("VHellsmithLightningProj",32)
	MAI3 AB 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("VHellsmithSpear",32)
	MAI3 FG 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 4 Fast
	MAI3 S 6 A_CustomMissile("VHellsmithSpear",32)
	MAI3 TU 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 4 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 4 Fast
	MAI4 G 6 A_CustomMissile("VHellsmithSpear",32)
	MAI4 HIJKLMNOP 3 Fast
	Goto See
   SwordProjectilesEnraged:
   TNT1 A 0 A_Jump(128,"SwordProjectilesEnraged2")
	TNT1 A 0 A_PlaySound("Mainyu/Attack10",2)
    MAI3 AB 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 2 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 FG 3 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 3 Fast
	TNT1 A 0 A_SetInvulnerable
	MAI3 S 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 TU 3 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 G 6 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 AB 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 3 A_CustomMissile("GoddessMainyuBFG3500Ball",32)
	MAI3 FG 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 S 3 A_CustomMissile("T3DBFGBall",32)
	MAI3 TU 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 3 Fast
	MAI4 G 6 A_CustomMissile("T3DBFGBall",32)
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 3 Fast
	TNT1 A 0 A_UnSetInvulnerable
	MAI4 G 6 A_CustomMissile("T3DBFGBall",32)
	MAI4 HIJKLMNOP 3 Fast
	Goto See
  SwordProjectilesEnraged2:
	TNT1 A 0 A_PlaySound("Mainyu/Attack10",2)
    MAI3 AB 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 2 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 6 A_CustomMissile("VHellsmithLightningProj",32)
	MAI3 FG 3 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 3 Fast
	TNT1 A 0 A_SetInvulnerable
	MAI3 S 6 A_CustomMissile("VHellsmithLightningProj",32)
	MAI3 TU 3 Fast
	TNT1 A 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 2 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 G 6 A_CustomMissile("VHellsmithLightningProj",32)
	MAI3 AB 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 CD 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 E 3 A_CustomMissile("VHellsmithSpear",32)
	MAI3 FG 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 OP 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI3 QR 4 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI3 S 3 A_CustomMissile("VHellsmithSpear",32)
	MAI3 TU 3 Fast
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 3 Fast
	MAI4 G 6 A_CustomMissile("VHellsmithSpear",32)
	TNT1 AA 0 Fast A_GiveInventory("CLSentientStrafe",1)
	MAI4 ABCD 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	MAI4 EF 3 Fast
	TNT1 A 0 A_UnSetInvulnerable
	MAI4 G 6 A_CustomMissile("VHellsmithSpear",32)
	MAI4 HIJKLMNOP 3 Fast
	Goto See
  LightStorm:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_PlaySound("Mainyu/Superattack1",2,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("MainyuWingsWhiteAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("MainyuWhiteAttackCopy",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 45
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_RemoveChildren(1)
	TNT1 A 0 A_PlaySound("Mainyu/Ding")
	//TNT1 A 0 ThrustThingZ(0,40,0,0)
	TNT1 A 0 A_UnSetShootable
	TNT1 A 18
	//TNT1 A 0 A_SpawnItemEx("MReimuCastEffect2",0,0,50)
	TNT1 A 0 A_Stop
	TNT1 A 0 A_JumpIf(user_rage == 1,"LightStormRage")
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 4 A_SpawnItemEx("MainyuCometRain",Random(-3000,3000),Random(-3000,3000),0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 80
	TNT1 AAAAAAA 10 A_VileTarget("MainyuStrikeBeam")
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 4 A_SpawnItemEx("MainyuCometRain",Random(-3000,3000),Random(-3000,3000),0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("MainyuBigStrikeBeam",0,0,-1000)
	TNT1 AAAAAAAAAAAAAAAA 4 A_SpawnItemEx("MainyuStrikeBeam",Random(-1500,1500),Random(-1500,1500),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 170
	TNT1 A 0 A_PlaySound("MReimu/TeleportIn",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	MAI7 MMMLLLKKKJ 1 A_FadeIn(0.1)
    TNT1 A 0 A_SpawnItemEx("MainyuSparkleSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	MAI7 J 1 A_SetShootable
	Goto See
  LightStormRage:
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 4 A_SpawnItemEx("MainyuCometRain",Random(-3000,3000),Random(-3000,3000),0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 80
	TNT1 AAAAAAAAAAAAAA 5 A_VileTarget("MainyuStrikeBeam")
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_SpawnItemEx("MainyuCometRain",Random(-3000,3000),Random(-3000,3000),0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("MainyuBigStrikeBeam",0,0,-1000)
	TNT1 A 0 A_SpawnItemEx("MainyuBigStrikeBeam",Random(-1500,1500),Random(-1500,1500),-1000,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_SpawnItemEx("MainyuStrikeBeam",Random(-1500,1500),Random(-1500,1500),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 170
	TNT1 A 0 A_PlaySound("MReimu/TeleportIn",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	MAI7 MMMLLLKKKJ 1 A_FadeIn(0.1)
    TNT1 A 0 A_SpawnItemEx("MainyuSparkleSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	MAI7 J 1 A_SetShootable
	Goto See
  VoidTravel:
	TNT1 A 0 A_PlaySound("Mainyu/Superattack3",1,1.0,0,ATTN_NONE)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	MAIT ABB 20 Fast
	TNT1 A 0 A_PlaySound("MReimu/Cast1")
	TNT1 A 0 A_SpawnItemEx("MReimuCastEffect2",0,0,50)
	MAIT J 60 Fast
	TNT1 A 0 A_UnSetShootable
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_SetTranslucent(1.0)
	TNT1 A 0 A_RemoveChildren(1)
	TNT1 A 0 A_PlaySound("Mainyu/Disappear",7)
	TNT1 A 0 A_SpawnItemEx("MainyuVoidTravelEffect",0,0,50)
	TNT1 AAA 1 A_SpawnItemEx("MainyuVoidTravelFake")
	TNT1 A 30
	TNT1 A 0 A_SetUserVar("user_missile",0)
  VoidTravelLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 20,"VoidTravelEnd")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAA 0 A_Chase("","",CHF_NOPLAYACTIVE)
	TNT1 A 12 Fast A_CustomMissile("MainyuVoidTravelSlash",32)
	Loop
  VoidTravelEnd:
	TNT1 A 0 A_JumpIf(user_mode == 1,"VoidTravelEnd.Black")
	TNT1 A 0 A_PlaySound("MReimu/TeleportIn",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	MAI7 MMMLLLKKKJ 1 A_FadeIn(0.1)
    TNT1 A 0 A_SpawnItemEx("MainyuSparkleSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	MAI7 J 1 A_SetShootable
	Goto See
 
  MassElectricSpawn:
	TNT1 A 0 A_PlaySound("Mainyu/Attack6",2)
	2MA7 JKLMN 5 Fast
	TNT1 A 0 A_SetUserVar("user_missile",0)
  MassElectricSpawnLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 8,"MassElectricSpawnEnd")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	2MA7 OPOPOP 3 Fast
	TNT1 A 0 A_PlaySound("Mainyu/Electric")
	TNT1 A 0 A_SpawnItemEx("MainyuSentientElectric",random(-700,700),random(-700,700),random(0,200))
	Loop
  MassElectricSpawnEnd:
	2MA7 OPQRST 5 Fast
	Goto See
  GroundFire:
	2MA2 ABC 4 Fast
	TNT1 AAAAAAA 0 A_CustomMissile("NemesisCyberNobleBall3",0,0,random(-20,20))
	2MA2 DEFGHI 2 Fast
	TNT1 AAAAAAA 0 A_CustomMissile("NemesisCyberNobleBall3",0,0,random(-20,20))
	2MA2 DEFGHI 2 Fast
	TNT1 AAAAAAA 0 A_CustomMissile("NemesisCyberNobleBall3",0,0,random(-20,20))
	2MA2 DEFGHI 2 Fast
	TNT1 AAAAAAA 0 A_CustomMissile("NemesisCyberNobleBall3",0,0,random(-20,20))
	2MA2 DEFGHI 2 Fast
	TNT1 AAAAAAA 0 A_CustomMissile("NemesisCyberNobleBall3",0,0,random(-20,20))
	2MA2 DEFGHIJK 2 Fast
	TNT1 A 0 A_Jump(200,"ChangeMode")
	Goto See
  SubliminationSword:
	2MA3 A 3 A_PlaySound("Mainyu/Attack8",2,1.0,0,ATTN_NONE)
	2MA3 BBBBBBB 3 A_SpawnItemEx("TrueNemesisHellionSmokeSpawner")
	TNT1 A 0 A_PlaySound("Mainyu/Sword")
	2MA3 CDEF 5
	TNT1 A 0 A_JumpIfTargetInLOS(2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_GiveToTarget("MainyuSubliminationGiver",1)
	2MA3 GHIJKL 4
	Goto See
  Shock:
	TNT1 A 0 A_PlaySound("Mainyu/Attack9",7)
	TNT1 A 0 A_PlaySound("Mainyu/HitscanWarn",6)
	2MA9 ABCDEEEFGHIJ 4
	TNT1 A 0 A_SetUserVar("user_missile",0)
  ShockLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 8,"ShockEnd")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	2MA9 KL 4 A_CustomBulletAttack(2,2,1,random(20,50),"MainyuShockPuff",0,CBAF_NORANDOM)
	Loop
  ShockEnd:
	2MA9 MN 5
	TNT1 A 0 A_Jump(200,"ChangeMode")
	Goto See
  VoidTravel.Black:
	TNT1 A 0 A_PlaySound("Mainyu/Superattack3",1,1.0,0,ATTN_NONE)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	MAIT EFF 20 Fast
	TNT1 A 0 A_PlaySound("MReimu/Cast1")
	TNT1 A 0 A_SpawnItemEx("MReimuCastEffect2",0,0,50)
	MAIT J 60 Fast
	TNT1 A 0 A_UnSetShootable
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_SetTranslucent(1.0)
	TNT1 A 0 A_RemoveChildren(1)
	TNT1 A 0 A_PlaySound("Mainyu/Disappear",7)
	TNT1 A 0 A_SpawnItemEx("MainyuVoidTravelEffect",0,0,50)
	TNT1 AAA 1 A_SpawnItemEx("MainyuVoidTravelFakeBlack")
	TNT1 A 30
	TNT1 A 0 A_SetUserVar("user_missile",0)
	Goto VoidTravelLoop
  VoidTravelEnd.Black:
	TNT1 A 0 A_PlaySound("MReimu/TeleportIn",7)
	TNT1 A 0 A_SpawnItemEx("MReimuTeleportEffect",0,0,40)
	2MA7 MMMLLLKKKJ 1 A_FadeIn(0.1)
    TNT1 A 0 A_SpawnItemEx("MainyuFireSpawner",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	2MA7 J 1 A_SetShootable
	Goto See
  Death:
	TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
	TNT1 A 0 A_SetUserVar("user_missile",0)
	MAI2 LMN 6
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion2",0,0,32)
	MAI2 N 50
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion",0,0,32)
	MAI2 N 50
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion",0,0,32)
	MAI2 N 50
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion",0,0,32)
	MAI2 N 50
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion",0,0,32)
	MAI2 N 50
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion2",0,0,32)
	TNT1 A 0 A_RemoveChildren(1)
  ActualDeath:
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion",0,0,32)
	TNT1 AA 0 A_SpawnItemEx("MainyuDeathExplosion2",0,0,32)
	TNT1 A 0 A_Quake(7,90,0,3000)
	TNT1 A 0 A_SpawnItemEx("SubliminationSword",0,0,8)
	TNT1 A 0 A_SpawnItemEx("DivineArmorItem",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisMegaSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("DemonicChalice",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("SkullOfPower",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 AAAAA 0 A_SpawnItemEx("NemesisDemonicEnergy",0,0,8,random(0,8),random(0,8),2,random(0,360),0,80)
	TNT1 AA 0 A_SpawnItemEx("NemesisGreaterDemonicEnergy",0,0,8,random(0,8),random(0,8),2,random(0,360),0,60)
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryUltraSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("UltraGodsSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("VexedNemesisPowerShard",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryRune",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 A 0 A_SpawnItemEx("LegendaryRune",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 3 A_SpawnItemEx("MainyuDeathExplosion4",random(0,128),0,random(16,100),frandom(1,8),0,frandom(1,8),random(0,360),0,120)
	TNT1 A 0 A_SpawnItem("DarkDesNuke2")
	TNT1 A 30 A_KillMaster
	Stop
  Null:
    TNT1 A 0 A_RemoveChildren(1)
	TNT1 A 1
	Stop
  }
}

Actor INFGoddessMainyu : GoddessMainyu
{
Tag "\c[d8]Mainyu, Goddess of the Divine Realm\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("EndGameSpawnCheck") == 2,1)
	Goto Remove
	Idle:
		TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_Gravity
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_ChangeFlag("FLOAT",0)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
    MAIS A 1 A_LookEx(LOF_FULLVOLSEESOUND,0,0,0,360,"See2")
		Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("CybersStrongSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}


Actor GoddessMainyuBFG3500Ball : BFG3500Ball
{
  Radius 13
  Height 8 
  Speed 40
  PROJECTILE
  Damage 1500
  +FORCERADIUSDMG
  DamageType "Mainyu"
  Species "Mainyu"
  Renderstyle Add
  Alpha 0.8
  DeathSound ""
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("weapons/dtech10kball","Voice",1)
    BFS9 ABCD 1 Bright A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    Loop
  Death:	
    TNT1 A 0
	TNT1 A 0 A_SetTranslucent(0.75,1)	
	TNT1 A 0 A_RadiusGive("BFG3500BallEffect",584,RGF_MONSTERS,1) //TNT1 A 0 A_RadiusGive("BFG3500BallEffect",584,RGF_MONSTERS|RGF_PLAYERS,1)
	TNT1 A 0 A_Explode(750,350,0)
	TNT1 A 0 A_SpawnItemEx("BFG3500ShockWave",0,0,24,0,0,0,0,128)
	BFS9 ABCDABCDABCDABCDABCD 1 Bright A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	TNT1 A 0 A_Explode(750,350,0)
	//TNT1 A 0 A_Explode(8,512,0)
	TNT1 A 0 Radius_Quake(3,35,0,10,0)
	TNT1 A 0 A_RadiusGive("BFG3500BallEffect",584,RGF_MONSTERS,1)
	TNT1 A 0 A_SpawnItemEx("BFG3500ShockWave",0,0,24,0,0,0,0,128)
	TNT1 A 0 A_StopSoundEx("Voice")
	TNT1 A 0 A_PlaySound("bfg3500/explode")
	TNT1 A 0 A_SpawnItemEx("T3DBFGBoltExpImpact")
    TNT1 A 0 A_SpawnItemEx("T3DBFGBoltExp")
	BFE9 A 8 Bright A_SpawnItem("BFG3500BallEx",0,-10)
	BFE9 BCD 8 Bright
    Stop 
    }
}

Actor GoddessMainyuDivineBomb : TLSBomb
{
  Scale 1.75
  Speed 75
  DamageType "Mainyu"
  Species "Mainyu"
  +FORCERADIUSDMG
  Translation "0:255=%[0.00,0.00,0.00]:[1.80,1.80,1.80]"
  States
  {
  Spawn:
    TLSB AAAAABBBBB 1 A_SpawnItemEx("TLSTrueBombTrail",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_SeekerMissile(10,8)
	Loop
  Death:
    TNT1 A 0 A_SpawnItemEx("NemesisDeathBall")
	TNT1 A 0 A_Explode(300,200,0)
	TNT1 A 0 A_Explode(600,325,0)
    TLSB AAAAABBBBB 1 
	Stop
  }
}


ACTOR GoddessMainyuDivineRifleShot : NemesisRifleShotPlayerButFaster
{
+THRUSPECIES
+FOILINVUL
Damage 650 // 125 // 80
Speed 42
Scale 1.5
Species "Mainyu"
DamageType "Mainyu"
States
  {
  Death:
	TNT1 A 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 A 0 A_SpawnItem("NemesisWhiteProjExplode")
	TNT1 A 0 A_SpawnItemEx("NemesisBFGShockwave",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboom7",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisADemonTechEx",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 A 1 A_CustomMissile("GoddessMainyuDivineRifleShotExplosion",0,0,0,2)
	Stop
	}
}

ACTOR GoddessMainyuDivineRifleShotExplosion : NemesisRifleShotExplosionPlayer
{
Damagetype "Mainyu"
Species "Mainyu"
Speed 60
+FOILINVUL
+FORCERADIUSDMG
States
{
  Spawn:
  Death:
	TNT1 A 0
	TNT1 A 1 A_Explode(500,220) //180,220
	Stop
	}
}