It is currently 29 Oct 2025, 00:47
   
Text Size

AF_Effect

Post MTG Forge Related Programming Questions Here

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

AF_Effect

Postby friarsol » 28 Apr 2011, 12:14

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.
Last edited by friarsol on 28 Apr 2011, 15:22, edited 1 time in total.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: AF_Effect

Postby Sloth » 28 Apr 2011, 12:21

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).
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: AF_Effect

Postby friarsol » 28 Apr 2011, 15:31

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

Re: AF_Effect

Postby Sloth » 28 Apr 2011, 16:06

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).
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 23 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 23 users online :: 0 registered, 0 hidden and 23 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 23 guests

Login Form