Option
Explicit
Private
sName As String
Private
iType As Integer
Private
sDamage As String
Private
sRange As String
Private
sClass As String
Private
sDuration As String
Private
sCharType As String
Private
sDescription As String
Private
iLevel As Byte
Private
objDefBonus() As udtBonus
Private
objOffBonus() As udtBonus
Private
bLearned As Boolean
Private
bMemorized As Boolean
Private
byteSkillPointsAllocated As Byte
Private
iManaCost As Integer
Private
byteAlignment As Byte
Public
Property Let Level(ByVal iData As Integer)
iLevel = iData
End
Property
Public
Property Get Level() As Integer
Level = iLevel
End
Property
Public
Property Let Description(ByVal sData As String)
sDescription = sData
End
Property
Public
Property Get Description() As String
Description = sDescription
End
Property
Public
Property Let CharType(ByVal sData As String)
sCharType = sData
End
Property
Public
Property Get CharType() As String
CharType = sCharType
End
Property
Public
Property Let Duration(ByVal sData As String)
sDuration = sData
End
Property
Public
Property Get Duration() As String
Duration = sDuration
End
Property
Public
Property Let Class(ByVal sData As String)
sClass = sData
End
Property
Public
Property Get Class() As String
Class = sClass
End
Property
Public
Property Let Range(ByVal sData As String)
sRange = sData
End
Property
Public
Property Get Range() As String
Range = sRange
End
Property
Public
Property Let Damage(ByVal sData As String)
sDamage = sData
End
Property
Public
Property Get Damage() As String
Damage = GetDamage
End
Property
Public
Property Let Name(ByVal sData As String)
sName = sData
End
Property
Public
Property Get Name() As String
Name = sName
End
Property
Public
Function GetDefBonus() As Integer
Dim iLp As Integer
Dim iTotal As Integer
iTotal = 0
For iLp = 0 To UBound(objDefBonus)
iTotal = iTotal +
objDefBonus(iLp).iAmount
Next iLp
GetDefBonus = iTotal
End
Function
Public
Sub SetDefBonus(ByVal iAmount As Integer, ByVal iTimeStarted As Integer, ByVal
iDuration As Integer)
Dim iIndex As Integer
On Error Resume Next
iIndex = -1
iIndex = UBound(objDefBonus)
If iIndex = -1 Then
iIndex = 0
ReDim objDefBonus(iIndex)
Else
iIndex = iIndex + 1
ReDim Preserve objDefBonus(iIndex)
End If
With objDefBonus(iIndex)
.iAmount = iAmount
.iDuration = iDuration
.iTimeStarted = iTimeStarted
End With
End Sub
Public
Function GetOffBonus() As Integer
Dim iLp As Integer
Dim iTotal As Integer
iTotal = 0
For iLp = 0 To UBound(objOffBonus)
iTotal = iTotal +
objOffBonus(iLp).iAmount
Next iLp
GetOffBonus = iTotal
End
Function
Public
Sub SetOffBonus(ByVal iAmount As Integer, ByVal iTimeStarted As Integer, ByVal
iDuration As Integer)
Dim iIndex As Integer
On Error Resume Next
iIndex = -1
iIndex = UBound(objOffBonus)
If iIndex = -1 Then
iIndex = 0
ReDim objOffBonus(iIndex)
Else
iIndex = iIndex + 1
ReDim Preserve objOffBonus(iIndex)
End If
With objOffBonus(iIndex)
.iAmount = iAmount
.iDuration = iDuration
.iTimeStarted = iTimeStarted
End With
End Sub
Public
Property Get Learned() As Boolean
Learned = bLearned
End
Property
Public
Property Let Learned(ByVal bData As Boolean)
bLearned = bData
End
Property
Public
Property Get Memorized() As Boolean
Memorized = bMemorized
End
Property
Public
Property Let Memorized(ByVal bData As Boolean)
bMemorized = bData
End
Property
Public
Property Get SkillPointsAllocated() As Byte
SkillPointsAllocated =
byteSkillPointsAllocated
End
Property
Public
Property Let SkillPointsAllocated(ByVal byteData As Byte)
byteSkillPointsAllocated = byteData
End
Property
Public
Property Get Cost() As Integer
Cost = iManaCost
End
Property
Public
Property Let Cost(ByVal iData As Integer)
iManaCost = iData
End
Property
Public
Property Get Alignment() As Byte
Alignment = byteAlignment
End
Property
Public
Property Let Alignment(ByVal byteData As Byte)
byteAlignment = byteData
End
Property
Public
Property Get SpellType() As Integer
SpellType = iType
End
Property
Public
Property Let SpellType(ByVal iData As Integer)
iType = iData
End
Property
Private
Function GetDamage() As Integer
End
Function
Public
Function Cast() As Boolean
End
Function
Public
Sub Memorize()
'TODO: Need to trap somehow for a
character action that changes from memorizing
'
This might need to be done in the game itself, for now just set flag
bMemorized = True
End Sub
Public
Sub Learn()
End Sub