Constant Ability
  None = 0
  Strength = 1
  Vitality = 2
  Intelligence = 3
  Agility = 4
  Luck = 5
End Constant

Constant APDP
  None = 0
  Phys = 1
  Fire = 2
  Cold = 3
  Elec = 4
  Stat = 5
End Constant

Constant TargetRange
  Own = 0
  OneOfUs = 1
  OneOfThem = 2
  AllOfUs = 3
  AllOfThem = 4
  Everyone = 5
End Constant

Constant StatusEffect
  Normal     = 0x0
  Dead       = 0x1
  Protection = 0x2
  Blink      = 0x10
  Panic      = 0x100
  Confusion  = 0x200 
  Charm      = 0x400
  Berserk    = 0x800
  Blind      = 0x1000
  Paralysis  = 0x2000
End Constant

Procedure TestStatus(who, effect)
  Return (who.Status And effect) <> 0
End Procedure

Procedure TestDead(who)
  Return (who.Status And StatusEffect.Dead) <> 0
End Procedure

Procedure SetStatus(who, effect)
  who.Status = who.Status Or effect
End Procedure

Procedure ResetStatus(who, effect)
  who.Status = who.Status And (Not effect)
End Procedure

Procedure ClearStatus(who)
  who.Status = StatusEffect.Normal
End Procedure
