Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'The spreadsheet' refers to https://goo.gl/jrHE4f
- The AI will always play a monster with its primary Guardian Star.
- When I say the AI looks at visible player cards, I usually mean only face-up cards. However, if the opponent is one of Heishin 1, Pegasus, Heishin 2, Seto 3, DarkNite, or Nitemare, then this includes face-up and face-down cards.
- When I say the AI lacks field control, I mean either only the player has a monster on the field, or both sides do and the base max stat plus field boost for the AI card with the highest true max stat is less than or equal to the same for the player's visible cards. In this case, I will use 'player's best card' to mean the earliest visible monster of the player's with the highest true max stat and 'AI's best card' to mean similarly for the AI's monsters.
- When I say the AI executes DEFEND with a monster, I mean the AI puts it into defense unless it is one of
- Blue-Eyes Ultimate Dragon
- Gate Guardian
- Perfectly Ultimate Great Moth
- Meteor B. Dragon
- B. Skull Dragon
- Black Luster Soldier
- Blue-Eyes White Dragon
- Metalzoa,
- in which case the monster stays in attack.
- Whenever the AI searches for a card with the lowest true max stat whether on the field or hand, cards with a true max stat of 9999 are ignored.
- ================================================================================
- First the AI goes through the cards in their magic zone. Each of the following cards is checked for in the given order, and they all come with an activation condition given below. If the condition is met the card is used, else the card is darkened. All cards in the magic zone not in this list (i.e., traps and Cursebreaker) are ignored.
- Harpie's Feather Duster
- Player has cards in their magic zone, and then the probability the AI uses this card is Spell Probability from the spreadsheet.
- Sparks
- Hinotama
- Final Flame
- Ookazi
- Tremendous Fire
- Mooyan Curry
- Red Medicine
- Goblin's Secret Remedy
- Soul of the Pure
- Dian Keto the Cure Master
- All have the same condition. The player must have more LP than the AI, and either the AI must be above their Low LP Threshold, or the player must have no cards in their magic zone, or otherwise the probability of activation is 100% - Spell Probability from the spreadsheet instead of 100%.
- Equips (earliest on the field first)
- Has a monster that accepts the equip, in which case the earliest one is equipped.
- Rituals (earliest on the field first)
- Can be successfully activated.
- Dark-Piercing Light
- Player has at least 1 monster, all of them face-down, and have more monsters than the AI.
- Swords of Revealing Light
- Player is not already under the effect of Swords of Revealing Light, and either only the player has a visible monster, or the player has a visible monster and the AI has a monster and out of those two sets of monsters, taking the ones with the best true max stats, the base max stat plus field boost for the player's best card is greater than the base max stat plus field boost for the AI's best card.
- Stop Defense
- AI is not under the effect of Swords of Revealing Light, both sides have monsters on the field, and either the difference between the base attack plus field bonus for the AI card with the highest true attack and the same value for the visible player card with the lowest true attack is greater than or equal to the amount of LP the player has, or the AI has at least as many monsters as the player has visible monsters and each element of the sorted (in descending order) set of true attacks of visible player monsters is less than the corresponding element of the similarly sorted set of true attacks of AI monsters.
- Dragon Capture Jar
- Warrior Elimination
- Eternal Rest
- Stain Storm
- Eradicating Aerosol
- Breath of Light
- Eternal Draught
- The AI lacks field control and the player's best card would be destroyed by the spell.
- Spellbinding Circle
- Shadow Spell
- AI lacks field control.
- Crush Card
- AI lacks field control and the base attack plus field boost of the player's best card is at least 1500.
- Raigeki
- AI lacks field control and the number of visible monsters the player has is greater than or equal to the number of monsters the AI has.
- Forest
- Wasteland
- Mountain
- Sogen
- Umi
- Yami
- AI lacks field control, the field is not already the type the field spell would change it to, the player's best card does not get boosted by the would-be new field, the AI's best card does not get weakened by the would-be new field, and either the player's best card is weakened by the would-be new field or the AI's best card is boosted by it. If the AI has no monsters on the field, then instead the checks pretend the AI does have a monster and its type is Dragon.
- Dark Hole
- AI lacks field control, and the player has more monsters than the AI.
- Next the AI looks for the following monsters in the following order, and they are all put into defense.
- Cocoon of Evolution
- Millennium Shield
- Labyrinth Wall
- Mystical Elf
- Dragon Piper
- Castle of Dark Illusions
- Metal Guardian
- Sleeping Lion
- Hard Armor
- Spirit of the Harp
- Prevent Rat
- Green Phantom King
- Gorgon Egg
- Wall Shadow
- Blocker
- Golgoil
- 30,000-Year White Turtle
- Queen Bird
- Yado Karu
- Boulder Tortoise
- Next, if the AI is under the effect of Swords of Revealing Light then it executes DEFEND on each of its monsters in order of descending true attack. Otherwise it jumps to LBL_NEXT_BATTLE.
- LBL_NEXT_BATTLE:
- The AI first checks for lethal by picking its monster with highest true attack and the player's visible monster with the lowest true attack in attack position. Then it takes the base attack + field boost of both cards, and checks if the difference is greater than or equal to the player's Life Points. If so, it does the attack and then jumps back to LBL_NEXT_BATTLE.
- If the player has no monsters on the field, the same calculation is done but giving the player a base attack + field boost of 0. If the player has monsters on the field but none of them are visible and in attack then this check is skipped.
- Next the AI looks at the player's visible monsters in attack position, picking the earliest one with the best true attack that can be killed in battle by an AI's monster without suiciding. If there are any such monsters, the AI picks the card with the lowest true attack that can kill the player monster without suiciding and does that attack, before jumping back to LBL_NEXT_BATTLE.
- Otherwise the AI looks at the player's visible monsters in defense position and does a similar calculation, except looking for the earliest best monster with the highest true defense the AI can kill.
- Otherwise the player has no visible monsters. The AI then picks its unmoved monster with the highest true attack and looks at the non-visible player monsters from earliest to latest. For each one, the AI has a probability of Attack Probability of attacking that card with their card and then jumping to LBL_NEXT_BATTLE. If the AI has gone through all of the player's non-visible cards without attacking with their card, and the player has at least one monster on the field then the AI executes DEFEND on their card and jumps to LBL_NEXT_BATTLE.
- If the AI gets this far then the player must have no monsters left. In which case the AI attacks directly with all their monsters in order of descending true attack, and then ends turn.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement