YGOPRO Forum

Welcome Guest! To enable all features please try to register or login.
4 Pages«<234
Options
Go to last post Go to first unread
Snarky  
#61 Posted : Monday, April 04, 2016 11:23:32 AM(UTC)
Snarky

Rank: Advanced Member

Joined: 7/6/2013(UTC)
Posts: 2,197

Thanks: 11 times
Was thanked: 462 time(s) in 340 post(s)
This is handled in the "OnSelectNumber" function. If you are using a custom deck file, that would be "deck.number". Do note, that it only gets a parameter listing the possible numbers to choose from, and that those are not necessarily in the order you would assume. For example, returning "1" might cause the AI to select 5 cards, if the first choice is 5. Also, since there is no card parameter, you have to handle the detection of the situation manually, for example by setting the GlobalActivatedCardID variable (or your own custom variable) on activation of komushroomo's effect.

Use it like this:

Code:

function SylvanStartup(deck)
  ...
  deck.number = SylvanNumber
end

function SylvanNumber(choices)
  if GlobalActivatedCardID == 99641328 then -- Sylvan Komushroomo
    return 1 -- or 5, whatever works
  end
end


Good luck! Sylvans are a hard deck to play for me as a human. Making the AI play it properly could be quite a challenge.

Edited by user Monday, April 04, 2016 11:39:40 AM(UTC)  | Reason: Not specified

Users browsing this topic
4 Pages«<234
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error