#pragma author Draxinusom
#pragma description Gold Box Games - Common Structs
#pragma once

// Attack values
struct ATTACK {
    u8 ATK_1_Count [[comment("Number of primary attacks every 2 rounds")]];
    u8 ATK_2_Count [[comment("Number of secondary attacks every 2 rounds")]];
    u8 ATK_1_Rolls [[comment("Number of rolls to make per primary attack")]];
    u8 ATK_2_Rolls [[comment("Number of rolls to make per secondary attack")]];
    u8 ATK_1_Dice [[comment("Dice type (d4/d6/d8/etc) rolled for primary attack")]];
    u8 ATK_2_Dice [[comment("Dice type (d4/d6/d8/etc) rolled for secondary attack")]];
    u8 ATK_1_Modifier [[comment("Damage modifier to apply to primary attack")]];
    u8 ATK_2_Modifier [[comment("Damage modifier to apply to secondary attack")]];
};

// Abilities
struct ABILITY {
    if (GameID != 1) {
        u8 STR_Base [[comment("Unadjusted strength value")]];
    }
    u8 STR_Current [[comment("Adjusted strength ability value")]];
    if (GameID != 1) {
        u8 INT_Base [[comment("Unadjusted intelligence ability value")]];
    }
    u8 INT_Current [[comment("Adjusted intelligence ability value")]];
    if (GameID != 1) {
        u8 WIS_Base [[comment("Unadjusted wisdom ability value")]];
    }
    u8 WIS_Current [[comment("Adjusted wisdom ability value")]];
    if (GameID != 1) {
        u8 DEX_Base [[comment("Unadjusted dexterity ability value")]];
    }
    u8 DEX_Current [[comment("Adjusted dexterity ability value")]];
    if (GameID != 1) {
        u8 CON_Base [[comment("Unadjusted constitution ability value")]];
    }
    u8 CON_Current [[comment("Adjusted constitution ability value")]];
    if (GameID != 1) {
        u8 CHA_Base [[comment("Unadjusted charisma ability value")]];
    }
    u8 CHA_Current [[comment("Adjusted charisma ability value")]];
    if (GameID != 1) {
        u8 STX_Base [[comment("Unadjusted extraordinary strength ability value")]];
    }
    u8 STX_Current [[comment("Adjusted extraordinary strength ability value\nOnly valid when STR_Current = 18 (0x12)")]];
};

// Class Level
struct CLASSLEVEL {
    match (GameID) {
        (1|2|8): {
            u8 LVL_CL [[comment("Cleric level")]];
            u8 LVL_DR [[comment("Druid level\nUnused")]];
            u8 LVL_FT [[comment("Fighter level")]];
            u8 LVL_PD [[comment(std::format("Paladin level{}", GameID == 1 ? "\nUnused" : ""))]];
            u8 LVL_RA [[comment(std::format("Ranger level{}", GameID == 1 ? "\nUnused" : ""))]];
            u8 LVL_MU [[comment("Magic-User level")]];
            u8 LVL_TH [[comment("Thief level")]];
            u8 LVL_MK [[comment("Monk level\nUnused")]];
        }
        (3|4|9): {
            u8 LVL_CL [[comment("Cleric level")]];
            u8 LVL_DR [[comment("Druid level\nUnused")]];
            u8 LVL_FT [[comment("Fighter level")]];
            u8 LVL_PD [[comment("Paladin level")]];
            u8 LVL_RA [[comment("Ranger level")]];
            u8 LVL_MU [[comment("Magic-User level")]];
            u8 LVL_TH [[comment("Thief level")]];
        }
        (5|6): {
            u8 LVL_CL [[comment("Cleric level")]];
            u8 LVL_DR [[comment("Druid level\nUnused")]];
            u8 LVL_FT [[comment("Fighter level")]];
            u8 LVL_PD [[comment(std::format("Paladin level{}", GameID == 5 ? "\nUnused" : ""))]];
            u8 LVL_RA [[comment("Ranger level")]];
            u8 LVL_MU [[comment("Magic-User level")]];
            u8 LVL_TH [[comment("Thief level")]];
            u8 LVL_KN [[comment("Knight level")]];
        }
        (7|10): {
            u8 LVL_CL [[comment("Cleric level")]];
            u8 LVL_KN [[comment(std::format("Knight level{}", GameID == 10 ? "\nUnused" : ""))]];
            u8 LVL_FT [[comment("Fighter level")]];
            u8 LVL_PD [[comment("Paladin level")]];
            u8 LVL_RA [[comment("Ranger level")]];
            u8 LVL_MU [[comment("Magic-User level")]];
            u8 LVL_TH [[comment("Thief level")]];
        }
    }
};

// Money
struct MONEY {
    match (GameID) {
        (1|2|3|8): {
            u16 MNY_Copper [[comment("Number of copper coins (CP) the character has")]];
            u16 MNY_Silver [[comment("Number of silver coins (SP) the character has")]];
            u16 MNY_Electrum [[comment("Number of electrum coins (EP) the character has")]];
            u16 MNY_Gold [[comment("Number of gold coins (GP) the character has")]];
            u16 MNY_Platinum [[comment("Number of platinum coins (PP) the character has")]];
        }
        (5): {
            u16 MNY_Silver [[comment("Number of silver coins (SP) the character has")]];
            u16 MNY_Copper [[comment("Number of copper coins (CP) the character has")]];
            u16 MNY_Bronze [[comment("Number of bronze coins (BP) the character has")]];
            u16 MNY_Platinum [[comment("Number of platinum coins (PP) the character has")]];
            u16 MNY_Steel [[comment("Number of steel coins (ST) the character has")]];
        }
        (4|9|10):   u16 MNY_Platinum [[comment("Number of platinum coins (PP) the character has")]];
        (6|7):      u16 MNY_Steel [[comment("Number of steel coins (ST) the character has")]];
    }
    u16 MNY_Gem [[comment("Number of unappraised gems the character has")]];
    u16 MNY_Jewelry [[comment("Number of unappraised jewelry the character has")]];
};

// Icon Colors
bitfield COLOR {
    COLORNAME Color1 : 4 [[color(std::format("{:06X}", IconColorValue(this)))]];
    COLORNAME Color2 : 4 [[color(std::format("{:06X}", IconColorValue(this)))]];
};

// Combat Icon Part Colors
struct ICO_COLOR {
    COLOR Color_Body [[comment("Combat icon body colors")]];
    COLOR Color_Arm [[comment("Combat icon arm colors")]];
    COLOR Color_Leg [[comment("Combat icon leg colors")]];
    COLOR Color_HairFace [[comment("Combat icon hair/face colors")]];
    COLOR Color_Shield [[comment("Combat icon shield colors")]];
    COLOR Color_Weapon [[comment("Combat icon weapon colors")]];
};

// Icon Dimensions
bitfield ICO_DIMENSION {
	DIMENSION ICO_Dimension : 7 [[comment("Combat tile dimensions")]];
	bool IsLarge : 1 [[comment("Indicates if character is considered 'Large' for combat calculations")]];
} [[inline]];

// Inventory pointers
struct INVENTORY {
    u32 ADDR_Item [[comment("Pointer to the character's item data")]];
    u32 ADDR_Equip_Weapon [[comment("Pointer to the character's equipped weapon")]];
    u32 ADDR_Equip_Shield [[comment("Pointer to the character's equipped shield")]];
    u32 ADDR_Equip_Armor [[comment("Pointer to the character's equipped armor")]];
    u32 ADDR_Equip_Gauntlet [[comment("Pointer to the character's equipped gauntlet")]];
    u32 ADDR_Equip_Helm [[comment("Pointer to the character's equipped helmet")]];
    u32 ADDR_Equip_Belt [[comment("Pointer to the character's equipped belt/necklace")]];
    u32 ADDR_Equip_Robe [[comment("Pointer to the character's equipped robe")]];
    u32 ADDR_Equip_Cloak [[comment("Pointer to the character's equipped cloak")]];
    u32 ADDR_Equip_Boot [[comment("Pointer to the character's equipped boots")]];
    u32 ADDR_Equip_Ring1 [[comment("Pointer to the character's first equipped ring")]];
    u32 ADDR_Equip_Ring2 [[comment("Pointer to the character's second equipped ring")]];
    u32 ADDR_Equip_Arrow [[comment("Pointer to the character's equipped arrows")]];
    u32 ADDR_Equip_Bolt [[comment("Pointer to the character's equipped bolts/quarrels")]];
};

// Saving Throws
struct SAVETHROW {
    u8 SAV_1_ParalyzationPoisonDeath [[comment("Paralyzation, Poison, or Death Magic base saving throw")]];
    u8 SAV_2_PetrificationPolymorph [[comment("Petrification or Polymorph base saving throw")]];
    u8 SAV_3_RodStaffWand [[comment("Rod, Staff, or Wand base saving throw")]];
    u8 SAV_4_BreathWeapon [[comment("Breath Weapon base saving throw")]];
    u8 SAV_5_Spell [[comment("Spells base saving throw")]];
};

// Spell class memorization counts
struct SPL_COUNT<auto Size> {
    u8 LVL_1 [[comment("Total number of level 1 spells the character can memorize")]];
    u8 LVL_2 [[comment("Total number of level 2 spells the character can memorize")]];
    u8 LVL_3 [[comment("Total number of level 3 spells the character can memorize")]];
    if (Size > 3) {
        u8 LVL_4 [[comment("Total number of level 4 spells the character can memorize")]];
        u8 LVL_5 [[comment("Total number of level 5 spells the character can memorize")]];
    }
    if (Size > 5) {
        u8 LVL_6 [[comment("Total number of level 6 spells the character can memorize")]];
        u8 LVL_7 [[comment("Total number of level 7 spells the character can memorize")]];
    }
    if (Size > 7) {
        u8 LVL_8 [[comment("Total number of level 8 spells the character can memorize")]];
    }
    if (Size > 8) {
        u8 LVL_9 [[comment("Total number of level 9 spells the character can memorize")]];
    }
};

// Thief Skills
struct THIEFSKILL {
    u8 TH_1_PickPocket [[comment("Thief Pick Pockets ability")]];
    u8 TH_2_OpenLock [[comment("Thief Open Locks ability")]];
    u8 TH_3_FindRemoveTrap [[comment("Thief Find/Remove Traps ability")]];
    u8 TH_4_MoveSilent [[comment("Thief Move Silently ability")]];
    u8 TH_5_HideInShadow [[comment("Thief Hide in Shadows ability")]];
    u8 TH_6_HearNoise [[comment("Thief Hear Noise ability")]];
    u8 TH_7_ClimbWall [[comment("Thief Climb Walls ability")]];
    u8 TH_8_ReadLanguage [[comment("Thief Read Languages ability")]];
};

/*******************************
    Known Spells (can memorize)
*******************************/
// Known Spells - 1
struct SPL_KNOWN01 {
    bool CL1_Bless [[comment("CL1: Bless")]];
    bool CL1_Curse [[comment("CL1: Curse")]];
    bool CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    bool CL1_CauseLightWounds [[comment("CL1: Cause Light Wounds")]];
    bool CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    bool CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    bool CL1_ProtectionFromGood [[comment("CL1: Protection from Good")]];
    bool CL1_ResistCold [[comment("CL1: Resist Cold")]];
    bool MU1_BurningHands [[comment("MU1: Burning Hands")]];
    bool MU1_CharmPerson [[comment("MU1: Charm Person")]];
    bool MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    bool MU1_Enlarge [[comment("MU1: Enlarge")]];
    bool MU1_Reduce [[comment("MU1: Reduce")]];
    bool MU1_Friends [[comment("MU1: Friends")]];
    bool MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    bool MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    bool MU1_ProtectionFromGood [[comment("MU1: Protection from Good")]];
    bool MU1_ReadMagic [[comment("MU1: Read Magic")]];
    bool MU1_Shield [[comment("MU1: Shield")]];
    bool MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    bool MU1_Sleep [[comment("MU1: Sleep")]];
    bool CL2_FindTraps [[comment("CL2: Find Traps")]];
    bool CL2_HoldPerson [[comment("CL2: Hold Person")]];
    bool CL2_ResistFire [[comment("CL2: Resist Fire")]];
    bool CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    bool CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    bool CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    bool CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    bool MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    bool MU2_Invisibility [[comment("MU2: Invisibility")]];
    bool MU2_Knock [[comment("MU2: Knock")]];
    bool MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    bool MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    bool MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    bool MU2_Strength [[comment("MU2: Strength")]];
    bool CL3_AnimateDead [[comment("CL3: Animate Dead")]];
    bool CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    bool CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    bool CL3_CureDisease [[comment("CL3: Cure Disease")]];
    bool CL3_CauseDisease [[comment("CL3: Cause Disease")]];
    bool CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    bool CL3_Prayer [[comment("CL3: Prayer")]];
    bool CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    bool CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    bool MU3_Blink [[comment("MU3: Blink")]];
    bool MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    bool MU3_Fireball [[comment("MU3: Fireball")]];
    bool MU3_Haste [[comment("MU3: Haste")]];
    bool MU3_HoldPerson [[comment("MU3: Hold Person")]];
    bool MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    bool MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    bool MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    bool MU3_ProtectionFromGood10Radius [[comment("MU3: Protection from Good, 10' Radius")]];
    bool MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    bool MU3_Slow [[comment("MU3: Slow")]];
    bool CL7_Restoration [[comment("CL7: Restoration")]];
};

// Known Spells - 2
struct SPL_KNOWN02 {
    bool CL1_Bless [[comment("CL1: Bless")]];
    bool CL1_Curse [[comment("CL1: Curse")]];
    bool CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    bool CL1_CauseLightWounds [[comment("CL1: Cause Light Wounds")]];
    bool CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    bool CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    bool CL1_ProtectionFromGood [[comment("CL1: Protection from Good")]];
    bool CL1_ResistCold [[comment("CL1: Resist Cold")]];
    bool MU1_BurningHands [[comment("MU1: Burning Hands")]];
    bool MU1_CharmPerson [[comment("MU1: Charm Person")]];
    bool MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    bool MU1_Enlarge [[comment("MU1: Enlarge")]];
    bool MU1_Reduce [[comment("MU1: Reduce")]];
    bool MU1_Friends [[comment("MU1: Friends")]];
    bool MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    bool MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    bool MU1_ProtectionFromGood [[comment("MU1: Protection from Good")]];
    bool MU1_ReadMagic [[comment("MU1: Read Magic")]];
    bool MU1_Shield [[comment("MU1: Shield")]];
    bool MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    bool MU1_Sleep [[comment("MU1: Sleep")]];
    bool CL2_FindTraps [[comment("CL2: Find Traps")]];
    bool CL2_HoldPerson [[comment("CL2: Hold Person")]];
    bool CL2_ResistFire [[comment("CL2: Resist Fire")]];
    bool CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    bool CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    bool CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    bool CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    bool MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    bool MU2_Invisibility [[comment("MU2: Invisibility")]];
    bool MU2_Knock [[comment("MU2: Knock")]];
    bool MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    bool MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    bool MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    bool MU2_Strength [[comment("MU2: Strength")]];
    bool IT7_AnimateDead [[comment("IT7: Animate Dead")]];
    bool CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    bool CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    bool CL3_CureDisease [[comment("CL3: Cure Disease")]];
    bool CL3_CauseDisease [[comment("CL3: Cause Disease")]];
    bool CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    bool CL3_Prayer [[comment("CL3: Prayer")]];
    bool CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    bool CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    bool MU3_Blink [[comment("MU3: Blink")]];
    bool MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    bool MU3_Fireball [[comment("MU3: Fireball")]];
    bool MU3_Haste [[comment("MU3: Haste")]];
    bool MU3_HoldPerson [[comment("MU3: Hold Person")]];
    bool MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    bool MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    bool MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    bool MU3_ProtectionFromGood10Radius [[comment("MU3: Protection from Good, 10' Radius")]];
    bool MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    bool MU3_Slow [[comment("MU3: Slow")]];
    bool CL7_Restoration [[comment("CL7: Restoration")]];
    bool IT6_PotionOfSpeed [[comment("IT6: Potion of Speed")]];
    bool CL4_CureSeriousWounds [[comment("CL4: Cure Serious Wounds")]];
    bool IT6_PotionOfGiantStrength [[comment("IT6: Potion of Giant Strength")]];
    bool IT6_JavelinOfLightning [[comment("IT6: Javelin of Lightning")]];
    bool IT6_WandOfParalyzation [[comment("IT6: Wand of Paralyzation")]];
    bool IT6_PotionOfHealing [[comment("IT6: Potion of Healing")]];
    bool IT6_DustOfDisappearance [[comment("IT6: Dust of Disappearance")]];
    bool IT6_NecklaceOfMissiles [[comment("IT6: Necklace of Missiles")]];
    bool IT6_WandOfMagicMissiles [[comment("IT6: Wand of Magic Missiles")]];
    bool CL4_CauseSeriousWounds [[comment("CL4: Cause Serious Wounds")]];
    bool CL4_NeutralizePoison [[comment("CL4: Neutralize Poison")]];
    bool CL4_Poison [[comment("CL4: Poison")]];
    bool CL4_ProtectionEvil10Radius [[comment("CL4: Protection Evil, 10' Radius")]];
    bool CL4_SticksToSnakes [[comment("CL4: Sticks to Snakes")]];
    bool CL5_CureCriticalWounds [[comment("CL5: Cure Critical Wounds")]];
    bool CL5_CauseCriticalWounds [[comment("CL5: Cause Critical Wounds")]];
    bool CL5_DispelEvil [[comment("CL5: Dispel Evil")]];
    bool CL5_FlameStrike [[comment("CL5: Flame Strike")]];
    bool CL5_RaiseDead [[comment("CL5: Raise Dead")]];
    bool CL5_SlayLiving [[comment("CL5: Slay Living")]];
    bool DR1_DetectMagic [[comment("DR1: Detect Magic")]];
    bool DR1_Entangle [[comment("DR1: Entangle")]];
    bool DR1_FaerieFire [[comment("DR1: Faerie Fire")]];
    bool DR1_InvisibilityToAnimals [[comment("DR1: Invisibility to Animals")]];
    bool MU4_CharmMonsters [[comment("MU4: Charm Monsters")]];
    bool MU4_Confusion [[comment("MU4: Confusion")]];
    bool MU4_DimensionDoor [[comment("MU4: Dimension Door")]];
    bool MU4_Fear [[comment("MU4: Fear")]];
    bool MU4_FireShield [[comment("MU4: Fire Shield")]];
    bool MU4_Fumble [[comment("MU4: Fumble")]];
    bool MU4_IceStorm [[comment("MU4: Ice Storm")]];
    bool MU4_MinorGlobeOfInvulnerability [[comment("MU4: Minor Globe of Invulnerability")]];
    bool MU4_RemoveCurse [[comment("MU4: Remove Curse")]];
    bool IT5_AnimateDead [[comment("IT5: Animate Dead")]];
    bool MU5_CloudKill [[comment("MU5: Cloud Kill")]];
    bool MU5_ConeOfCold [[comment("MU5: Cone of Cold")]];
    bool MU5_Feeblemind [[comment("MU5: Feeblemind")]];
    bool MU5_HoldMonsters [[comment("MU5: Hold Monsters")]];
    bool IT6_ScrollOfProtDragonBreath [[comment("IT6: Scroll of Prot. Dragon Breath")]];
    bool IT6_ScrollOfProtParalyzation [[comment("IT6: Scroll of Prot. Paralyzation")]];
    bool IT6_PotionOfInvisibility [[comment("IT6: Potion of Invisibility")]];
    bool IT6_WandOfDefoliation [[comment("IT6: Wand of Defoliation")]];
    bool IT6_PotionExtraHealing [[comment("IT6: Potion Extra Healing")]];
    bool MU4_BestowCurse [[comment("MU4: Bestow Curse")]];
};

// Known Spells - 3
struct SPL_KNOWN03 {
    bool CL1_Bless [[comment("CL1: Bless")]];
    bool CL1_Curse [[comment("CL1: Curse")]];
    bool CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    bool CL1_CauseLightWounds [[comment("CL1: Cause Light Wounds")]];
    bool CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    bool CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    bool CL1_ProtectionFromGood [[comment("CL1: Protection from Good")]];
    bool CL1_ResistCold [[comment("CL1: Resist Cold")]];
    bool MU1_BurningHands [[comment("MU1: Burning Hands")]];
    bool MU1_CharmPerson [[comment("MU1: Charm Person")]];
    bool MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    bool MU1_Enlarge [[comment("MU1: Enlarge")]];
    bool MU1_Reduce [[comment("MU1: Reduce")]];
    bool MU1_Friends [[comment("MU1: Friends")]];
    bool MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    bool MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    bool MU1_ProtectionFromGood [[comment("MU1: Protection from Good")]];
    bool MU1_ReadMagic [[comment("MU1: Read Magic")]];
    bool MU1_Shield [[comment("MU1: Shield")]];
    bool MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    bool MU1_Sleep [[comment("MU1: Sleep")]];
    bool CL2_FindTraps [[comment("CL2: Find Traps")]];
    bool CL2_HoldPerson [[comment("CL2: Hold Person")]];
    bool CL2_ResistFire [[comment("CL2: Resist Fire")]];
    bool CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    bool CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    bool CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    bool CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    bool MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    bool MU2_Invisibility [[comment("MU2: Invisibility")]];
    bool MU2_Knock [[comment("MU2: Knock")]];
    bool MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    bool MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    bool MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    bool MU2_Strength [[comment("MU2: Strength")]];
    bool CL6_Heal [[comment("CL6: Heal")]];
    bool CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    bool CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    bool CL3_CureDisease [[comment("CL3: Cure Disease")]];
    bool CL3_CauseDisease [[comment("CL3: Cause Disease")]];
    bool CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    bool CL3_Prayer [[comment("CL3: Prayer")]];
    bool CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    bool CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    bool MU3_Blink [[comment("MU3: Blink")]];
    bool MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    bool MU3_Fireball [[comment("MU3: Fireball")]];
    bool MU3_Haste [[comment("MU3: Haste")]];
    bool MU3_HoldPerson [[comment("MU3: Hold Person")]];
    bool MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    bool MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    bool MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    bool MU3_ProtectionFromGood10Radius [[comment("MU3: Protection from Good, 10' Radius")]];
    bool MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    bool MU3_Slow [[comment("MU3: Slow")]];
    bool CL6_Harm [[comment("CL6: Harm")]];
    bool IT6_PotionOfSpeed [[comment("IT6: Potion of Speed")]];
    bool CL4_CureSeriousWounds [[comment("CL4: Cure Serious Wounds")]];
    bool IT6_PotionOfGiantStrength [[comment("IT6: Potion of Giant Strength")]];
    bool IT6_JavelinOfLightning [[comment("IT6: Javelin of Lightning")]];
    bool IT6_WandOfParalyzation [[comment("IT6: Wand of Paralyzation")]];
    bool IT6_PotionOfHealing [[comment("IT6: Potion of Healing")]];
    bool IT6_ElixirOfYouth [[comment("IT6: Elixir of Youth")]];
    bool IT6_NecklaceOfMissiles [[comment("IT6: Necklace of Missiles")]];
    bool IT6_WandOfMagicMissiles [[comment("IT6: Wand of Magic Missiles")]];
    bool CL4_CauseSeriousWounds [[comment("CL4: Cause Serious Wounds")]];
    bool CL4_NeutralizePoison [[comment("CL4: Neutralize Poison")]];
    bool CL4_Poison [[comment("CL4: Poison")]];
    bool CL4_ProtectionEvil10Radius [[comment("CL4: Protection Evil, 10' Radius")]];
    bool CL4_SticksToSnakes [[comment("CL4: Sticks to Snakes")]];
    bool CL5_CureCriticalWounds [[comment("CL5: Cure Critical Wounds")]];
    bool CL5_CauseCriticalWounds [[comment("CL5: Cause Critical Wounds")]];
    bool CL5_DispelEvil [[comment("CL5: Dispel Evil")]];
    bool CL5_FlameStrike [[comment("CL5: Flame Strike")]];
    bool CL5_RaiseDead [[comment("CL5: Raise Dead")]];
    bool CL5_SlayLiving [[comment("CL5: Slay Living")]];
    bool DR1_DetectMagic [[comment("DR1: Detect Magic")]];
    bool DR1_Entangle [[comment("DR1: Entangle")]];
    bool DR1_FaerieFire [[comment("DR1: Faerie Fire")]];
    bool DR1_InvisibilityToAnimals [[comment("DR1: Invisibility to Animals")]];
    bool MU4_CharmMonsters [[comment("MU4: Charm Monsters")]];
    bool MU4_Confusion [[comment("MU4: Confusion")]];
    bool MU4_DimensionDoor [[comment("MU4: Dimension Door")]];
    bool MU4_Fear [[comment("MU4: Fear")]];
    bool MU4_FireShield [[comment("MU4: Fire Shield")]];
    bool MU4_Fumble [[comment("MU4: Fumble")]];
    bool MU4_IceStorm [[comment("MU4: Ice Storm")]];
    bool MU4_MinorGlobeOfInvulnerability [[comment("MU4: Minor Globe of Invulnerability")]];
    bool MU4_RemoveCurse [[comment("MU4: Remove Curse")]];
    bool DR2_Barkskin [[comment("DR2: Barkskin")]];
    bool MU5_CloudKill [[comment("MU5: Cloud Kill")]];
    bool MU5_ConeOfCold [[comment("MU5: Cone of Cold")]];
    bool MU5_Feeblemind [[comment("MU5: Feeblemind")]];
    bool MU5_HoldMonsters [[comment("MU5: Hold Monsters")]];
    bool IT6_ScrollOfProtDragonBreath [[comment("IT6: Scroll of Prot Dragon Breath")]];
    bool DR2_CharmPersonOrMammal [[comment("DR2: Charm Person or Mammal")]];
    bool IT6_PotionOfInvisibility [[comment("IT6: Potion of Invisibility")]];
    bool DR2_CureLightWounds [[comment("DR2: Cure Light Wounds")]];
    bool IT6_PotionExtraHealing [[comment("IT6: Potion Extra Healing")]];
    bool MU4_BestowCurse [[comment("MU4: Bestow Curse")]];
    bool IT0_ProtectionFromEvil10Radius [[comment("IT0: Protection from Evil 10' Radius")]];
    bool IT0_Silence15Radius [[comment("IT0: Silence 15' radius")]];
    bool IT0_DetectMagic [[comment("IT0: Detect Magic")]];
    bool IT0_RemoveCurse [[comment("IT0: Remove Curse")]];
    bool IT0_Bless [[comment("IT0: Bless")]];
    bool IT0_CharmPerson [[comment("IT0: Charm Person")]];
    bool IT0_BurningHands [[comment("IT0: Burning Hands")]];
    bool DR9_Spell108 [[comment("DR9: spell 108")]];
    bool MU0_Spell109 [[comment("MU0: spell 109")]];
    bool MU6_DeathSpell [[comment("MU6: Death Spell")]];
    bool MU6_Disintegrate [[comment("MU6: Disintegrate")]];
    bool MU6_GlobeOfInvulnerability [[comment("MU6: Globe of Invulnerability")]];
    bool MU6_StoneToFlesh [[comment("MU6: Stone to Flesh")]];
    bool MU6_FleshToStone [[comment("MU6: Flesh to Stone")]];
    bool MU7_DelayedBlastFireball [[comment("MU7: Delayed Blast Fireball")]];
    bool MU7_MassInvisibility [[comment("MU7: Mass Invisibility")]];
    bool MU7_PowerWordStun [[comment("MU7: Power Word Stun")]];
};

// Known Spells - 4
struct SPL_KNOWN04 {
    bool CL1_Bless [[comment("CL1: Bless")]];
    bool CL1_Curse [[comment("CL1: Curse")]];
    bool CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    bool CL1_CauseLightWounds [[comment("CL1: Cause Light Wounds")]];
    bool CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    bool CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    bool CL1_ProtectionFromGood [[comment("CL1: Protection from Good")]];
    bool CL1_ResistCold [[comment("CL1: Resist Cold")]];
    bool MU1_BurningHands [[comment("MU1: Burning Hands")]];
    bool MU1_CharmPerson [[comment("MU1: Charm Person")]];
    bool MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    bool MU1_Enlarge [[comment("MU1: Enlarge")]];
    bool MU1_Reduce [[comment("MU1: Reduce")]];
    bool MU1_Friends [[comment("MU1: Friends")]];
    bool MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    bool MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    bool MU1_ProtectionFromGood [[comment("MU1: Protection from Good")]];
    bool MU1_ReadMagic [[comment("MU1: Read Magic")]];
    bool MU1_Shield [[comment("MU1: Shield")]];
    bool MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    bool MU1_Sleep [[comment("MU1: Sleep")]];
    bool CL2_FindTraps [[comment("CL2: Find Traps")]];
    bool CL2_HoldPerson [[comment("CL2: Hold Person")]];
    bool CL2_ResistFire [[comment("CL2: Resist Fire")]];
    bool CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    bool CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    bool CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    bool CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    bool MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    bool MU2_Invisibility [[comment("MU2: Invisibility")]];
    bool MU2_Knock [[comment("MU2: Knock")]];
    bool MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    bool MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    bool MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    bool MU2_Strength [[comment("MU2: Strength")]];
    bool CL6_Heal [[comment("CL6: Heal")]];
    bool CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    bool CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    bool CL3_CureDisease [[comment("CL3: Cure Disease")]];
    bool CL3_CauseDisease [[comment("CL3: Cause Disease")]];
    bool CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    bool CL3_Prayer [[comment("CL3: Prayer")]];
    bool CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    bool CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    bool MU3_Blink [[comment("MU3: Blink")]];
    bool MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    bool MU3_Fireball [[comment("MU3: Fireball")]];
    bool MU3_Haste [[comment("MU3: Haste")]];
    bool MU3_HoldPerson [[comment("MU3: Hold Person")]];
    bool MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    bool MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    bool MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    bool MU3_ProtectionFromGood10Radius [[comment("MU3: Protection from Good, 10' Radius")]];
    bool MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    bool MU3_Slow [[comment("MU3: Slow")]];
    bool CL6_Harm [[comment("CL6: Harm")]];
    bool IT6_PotionOfSpeed [[comment("IT6: Potion of Speed")]];
    bool CL4_CureSeriousWounds [[comment("CL4: Cure Serious Wounds")]];
    bool IT6_PotionOfGiantStrength [[comment("IT6: Potion of Giant Strength")]];
    bool IT6_JavelinOfLightning [[comment("IT6: Javelin of Lightning")]];
    bool IT6_WandOfParalyzation [[comment("IT6: Wand of Paralyzation")]];
    bool IT6_PotionOfHealing [[comment("IT6: Potion of Healing")]];
    bool IT6_ElixirOfYouth [[comment("IT6: Elixir of Youth")]];
    bool IT6_NecklaceOfMissiles [[comment("IT6: Necklace of Missiles")]];
    bool IT6_WandOfMagicMissiles [[comment("IT6: Wand of Magic Missiles")]];
    bool CL4_CauseSeriousWounds [[comment("CL4: Cause Serious Wounds")]];
    bool CL4_NeutralizePoison [[comment("CL4: Neutralize Poison")]];
    bool CL4_Poison [[comment("CL4: Poison")]];
    bool CL4_ProtectionEvil10Radius [[comment("CL4: Protection Evil, 10' Radius")]];
    bool CL4_SticksToSnakes [[comment("CL4: Sticks to Snakes")]];
    bool CL5_CureCriticalWounds [[comment("CL5: Cure Critical Wounds")]];
    bool CL5_CauseCriticalWounds [[comment("CL5: Cause Critical Wounds")]];
    bool CL5_DispelEvil [[comment("CL5: Dispel Evil")]];
    bool CL5_FlameStrike [[comment("CL5: Flame Strike")]];
    bool CL5_RaiseDead [[comment("CL5: Raise Dead")]];
    bool CL5_SlayLiving [[comment("CL5: Slay Living")]];
    bool DR1_DetectMagic [[comment("DR1: Detect Magic")]];
    bool DR1_Entangle [[comment("DR1: Entangle")]];
    bool DR1_FaerieFire [[comment("DR1: Faerie Fire")]];
    bool DR1_InvisibilityToAnimals [[comment("DR1: Invisibility to Animals")]];
    bool MU4_CharmMonsters [[comment("MU4: Charm Monsters")]];
    bool MU4_Confusion [[comment("MU4: Confusion")]];
    bool MU4_DimensionDoor [[comment("MU4: Dimension Door")]];
    bool MU4_Fear [[comment("MU4: Fear")]];
    bool MU4_FireShield [[comment("MU4: Fire Shield")]];
    bool MU4_Fumble [[comment("MU4: Fumble")]];
    bool MU4_IceStorm [[comment("MU4: Ice Storm")]];
    bool MU4_MinorGlobeOfInvulnerability [[comment("MU4: Minor Globe of Invulnerability")]];
    bool MU4_RemoveCurse [[comment("MU4: Remove Curse")]];
    bool DR2_Barkskin [[comment("DR2: Barkskin")]];
    bool MU5_CloudKill [[comment("MU5: Cloud Kill")]];
    bool MU5_ConeOfCold [[comment("MU5: Cone of Cold")]];
    bool MU5_Feeblemind [[comment("MU5: Feeblemind")]];
    bool MU5_HoldMonsters [[comment("MU5: Hold Monsters")]];
    bool IT6_ScrollOfProtDragonBreath [[comment("IT6: Scroll of Prot Dragon Breath")]];
    bool DR2_CharmPersonOrMammal [[comment("DR2: Charm Person or Mammal")]];
    bool IT6_PotionOfInvisibility [[comment("IT6: Potion of Invisibility")]];
    bool DR2_CureLightWounds [[comment("DR2: Cure Light Wounds")]];
    bool IT6_PotionOfExtraHealing [[comment("IT6: Potion of Extra Healing")]];
    bool MU4_BestowCurse [[comment("MU4: Bestow Curse")]];
    bool CL6_BladeBarrier [[comment("CL6: Blade Barrier")]];
    bool CL7_Restoration [[comment("CL7: Restoration")]];
    bool CL7_EnergyDrain [[comment("CL7: Energy Drain")]];
    bool CL7_Destruction [[comment("CL7: Destruction")]];
    bool CL7_Resurrection [[comment("CL7: Resurrection")]];
    bool DR3_CureDisease [[comment("DR3: Cure Disease")]];
    bool DR3_NeutralizePoison [[comment("DR3: Neutralize Poison")]];
    bool DR3_HoldAnimal [[comment("DR3: Hold Animal")]];
    bool DR3_ProtFromFire [[comment("DR3: Prot. from Fire")]];
    bool MU6_DeathSpell [[comment("MU6: Death Spell")]];
    bool MU6_Disintegrate [[comment("MU6: Disintegrate")]];
    bool MU6_GlobeOfInvulnerability [[comment("MU6: Globe of Invulnerability")]];
    bool MU6_StoneToFlesh [[comment("MU6: Stone to Flesh")]];
    bool MU6_FleshToStone [[comment("MU6: Flesh to Stone")]];
    bool MU7_DelayedBlastFireball [[comment("MU7: Delayed Blast Fireball")]];
    bool MU7_MassInvisibility [[comment("MU7: Mass Invisibility")]];
    bool MU7_PowerWordStun [[comment("MU7: Power Word Stun")]];
    bool MU5_FireTouch [[comment("MU5: Fire Touch"),comment("A bug sets LVL_Sweep value from characters transferred from SotSB (3) here")]];
    bool MU5_IronSkin [[comment("MU5: Iron Skin")]];
    bool MU8_MassCharm [[comment("MU8: Mass Charm")]];
    bool MU8_OttosIrrDance [[comment("MU8: Otto's Irr. Dance")]];
    bool MU8_MindBlank [[comment("MU8: Mind Blank")]];
    bool MU8_PowerWordBlind [[comment("MU8: Power Word Blind")]];
    bool MU9_MeteorSwarm [[comment("MU9: Meteor Swarm")]];
    bool MU9_PowerWordKill [[comment("MU9: Power Word Kill")]];
    bool MU9_MonsterSummoning [[comment("MU9: Monster Summoning")]];
};

// Known Spells - 5
struct SPL_KNOWN05 {
    bool CL1_Bless [[comment("CL1: Bless")]];
    bool CL1_Curse [[comment("CL1: Curse")]];
    bool CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    bool CL1_CauseLightWounds [[comment("CL1: Cause Light Wounds")]];
    bool CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    bool CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    bool CL1_ProtectionFromGood [[comment("CL1: Protection from Good")]];
    bool CL1_ResistCold [[comment("CL1: Resist Cold")]];
    bool MU1_BurningHands [[comment("MU1: Burning Hands")]];
    bool MU1_CharmPerson [[comment("MU1: Charm Person")]];
    bool MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    bool MU1_Enlarge [[comment("MU1: Enlarge")]];
    bool MU1_Reduce [[comment("MU1: Reduce")]];
    bool MU1_Friends [[comment("MU1: Friends")]];
    bool MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    bool MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    bool MU1_ProtectionFromGood [[comment("MU1: Protection from Good")]];
    bool MU1_ReadMagic [[comment("MU1: Read Magic")]];
    bool MU1_Shield [[comment("MU1: Shield")]];
    bool MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    bool MU1_Sleep [[comment("MU1: Sleep")]];
    bool CL2_FindTraps [[comment("CL2: Find Traps")]];
    bool CL2_HoldPerson [[comment("CL2: Hold Person")]];
    bool CL2_ResistFire [[comment("CL2: Resist Fire")]];
    bool CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    bool CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    bool CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    bool CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    bool MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    bool MU2_Invisibility [[comment("MU2: Invisibility")]];
    bool MU2_Knock [[comment("MU2: Knock")]];
    bool MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    bool MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    bool MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    bool MU2_Strength [[comment("MU2: Strength")]];
    bool IT7_AnimateDead [[comment("IT7: Animate Dead")]];
    bool CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    bool CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    bool CL3_CureDisease [[comment("CL3: Cure Disease")]];
    bool CL3_CauseDisease [[comment("CL3: Cause Disease")]];
    bool CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    bool CL3_Prayer [[comment("CL3: Prayer")]];
    bool CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    bool CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    bool MU3_Blink [[comment("MU3: Blink")]];
    bool MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    bool MU3_Fireball [[comment("MU3: Fireball")]];
    bool MU3_Haste [[comment("MU3: Haste")]];
    bool MU3_HoldPerson [[comment("MU3: Hold Person")]];
    bool MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    bool MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    bool MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    bool MU3_ProtectionFromGood10Radius [[comment("MU3: Protection from Good, 10' Radius")]];
    bool MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    bool MU3_Slow [[comment("MU3: Slow")]];
    bool CL7_Restoration [[comment("CL7: Restoration")]];
    bool IT6_PotionOfSpeed [[comment("IT6: Potion of Speed")]];
    bool CL4_CureSeriousWounds [[comment("CL4: Cure Serious Wounds")]];
    bool IT6_PotionOfGiantStrength [[comment("IT6: Potion of Giant Strength")]];
    bool IT6_JavelinOfLightning [[comment("IT6: Javelin of Lightning")]];
    bool IT6_WandOfParalyzation [[comment("IT6: Wand of Paralyzation")]];
    bool IT6_PotionOfHealing [[comment("IT6: Potion of Healing")]];
    bool IT6_DustOfDisappearance [[comment("IT6: Dust of Disappearance")]];
    bool IT6_NecklaceOfMissiles [[comment("IT6: Necklace of Missiles")]];
    bool IT6_WandOfMagicMissiles [[comment("IT6: Wand of Magic Missiles")]];
    bool CL4_CauseSeriousWounds [[comment("CL4: Cause Serious Wounds")]];
    bool CL4_NeutralizePoison [[comment("CL4: Neutralize Poison")]];
    bool CL4_Poison [[comment("CL4: Poison")]];
    bool CL4_ProtectionEvil10Radius [[comment("CL4: Protection Evil, 10' Radius")]];
    bool CL4_SticksToSnakes [[comment("CL4: Sticks to Snakes")]];
    bool CL5_CureCriticalWounds [[comment("CL5: Cure Critical Wounds")]];
    bool CL5_CauseCriticalWounds [[comment("CL5: Cause Critical Wounds")]];
    bool CL5_DispelEvil [[comment("CL5: Dispel Evil")]];
    bool CL5_FlameStrike [[comment("CL5: Flame Strike")]];
    bool CL5_RaiseDead [[comment("CL5: Raise Dead")]];
    bool CL5_SlayLiving [[comment("CL5: Slay Living")]];
    bool DR1_DetectMagic [[comment("DR1: Detect Magic")]];
    bool DR1_Entangle [[comment("DR1: Entangle")]];
    bool DR1_FaerieFire [[comment("DR1: Faerie Fire")]];
    bool DR1_InvisibilityToAnimals [[comment("DR1: Invisibility to Animals")]];
    bool MU4_CharmMonsters [[comment("MU4: Charm Monsters")]];
    bool MU4_Confusion [[comment("MU4: Confusion")]];
    bool MU4_DimensionDoor [[comment("MU4: Dimension Door")]];
    bool MU4_Fear [[comment("MU4: Fear")]];
    bool MU4_FireShield [[comment("MU4: Fire Shield")]];
    bool MU4_Fumble [[comment("MU4: Fumble")]];
    bool MU4_IceStorm [[comment("MU4: Ice Storm")]];
    bool MU4_MinorGlobeOfInvulnerability [[comment("MU4: Minor Globe of Invulnerability")]];
    bool MU4_RemoveCurse [[comment("MU4: Remove Curse")]];
    bool IT5_AnimateDead [[comment("IT5: Animate Dead")]];
    bool MU5_CloudKill [[comment("MU5: Cloud Kill")]];
    bool MU5_ConeOfCold [[comment("MU5: Cone of Cold")]];
    bool MU5_Feeblemind [[comment("MU5: Feeblemind")]];
    bool MU5_HoldMonsters [[comment("MU5: Hold Monsters")]];
    bool IT6_ScrollOfProtDragonBreath [[comment("IT6: Scroll of Prot Dragon Breath")]];
    bool IT6_ScrollOfProtParalyzation [[comment("IT6: Scroll of Prot. Paralyzation")]];
    bool IT6_PotionOfInvisibility [[comment("IT6: Potion of Invisibility")]];
    bool IT6_WandOfDefoliation [[comment("IT6: Wand of Defoliation")]];
    bool IT6_PotionExtraHealing [[comment("IT6: Potion Extra Healing")]];
    bool MU4_BestowCurse [[comment("MU4: Bestow Curse")]];
    bool SP0_ProtectionFromEvil10Radius [[comment("SP0: Protection from Evil 10' Radius")]];
    bool SP0_Silence15Radius [[comment("SP0: Silence 15' radius")]];
    bool SP0_DetectMagic [[comment("SP0: Detect Magic")]];
    bool SP0_RemoveCurse [[comment("SP0: Remove Curse")]];
    bool SP0_Bless [[comment("SP0: Bless")]];
    bool SP0_CharmPerson [[comment("SP0: Charm Person")]];
    bool SP0_BurningHands [[comment("SP0: Burning Hands")]];
};

// Known Spells - 6 - WIZ.SPL_Known - Note: This is using the BOOL enum type, not the standard "bool" type
struct SPL_KNOWN06 {
    BOOL CL1_Bless [[comment("CL1: Bless")]];
    BOOL DR2_Barkskin [[comment("DR2: Barkskin")]];
    BOOL CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    BOOL DR2_CharmPersonMammal [[comment("DR2: Charm Person/Mammal")]];
    BOOL CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    BOOL CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    BOOL CL7_Ressurection [[comment("CL7: Resurrection")]];
    BOOL CL1_ResistCold [[comment("CL1: Resist Cold")]];
    BOOL MU1_BurningHands [[comment("MU1: Burning Hands")]];
    BOOL MU1_CharmPerson [[comment("MU1: Charm Person")]];
    BOOL MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    BOOL MU1_Enlarge [[comment("MU1: Enlarge")]];
    BOOL MU1_Reduce [[comment("MU1: Reduce")]];
    BOOL MU1_Friends [[comment("MU1: Friends")]];
    BOOL MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    BOOL MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    BOOL CL7_Restoration [[comment("CL7: Restoration")]];
    BOOL MU1_ReadMagic [[comment("MU1: Read Magic")]];
    BOOL MU1_Shield [[comment("MU1: Shield")]];
    BOOL MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    BOOL MU1_Sleep [[comment("MU1: Sleep")]];
    BOOL CL2_FindTraps [[comment("CL2: Find Traps")]];
    BOOL CL2_HoldPerson [[comment("CL2: Hold Person")]];
    BOOL CL2_ResistFire [[comment("CL2: Resist Fire")]];
    BOOL CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    BOOL CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    BOOL CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    BOOL CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    BOOL MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    BOOL MU2_Invisibility [[comment("MU2: Invisibility")]];
    BOOL MU2_Knock [[comment("MU2: Knock")]];
    BOOL MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    BOOL MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    BOOL MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    BOOL MU2_Strength [[comment("MU2: Strength")]];
    BOOL IT7_AnimateDead [[comment("IT7: Animate Dead")]];
    BOOL CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    BOOL CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    BOOL CL3_CureDisease [[comment("CL3: Cure Disease")]];
    BOOL CL6_Harm [[comment("CL6: Harm")]];
    BOOL CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    BOOL CL3_Prayer [[comment("CL3: Prayer")]];
    BOOL CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    BOOL CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    BOOL MU3_Blink [[comment("MU3: Blink")]];
    BOOL MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    BOOL MU3_Fireball [[comment("MU3: Fireball")]];
    BOOL MU3_Haste [[comment("MU3: Haste")]];
    BOOL MU3_HoldPerson [[comment("MU3: Hold Person")]];
    BOOL MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    BOOL MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    BOOL MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    BOOL CL6_Heal [[comment("CL6: Heal")]];
    BOOL MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    BOOL MU3_Slow [[comment("MU3: Slow")]];
    BOOL MU6_DeathSpell [[comment("MU6: Death Spell")]];
    BOOL IT6_PotionOfSpeed [[comment("IT6: Potion of Speed")]];
    BOOL CL4_CureSeriousWounds [[comment("CL4: Cure Serious Wounds")]];
    BOOL IT6_PotionOfGiantStrength [[comment("IT6: Potion of Giant Strength")]];
    BOOL MU6_Disentegrate [[comment("MU6: Disentegrate")]];
    BOOL IT6_WandOfParalyzation [[comment("IT6: Wand of Paralyzation")]];
    BOOL IT6_PotionOfHealing [[comment("IT6: Potion of Healing")]];
    BOOL MU6_GlobeOfInvulnerability [[comment("MU6: Globe of Invulnerability")]];
    BOOL IT6_NecklaceOfMissiles [[comment("IT6: Necklace of Missiles")]];
    BOOL IT6_WandOfMagicMissiles [[comment("IT6: Wand of Magic Missiles")]];
    BOOL MU6_StoneToFlesh [[comment("MU6: Stone to Flesh")]];
    BOOL CL4_NeutralizePoison [[comment("CL4: Neutralize Poison")]];
    BOOL CL4_Poison [[comment("CL4: Poison")]];
    BOOL CL4_ProtectionEvil10Radius [[comment("CL4: Protection Evil, 10' Radius")]];
    BOOL CL4_SticksToSnakes [[comment("CL4: Sticks to Snakes")]];
    BOOL CL5_CureCriticalWounds [[comment("CL5: Cure Critical Wounds")]];
    BOOL MU6_FleshToStone [[comment("MU6: Flesh to Stone")]];
    BOOL CL5_DispelEvil [[comment("CL5: Dispel Evil")]];
    BOOL CL5_FlameStrike [[comment("CL5: Flame Strike")]];
    BOOL CL5_RaiseDead [[comment("CL5: Raise Dead")]];
    BOOL CL5_SlayLiving [[comment("CL5: Slay Living")]];
    BOOL DR1_DetectMagic [[comment("DR1: Detect Magic")]];
    BOOL DR1_Entangle [[comment("DR1: Entangle")]];
    BOOL DR1_FaerieFire [[comment("DR1: Faerie Fire")]];
    BOOL DR1_InvisibilityToAnimals [[comment("DR1: Invisibility to Animals")]];
    BOOL MU4_CharmMonsters [[comment("MU4: Charm Monsters")]];
    BOOL MU4_Confusion [[comment("MU4: Confusion")]];
    BOOL MU4_DimensionDoor [[comment("MU4: Dimension Door")]];
    BOOL MU4_Fear [[comment("MU4: Fear")]];
    BOOL MU4_FireShield [[comment("MU4: Fire Shield")]];
    BOOL MU4_Fumble [[comment("MU4: Fumble")]];
    BOOL MU4_IceStorm [[comment("MU4: Ice Storm")]];
    BOOL MU4_MinorGlobeOfInvulnerability [[comment("MU4: Minor Globe of Invulnerability")]];
    BOOL MU4_RemoveCurse [[comment("MU4: Remove Curse")]];
    BOOL MU5_IronSkin [[comment("MU5: Iron Skin")]];
    BOOL MU5_CloudKill [[comment("MU5: Cloud Kill")]];
    BOOL MU5_ConeOfCold [[comment("MU5: Cone of Cold")]];
    BOOL MU5_Feeblemind [[comment("MU5: Feeblemind")]];
    BOOL MU5_HoldMonsters [[comment("MU5: Hold Monsters")]];
    BOOL IT6_ScrollOfProtDragonBreath [[comment("IT6: Scroll of Prot Dragon Breath")]];
    BOOL IT6_ElixirOfYouth [[comment("IT6: Elixir of Youth")]];
    BOOL IT6_PotionOfInvisibility [[comment("IT6: Potion of Invisibility")]];
    BOOL MU5_FireTouch [[comment("MU5: Fire Touch")]];
    BOOL IT6_PotionExtraHealing [[comment("IT6: Potion Extra Healing")]];
    BOOL MU4_BestowCurse [[comment("MU4: Bestow Curse")]];
    BOOL SP0_ProtectionFromEvil10Radius [[comment("SP0: Protection from Evil 10' Radius")]];
    BOOL SP0_Silence15Radius [[comment("SP0: Silence 15' radius")]];
    BOOL SP0_DetectMagic [[comment("SP0: Detect Magic")]];
    BOOL SP0_RemoveCurse [[comment("SP0: Remove Curse")]];
    BOOL SP0_Bless [[comment("SP0: Bless")]];
    BOOL SP0_CharmPerson [[comment("SP0: Charm Person")]];
    BOOL SP0_BurningHands [[comment("SP0: Burning Hands")]];
    BOOL MU7_DelayBlastFireball [[comment("MU7: Delay Blast Fireball")]];
    BOOL MU7_MassInvisibility [[comment("MU7: Mass Invisibility")]];
    BOOL MU7_PowerWordStun [[comment("MU7: Power Word Stun")]];
    BOOL MU8_MassCharm [[comment("MU8: Mass Charm")]];
    BOOL MU8_MindBlank [[comment("MU8: Mind Blank")]];
    BOOL MU8_OttosIrresitableDance [[comment("MU8: Otto's Irresitable Dance")]];
    BOOL MU8_PowerWordBlind [[comment("MU8: Power Word Blind")]];
};

// Known Spells - 7
bitfield SPL_KNOWN07 {
    CL1_Bless : 1 [[comment("CL1: Bless")]];
    EV1_Curse : 1 [[comment("EV1: Curse")]];
    CL1_CureLightWounds : 1 [[comment("CL1: Cure Light Wounds")]];
    EV1_CauseLightWounds : 1 [[comment("EV1: Cause Light Wounds")]];
    CL1_DetectMagic : 1 [[comment("CL1: Detect Magic")]];
    CL1_ProtectionFromEvil : 1 [[comment("CL1: Protection from Evil")]];
    EV1_ProtectionFromGood : 1 [[comment("EV1: Protection from Good")]];
    CL1_ResistCold : 1 [[comment("CL1: Resist Cold")]];
    MU1_BurningHands : 1 [[comment("MU1: Burning Hands")]];
    MU1_CharmPerson : 1 [[comment("MU1: Charm Person")]];
    MU1_DetectMagic : 1 [[comment("MU1: Detect Magic")]];
    MU1_Enlarge : 1 [[comment("MU1: Enlarge")]];
    MU1_Reduce : 1 [[comment("MU1: Reduce")]];
    MU1_Friends : 1 [[comment("MU1: Friends")]];
    MU1_MagicMissile : 1 [[comment("MU1: Magic Missile")]];
    MU1_ProtectionFromEvil : 1 [[comment("MU1: Protection from Evil")]];
    MU1_ProtectionFromGood : 1 [[comment("MU1: Protection from Good")]];
    MU1_ReadMagic : 1 [[comment("MU1: Read Magic")]];
    MU1_Shield : 1 [[comment("MU1: Shield")]];
    MU1_ShockingGrasp : 1 [[comment("MU1: Shocking Grasp")]];
    MU1_Sleep : 1 [[comment("MU1: Sleep")]];
    CL2_FindTraps : 1 [[comment("CL2: Find Traps")]];
    CL2_HoldPerson : 1 [[comment("CL2: Hold Person")]];
    CL2_ResistFire : 1 [[comment("CL2: Resist Fire")]];
    CL2_Silence15Radius : 1 [[comment("CL2: Silence, 15' Radius")]];
    CL2_SlowPoison : 1 [[comment("CL2: Slow Poison")]];
    CL2_SnakeCharm : 1 [[comment("CL2: Snake Charm")]];
    CL2_SpiritualHammer : 1 [[comment("CL2: Spiritual Hammer")]];
    MU2_DetectInvisibility : 1 [[comment("MU2: Detect Invisibility")]];
    MU2_Invisibility : 1 [[comment("MU2: Invisibility")]];
    MU2_Knock : 1 [[comment("MU2: Knock")]];
    MU2_MirrorImage : 1 [[comment("MU2: Mirror Image")]];
    MU2_RayOfEnfeeblement : 1 [[comment("MU2: Ray of Enfeeblement")]];
    MU2_StinkingCloud : 1 [[comment("MU2: Stinking Cloud")]];
    MU2_Strength : 1 [[comment("MU2: Strength")]];
    CL6_Heal : 1 [[comment("CL6: Heal")]];
    CL3_CureBlindness : 1 [[comment("CL3: Cure Blindness")]];
    EV3_CauseBlindness : 1 [[comment("EV3: Cause Blindness")]];
    CL3_CureDisease : 1 [[comment("CL3: Cure Disease")]];
    EV3_CauseDisease : 1 [[comment("EV3: Cause Disease")]];
    CL3_DispelMagic : 1 [[comment("CL3: Dispel Magic")]];
    CL3_Prayer : 1 [[comment("CL3: Prayer")]];
    CL3_RemoveCurse : 1 [[comment("CL3: Remove Curse")]];
    EV3_BestowCurse : 1 [[comment("EV3: Bestow Curse")]];
    MU3_Blink : 1 [[comment("MU3: Blink")]];
    MU3_DispelMagic : 1 [[comment("MU3: Dispel Magic")]];
    MU3_Fireball : 1 [[comment("MU3: Fireball")]];
    MU3_Haste : 1 [[comment("MU3: Haste")]];
    MU3_HoldPerson : 1 [[comment("MU3: Hold Person")]];
    MU3_Invisibility10Radius : 1 [[comment("MU3: Invisibility, 10' Radius")]];
    MU3_LightningBolt : 1 [[comment("MU3: Lightning Bolt")]];
    MU3_ProtectionFromEvil10Radius : 1 [[comment("MU3: Protection from Evil, 10' Radius")]];
    MU3_ProtectionFromGood10Radius : 1 [[comment("MU3: Protection from Good, 10' Radius")]];
    MU3_ProtectionFromNormalMissiles : 1 [[comment("MU3: Protection from Normal Missiles")]];
    MU3_Slow : 1 [[comment("MU3: Slow")]];
    EV6_Harm : 1 [[comment("EV6: Harm")]];
    SP0_ProtectionFromEvil10Radius : 1 [[comment("SP0: Protection from Evil 10' Radius")]];
    CL4_CureSeriousWounds : 1 [[comment("CL4: Cure Serious Wounds")]];
    SP0_Silence15Radius : 1 [[comment("SP0: Silence 15' radius")]];
    SP0_DetectMagic : 1 [[comment("SP0: Detect Magic")]];
    SP0_RemoveCurse : 1 [[comment("SP0: Remove Curse")]];
    SP0_Bless : 1 [[comment("SP0: Bless")]];
    SP0_CharmPerson : 1 [[comment("SP0: Charm Person")]];
    SP0_BurningHands : 1 [[comment("SP0: Burning Hands")]];
    IT6_WandOfMagicMissiles : 1 [[comment("IT6: Wand of Magic Missiles")]];
    EV4_CauseSeriousWounds : 1 [[comment("EV4: Cause Serious Wounds")]];
    CL4_NeutralizePoison : 1 [[comment("CL4: Neutralize Poison")]];
    EV4_Poison : 1 [[comment("EV4: Poison")]];
    CL4_ProtectionEvil10Radius : 1 [[comment("CL4: Protection Evil, 10' Radius")]];
    CL4_SticksToSnakes : 1 [[comment("CL4: Sticks to Snakes")]];
    CL5_CureCriticalWounds : 1 [[comment("CL5: Cure Critical Wounds")]];
    EV5_CauseCriticalWounds : 1 [[comment("EV5: Cause Critical Wounds")]];
    CL5_DispelEvil : 1 [[comment("CL5: Dispel Evil")]];
    CL5_FlameStrike : 1 [[comment("CL5: Flame Strike")]];
    CL5_RaiseDead : 1 [[comment("CL5: Raise Dead")]];
    EV5_SlayLiving : 1 [[comment("EV5: Slay Living")]];
    DR1_DetectMagic : 1 [[comment("DR1: Detect Magic")]];
    DR1_Entangle : 1 [[comment("DR1: Entangle")]];
    DR1_FaerieFire : 1 [[comment("DR1: Faerie Fire")]];
    DR1_InvisibilityToAnimals : 1 [[comment("DR1: Invisibility to Animals")]];
    MU4_CharmMonsters : 1 [[comment("MU4: Charm Monsters")]];
    MU4_Confusion : 1 [[comment("MU4: Confusion")]];
    MU4_DimensionDoor : 1 [[comment("MU4: Dimension Door")]];
    MU4_Fear : 1 [[comment("MU4: Fear")]];
    MU4_FireShield : 1 [[comment("MU4: Fire Shield")]];
    MU4_Fumble : 1 [[comment("MU4: Fumble")]];
    MU4_IceStorm : 1 [[comment("MU4: Ice Storm")]];
    MU4_MinorGlobeOfInvulnerability : 1 [[comment("MU4: Minor Globe of Invulnerability")]];
    MU4_RemoveCurse : 1 [[comment("MU4: Remove Curse")]];
    DR2_Barkskin : 1 [[comment("DR2: Barkskin")]];
    MU5_CloudKill : 1 [[comment("MU5: Cloud Kill")]];
    MU5_ConeOfCold : 1 [[comment("MU5: Cone of Cold")]];
    MU5_Feeblemind : 1 [[comment("MU5: Feeblemind")]];
    MU5_HoldMonsters : 1 [[comment("MU5: Hold Monsters")]];
    IT6_ScrollOfProtection : 1 [[comment("IT6: Scroll of Protection")]];
    DR2_CharmPersonOrMammal : 1 [[comment("DR2: Charm Person or Mammal")]];
    IT6_PotionOfInvisibility : 1 [[comment("IT6: Potion of Invisibility")]];
    DR2_CureLightWounds : 1 [[comment("DR2: Cure Light Wounds")]];
    IT6_PotionOfExtraHealing : 1 [[comment("IT6: Potion of Extra Healing")]];
    MU4_BestowCurse : 1 [[comment("MU4: Bestow Curse")]];
    CL6_BladeBarrier : 1 [[comment("CL6: Blade Barrier")]];
    CL7_Restoration : 1 [[comment("CL7: Restoration")]];
    EV7_EnergyDrain : 1 [[comment("EV7: Energy Drain")]];
    EV7_Destruction : 1 [[comment("EV7: Destruction")]];
    CL7_Resurrection : 1 [[comment("CL7: Resurrection")]];
    DR3_CureDisease : 1 [[comment("DR3: Cure Disease")]];
    DR3_NeutralizePoison : 1 [[comment("DR3: Neutralize Poison")]];
    DR3_HoldAnimal : 1 [[comment("DR3: Hold Animal")]];
    DR3_ProtFromFire : 1 [[comment("DR3: Prot. from Fire")]];
    MU6_DeathSpell : 1 [[comment("MU6: Death Spell")]];
    MU6_Disintegrate : 1 [[comment("MU6: Disintegrate")]];
    MU6_GlobeOfInvulnerability : 1 [[comment("MU6: Globe of Invulnerability")]];
    MU6_StoneToFlesh : 1 [[comment("MU6: Stone to Flesh")]];
    MU6_FleshToStone : 1 [[comment("MU6: Flesh to Stone")]];
    MU7_DelayedBlastFireball : 1 [[comment("MU7: Delayed Blast Fireball")]];
    MU7_MassInvisibility : 1 [[comment("MU7: Mass Invisibility")]];
    MU7_PowerWordStun : 1 [[comment("MU7: Power Word Stun")]];
    MU5_FireTouch : 1 [[comment("MU5: Fire Touch")]];
    MU5_IronSkin : 1 [[comment("MU5: Iron Skin")]];
    MU8_MassCharm : 1 [[comment("MU8: Mass Charm")]];
    MU8_OttosIrrDance : 1 [[comment("MU8: Otto's Irr. Dance")]];
    MU8_MindBlank : 1 [[comment("MU8: Mind Blank")]];
    MU8_PowerWordBlind : 1 [[comment("MU8: Power Word Blind")]];
    MU9_MeteorSwarm : 1 [[comment("MU9: Meteor Swarm")]];
    MU9_PowerWordKill : 1 [[comment("MU9: Power Word Kill")]];
    MU9_MonsterSummoning : 1 [[comment("MU9: Monster Summoning")]];
    IT6_PotionOfSpeed : 1 [[comment("IT6: Potion of Speed")]];
    IT6_PotionOfGiantStrength : 1 [[comment("IT6: Potion of Giant Strength")]];
};

// Known Spells - 8
struct SPL_KNOWN08 {
    bool CL1_Bless [[comment("CL1: Bless")]];
    bool CL1_Curse [[comment("CL1: Curse")]];
    bool CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    bool CL1_CauseLightWounds [[comment("CL1: Cause Light Wounds")]];
    bool CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    bool CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    bool CL1_ProtectionFromGood [[comment("CL1: Protection from Good")]];
    bool CL1_ResistCold [[comment("CL1: Resist Cold")]];
    bool MU1_BurningHands [[comment("MU1: Burning Hands")]];
    bool MU1_CharmPerson [[comment("MU1: Charm Person")]];
    bool MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    bool MU1_Enlarge [[comment("MU1: Enlarge")]];
    bool MU1_Reduce [[comment("MU1: Reduce")]];
    bool MU1_Friends [[comment("MU1: Friends")]];
    bool MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    bool MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    bool MU1_ProtectionFromGood [[comment("MU1: Protection from Good")]];
    bool MU1_ReadMagic [[comment("MU1: Read Magic")]];
    bool MU1_Shield [[comment("MU1: Shield")]];
    bool MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    bool MU1_Sleep [[comment("MU1: Sleep")]];
    bool CL2_FindTraps [[comment("CL2: Find Traps")]];
    bool CL2_HoldPerson [[comment("CL2: Hold Person")]];
    bool CL2_ResistFire [[comment("CL2: Resist Fire")]];
    bool CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    bool CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    bool CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    bool CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    bool MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    bool MU2_Invisibility [[comment("MU2: Invisibility")]];
    bool MU2_Knock [[comment("MU2: Knock")]];
    bool MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    bool MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    bool MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    bool MU2_Strength [[comment("MU2: Strength")]];
    bool IT7_AnimateDead [[comment("IT7: Animate Dead")]];
    bool CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    bool CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    bool CL3_CureDisease [[comment("CL3: Cure Disease")]];
    bool CL3_CauseDisease [[comment("CL3: Cause Disease")]];
    bool CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    bool CL3_Prayer [[comment("CL3: Prayer")]];
    bool CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    bool CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    bool MU3_Blink [[comment("MU3: Blink")]];
    bool MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    bool MU3_Fireball [[comment("MU3: Fireball")]];
    bool MU3_Haste [[comment("MU3: Haste")]];
    bool MU3_HoldPerson [[comment("MU3: Hold Person")]];
    bool MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    bool MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    bool MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    bool MU3_ProtectionFromGood10Radius [[comment("MU3: Protection from Good, 10' Radius")]];
    bool MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    bool MU3_Slow [[comment("MU3: Slow")]];
    bool CL7_Restoration [[comment("CL7: Restoration")]];
    bool IT6_PotionOfSpeed [[comment("IT6: Potion of Speed")]];
    bool CL4_CureSeriousWounds [[comment("CL4: Cure Serious Wounds")]];
    bool IT6_PotionOfGiantStrength [[comment("IT6: Potion of Giant Strength")]];
    bool IT6_JavelinOfLightning [[comment("IT6: Javelin of Lightning")]];
    bool IT6_WandOfParalyzation [[comment("IT6: Wand of Paralyzation")]];
    bool IT6_PotionOfHealing [[comment("IT6: Potion of Healing")]];
    bool IT6_DustOfDisappearance [[comment("IT6: Dust of Disappearance")]];
    bool IT6_NecklaceOfMissiles [[comment("IT6: Necklace of Missiles")]];
    bool IT6_WandOfMagicMissiles [[comment("IT6: Wand of Magic Missiles")]];
    bool CL4_CauseSeriousWounds [[comment("CL4: Cause Serious Wounds")]];
    bool CL4_NeutralizePoison [[comment("CL4: Neutralize Poison")]];
    bool CL4_Poison [[comment("CL4: Poison")]];
    bool CL4_ProtectionEvil10Radius [[comment("CL4: Protection Evil, 10' Radius")]];
    bool CL4_SticksToSnakes [[comment("CL4: Sticks to Snakes")]];
    bool CL5_CureCriticalWounds [[comment("CL5: Cure Critical Wounds")]];
    bool CL5_CauseCriticalWounds [[comment("CL5: Cause Critical Wounds")]];
    bool CL5_DispelEvil [[comment("CL5: Dispel Evil")]];
    bool CL5_FlameStrike [[comment("CL5: Flame Strike")]];
    bool CL5_RaiseDead [[comment("CL5: Raise Dead")]];
    bool CL5_SlayLiving [[comment("CL5: Slay Living")]];
    bool DR1_DetectMagic [[comment("DR1: Detect Magic")]];
    bool DR1_Entangle [[comment("DR1: Entangle")]];
    bool DR1_FaerieFire [[comment("DR1: Faerie Fire")]];
    bool DR1_InvisibilityToAnimals [[comment("DR1: Invisibility to Animals")]];
    bool MU4_CharmMonsters [[comment("MU4: Charm Monsters")]];
    bool MU4_Confusion [[comment("MU4: Confusion")]];
    bool MU4_DimensionDoor [[comment("MU4: Dimension Door")]];
    bool MU4_Fear [[comment("MU4: Fear")]];
    bool MU4_FireShield [[comment("MU4: Fire Shield")]];
    bool MU4_Fumble [[comment("MU4: Fumble")]];
    bool MU4_IceStorm [[comment("MU4: Ice Storm")]];
    bool MU4_MinorGlobeOfInvulnerability [[comment("MU4: Minor Globe of Invulnerability")]];
    bool MU4_RemoveCurse [[comment("MU4: Remove Curse")]];
    bool IT5_AnimateDead [[comment("IT5: Animate Dead")]];
    bool MU5_CloudKill [[comment("MU5: Cloud Kill")]];
    bool MU5_ConeOfCold [[comment("MU5: Cone of Cold")]];
    bool MU5_Feeblemind [[comment("MU5: Feeblemind")]];
    bool MU5_HoldMonsters [[comment("MU5: Hold Monsters")]];
    bool IT6_ScrollOfProtDragonBreath [[comment("IT6: Scroll of Prot. Dragon Breath")]];
    bool IT6_ScrollOfProtParalyzation [[comment("IT6: Scroll of Prot. Paralyzation")]];
    bool IT6_PotionOfInvisibility [[comment("IT6: Potion of Invisibility")]];
    bool IT6_WandOfDefoliation [[comment("IT6: Wand of Defoliation")]];
    bool IT6_PotionExtraHealing [[comment("IT6: Potion Extra Healing")]];
    bool MU4_BestowCurse [[comment("MU4: Bestow Curse")]];
};

// Known Spells - 9
struct SPL_KNOWN09 {
    bool CL1_Bless [[comment("CL1: Bless")]];
    bool CL1_Curse [[comment("CL1: Curse")]];
    bool CL1_CureLightWounds [[comment("CL1: Cure Light Wounds")]];
    bool CL1_CauseLightWounds [[comment("CL1: Cause Light Wounds")]];
    bool CL1_DetectMagic [[comment("CL1: Detect Magic")]];
    bool CL1_ProtectionFromEvil [[comment("CL1: Protection from Evil")]];
    bool CL1_ProtectionFromGood [[comment("CL1: Protection from Good")]];
    bool CL1_ResistCold [[comment("CL1: Resist Cold")]];
    bool MU1_BurningHands [[comment("MU1: Burning Hands")]];
    bool MU1_CharmPerson [[comment("MU1: Charm Person")]];
    bool MU1_DetectMagic [[comment("MU1: Detect Magic")]];
    bool MU1_Enlarge [[comment("MU1: Enlarge")]];
    bool MU1_Reduce [[comment("MU1: Reduce")]];
    bool MU1_Friends [[comment("MU1: Friends")]];
    bool MU1_MagicMissile [[comment("MU1: Magic Missile")]];
    bool MU1_ProtectionFromEvil [[comment("MU1: Protection from Evil")]];
    bool MU1_ProtectionFromGood [[comment("MU1: Protection from Good")]];
    bool MU1_ReadMagic [[comment("MU1: Read Magic")]];
    bool MU1_Shield [[comment("MU1: Shield")]];
    bool MU1_ShockingGrasp [[comment("MU1: Shocking Grasp")]];
    bool MU1_Sleep [[comment("MU1: Sleep")]];
    bool CL2_FindTraps [[comment("CL2: Find Traps")]];
    bool CL2_HoldPerson [[comment("CL2: Hold Person")]];
    bool CL2_ResistFire [[comment("CL2: Resist Fire")]];
    bool CL2_Silence15Radius [[comment("CL2: Silence, 15' Radius")]];
    bool CL2_SlowPoison [[comment("CL2: Slow Poison")]];
    bool CL2_SnakeCharm [[comment("CL2: Snake Charm")]];
    bool CL2_SpiritualHammer [[comment("CL2: Spiritual Hammer")]];
    bool MU2_DetectInvisibility [[comment("MU2: Detect Invisibility")]];
    bool MU2_Invisibility [[comment("MU2: Invisibility")]];
    bool MU2_Knock [[comment("MU2: Knock")]];
    bool MU2_MirrorImage [[comment("MU2: Mirror Image")]];
    bool MU2_RayOfEnfeeblement [[comment("MU2: Ray of Enfeeblement")]];
    bool MU2_StinkingCloud [[comment("MU2: Stinking Cloud")]];
    bool MU2_Strength [[comment("MU2: Strength")]];
    bool CL6_Heal [[comment("CL6: Heal")]];
    bool CL3_CureBlindness [[comment("CL3: Cure Blindness")]];
    bool CL3_CauseBlindness [[comment("CL3: Cause Blindness")]];
    bool CL3_CureDisease [[comment("CL3: Cure Disease")]];
    bool CL3_CauseDisease [[comment("CL3: Cause Disease")]];
    bool CL3_DispelMagic [[comment("CL3: Dispel Magic")]];
    bool CL3_Prayer [[comment("CL3: Prayer")]];
    bool CL3_RemoveCurse [[comment("CL3: Remove Curse")]];
    bool CL3_BestowCurse [[comment("CL3: Bestow Curse")]];
    bool MU3_Blink [[comment("MU3: Blink")]];
    bool MU3_DispelMagic [[comment("MU3: Dispel Magic")]];
    bool MU3_Fireball [[comment("MU3: Fireball")]];
    bool MU3_Haste [[comment("MU3: Haste")]];
    bool MU3_HoldPerson [[comment("MU3: Hold Person")]];
    bool MU3_Invisibility10Radius [[comment("MU3: Invisibility, 10' Radius")]];
    bool MU3_LightningBolt [[comment("MU3: Lightning Bolt")]];
    bool MU3_ProtectionFromEvil10Radius [[comment("MU3: Protection from Evil, 10' Radius")]];
    bool MU3_ProtectionFromGood10Radius [[comment("MU3: Protection from Good, 10' Radius")]];
    bool MU3_ProtectionFromNormalMissiles [[comment("MU3: Protection from Normal Missiles")]];
    bool MU3_Slow [[comment("MU3: Slow")]];
    bool CL6_Harm [[comment("CL6: Harm")]];
    bool IT6_PotionOfSpeed [[comment("IT6: Potion of Speed")]];
    bool CL4_CureSeriousWounds [[comment("CL4: Cure Serious Wounds")]];
    bool IT6_PotionOfGiantStrength [[comment("IT6: Potion of Giant Strength")]];
    bool IT6_JavelinOfLightning [[comment("IT6: Javelin of Lightning")]];
    bool IT6_WandOfParalyzation [[comment("IT6: Wand of Paralyzation")]];
    bool IT6_PotionOfHealing [[comment("IT6: Potion of Healing")]];
    bool IT6_ElixirOfYouth [[comment("IT6: Elixir of Youth")]];
    bool IT6_NecklaceOfMissiles [[comment("IT6: Necklace of Missiles")]];
    bool IT6_WandOfMagicMissiles [[comment("IT6: Wand of Magic Missiles")]];
    bool CL4_CauseSeriousWounds [[comment("CL4: Cause Serious Wounds")]];
    bool CL4_NeutralizePoison [[comment("CL4: Neutralize Poison")]];
    bool CL4_Poison [[comment("CL4: Poison")]];
    bool CL4_ProtectionEvil10Radius [[comment("CL4: Protection Evil, 10' Radius")]];
    bool CL4_SticksToSnakes [[comment("CL4: Sticks to Snakes")]];
    bool CL5_CureCriticalWounds [[comment("CL5: Cure Critical Wounds")]];
    bool CL5_CauseCriticalWounds [[comment("CL5: Cause Critical Wounds")]];
    bool CL5_DispelEvil [[comment("CL5: Dispel Evil")]];
    bool CL5_FlameStrike [[comment("CL5: Flame Strike")]];
    bool CL5_RaiseDead [[comment("CL5: Raise Dead")]];
    bool CL5_SlayLiving [[comment("CL5: Slay Living")]];
    bool DR1_DetectMagic [[comment("DR1: Detect Magic")]];
    bool DR1_Entangle [[comment("DR1: Entangle")]];
    bool DR1_FaerieFire [[comment("DR1: Faerie Fire")]];
    bool DR1_InvisibilityToAnimals [[comment("DR1: Invisibility to Animals")]];
    bool MU4_CharmMonsters [[comment("MU4: Charm Monsters")]];
    bool MU4_Confusion [[comment("MU4: Confusion")]];
    bool MU4_DimensionDoor [[comment("MU4: Dimension Door")]];
    bool MU4_Fear [[comment("MU4: Fear")]];
    bool MU4_FireShield [[comment("MU4: Fire Shield")]];
    bool MU4_Fumble [[comment("MU4: Fumble")]];
    bool MU4_IceStorm [[comment("MU4: Ice Storm")]];
    bool MU4_MinorGlobeOfInvulnerability [[comment("MU4: Minor Globe of Invulnerability")]];
    bool MU4_RemoveCurse [[comment("MU4: Remove Curse")]];
    bool DR2_Barkskin [[comment("DR2: Barkskin")]];
    bool MU5_CloudKill [[comment("MU5: Cloud Kill")]];
    bool MU5_ConeOfCold [[comment("MU5: Cone of Cold")]];
    bool MU5_Feeblemind [[comment("MU5: Feeblemind")]];
    bool MU5_HoldMonsters [[comment("MU5: Hold Monsters")]];
    bool IT6_ScrollOfProtDragonBreath [[comment("IT6: Scroll of Prot. Dragon Breath")]];
    bool DR2_CharmPersonOrMammal [[comment("DR2: Charm Person or Mammal")]];
    bool IT6_PotionOfInvisibility [[comment("IT6: Potion of Invisibility")]];
    bool DR2_CureLightWounds [[comment("DR2: Cure Light Wounds")]];
    bool IT6_PotionOfExtraHealing [[comment("IT6: Potion of Extra Healing")]];
    bool MU4_BestowCurse [[comment("MU4: Bestow Curse")]];
    bool CL6_BladeBarrier [[comment("CL6: Blade Barrier")]];
    bool CL7_Restoration [[comment("CL7: Restoration")]];
    bool CL7_EnergyDrain [[comment("CL7: Energy Drain")]];
    bool CL7_Destruction [[comment("CL7: Destruction")]];
    bool CL7_Resurrection [[comment("CL7: Resurrection")]];
    bool DR3_CureDisease [[comment("DR3: Cure Disease")]];
    bool DR3_NeutralizePoison [[comment("DR3: Neutralize Poison")]];
    bool DR3_HoldAnimal [[comment("DR3: Hold Animal")]];
    bool DR3_ProtFromFire [[comment("DR3: Prot. from Fire")]];
    bool MU6_DeathSpell [[comment("MU6: Death Spell")]];
    bool MU6_Disintegrate [[comment("MU6: Disintegrate")]];
    bool MU6_GlobeOfInvulnerability [[comment("MU6: Globe of Invulnerability")]];
    bool MU6_StoneToFlesh [[comment("MU6: Stone to Flesh")]];
    bool MU6_FleshToStone [[comment("MU6: Flesh to Stone")]];
    bool MU7_DelayedBlastFireball [[comment("MU7: Delayed Blast Fireball")]];
    bool MU7_MassInvisibility [[comment("MU7: Mass Invisibility")]];
    bool MU7_PowerWordStun [[comment("MU7: Power Word Stun")]];
    bool MU5_FireTouch [[comment("MU5: Fire Touch")]];
    bool MU5_IronSkin [[comment("MU5: Iron Skin")]];
    bool MU8_MassCharm [[comment("MU8: Mass Charm")]];
    bool MU8_OttosIrrDance [[comment("MU8: Otto's Irr. Dance")]];
    bool MU8_MindBlank [[comment("MU8: Mind Blank")]];
    bool MU8_PowerWordBlind [[comment("MU8: Power Word Blind")]];
    bool MU9_MeteorSwarm [[comment("MU9: Meteor Swarm")]];
    bool MU9_PowerWordKill [[comment("MU9: Power Word Kill")]];
    bool MU9_MonsterSummoning [[comment("MU9: Monster Summoning")]];
};

// Known Spells - 10
bitfield SPL_KNOWN10 {
    CL1_Bless : 1 [[comment("CL1: Bless")]];
    CL1_Curse : 1 [[comment("CL1: Curse")]];
    CL1_CureLightWounds : 1 [[comment("CL1: Cure Light Wounds")]];
    CL1_CauseLightWounds : 1 [[comment("CL1: Cause Light Wounds")]];
    CL1_DetectMagic : 1 [[comment("CL1: Detect Magic")]];
    CL1_ProtectionFromEvil : 1 [[comment("CL1: Protection from Evil")]];
    CL1_ProtectionFromGood : 1 [[comment("CL1: Protection from Good")]];
    CL1_ResistCold : 1 [[comment("CL1: Resist Cold")]];
    MU1_BurningHands : 1 [[comment("MU1: Burning Hands")]];
    MU1_CharmPerson : 1 [[comment("MU1: Charm Person")]];
    MU1_DetectMagic : 1 [[comment("MU1: Detect Magic")]];
    MU1_Enlarge : 1 [[comment("MU1: Enlarge")]];
    MU1_Reduce : 1 [[comment("MU1: Reduce")]];
    MU1_Friends : 1 [[comment("MU1: Friends")]];
    MU1_MagicMissile : 1 [[comment("MU1: Magic Missile")]];
    MU1_ProtectionFromEvil : 1 [[comment("MU1: Protection from Evil")]];
    MU1_ProtectionFromGood : 1 [[comment("MU1: Protection from Good")]];
    MU1_ReadMagic : 1 [[comment("MU1: Read Magic")]];
    MU1_Shield : 1 [[comment("MU1: Shield")]];
    MU1_ShockingGrasp : 1 [[comment("MU1: Shocking Grasp")]];
    MU1_Sleep : 1 [[comment("MU1: Sleep")]];
    CL2_FindTraps : 1 [[comment("CL2: Find Traps")]];
    CL2_HoldPerson : 1 [[comment("CL2: Hold Person")]];
    CL2_ResistFire : 1 [[comment("CL2: Resist Fire")]];
    CL2_Silence15Radius : 1 [[comment("CL2: Silence, 15' Radius")]];
    CL2_SlowPoison : 1 [[comment("CL2: Slow Poison")]];
    CL2_SnakeCharm : 1 [[comment("CL2: Snake Charm")]];
    CL2_SpiritualHammer : 1 [[comment("CL2: Spiritual Hammer")]];
    MU2_DetectInvisibility : 1 [[comment("MU2: Detect Invisibility")]];
    MU2_Invisibility : 1 [[comment("MU2: Invisibility")]];
    MU2_Knock : 1 [[comment("MU2: Knock")]];
    MU2_MirrorImage : 1 [[comment("MU2: Mirror Image")]];
    MU2_RayOfEnfeeblement : 1 [[comment("MU2: Ray of Enfeeblement")]];
    MU2_StinkingCloud : 1 [[comment("MU2: Stinking Cloud")]];
    MU2_Strength : 1 [[comment("MU2: Strength")]];
    CL6_Heal : 1 [[comment("CL6: Heal")]];
    CL3_CureBlindness : 1 [[comment("CL3: Cure Blindness")]];
    CL3_CauseBlindness : 1 [[comment("CL3: Cause Blindness")]];
    CL3_CureDisease : 1 [[comment("CL3: Cure Disease")]];
    CL3_CauseDisease : 1 [[comment("CL3: Cause Disease")]];
    CL3_DispelMagic : 1 [[comment("CL3: Dispel Magic")]];
    CL3_Prayer : 1 [[comment("CL3: Prayer")]];
    CL3_RemoveCurse : 1 [[comment("CL3: Remove Curse")]];
    CL3_BestowCurse : 1 [[comment("CL3: Bestow Curse")]];
    MU3_Blink : 1 [[comment("MU3: Blink")]];
    MU3_DispelMagic : 1 [[comment("MU3: Dispel Magic")]];
    MU3_Fireball : 1 [[comment("MU3: Fireball")]];
    MU3_Haste : 1 [[comment("MU3: Haste")]];
    MU3_HoldPerson : 1 [[comment("MU3: Hold Person")]];
    MU3_Invisibility10Radius : 1 [[comment("MU3: Invisibility, 10' Radius")]];
    MU3_LightningBolt : 1 [[comment("MU3: Lightning Bolt")]];
    MU3_ProtectionFromEvil10Radius : 1 [[comment("MU3: Protection from Evil, 10' Radius")]];
    MU3_ProtectionFromGood10Radius : 1 [[comment("MU3: Protection from Good, 10' Radius")]];
    MU3_ProtectionFromNormalMissiles : 1 [[comment("MU3: Protection from Normal Missiles")]];
    MU3_Slow : 1 [[comment("MU3: Slow")]];
    CL6_Harm : 1 [[comment("CL6: Harm")]];
    SP0_ProtectionFromEvil10Radius : 1 [[comment("SP0: Protection from Evil 10' Radius")]];
    CL4_CureSeriousWounds : 1 [[comment("CL4: Cure Serious Wounds")]];
    SP0_Silence15Radius : 1 [[comment("SP0: Silence 15' radius")]];
    SP0_DetectMagic : 1 [[comment("SP0: Detect Magic")]];
    SP0_RemoveCurse : 1 [[comment("SP0: Remove Curse")]];
    SP0_Bless : 1 [[comment("SP0: Bless")]];
    SP0_CharmPerson : 1 [[comment("SP0: Charm Person")]];
    SP0_BurningHands : 1 [[comment("SP0: Burning Hands")]];
    IT6_WandOfMagicMissiles : 1 [[comment("IT6: Wand of Magic Missiles")]];
    CL4_CauseSeriousWounds : 1 [[comment("CL4: Cause Serious Wounds")]];
    CL4_NeutralizePoison : 1 [[comment("CL4: Neutralize Poison")]];
    CL4_Poison : 1 [[comment("CL4: Poison")]];
    CL4_ProtectionEvil10Radius : 1 [[comment("CL4: Protection Evil, 10' Radius")]];
    CL4_SticksToSnakes : 1 [[comment("CL4: Sticks to Snakes")]];
    CL5_CureCriticalWounds : 1 [[comment("CL5: Cure Critical Wounds")]];
    CL5_CauseCriticalWounds : 1 [[comment("CL5: Cause Critical Wounds")]];
    CL5_DispelEvil : 1 [[comment("CL5: Dispel Evil")]];
    CL5_FlameStrike : 1 [[comment("CL5: Flame Strike")]];
    CL5_RaiseDead : 1 [[comment("CL5: Raise Dead")]];
    CL5_SlayLiving : 1 [[comment("CL5: Slay Living")]];
    DR1_DetectMagic : 1 [[comment("DR1: Detect Magic")]];
    DR1_Entangle : 1 [[comment("DR1: Entangle")]];
    DR1_FaerieFire : 1 [[comment("DR1: Faerie Fire")]];
    DR1_InvisibilityToAnimals : 1 [[comment("DR1: Invisibility to Animals")]];
    MU4_CharmMonsters : 1 [[comment("MU4: Charm Monsters")]];
    MU4_Confusion : 1 [[comment("MU4: Confusion")]];
    MU4_DimensionDoor : 1 [[comment("MU4: Dimension Door")]];
    MU4_Fear : 1 [[comment("MU4: Fear")]];
    MU4_FireShield : 1 [[comment("MU4: Fire Shield")]];
    MU4_Fumble : 1 [[comment("MU4: Fumble")]];
    MU4_IceStorm : 1 [[comment("MU4: Ice Storm")]];
    MU4_MinorGlobeOfInvulnerability : 1 [[comment("MU4: Minor Globe of Invulnerability")]];
    MU4_RemoveCurse : 1 [[comment("MU4: Remove Curse")]];
    DR2_Barkskin : 1 [[comment("DR2: Barkskin")]];
    MU5_CloudKill : 1 [[comment("MU5: Cloud Kill")]];
    MU5_ConeOfCold : 1 [[comment("MU5: Cone of Cold")]];
    MU5_Feeblemind : 1 [[comment("MU5: Feeblemind")]];
    MU5_HoldMonsters : 1 [[comment("MU5: Hold Monsters")]];
    IT6_ScrollOfProtDragonBreath : 1 [[comment("IT6: Scroll of Prot Dragon Breath")]];
    DR2_CharmPersonOrMammal : 1 [[comment("DR2: Charm Person or Mammal")]];
    IT6_PotionOfInvisibility : 1 [[comment("IT6: Potion of Invisibility")]];
    DR2_CureLightWounds : 1 [[comment("DR2: Cure Light Wounds")]];
    IT6_PotionOfExtraHealing : 1 [[comment("IT6: Potion of Extra Healing")]];
    MU4_BestowCurse : 1 [[comment("MU4: Bestow Curse")]];
    CL6_BladeBarrier : 1 [[comment("CL6: Blade Barrier")]];
    CL7_Restoration : 1 [[comment("CL7: Restoration")]];
    CL7_EnergyDrain : 1 [[comment("CL7: Energy Drain")]];
    CL7_Destruction : 1 [[comment("CL7: Destruction")]];
    CL7_Resurrection : 1 [[comment("CL7: Resurrection")]];
    DR3_CureDisease : 1 [[comment("DR3: Cure Disease")]];
    DR3_NeutralizePoison : 1 [[comment("DR3: Neutralize Poison")]];
    DR3_HoldAnimal : 1 [[comment("DR3: Hold Animal")]];
    DR3_ProtFromFire : 1 [[comment("DR3: Prot. from Fire")]];
    MU6_DeathSpell : 1 [[comment("MU6: Death Spell")]];
    MU6_Disintegrate : 1 [[comment("MU6: Disintegrate")]];
    MU6_GlobeOfInvulnerability : 1 [[comment("MU6: Globe of Invulnerability")]];
    MU6_StoneToFlesh : 1 [[comment("MU6: Stone to Flesh")]];
    MU6_FleshToStone : 1 [[comment("MU6: Flesh to Stone")]];
    MU7_DelayedBlastFireball : 1 [[comment("MU7: Delayed Blast Fireball")]];
    MU7_MassInvisibility : 1 [[comment("MU7: Mass Invisibility")]];
    MU7_PowerWordStun : 1 [[comment("MU7: Power Word Stun")]];
    MU5_FireTouch : 1 [[comment("MU5: Fire Touch")]];
    MU5_IronSkin : 1 [[comment("MU5: Iron Skin")]];
    MU8_MassCharm : 1 [[comment("MU8: Mass Charm")]];
    MU8_OttosIrrDance : 1 [[comment("MU8: Otto's Irr. Dance")]];
    MU8_MindBlank : 1 [[comment("MU8: Mind Blank")]];
    MU8_PowerWordBlind : 1 [[comment("MU8: Power Word Blind")]];
    MU9_MeteorSwarm : 1 [[comment("MU9: Meteor Swarm")]];
    MU9_PowerWordKill : 1 [[comment("MU9: Power Word Kill")]];
    MU9_MonsterSummoning : 1 [[comment("MU9: Monster Summoning")]];
    IT6_PotionOfSpeed : 1 [[comment("IT6: Potion of Speed")]];
    IT6_PotionOfGiantStrength : 1 [[comment("IT6: Potion of Giant Strength")]];
};

// Spells Memorized
bitfield SPL_MEMORIZED {
    match (GameID) {
        (1): SPL_NAME01 MemorizedSpell : 7 [[name(std::format("{:02d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (2): SPL_NAME02 MemorizedSpell : 7 [[name(std::format("{:02d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (3): SPL_NAME03 MemorizedSpell : 7 [[name(std::format("{:03d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (4): SPL_NAME04 MemorizedSpell : 7 [[name(std::format("{:03d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (5): SPL_NAME05 MemorizedSpell : 7 [[name(std::format("{:02d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (6): SPL_NAME06 MemorizedSpell : 7 [[name(std::format("{:03d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (7): SPL_NAME07 MemorizedSpell : 7 [[name(std::format("{:03d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (8): SPL_NAME08 MemorizedSpell : 7 [[name(std::format("{:02d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (9): SPL_NAME09 MemorizedSpell : 7 [[name(std::format("{:03d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
        (10): SPL_NAME10 MemorizedSpell : 7 [[name(std::format("{:03d}: MemorizedSpell", std::core::array_index())),comment("Spell currently memorized (available to cast) by the character")]];
    }
    match (GameID) {
		(8):   bool IsCast : 1 [[name(std::format("{:02d}: IsCast", std::core::array_index())),comment("Indicates if spell has already been cast")]];
        (4|6|7|9|10):   bool IsCast : 1 [[name(std::format("{:03d}: IsCast", std::core::array_index())),comment("Indicates if spell has already been cast")]];
        (_):            padding : 1;
    }
} [[inline]];