AF_Fetch, AF_Retrieve, AF_Bounce
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			4 posts
			 • Page 1 of 1
		
	
AF_Fetch, AF_Retrieve, AF_Bounce
 by zerker2000 » 28 Nov 2010, 03:51
by 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
		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
 by friarsol » 28 Nov 2010, 23:03
by 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
 by Rob Cashwalker » 29 Nov 2010, 04:29
by 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.
		- 
				 
 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
 by friarsol » 29 Nov 2010, 05:07
by 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:
			
		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.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
			4 posts
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: No registered users and 32 guests
