Classes:CWeapStaff

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do NOT need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it will cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
Serpent staff
Actor type Weapon Game MiniHexenLogoIcon.png (Hexen)
DoomEd Number 10 Class Name CWeapStaff
Spawn ID 32 Identifier T_CLERICSTAFF


Classes: ClericWeaponCWeapStaff

The Cleric's second weapon, the Serpent Staff uses blue mana to fire a pair of green poisonous projectiles. When used at close proximity to the target, the staff, instead, drains the target's health and heals the player with the amount of damage dealt.

DECORATE definition

ACTOR CWeapStaff : ClericWeapon
{
  Weapon.SelectionOrder 1600
  Weapon.AmmoUse1 1
  Weapon.AmmoGive1 25
  Weapon.KickBack 150
  Weapon.YAdjust 10
  Weapon.AmmoType1 "Mana1"
  Inventory.PickupMessage "$TXT_WEAPON_C2"
  Obituary "$OB_MPCWEAPSTAFFM"
  Tag "$TAG_CWEAPSTAFF"

  action native A_CStaffInitBlink();
  action native A_CStaffCheckBlink();
  action native A_CStaffCheck();
  action native A_CStaffAttack();

  States
  {
  Spawn:
    WCSS A -1
    Stop
  Select:
    CSSF C 1 A_Raise
    Loop
  Deselect:
    CSSF B 3
    CSSF C 4
    CSSF C 1 A_Lower
    Wait
  Ready:
    CSSF C 4
    CSSF B 3 A_CStaffInitBlink
    CSSF AAAAAAA 1 A_WeaponReady
    CSSF A 1 A_CStaffCheckBlink
    Goto Ready+2
  Fire:
    CSSF A 1 Offset(0, 45) A_CStaffCheck
    CSSF J 1 Offset(0, 50) A_CStaffAttack
    CSSF J 2 Offset(0, 50)
    CSSF J 2 Offset(0, 45)
    CSSF A 2 Offset(0, 40)
    CSSF A 2 Offset(0, 36)
    Goto Ready+2
  Blink:
    CSSF BBBCCCCCBBB 1 A_WeaponReady
    Goto Ready+2
  Drain:
    CSSF K 10 Offset(0, 36)
    Goto Ready+2
  }
}