Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
1.033.D
Browse files Browse the repository at this point in the history
  • Loading branch information
cromerc committed Jan 23, 2017
1 parent b9c0ffb commit bc25f96
Show file tree
Hide file tree
Showing 7,897 changed files with 425,844 additions and 113,654 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 11 additions & 9 deletions ai/ai-template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
ai-template.lua
Author: Percival18
Version: 0.9.1
Version: 0.9.2
Website: https://www.ygopro.co
To be used with ygopro percy 1.033.A and up. For help on how to use this file please read the comments thoroughly.
To be used with ygopro percy 1.033.D and up. For help on how to use this file please read the comments thoroughly.
--- What's new ---
0.9.2
-Random ai deck tweaks
0.9.1
-New functions
card:is_public()
Expand Down Expand Up @@ -303,8 +305,8 @@ end
From constants.lua
POS_FACEUP_ATTACK =0x1
POS_FACEDOWN_ATTACK =0x2
POS_FACEUP_DEFENCE =0x4
POS_FACEDOWN_DEFENCE =0x8
POS_FACEUP_DEFENSE =0x4
POS_FACEDOWN_DEFENSE =0x8
--]]
function OnSelectPosition(id, available)
local result = 0
Expand All @@ -315,7 +317,7 @@ function OnSelectPosition(id, available)
--Example
if id == 19665973 then --is this card battle fader?
--always put battle fader in def position
result = POS_FACEUP_DEFENCE
result = POS_FACEUP_DEFENSE
else
-- default is attack position
result = POS_FACEUP_ATTACK
Expand All @@ -328,10 +330,10 @@ function OnSelectPosition(id, available)
print("invalid position! find a valid value")
if band(POS_FACEUP_ATTACK,available) > 0 then
result = POS_FACEUP_ATTACK
elseif band(POS_FACEUP_DEFENCE,available) > 0 then
result = POS_FACEUP_DEFENCE
elseif band(POS_FACEDOWN_DEFENCE,available) > 0 then
result = POS_FACEDOWN_DEFENCE
elseif band(POS_FACEUP_DEFENSE,available) > 0 then
result = POS_FACEUP_DEFENSE
elseif band(POS_FACEDOWN_DEFENSE,available) > 0 then
result = POS_FACEDOWN_DEFENSE
else
result = POS_FACEDOWN_ATTACK
end
Expand Down
11 changes: 8 additions & 3 deletions ai/ai.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "0.34"
Version = "0.35"
Experimental = false

--[[
Expand All @@ -15,7 +15,7 @@ Experimental = false
http://www.ygopro.co/Forum/tabid/95/g/posts/t/7877/AI-Updates
Contributors: ytterbite, Sebrian, Skaviory, francot514
Optional decks: Yeon, Satone, rothayz, Ildana, Iroha, Postar, Nachk, Xaddgx
Optional decks: Yeon, Satone, rothayz, Ildana, Iroha, Postar, Nachk, Xaddgx, neftalimich
You can find and download optional decks here:
http://www.ygopro.co/Forum/tabid/95/g/posts/t/7877/AI-Updates
Expand Down Expand Up @@ -84,6 +84,7 @@ require("ai.decks.Generic")
require("ai.decks.FireFist")
require("ai.decks.HeraldicBeast")
require("ai.decks.Gadget")
require("ai.decks.BLS")
require("ai.decks.Bujin")
require("ai.decks.Mermail")
require("ai.decks.Shaddoll")
Expand All @@ -107,14 +108,18 @@ require("ai.decks.Kozmo")
require("ai.decks.Lightsworn")
require("ai.decks.DDD")
require("ai.decks.GladBeast")
require("ai.decks.ABC")
require("ai.decks.Raidraptor")
require("ai.decks.Eidolon")
requireoptional("ai.decks.ZodiacBeast")
requireoptional("ai.decks.Fluffal")
requireoptional("ai.decks.Majespecter")
requireoptional("ai.decks.Spellbook")
requireoptional("ai.decks.X-Saber")
requireoptional("ai.decks.Cth")
requireoptional("ai.decks.Wizard")
requireoptional("ai.decks.Express")


math.randomseed( require("os").time() )

function OnStartOfDuel()
Expand Down
Loading

0 comments on commit bc25f96

Please sign in to comment.