//
// EDF for Eternity Engine v4.01.00+
//
// Heretic Player-related Definitions
//

//=============================================================================
//
// Corvus Player Class
//

skin corvus {}

playerclass Corvus
{
   defaultskin    corvus
   thingtype      HereticPlayer
   altattackstate S_HPLAY_ATK2

   weaponslot 1 { weapons : Gauntlets, Staff }
   weaponslot 2 { weapons : GoldWand }
   weaponslot 3 { weapons : Crossbow }
   weaponslot 4 { weapons : Blaster }
   weaponslot 5 { weapons : SkullRod }
   weaponslot 6 { weapons : PhoenixRod }
   weaponslot 7 { weapons : Mace }
   weaponslot 8 { weapons : Gauntlets }

   rebornitem AmmoWandCrystal, 50
   rebornitem Staff
   rebornitem GoldWand
}

//=============================================================================
//
// Weapon Info
//

weaponinfo Staff
{
  selectionorder 8.0

  sisterweapon StaffPowered

  flags        FLEEMELEE|NOHITGHOSTS|SILENCEABLE|DISABLEAPS|AUTOSWITCHFROM
  //mod          ""
  recoil       10

  firstdecoratestate S_STAFFREADY
  states
  @"
  Ready:
    STFF A 1 A_WeaponReady
    loop
  Deselect:
    STFF A 1 A_Lower
    loop
  Select:
    STFF A 1 A_Raise
    loop
  Fire:
    STFF B 6
    STFF C 8 A_StaffAttackPL1
    STFF B 8 A_ReFire
    goto ready
  "@
}

weaponinfo StaffPowered : Staff
{
  sisterweapon Staff

  readysound   ht_stfcrk
  addflags     READYSNDHALF|POWEREDUP|DEPOWERSWITCH
  mod          StaffPowered

  states
  @"
  Ready:
    STFF DEF 4 A_WeaponReady
    loop
  Deselect:
    STFF D 1 A_Lower
    loop
  Select:
    STFF D 1 A_Raise
    loop
  Fire:
    STFF G 6
    STFF H 8 A_StaffAttackPL2
    STFF G 8 A_ReFire
    goto Ready
  "@
}

weaponinfo GoldWand
{
  ammotype     AmmoWandCrystal
  ammouse      1

  selectionorder 5.0

  sisterweapon GoldWandPowered

  flags        SILENCEABLE|DISABLEAPS|HAPTICRECOIL
  //mod          ""
  recoil       10
  hapticrecoil 1
  haptictime   1

  fullscreenoffset 5

  firstdecoratestate S_GOLDWANDREADY
  states
  @"
  Ready:
    GWND A 1 A_WeaponReady
    loop
  Deselect:
    GWND A 1 A_Lower
    loop
  Select:
    GWND A 1 A_Raise
    loop
  Fire:
    GWND B 3 
    GWND C 5 A_FireGoldWandPL1
    GWND D 3
    GWND D 0 A_ReFire
    goto Ready
  "@
}

weaponinfo GoldWandPowered : GoldWand
{
  sisterweapon GoldWand

  addflags POWEREDUP

  firstdecoratestate S_GOLDWANDATK2_1
  states
  @"
  Fire:
    GWND B 3 
    GWND C 4 A_FireGoldWandPL2
    GWND D 3
    GWND D 0 A_ReFire
    goto Ready
  "@
}

weaponinfo Crossbow
{
  ammotype     AmmoEtherealArrow
  ammouse      1

  selectionorder 3.0

  sisterweapon   CrossbowPowered

  flags        SILENCEABLE|DISABLEAPS|HAPTICRECOIL
  //mod          ""
  recoil       30
  hapticrecoil 3
  haptictime   3

  fullscreenoffset 15

  firstdecoratestate S_CRBOW1
  states
  @"
  Ready:
    CRBW AAAAAABBBBBBCCCCCC 1 A_WeaponReady
    loop
  Deselect:
    CRBW A 1 A_Lower
    loop
  Select:
    CRBW A 1 A_Raise
    loop
  Fire:
    CRBW D 6 A_FireCrossbowPL1
    CRBW EFGH 3
    CRBW AB 4
    CRBW C 5 A_ReFire
    goto Ready
  "@
}

weaponinfo CrossbowPowered : Crossbow
{
  sisterweapon Crossbow

  addflags POWEREDUP

  firstdecoratestate S_CRBOWATK2_1
  states
  @"
  Fire:
    CRBW D 5 A_FireCrossbowPL2
    CRBW E 3
    CRBW F 2
    CRBW G 3
    CRBW H 2
    CRBW A 3
    CRBW B 3
    CRBW C 4 A_ReFire
    goto Ready
  "@
}

weaponinfo Blaster
{
  ammotype     AmmoClawOrb
  ammouse      1

  selectionorder 2.0

  flags        SILENCEABLE|DISABLEAPS|HAPTICRECOIL
  //mod          ""
  recoil       10
  hapticrecoil 1
  haptictime   1

  fullscreenoffset 15

  firstdecoratestate S_BLASTERREADY
  states
  @"
  Ready:
    BLSR A 1 A_WeaponReady
    loop
  Deselect:
    BLSR A 1 A_Lower
    loop
  Select:
    BLSR A 1 A_Raise
    loop
  Fire:
    BLSR BC 3
  Hold:
    BLSR D 2 A_FireBlasterPL1
    BLSR CB 2
    BLSR A 0 A_ReFire
    goto Ready
  "@
}

weaponinfo SkullRod
{
  ammotype     AmmoRune
  ammouse      1

  selectionorder 1.0

  flags        SILENCEABLE|DISABLEAPS|HAPTICRECOIL
  //mod          ""
  recoil       100
  hapticrecoil 6
  haptictime   8

  fullscreenoffset 15

  firstdecoratestate S_HORNRODREADY
  states
  @"
  Ready:
    HROD A 1 A_WeaponReady
    loop
  Deselect:
    HROD A 1 A_Lower
    loop
  Select:
    HROD A 1 A_Raise
    loop
  Fire:
    HROD AB 4 A_FireSkullRodPL1
    HROD B 0 A_ReFire
    goto Ready
  "@
}

weaponinfo PhoenixRod
{
  ammotype     AmmoFlameOrb
  ammouse      1

  selectionorder 7.0

  sisterweapon PhoenixRodPowered

  flags        NOAUTOFIRE|SILENCEABLE|DISABLEAPS|HAPTICRECOIL|NOTSHAREWARE
  //mod          ""
  recoil       20
  hapticrecoil 2
  haptictime   1

  fullscreenoffset 15

  firstdecoratestate S_PHOENIXREADY
  states
  @"
  Ready:
    PHNX A 1 A_WeaponReady
    loop
  Deselect:
    PHNX A 1 A_Lower
    loop
  Select:
    PHNX A 1 A_Raise
    loop
  Fire:
    PHNX B 5
    PHNX C 7 A_FirePhoenixPL1
    PHNX DB 4
    PHNX B 0 A_ReFire
    goto Ready
  "@
}

weaponinfo PhoenixRodPowered : PhoenixRod
{
  sisterweapon PhoenixRod

  addflags POWEREDUP|FLEEMELEE|PHOENIXRESET

  firstdecoratestate S_PHOENIXATK2_1
  states
  @"
  Fire:
    PHNX B 3 A_InitPhoenixPL2
  Hold:
    PHNX C 1 bright A_FirePhoenixPL2
    PHNX B 4 A_ReFire
  Powerdown:
    PHNX B 4 A_SubtractAmmo
    goto Ready
  "@
}

weaponinfo Mace
{
  ammotype     AmmoMaceSphere
  ammouse      1

  selectionorder 4.0

  sisterweapon MacePowered

  flags        SILENCEABLE|DISABLEAPS|HAPTICRECOIL|NOTSHAREWARE
  //mod          ""
  recoil       20
  hapticrecoil 2
  haptictime   1

  fullscreenoffset 15

  firstdecoratestate S_MACEREADY
  states
  @"
  Ready:
    MACE A 1 A_WeaponReady
    loop
  Deselect:
    MACE A 1 A_Lower
    loop
  Select:
    MACE A 1 A_Raise
    loop
  Fire:
    MACE B 4
  Hold:
    MACE CDEF 3 A_FireMacePL1
    MACE C 4 A_ReFire
    MACE DEFB 4
    goto Ready
  "@
}

weaponinfo MacePowered : Mace
{
  ammouse      5

  sisterweapon Mace

  addflags POWEREDUP

  firstdecoratestate S_MACEATK2_1
  states
  @"
  Fire:
  Hold:
    MACE B 4
    MACE D 4 A_FireMacePL2
    MACE C 4
    MACE A 8 A_ReFire
    goto Ready
  "@
}

weaponinfo Gauntlets
{
  selectionorder 6.0

  sisterweapon GauntletsPowered

  flags        NOTHRUST|FLEEMELEE|NOHITGHOSTS|SILENCEABLE|DISABLEAPS|AUTOSWITCHFROM
  //mod          ""
  upsound      ht_gntact

  fullscreenoffset 15

  firstdecoratestate S_GAUNTLETREADY
  states
  @"
  Ready:
    GAUN A 1 A_WeaponReady
    loop
  Deselect:
    GAUN A 1 A_Lower
    loop
  Select:
    GAUN A 1 A_Raise
    loop
  Fire:
    GAUN B 4 A_PlaySoundEX(ht_gntuse, idle)
    GAUN C 4
  Hold:
    GAUN DEF 4 bright A_GauntletAttack(0)
    GAUN C 4 A_ReFire
    GAUN B 4 A_Light0
    goto Ready
  "@
}

weaponinfo GauntletsPowered : Gauntlets
{
  sisterweapon Gauntlets

  addflags POWEREDUP|DEPOWERSWITCH

  firstdecoratestate S_GAUNTLETREADY2_1
  states
  @"
  Ready:
    GAUN GHI 4 A_WeaponReady
    loop
  Deselect:
    GAUN G 1 A_Lower
    loop
  Select:
    GAUN G 1 A_Raise
    loop
  Fire:
    GAUN J 4 A_PlaySoundEX(ht_gntuse, idle)
    GAUN K 4
  Hold:
    GAUN LMN 4 bright A_GauntletAttack(1)
    GAUN K 4 A_ReFire
    GAUN J 4 A_Light0
    goto Ready
  "@
}


//=============================================================================
//
// Weapon Givers
//

weapongiver GiverStaff
{
  weapon Staff
}

weapongiver GiverGoldWand
{
  weapon GoldWand
}

weapongiver GiverCrossbow
{
  weapon    Crossbow
  ammogiven AmmoEtherealArrow, 10
}

weapongiver GiverBlaster
{
  weapon    Blaster
  ammogiven AmmoClawOrb, 30
}

weapongiver GiverSkullRod
{
  weapon    SkullRod
  ammogiven AmmoRune, 50
}

weapongiver GiverPhoenixRod
{
  weapon    PhoenixRod
  ammogiven AmmoFlameOrb, 2
}

weapongiver GiverMace
{
  weapon    Mace
  ammogiven AmmoMaceSphere, 50
}

weapongiver GiverGauntlets
{
  weapon Gauntlets
}

