VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "monsterdrop"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Public word0 As Long

'0x8000 = sometimes drop, sometimes dont
'0x7FFF = number of item to drop
' rest do nothing as far as i know

'droppings:
'0 to 10 = dragon
'11 to 14 = worm
'15 to 17 = screamer
'18 to 20 = rat/hellhound
'21 to 25 = rockpile
'26 to 32 = knight
'^^^-- these items will always be cursed
'33 to 34 = antman
'35 to 36 = stone golem
'37 to 39 = skeleton

Public Function itemnum() As Integer
    itemnum = (word0 And &H7FFF)
End Function

Public Function sometimes() As Byte
    Dim l1 As Long
    
    l1 = (word0 And &H8000)
    l1 = l1 / &H8000
    If l1 = -1 Then
        l1 = 1
    End If
    sometimes = l1
End Function

Public Function set_itemnum(num As Integer)
    If num > 32767 Then
        num = 32767
    End If
    If num < 0 Then
        num = 0
    End If
    word0 = (word0 And &H8000) + num
End Function

Public Function set_sometimes(num As Integer)
    If num = 1 Then
        word0 = (word0 And &H7FFF) + 32768
    Else
        word0 = word0 And &H7FFF
    End If
    
End Function

