ACTOR YinYangWand : Weapon
{
  -BLOODSPLATTER
  Weapon.SelectionOrder 2000
  Inventory.PickupMessage "Yin Yang wand!"
  Weapon.YAdjust 0
  Obituary "%o was crushed to death by %k's Yin Yang orbs."
  Tag "Yin-Yang Wand"
  Weapon.AmmoType "Shell"
  Weapon.AmmoGive 8
  Weapon.AmmoUse 1
  Weapon.SlotNumber 2
  States
  {
  Spawn:
    FWND Z -1
    Stop
  Ready:
    FWND A 1 A_WeaponReady
    Loop
  Deselect:
    FWND A 1 A_Lower
    Loop
  Select:
    FWND A 1 A_Raise
    Loop
  Fire:
    FWND B 0 BRIGHT
    FWND B 4 BRIGHT A_PlaySound("FireCrystal2")
    FWND B 0 A_FireCustomMissile("ReimuPlayerYinYangOrb",random(-7,7),1,0,0,0,0)
    FWND BBBBBBB 0 A_FireCustomMissile("ReimuPlayerYinYangOrb",random(-7,7),0,0,0,0,0)
    FWND C 4 BRIGHT
    FWND D 4 BRIGHT
    FWND E 4 BRIGHT
    TNT1 A 4
    FWND FA 4
    FWND A 0 A_ReFire
    Goto Ready
  }
}
ACTOR ReimuPlayerYinYangOrb
{
  Projectile
  Radius 5
  Height 10
  Speed 60
  Damage (12)
  +BRIGHT
  -NOGRAVITY
  BounceType "Doom"
  Renderstyle Add
  Alpha 0.9
  Scale 0.8
  SeeSound "touhou/fire"
  BounceSound "touhou/hit2"
  DeathSound "touhou/hit"
  Decal BulletChip
  DamageType "TouhouPlayerDamage"
  States
  {
  Spawn:
	RMYN AAABBBCCCDDD 1 Bright 
    Loop
  Death:
	RMYN ABCDABCDABCD 3 Bright A_FadeOut(0.1)
    Loop
  }
}

Actor AmuletArbalest : Weapon 
{
	Weapon.AmmoType1 "Shell"
	Weapon.AmmoType2 "Shell"
	Weapon.AmmoGive 8
	Weapon.AmmoUse1 2
	Weapon.AmmoUse2 2
	Weapon.SlotNumber 3
	Inventory.PickupMessage "You got the 'Youkai Buster' Amulet Arbalest!"
	Obituary "%o was papered over by %k's Youkai Buster."
	+WEAPON.NOAUTOFIRE
	Tag "Amulet Arbalest"
	States
	{
	Spawn:
		WBOW A -1
		Stop
	Deselect:
		BOWG A 1 Bright A_Lower
		Loop
	Select:
		BOWG A 1 Bright A_Raise
		Loop
	Ready:
		BOWG AAABBBCCCDDDBBB 1 Bright A_WeaponReady
    	Loop
	Fire:
		BOWG A 0 Bright A_GunFlash
		BOWG A 0 Bright A_Recoil(4.0)
		BOWG A 0 Bright A_PlaySound("weapons/cryobowshot")
		BOWG A 0 Bright A_PlaySound("weapons/cryobowfire", CHAN_WEAPON)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet1",0,1)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet2",2,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet2",-2,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet3",0,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet3",4,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet3",-4,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet4",2,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet4",-2,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet4",6,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet4",-6,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet5",0,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet5",4,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet5",-4,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet5",8,0)
		BOWF A 0 Bright A_FireCustomMissile("YoukaiBusterAmulet5",-8,0)
		BOWF ABCD 2 Bright
		BOWF E 8
		BOWF E 2 A_PlaySound("weapons/cryobowreload")
		BOWF E 2 Offset(0,31) 
		BOWF F 2 Offset(0,32)
		BOWF F 2 Offset(0,30)
		BOWF G 2 Offset(0,31)
		BOWF HI 1 Offset(0,32)
		BOWG CDB 3 Bright Offset(0,32)
		BOWG A 0 A_ReFire
		Goto Ready
	AltFire:
		BOWG A 0 Bright A_GunFlash
		BOWG A 0 Bright A_Recoil(4.0)
		BOWG A 0 Bright A_PlaySound("weapons/cryobowshot")
		BOWG A 0 Bright A_PlaySound("weapons/cryobowfire", CHAN_WEAPON)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",0,1)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-1, 1), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-2, 2), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-3, 3), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-4, 4), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-5, 5), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-6, 6), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-7, 7), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-8, 8), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-9, 9), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-11, 11), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-12, 12), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-13, 13), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-14, 14), 0)
		BOWF A 0 Bright A_FireCustomMissile("ReimuPlayerYinYangOrb2",random(-15, 15), 0)
		BOWF ABCD 2 Bright
		BOWF E 8
		BOWF E 2 A_PlaySound("weapons/cryobowreload")
		BOWF E 2 Offset(0,31) 
		BOWF F 2 Offset(0,32)
		BOWF F 2 Offset(0,30)
		BOWF G 2 Offset(0,31)
		BOWF HI 1 Offset(0,32)
		BOWG CDB 3 Bright Offset(0,32)
		BOWG A 0 A_ReFire
		Goto Ready
	Flash:
		TNT1 A 2 Bright A_Light1
		TNT1 A 2 Bright A_Light2
		TNT1 A 1 Bright A_Light1
		Goto LightDone
	}
}
Actor YoukaiBusterAmulet1
{
  Speed 50
  Radius 3
  Height 6
  Damage (15)
  +THRUSPECIES
  Species "Player"
  Projectile
  SeeSound "touhou/fire"
  DeathSound "touhou/hit"
  Scale 0.75
  RenderStyle Translucent
  Alpha 0.8
  States
  {
  Spawn:
	AMUB A 1 Bright
    Loop
  Death:
	AMUB AAAAAAAAAA 3 Bright A_FadeOut(0.1)
    Stop
  }
}

Actor YoukaiBusterAmulet2 : YoukaiBusterAmulet1
{
  States
  {
  Spawn:
	AMUR A 1 Bright
    Loop
  Death:
	AMUR AAAAAAAAAA 3 Bright A_FadeOut(0.1)
    Stop
  }
}

Actor YoukaiBusterAmulet3 : YoukaiBusterAmulet1 { Speed 40 }
Actor YoukaiBusterAmulet4 : YoukaiBusterAmulet2 { Speed 35 }
Actor YoukaiBusterAmulet5 : YoukaiBusterAmulet1 { Speed 30 }
Actor YoukaiBusterAmulet6 : YoukaiBusterAmulet2 { Speed 25 }

ACTOR ReimuPlayerYinYangOrb2
{
  Projectile
  Radius 5
  Height 10
  Speed 80
  Damage (15)
  +BRIGHT
  -NOGRAVITY
  BounceType "Doom"
  Renderstyle Add
  Alpha 1.0
  Scale 0.8
  SeeSound "touhou/fire"
  BounceSound "touhou/hit2"
  DeathSound "touhou/hit"
  Decal BulletChip
  DamageType "TouhouPlayerDamage"
  States
  {
  Spawn:
	RMYN EEEFFFGGGHHH 1 Bright 
    Loop
  Death:
	RMYN EFGHEFGHEFGH 3 Bright A_FadeOut(0.1)
    Loop
  }
}