REM File: Dndinit.inc Version v5.0a Release r2.0a Tweak t6.0a

DEFINT A-Z
REM $DYNAMIC

TYPE ActionType
 Attribute1 AS INTEGER
 Attribute2 AS INTEGER
 AttackMonster(1 To 3) As SINGLE
 EncounterRate AS INTEGER
 Fumble AS INTEGER
 HealthRate AS INTEGER
 HitPoints AS INTEGER
 Inventory AS INTEGER
 InvPercent As Integer
 InvNumber As Integer
 Level AS INTEGER
 MonsterTalk(1 To 3) As SINGLE
 MonsterTrigger(1 To 3) As SINGLE
 Restrictions AS INTEGER
 RustRate AS INTEGER
 SpellTrigger AS SINGLE
 StealRate AS INTEGER
 Teleport(1 To 5) AS SINGLE
 TelePercent As Integer
 Hidden As Integer
 ItemForSale As Single
 WishPercent As Integer
 PoisonPercent As Integer
END TYPE

TYPE MonClassType
 Monsters(1 TO 10) AS SINGLE
END TYPE

TYPE MonsterTalkType
 TalkMessage AS STRING * 80
END TYPE

TYPE Spelltype
 SpellName AS STRING * 30
 Chant AS STRING * 80
 Level AS INTEGER
 SpellType AS INTEGER
 Teleport AS SINGLE
 Psionic AS INTEGER
 PsionicMode AS INTEGER
 ClassType AS INTEGER
 Desc AS STRING * 80
 Ingred(1 TO 5) AS SINGLE
 SpellFlag AS INTEGER
 SpellEquate AS STRING * 40
 Equation AS INTEGER
 Prefix1 As String*8
 Buffer9 AS INTEGER
 Buffer10 AS INTEGER
 Buffer11 AS SINGLE
 Buffer12 AS SINGLE
END TYPE

Type WeaponType
 Index As Single
 Charges As Integer
 Plus As Integer
End Type

Type WeaponType2
 Index As Single
 Charges As Integer
 Plus As Integer
 Time1 As Single
 Time2 As Single
End Type

TYPE MonsterType
 Monstername AS STRING * 30
 Pluralname AS STRING * 30
 Experience AS Double
 Gold As Double
 NumberAppearing AS INTEGER
 Level AS INTEGER
 Hits AS INTEGER
 Poison AS INTEGER
 LevelDrain AS INTEGER
 Spell AS SINGLE
 Block AS INTEGER
 Prevent AS INTEGER
 Follow AS INTEGER
 Magic AS INTEGER
 Jail AS INTEGER
 TeleportPercent AS INTEGER
 FollowPercent AS INTEGER
 BlockPercent AS INTEGER
 PreventPercent AS INTEGER
 SpellPercent AS INTEGER
 PoisonPercent AS INTEGER
 DrainPercent AS INTEGER
 Rate AS INTEGER
 RatePercent AS INTEGER
 Permanent AS INTEGER
 Talk(1 TO 5) AS INTEGER
 Psionic AS INTEGER
 PsionicSpell AS SINGLE
 Equation AS INTEGER
 MonsterEquate AS STRING * 40
 MonsterSurprise As String*40
 MonsterSavingThrow As String*40
 Prefix1 As String*8
 First As Single
 Last As Single
 Weapon As Single
 Shield As Single
 Armor As Single
 PerMonster As Integer
 TalkGold As Double
 TalkGoldTimes As Integer
 TalkGoldPercent As Integer
 TalkItem As Single
 TalkItemTimes As Integer
 TalkItemPercent As Integer
 TalkMoveDirection As Integer
 Invisible AS INTEGER
 RemainsInRoom AS INTEGER
 Buffer15 AS SINGLE
 Buffer16 AS SINGLE
END TYPE

Type MessType
 Index As Single
 User As Single
 Charges As Integer
 Plus As Integer
 Room As Single
 Prev As Single
 Next As Single
 Temp(1 To 4) As Single
 Desc(1 To 4) As Single
 Time1 As Single
 Time2 As Single
End Type

TYPE TreasureType
 TreasureName AS STRING * 30
 ShortName AS STRING * 30
 Weight AS INTEGER
 Gold AS Double
 Spell AS SINGLE
 Plus AS INTEGER
 Coin AS INTEGER
 Locked As Integer
 Keyed AS SINGLE
 Scroll AS INTEGER
 Charges AS INTEGER
 Potion AS INTEGER
 Loadable AS INTEGER
 Ammunition AS INTEGER
 AmmoLoads AS SINGLE
 Invisible AS INTEGER
 Permanent AS INTEGER
 Proficiency AS INTEGER
 WeaponNumber AS INTEGER
 RingType AS INTEGER
 RingSpell AS SINGLE
 Edible AS INTEGER
 Rustable AS INTEGER
 RustPercent AS INTEGER
 Stealable AS INTEGER
 StealPercent AS INTEGER
 Launchable AS INTEGER
 LaunchLoads AS SINGLE
 LaunchAmmo AS INTEGER
 Movable AS INTEGER
 Vehicle AS INTEGER
 VehicleType AS INTEGER
 LightType AS INTEGER
 LightCharges AS INTEGER
 FuelType AS INTEGER
 FuelCharges AS INTEGER
 Container AS INTEGER
 ContainerMax AS INTEGER
 ContainerPrefix AS STRING * 15
 ContainerDisappears As Single
 ContainerSize As Integer
 ContainerMaterial As Integer
 ContainerSelfImplodes As Integer
 PotionType As Single
 NewPotion As Single
 MixPotion As Integer
 TwoHanded As Integer
 RequireStr As Integer
 RequireDex As Integer
 RequireInt As Integer
 RestrictItem(1 To 3) As Single
 TrapType As Integer
 TrapHits As Integer
 TrapItem As Single
 MasterKey As Integer
 Liquid As Integer
 LiquidType As Integer
 LiquidFlags As Integer
 Prefix1 As String*8
 StaysInRoom As Integer
 Occupants As Integer
 BindType As Integer
 TimesCursed AS INTEGER
 TimesBlessed AS INTEGER
 Persistent AS INTEGER
 Buffer2 AS INTEGER
 PersistTime AS SINGLE
 DischargePersist AS SINGLE
 ProperName As STring*20
END TYPE

COMMON SHARED FileName AS STRING,_
 Action.FileName AS STRING,_
 Container.FileName AS STRING,_
 CtnInv.FileName AS STRING,_
 MonClass.FileName AS STRING,_
 MonInv.Filename AS STRING,_
 MonTalk.FileName AS STRING,_
 Monster.FileName AS STRING,_
 NonPlayer.FileName AS STRING,_
 Spell.FileName AS STRING,_
 Team.FileName AS STRING,_
 TeamInv.FileName AS STRING,_
 Treasure.FileName AS STRING,_
 User.FileName AS STRING,_
 UserInv.FileName AS STRING

COMMON SHARED ActionRecord AS ActionType,_
 MessWorkRecord As MessType,_
 MonClassRecord AS MonClassType,_
 MonsterRecord AS MonsterType,_
 MonsterTalkRecord AS MonsterTalkType,_
 SpellRecord AS Spelltype,_
 TreasureRecord AS TreasureType

COMMON SHARED Inv() AS INTEGER

COMMON SHARED Strng3 AS STRING

Const False=0
Const True=-1
Const UnTrue=1
Const SFalse=0!
Const STrue=-1!
Const DFalse=0#
Const DTrue=-1#
Const Nul=""

Const MaxConfigArray1=40
Const MaxConfigArray2=150
Const MaxConfigArray3=100

DECLARE SUB DELETE.DATA.FILES ()
DECLARE SUB WRITE.ACTION.FILE ()
DECLARE SUB WRITE.MONCLASS.FILE ()
DECLARE SUB WRITE.MONTALK.FILE ()
DECLARE SUB WRITE.SPELL.FILE ()
DECLARE SUB WRITE.NONPLAYER.FILE ()
DECLARE SUB WRITE.MONSTER.FILE1 ()
DECLARE SUB WRITE.MONSTER.FILE2 ()
DECLARE SUB WRITE.TREASURE.FILE1 ()
DECLARE SUB WRITE.TREASURE.FILE2 ()
DECLARE SUB WRITE.TREASURE.FILE3 ()
