It is currently 31 Oct 2025, 12:22
   
Text Size

AF_Fetch, AF_Retrieve, AF_Bounce

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

AF_Fetch, AF_Retrieve, AF_Bounce

Postby zerker2000 » 28 Nov 2010, 03:51

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?
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: AF_Fetch, AF_Retrieve, AF_Bounce

Postby friarsol » 28 Nov 2010, 23:03

Because the AI is completely different for them.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: AF_Fetch, AF_Retrieve, AF_Bounce

Postby Rob Cashwalker » 29 Nov 2010, 04:29

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.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: AF_Fetch, AF_Retrieve, AF_Bounce

Postby friarsol » 29 Nov 2010, 05:07

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 32 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 32 users online :: 0 registered, 0 hidden and 32 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 32 guests

Login Form