This is the table used to reroll AI wizards that get no endgame spells that makes them competent, to avoid disappointing games where the final opponent doesn't do anything. It might be unfair but I rather have this than win a game because the final enemy rolled Consecration, Ruler of Heaven, Enlightenment, Clairvoyance, Herb Mastery, Earth Gate as their very rares from 4 Life and 4 Nature books.
In the previous spell system, roughly 1 in 20 wizards actually needed to reroll as not getting anything from this list was unlikely.
With the addition of more very rare spels, this might happen slightly more often, but the feature is still necessary as dual realm wizards can't pick any guaranteed very rares.
So this is the table expanded with the new spells added to it. If the AI has all of the 1, 2 or 3 spells or retorts in any of the rows, it's valid. If it has none of them, it is rerolled.
Most of the time this results in the AI having a very rare creature spell but of course it's not the only thing they can get. It doesn't guarantee anything specific for the AI - as long as they have any of the listed lines, they can't reroll.
In the previous spell system, roughly 1 in 20 wizards actually needed to reroll as not getting anything from this list was unlikely.
With the addition of more very rare spels, this might happen slightly more often, but the feature is still necessary as dual realm wizards can't pick any guaranteed very rares.
So this is the table expanded with the new spells added to it. If the AI has all of the 1, 2 or 3 spells or retorts in any of the rows, it's valid. If it has none of them, it is rerolled.
Most of the time this results in the AI having a very rare creature spell but of course it's not the only thing they can get. It doesn't guarantee anything specific for the AI - as long as they have any of the listed lines, they can't reroll.
Code:
(SMassacre,0,0),
(SDemonLord,0,0),
(SArchAngel,0,0),
(SHighPrayer,0,0),
(SApocalypse,0,0),
(SSkyDrake,0,0),
(SGreatWyrm,0,0),
(SColossus,0,0),
(SChainLightning,0,0),
(SBehemoth,SRegeneration,0),
(SBehemoth,SSeismicMastery,0),
(SBehemoth,SCallLightning,0),
(SEntangle,SCallLightning,0),
(SEntangle,SHydra,0),
(SEntangle,SDeathKnights,0),
(SEntangle,SAnnihilate,0),
(SEntangle,SMassInvisibility,0),
(SSeismicMastery,SDjinn,0),
(SSeismicMastery,SHydra,0),
(SSeismicMastery,SDeathKnights,0),
(SCallLightning,SHydra,0),
(SCallLightning,STimeStop,0),
(SCallLightning,SDjinn,0),
(SCallLightning,SCharmOfLife,0),
(SCallLightning,SSupremeLight,0),
(SCallLightning,SMassInvisibility,0),
(SCallLightning,SEarthElemental,0),
(SCallLightning,SAirElemental,0),
(STimeStop,SCallTheVoid,0),
(STimeStop,SMassInvisibility,0),
(STimeStop,SDjinn,0),
(STimeStop,SCrusade,0),
(STimeStop,SFinalWave,0),
(SDjinn,SSupremeLight,0),
(SDjinn,SAnnihilate,0),
(SDjinn,SMassInvisibility,0),
(SDjinn,SSpellWard,0),
(SDjinn,SSpellBinding,0),
(SSpellWard,SCallLightning,0),
(SSpellWard,SEnlightenment,0),
(SSpellWard,SCrusade,0),
(SSpellWard,SSpellBinding,0),
(SSpellWard,SArmageddon,0),
(SSpellWard,SDoomsday,0),
(SSpellWard,SMeteorStorm,0),
(SSpellBinding, 1000+Runemaster,0), // Runemaster
(STimeStop,1000+Alchemy,0),
(SWindMastery,SDeathKnights,0),
(SWindMastery,SPhoenix,0),
(SWindMastery,SCharmOfLife,0),
(SWindMastery,SCrusade,0),
(SMagicImmunity,1000+Runemaster,SDjinn),
(SMagicImmunity,1000+Runemaster,SPhoenix),
(SMagicImmunity,1000+Runemaster,SDeathKnights),
(SMagicImmunity,1000+Runemaster,SBehemoth),
(SMagicImmunity,1000+Runemaster,SVampire),
(SMagicImmunity,1000+Runemaster,SGreatDrake),
(SMagicImmunity,SSpellLock,SDjinn),
(SMagicImmunity,SSpellLock,SPhoenix),
(SMagicImmunity,SSpellLock,SDeathKnights),
(SMagicImmunity,SSpellLock,SBehemoth),
(SMagicImmunity,SSpellLock,SVampire),
(SMagicImmunity,SSpellLock,SGreatDrake),
(SCrusade,1000+Warlord,0),
(SSpellBinding,SArmageddon,0),
(SMassInvisibility,SDeathKnights,0),
(SMassInvisibility,SAnnihilate,0),
(SCallTheVoid,SDisillusionise,0),
(SArmageddon,SLifeForce,0),
(SArmageddon,SRootsofGenesis,0),
(SRootsofGenesis,SLifeForce,0),
(SArmageddon,SPestilence,0),
(SArmageddon,1000+Runemaster,0),
(SMeteorStorm,SPestilence,0),
(SChaosSurge,SDoomMastery,0),
(SBlazingEyes,SDoomMastery,0),
(SCrusade,SDoomMastery,0),
(SWarpReality,SDoomMastery,0),
(SDoomsday,SArmageddon,0),
(SCharmofLife,SHolyArms,0),
(SCharmofLife,SCrusade,0),
(SCharmOfLife,SDeathKnights,0),
(SCharmOfLife,SCallToArms,0),
(SCrusade,SSupremeLight,0),
(SCrusade,SFinalWave,0),
(SSupremeLight,SEfreet,0),
(SSupremeLight,SDestiny,0),
(SRulerofHeaven,SDarkRitual,1000+CultLeader),
(SFinalWave,SEternalNight,SAnnihilate),
(SFinalWave,SGreatUnsummoning,0),
(SEternalNight,SDeathKnights,0),
(SFairyRing,SBehemoth,0),
(SFairyRing,SDjinn,0),
(SFairyRing,SDeathKnights,0),
(STimeStop,SSeismicMastery,0),
(STimeStop,SBehemoth,0),
(SCrusade,SHolyArms,0),
(SRegeneration,SHydra,0),
(SEntangle,SDjinn,0),
(SMassInvisibility,SStormGiant,0),
(SMassInvisibility,SEfreet,0),
(SArmageddon,SDjinn,0),
(SArmageddon,SDeathKnights,0),
(SArmageddon,SBehemoth,0),
(SDoomsday,SEvilOmens,0),
(SCalltheVoid,SPowerlink,0),
(SFinalWave,SPowerLink,0),
(SArmageddon,SEnlightenment,0),
(SAnimateDead,SDjinn,0),
(SAnimateDead,SDeathKnights,0),
(SAnimateDead,SBehemoth,0),
(SKingoftheUnderworld,SMagicImmunity,0),
(SKingoftheUnderworld,SCharmOfLife,0),
(SKingoftheUnderworld,SCrusade,0),
(SDarkestHour,SPowerLink,0)