ErebusSeraph
2017-03-16T17:21:47Z
The AI activates Arcanite Magician's effect without removing Spell Counters.
I made the AI test Breaker the magical warrior and it works fine. Maybe it is because Arcanite removes from any card on your field...
I have not made the AI use Supreme Arcanite Magician but maybe it doesnt work correctly too since it is the same as the synchro counterpart.
On top of that, when I have Breaker the Magical warrior (with spell counter) and the AI uses Arcanite Magician it removes the Spell counter of MY Breaker (i guess as cost. Funnily, it sometimes removes it, sometimes not, I guess because it targets the card to remove counters randomly from my field ( since it has not removed even once its spell counters ) )

Well, when solved, I will be grateful if someone tells me how to let the AI which card must be used for removing the counter at the moment it uses Arcanite Magician effect.
For the moment, I think I will temporarily change Arcanite Magician Effect to only being able to remove counters from itself (since it seems it works and I would want to keep Arcanite Magician on the AI deck I am developing).


ErebusSeraph
2017-03-16T17:44:37Z
As expected, Supreme Arcanite Magician doesnt work either. It was basically the same code, after all. Same problems as the synchro counterpart.
ErebusSeraph
2017-03-16T19:01:01Z
Well, this is not a bug but I will ask here since I have begun this. Sorry for the bother.
When Silent Magician selects a Spellcaster monster to tribute, where can I set the priority target?
OnSelectTribute seems to only be for tribute summons on itself and onSelectCard doesnt work either for it, so it releases the spellcaster it wants and that is really bad. Thanks for the answer.
neftalimich
2017-03-17T16:56:26Z
Hola, ¿estás utilizando el código base de Snarkie? o ¿la empezaste desde cero con la plantilla?
De todas maneras, cuando un efecto se resuelve y el costo no se hace correctamente es porque no estás devolviendo el valor correcto o la cantidad correcta de valores.

Podrías colocar el código para que lo revise.

Saludos

Hello, are you using Snarkie's code?
When an effect resolves and cost does not done properly, it's because you are not returning the correct value or the correct amount of values.


Edito:

Originally Posted by: ErebusSeraph 

Well, this is not a bug but I will ask here since I have begun this. Sorry for the bother.
When Silent Magician selects a Spellcaster monster to tribute, where can I set the priority target?
OnSelectTribute seems to only be for tribute summons on itself and onSelectCard doesnt work either for it, so it releases the spellcaster it wants and that is really bad. Thanks for the answer.



Sí, es en el onSelectCard, pero las invocaciones build-summon ("inherentes" o que no causan cadena) no llegan con el id de la carta que disparó el efecto. Por lo que es recomendable utilizar una variable global.

Por cierto, parece que estás utilizando la plantilla vacía. Quizá se bueno que le eches un vistazo a todo el código que utiliza Snarkie para su IA, ya tiene funciones generales y puedes integrar el tuyo fácilmente. Te paso la plantilla en mi siguiente post.
Snarky
2017-03-18T07:24:32Z
I will look into the Arcanite/Supreme Magician issues. Arcanite Magician was part of some decklists before, Shaddolls for example, so I am pretty sure, it worked at some point. But some of the more recent changes might have interfered with that.

From what I gathered from neftalimich's post, he already explained to you, that inherent summons do not have a triggering id, yet still use OnSelectCard to handle the card selection. That makes it harder to detect them, and as he says, I usually use global variables to keep track of this.

I have attempted to add more generic functions to handle this. If you add the handling of Silent Magician's summon, instead of returning the index manually, you can return the "SpSummon" function instead. It takes the index and the id as parameters:

for i,c in pairs(SpSum) do
  if c.id == 41175645
  and SummonSilentMagician()
  then
    return SpSummon(i,c.id)
  end
end

Or, if you prefer:

if HasID(SpSum,41175645,SummonSilentMagician) then
  return SpSummon(nil,41175645) -- nil means use global index defined in HasID
end

This does set up the global variable for inherent summons, causing the system to redirect the next call to "OnSelectCard" to a custom function called "OnSelectMaterial" instead. You can find that in the SelectTribute.lua file as well, and you can use it by setting up a Material function for your deck file:

MyDeck = NewDeck("Silent Magician Deck",41175645)

MyDeck.Material(cards,min,max,id)
  if id == 41175645 -- material selection for Silent Magician
  then
    return Add(cards,PRIO_TOGRAVE,min)  -- send the 
  end
end

Does this help you?
ErebusSeraph
2017-03-18T12:35:55Z
Well, the Global variable method works, but using the Material function doesnt seem to achieve the goal since it continues performing random tributes.
About Arcanite Magician I tested it using my AI script and without using any AI script. The behaviour is the same wrong one.
Thanks for the replies. If the problem with Arcanite Magician is only mine (that is, of my version), let me know how to solve it.