Page 1 of 1

AF_Effect

PostPosted: 28 Apr 2011, 12:14
by friarsol
Alright folks. I started an AbilityFactory for Effect that's similar to Token without the baggage. Right now the AI code is fairly simple since Effects can be be a whole host of things. I'd recommend keeping these cards out of the AIs hands until we can think of a generic way for the AI to use them. Otherwise, who knows what would happen.

A card like False Cure (already added by Sloth) should be cast in response to an AF Gain Life ability targeting/effecting the Human or a Creature.YouDontCtrl with Lifelink in combat. But other Effects should only be cast if the AI plans to do something after. I have a feeling that Effect might be the first AF that will have AIPlayConditions built into the ability, since a "generic" Effect has no related Play Conditios with another "Effect"

Maybe one of you who has worked with the static effects can figure out how we can create them dynamically? This way we can get cards like Resuscitate (that don't work at all now) to actually work.

Anyway, this should open up a bunch more cards and hopefully simplify cards that have some major hardcoding (I already did Channel, I don't know if High Tide is ready for the conversion yet, how functional is the TapsForMana trigger? Once we get a AF_Play Mind's Desire should be able to be simplified. Although Effect would definitely need a Duration of RememberedLeaves:<Zone> or some such). I think Haunt will be able to happen with that specific Duration and some more minor coding.

Re: AF_Effect

PostPosted: 28 Apr 2011, 12:21
by Sloth
Very nicely thought through Sol. =D>

I will try to implement static effects on Effects.

EDIT: I think a color has to be added to the Effects (which should always be the color of the source).

Re: AF_Effect

PostPosted: 28 Apr 2011, 15:31
by friarsol
Maybe we can just use the original Image of the card with an Icon on the card (like a Water Ripple) to show that it's an effect?

Definitely some kinks to work out (such as how Effects react to other cards) but I figured it'd be a good starting place to get these types of things ready.

Re: AF_Effect

PostPosted: 28 Apr 2011, 16:06
by Sloth
I meant a color in the technical sense. So triggered and activated abilities will interact correctly with protection/other triggered abilities.

EDIT: And I just noticed that Resuscitate is just a pump effect (and is not bestowed upon creatures etB later).