Page 1 of 1

AF_Fetch, AF_Retrieve, AF_Bounce

PostPosted: 28 Nov 2010, 03:51
by zerker2000
Why are these in separate methods? Shouldn't we have one "MoveCard", which can put/return cards from the grave/library/field/exile/hand to the grave/library/field/exile/hand?

Re: AF_Fetch, AF_Retrieve, AF_Bounce

PostPosted: 28 Nov 2010, 23:03
by friarsol
Because the AI is completely different for them.

Re: AF_Fetch, AF_Retrieve, AF_Bounce

PostPosted: 29 Nov 2010, 04:29
by Rob Cashwalker
That would be the simple answer.... But I'm thinking, why is that such a problem? All the code for these abilities are self-contained, so what's the big deal if there are a few extra methods to handle each of the differences? The actual zone movement code is probably very similar.

Re: AF_Fetch, AF_Retrieve, AF_Bounce

PostPosted: 29 Nov 2010, 05:07
by friarsol
Ah sorry I should have expanded that. These were separate because they were done one at a time, by different people, and because the AI was significantly different.

They could be merged into the same class (since the Resolution part of them are quite similar), but we should decide if/how that would happen (and I'd say not before the upcoming release). And we would have to determine how to handle the AI by Origin/Destination.

AF_ChangeZone
Origin = Current Location of Target/Chosen Card
Destination = Location to Move Card to

For Origins that are non-targeted (like Library) we need to know what Type we are looking for and the Amount we can get.

We could probably do "cheat onto battlefield" effects using a combined AF.

This might look something like this:

Code: Select all
Name:Elvish Piper
A:AB$ChangeZone | Cost$ G T | Origin$ Hand | Destination $ Battlefield | ChosenType$ Creature | AmountMax $ 1 | AmountMin$ 0  | SpellDescription$ You may put a creature card from your hand onto the battlefield.
I don't think we should merge Drawing and Discard into this though, since those are more specific effects.