You must be logged in to post messages.
Please login or register

Strategy Central
Moderated by Maffia, LordKivlov, JimXIX

Hop to:    
Welcome! You are not logged in. Please Login or Register.1 reply
Age of Empires III Heaven » Forums » Strategy Central » AI deck
Bottom
Topic Subject:AI deck
Galskap
Skirmisher
posted 11-11-20 07:19 AM EDT (US)         
Hi, I was wondering if there is a way to add more cards to the AI deck?
AuthorReplies:
murdilator
Skirmisher
posted 11-11-20 12:12 PM EDT (US)     1 / 1       
There is. This is what is in my AI Mod, the Horsemaster:

You have to put (i) and (card) for each card you want, one time each.

An example:

(If you want to see how this works, download and try the AI on a NR30 on Hard or Expert Difficulty; Ai builds deck after 40 seconds).

int gCardNames = -1; // Array of strings, handy name for this card.
int gCardStates = -1; // Array of chars (strings), A = avail, N = Not avail, P = Purchased, D = in deck (and purchased)
int gCardPriorities = -1; // Array of ints, used for selecting cards into deck.

const int maxCards = 150;
const int deckSize = 20;
const int pointsForLevel2 = 5; // First five cards must be level 1
const int pointsForLevel3 = 25; // Cards 6..25 must be levels 1 or 2

rule buyCards
inactive
minInterval 1
{
static int pass = 0; // Pass 0, init arrays. Pass 1, buy cards. Pass 2, create deck.
static int startingSP = -1;
if (startingSP < 0)
startingSP = kbResourceGet(cResourceSkillPoints) - 15; // XS won't allow float initialization of const ints, also subtract first 15 free cards.
int remainingSP = kbResourceGet(cResourceSkillPoints) - 15;
int SPSpent = startingSP - remainingSP;
int myLevel = 0;
if (SPSpent >= 10)
myLevel = 10;
if (SPSpent >= 25)
myLevel = 25;
int totalCardCount = aiHCCardsGetTotal();
aiEcho("My starting level is "+myLevel+", my SP remaining is "+remainingSP);

switch(pass) // Break processing load into 3 passes: init, buy, deck.
{
case 0: // Init arrays
{
gCardNames = xsArrayCreateString(maxCards, " ", "Card names");
gCardStates = xsArrayCreateString(maxCards, "P", "Card states");
gCardPriorities = xsArrayCreateInt(maxCards, 0, "Card priorities");

for (i=0; < totalCardCount)
{ // First, set maximum priority for the "best" cards
// 'Advanced Trading Post', 'Royal Decree', 'Advanced Arsenal', 'New Ways' & 'Advanced Balloon',
// plus '2 Grove Rickshaws' & 'Shogun Tokugawa'
if ((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCImprovedBuildings") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCImprovedBuildingsGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreeBritish") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreeDutch") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreeFrench") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreeGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreeOttoman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreePortuguese") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreeRussian") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalDecreeSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedArsenal") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedArsenalGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPNewWaysIroquois") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPNewWaysSioux") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPAdvancedBalloon") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCUnlockFactory") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRobberBarons") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCUnlockFactoryGerman") && (kbGetCiv() != cCivGermans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRobberBaronsGerman") && (kbGetCiv() != cCivGermans)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPIndustrialRevolution") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCExoticHardwoods") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCGrainMarket") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons1") && (kbGetCiv() != cCivFrench)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons1") && (kbGetCiv() != cCivBritish)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons1") && (kbGetCiv() != cCivSpanish)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons1") && (kbGetCiv() != cCivRussians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons1") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons1German") && (kbGetCiv() != cCivGermans)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRefrigeration") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalMint") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCTextileMills") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRoyalMintGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRefrigerationGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCRoyalMintIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCFencingSchoolIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCRidingSchoolIndians") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCGermanTownFarmers") && (kbGetCiv() != cCivGermans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCGuildArtisans") && (kbGetCiv() != cCivGermans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCTeamTeutonTownCenter") && (kbGetCiv() != cCivGermans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCUhlanCombatGerman") && (kbGetCiv() != cCivGermans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCDutchEastIndiaCompany") && (kbGetCiv() != cCivDutch)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCBetterBanks") && (kbGetCiv() != cCivDutch)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCBanks1") && (kbGetCiv() != cCivDutch)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCBanks2") && (kbGetCiv() != cCivDutch)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRansack") && (kbGetCiv() != cCivRussians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCGurkhaAid") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCSustainableAgricultureIndians") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCIncreasedTribute") && (kbGetCiv() != cCivJapanese)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCMughalArchitecture") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCEastIndiaCompany") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCCamelDamageIndians") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRumDistillery") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCSustainableAgriculture") && (kbGetCiv() != cCivXPIroquois)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFencingSchool") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFencingSchoolGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRidingSchool") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRidingSchoolGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCJanissaryCombatOttoman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCJanissaryCost") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCoveredWagonIndians1") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipGroveWagonIndians2") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCElephantTrampling") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCElephantCombatIndians") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCElephantLimit") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCCamelFrightening") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipWoodCratesInf4Indians") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipHowdah2") && (kbGetCiv() != cCivIndians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipUrumi2") && (kbGetCiv() != cCivIndians)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPCoyoteCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPKnightDamage") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPKnightHitpoints") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPKnightCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPInfantryCombatIroquois") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPSiegeCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPInfantryHitpointsIroquois") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPInfantryDamageIroquois") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCEngineeringSchool") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipTomahawk3") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipTomahawk5") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipLightCannon2") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPCommandSkill") && (kbGetCiv() != cCivXPSioux)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPMustangs") && (kbGetCiv() != cCivXPSioux)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCSpiceTrade") && (kbGetCiv() != cCivBritish)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCPioneers") && (kbGetCiv() != cCivFrench)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCLightArtilleryHitpointsOttoman") && (kbGetCiv() != cCivOttomans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCArtilleryDamageOttoman") && (kbGetCiv() != cCivOttomans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCArtilleryHitpointsOttomanTeam") && (kbGetCiv() != cCivOttomans)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCNativeWarriors") && (kbGetCiv() != cCivFrench)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCHandCavalryHitpointsFrench") && (kbGetCiv() != cCivFrench)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPAdoption") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPBuffalo4") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPCavalryDamageSioux") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPCavalryHitpointsSioux") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPCavalryCombatSioux") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPMedicineTeam") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFoodSilos") && (kbGetCiv() != cCivXPSioux)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPEarthBounty") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPWindRunner") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPNomadicExpansion") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryCombatFrench") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRangedInfantryDamageFrenchTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryDamageGermanTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCDragoonCombatPortuguese") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryCombatRussian") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCStreletsCombatRussian") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryCombatGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPSiouxTwoKettleSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPSiouxSanteeSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPSiouxYanktonSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCHandInfantryCombatGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCHandCavalryCombatSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCMusketeerGrenadierCombatBritish") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCHanAntiCavalryBonus") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAccupuncture") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCBannerSchool") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCSamuraiDamage") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCSamuraiSpeed") && (kbGetCiv() != cCivJapanese)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipSamurai2") && (kbGetCiv() != cCivJapanese)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCNobleCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCNaginataHitpoints") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipYumi4") && (kbGetCiv() != cCivJapanese)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipAshigaru3") && (kbGetCiv() != cCivJapanese)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCYumiDamage") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCYumiRange") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAshigaruDamage") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCaballeros") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCHandInfantryHitpointsSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCHandInfantryCombatSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCInfantryCombatDutch") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryCombatDutch") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryCombatOttoman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPExoticHardwoodsTeam") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCPioneers") && (kbGetCiv() != cCivRussians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCSpiceTrade") && (kbGetCiv() != cCivRussians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCMedicine") && (kbGetCiv() != cCivRussians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCPioneers") && (kbGetCiv() != cCivXPSioux)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCSpiceTrade") && (kbGetCiv() != cCivXPSioux)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCPioneers") && (kbGetCiv() != cCivPortuguese)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRangedInfantryCombatPortuguese") && (kbGetCiv() != cCivPortuguese)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRangedInfantryHitpointsPortugueseTeam") && (kbGetCiv() != cCivPortuguese)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCPioneers") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPChinampa1") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPChinampa2") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTempleCenteotl") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTempleXipeTotec") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTempleXolotl") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTempleCoatlicue") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTempleTlaloc") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPGreatTempleQuetzalcoatl") && (kbGetCiv() != cCivXPAztec)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCMusketeerGrenadierHitpointsBritishTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCImprovedBuildingsTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCWildernessWarfare") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCInfantryHitpointsDutchTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCHandCavalryDamageFrenchTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryCombatBritish") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCForbiddenArmyArmor") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCTerritorialArmyCombat") ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCInfantryDamageDutch") && (kbGetCiv() != cCivDutch)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipRockets2") && (kbGetCiv() != cCivBritish)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCannons1") && (kbGetCiv() != cCivSpanish)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCannons1") && (kbGetCiv() != cCivRussians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryLOSTeam") && (kbGetCiv() != cCivRussians)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCHandCavalryHitpointsSpanish") && (kbGetCiv() != cCivSpanish)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCMongolianScourge") && (kbGetCiv() != cCivChinese)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCStandardArmyHitpoints") && (kbGetCiv() != cCivChinese)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipWoodCrates4") && (kbGetCiv() != cCivXPSioux)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryHitpointsBritish") && (kbGetCiv() != cCivBritish)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipWoodCrates3") && (kbGetCiv() != cCivDutch)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPWarHutTraining") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTownDance") && (kbGetCiv() != cCivXPAztec)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTownDance") && (kbGetCiv() != cCivXPIroquois)) ||
((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTownDance") && (kbGetCiv() != cCivXPSioux)) ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipShogunate"))
xsArraySetInt(gCardPriorities, i, 10); // "Best" cards, pri 10

And (Card):

The toPick = 14 is how many custom cards to pick for the AI deck.

[b]aiEcho("Building Deck");
int cardsRemaining = 25;
int toPick = 14;[/b]

// First, "best" cards (if available).
for (card=0; < maxCards)
{
if ((kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCImprovedBuildings") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCImprovedBuildingsGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreeBritish") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreeDutch") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreeFrench") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreeGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreeOttoman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreePortuguese") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreeRussian") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalDecreeSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCAdvancedArsenal") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCAdvancedArsenalGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPNewWaysIroquois") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPNewWaysSioux") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCUnlockFactory") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRobberBarons") ||
((kbGetCiv() == cCivGermans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCUnlockFactoryGerman")) ||
((kbGetCiv() == cCivGermans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRobberBaronsGerman")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPIndustrialRevolution") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCExoticHardwoods") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCGrainMarket") ||
((kbGetCiv() == cCivFrench) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCoveredWagons1")) ||
((kbGetCiv() == cCivBritish) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCoveredWagons1")) ||
((kbGetCiv() == cCivSpanish) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCoveredWagons1")) ||
((kbGetCiv() == cCivRussians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCoveredWagons1")) ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCoveredWagons1")) ||
((kbGetCiv() == cCivGermans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCoveredWagons1German")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRefrigeration") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalMint") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCTextileMills") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRoyalMintGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRefrigerationGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCRoyalMintIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCFencingSchoolIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCRidingSchoolIndians") ||
((kbGetCiv() == cCivGermans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCGermanTownFarmers")) ||
((kbGetCiv() == cCivGermans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCGuildArtisans")) ||
((kbGetCiv() == cCivGermans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCTeamTeutonTownCenter")) ||
((kbGetCiv() == cCivGermans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCUhlanCombatGerman")) ||
((kbGetCiv() == cCivDutch) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCDutchEastIndiaCompany")) ||
((kbGetCiv() == cCivDutch) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCBetterBanks")) ||
((kbGetCiv() == cCivDutch) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCBanks1")) ||
((kbGetCiv() == cCivDutch) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCBanks2")) ||
((kbGetCiv() == cCivRussians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRansack")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCGurkhaAid")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCSustainableAgricultureIndians")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCHowdah2")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCUrumi2")) ||
((kbGetCiv() == cCivJapanese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCIncreasedTribute")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCMughalArchitecture") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCEastIndiaCompany") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCCamelDamageIndians") ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRumDistillery")) ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCSustainableAgriculture")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCFencingSchool") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCFencingSchoolGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRidingSchool") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRidingSchoolGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCJanissaryCombatOttoman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCJanissaryCost") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipShogunate") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPCoyoteCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPKnightDamage") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPKnightHitpoints") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPKnightCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPInfantryCombatIroquois") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPSiegeCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPInfantryHitpointsIroquois") ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPInfantryDamageIroquois")) ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCEngineeringSchool")) ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPShipTomahawk3")) ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPShipTomahawk5")) ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPShipLightCannon2")) ||
((kbGetCiv() == cCivXPSioux) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPCommandSkill")) ||
((kbGetCiv() == cCivXPSioux) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPMustangs")) ||
((kbGetCiv() == cCivBritish) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCSpiceTrade")) ||
((kbGetCiv() == cCivFrench) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCPioneers")) ||
((kbGetCiv() == cCivOttomans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCLightArtilleryHitpointsOttoman")) ||
((kbGetCiv() == cCivOttomans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCArtilleryDamageOttoman")) ||
((kbGetCiv() == cCivOttomans) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCArtilleryHitpointsOttomanTeam")) ||
((kbGetCiv() == cCivFrench) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCNativeWarriors")) ||
((kbGetCiv() == cCivFrench) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCHandCavalryHitpointsFrench")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPAdoption") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPBuffalo4") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPCavalryDamageSioux") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPCavalryHitpointsSioux") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPCavalryCombatSioux") ||
((kbGetCiv() == cCivXPSioux) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCFoodSilos")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPMedicineTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPEarthBounty") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPWindRunner") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPNomadicExpansion") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryCombatFrench") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRangedInfantryDamageFrenchTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryDamageGermanTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCDragoonCombatPortuguese") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryCombatRussian") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCStreletsCombatRussian") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryCombatGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPSiouxTwoKettleSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPSiouxSanteeSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPSiouxYanktonSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCHandInfantryCombatGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCHandCavalryCombatSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCMusketeerGrenadierCombatBritish") ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipCoveredWagonIndians1")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipGroveWagonIndians2")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCElephantTrampling")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCElephantCombatIndians")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCElephantLimit")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipWoodCratesInf4Indians")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCCamelFrightening")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipHowdah2")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipUrumi2")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCHanAntiCavalryBonus") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCAccupuncture") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCBannerSchool") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCSamuraiDamage") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCNobleCombat") ||
((kbGetCiv() == cCivJapanese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCSamuraiSpeed")) ||
((kbGetCiv() == cCivJapanese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipSamurai2")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCNaginataHitpoints") ||
((kbGetCiv() == cCivJapanese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipYumi4")) ||
((kbGetCiv() == cCivJapanese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCShipAshigaru3")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCYumiDamage") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCYumiRange") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCAshigaruDamage") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCaballeros") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCHandInfantryHitpointsSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCHandInfantryCombatSpanish") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCInfantryCombatDutch") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryCombatDutch") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryCombatOttoman") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPExoticHardwoodsTeam") ||
((kbGetCiv() == cCivRussians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCPioneers")) ||
((kbGetCiv() == cCivRussians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCSpiceTrade")) ||
((kbGetCiv() == cCivRussians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCMedicine")) ||
((kbGetCiv() == cCivXPSioux) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCPioneers")) ||
((kbGetCiv() == cCivXPSioux) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCSpiceTrade")) ||
((kbGetCiv() == cCivPortuguese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCPioneers")) ||
((kbGetCiv() == cCivPortuguese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRangedInfantryCombatPortuguese")) ||
((kbGetCiv() == cCivPortuguese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRangedInfantryHitpointsPortugueseTeam")) ||
((kbGetCiv() == cCivPortuguese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCRangedInfantryDamagePortuguese")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCPioneers")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPChinampa1")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPChinampa2")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTempleCenteotl")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTempleXipeTotec")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTempleXolotl")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTempleCoatlicue")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTempleTlaloc")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPGreatTempleQuetzalcoatl")) ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCMusketeerGrenadierHitpointsBritishTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCImprovedBuildingsTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCWildernessWarfare") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCInfantryHitpointsDutchTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCHandCavalryDamageFrenchTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryCombatBritish") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCForbiddenArmyArmor") ||
(kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCTerritorialArmyCombat") ||
((kbGetCiv() == cCivDutch) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCInfantryDamageDutch")) ||
((kbGetCiv() == cCivBritish) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipRockets2")) ||
((kbGetCiv() == cCivSpanish) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCannons1")) ||
((kbGetCiv() == cCivRussians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipCannons1")) ||
((kbGetCiv() == cCivRussians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryLOSTeam")) ||
((kbGetCiv() == cCivSpanish) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCHandCavalryHitpointsSpanish")) ||
((kbGetCiv() == cCivChinese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCMongolianScourge")) ||
((kbGetCiv() == cCivChinese) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCStandardArmyHitpoints")) ||
((kbGetCiv() == cCivXPSioux) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipWoodCrates4")) ||
((kbGetCiv() == cCivBritish) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCCavalryHitpointsBritish")) ||
((kbGetCiv() == cCivDutch) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCShipWoodCrates3")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPWarHutTraining")) ||
((kbGetCiv() == cCivXPAztec) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTownDance")) ||
((kbGetCiv() == cCivXPIroquois) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTownDance")) ||
((kbGetCiv() == cCivXPSioux) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "HCXPTownDance")) ||
((kbGetCiv() == cCivIndians) && (kbGetTechName(aiHCCardsGetCardTechID(card)) == "YPHCAgrarianism") ))
{
aiHCDeckAddCardToDeck(gDefaultDeck, card);
cardsRemaining = cardsRemaining - 1;
xsArraySetString(gCardStates, card, "D");
aiEcho(" Adding card "+xsArrayGetString(gCardNames, card));
}
} // 22-25 remaining.


You can enable cards for the AI this way. Type whatever it is in the techtreey, and put it in.

For a specific civ, you have to do cCivXPIroquois, or cCivJapanese, etc.

To Forbid Cards:

// Set priority to 0 for cards to be avoided if possible
if ((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFrontierDefenses2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFrontierDefenses1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoveredWagons2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCConestogaWagonsTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCUnlockFortVauban") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPUnlockFort2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPUnlockFort2German") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedMarket") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedMarketGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedDock") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedDockGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedPlantations") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCAdvancedPlantationsGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipSettlers1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoureurs1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipSettlersNative1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipSettlerWagons1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipFoodCrates1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipWoodCrates1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipCoinCrates1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipMixedCrates1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipFoodCrates1Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipWoodCrates1Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCoinCrates1Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipWoodCratesInf1Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCastleWagons1Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCastleWagons2Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipTigers1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipLions1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipMonitorLizard1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipMonitorLizard2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCastleWagons1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCastleWagons2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCastleWagons3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipRajputs2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipRajputs3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipIndianRangedCavalry2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipIndianRangedCavalry3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipMongolScoutTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipEnvoyTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipMercsTigerClaw1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCPioneersTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCMercsNinja2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCEnlistIrregulars") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCCallToArms1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCDojoGenbukan") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipGroveWagonIndians1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipFalconets2German") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipHorseArtillery1German") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipMortars1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipMortars2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipMortars1German") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipMortars2German") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCShipMortarsTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipPetards1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipDemolitionSquadGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipRams1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPIroquoisMohawkSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipSiege") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipSpies1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipSpies2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipSpies3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipSpies1German") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipSpiesTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPGreatTempleTezcatlipoca") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipBears") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipBearsTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCougars") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCoyotes") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCoyotesTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipGrizzlies") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipJaguars1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipJaguars2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipJaguars3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipJaguarsTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipWolves") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCoupRiders1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCoupRiders2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCoupRiders3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCoupRiders4") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipDogsoldiersTeam1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipDogsoldiersTeam2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPRanching") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPRanchingLlama") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFishMarket") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFishMarketGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCFishMarket") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipWoodCratesInf1Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCExpandedTradingPost") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCExpandedTradingPostIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedDockIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedRicePaddyIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedWondersIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedConsulate") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCFishMarketIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCSchoonersIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCSchoonersJapanese") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipRicePaddyWagon1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCArmedFishermenIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipDisciple1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCIndianMonkCombat") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipShrineWagon1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipCoveredWagons2Indians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCIndianMonkFrighten") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCSacredFieldHealing") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCBazaar") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCGoraksha") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCExpandedMarket") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCCommoditiesMarket") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedMonastery") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedMonasteryIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipBerryWagon1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipRicePaddyWagon1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipMorutaru1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipMorutaru2"))
[b]xsArraySetInt(gCardPriorities, i, 0);[/b] // Cards to be avoided, pri 0

It has to be 0 for them not to be chosen.

If there is a single bug or misspelling the computer will not load the AI in a skirmish, and if you have (i) but not (card) in it won't the card you wanted. You also have to buy previous cards, such as this for HCs over level 15:
            if (kbResourceGet(cResourceSkillPoints) >= 15)
{ // Prerequisites for 'Royal Decree', 'Advanced Arsenal', 'New Ways' and 'Shogun Tokugawa', only for HC level >= 15.
if ((kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCColonialMilitia") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCMosqueConstruction") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFoodSilos") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCFoodSilosTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCRumDistillery") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCExtensiveFortifications") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPTownDance") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipCoyoteMen3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCStreletsCombatRussian") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCJanissaryCombatOttoman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedConsulateIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCGurkhaAid") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCPioneers") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCImprovedWallsTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCAdvancedIrregulars") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCCheapWarAcademyTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCNativeLearningIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCNativeIncorporationIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCNativeTradeTaxIndians") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCheapStablesTeam") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCCavalryHitpointsGerman") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPWarchiefSioux1") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipAxeRiders2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipAxeRiders3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPShipRifleRiders2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPSiouxDakotaSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPSiouxSanteeSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "HCXPSiouxYanktonSupport") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipIndianHandCavalry3") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipSamurai2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipShrineWagon2") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCIncreasedTribute") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipDaimyoAizu") ||
(kbGetTechName(aiHCCardsGetCardTechID(i)) == "YPHCShipDaimyoSatsuma"))
xsArraySetInt(gCardPriorities, i, 10); // Prerequisite cards, pri 10
}

Do this for level 25 and 40 as well to gradually unlock cards. If you don't have earlier cards unlocked, the AI will not be able to use later cards until you reach level 70.

Good Coding

[This message has been edited by murdilator (edited 11-11-2020 @ 12:14 PM).]

You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames