New targeting check system for cards
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
1 post
• Page 1 of 1
New targeting check system for cards
by Sloth » 10 Nov 2011, 13:23
At the moment I'm trying to revise the targeting restrictions, which are at the moment handled by the function "canTarget(final Card spell, final Card target)" in CardFactoryUtil. This function is flawed, because the SpellAbility is represented by its source card, and thus can't handle situations where the activator/caster is not the controller of the source card (which can happen with cards like Samite Sanctuary, Scandalmonger or Ornate Kanzashi) which is important for Hexproof.
I will start with adding a canTarget function to the card class that takes a spell ability as parameter and slowly try to redirect the checks to this. Any help would be appreciated (especially in cases where cleanup is necessary anyway).
I will start with adding a canTarget function to the card class that takes a spell ability as parameter and slowly try to redirect the checks to this. Any help would be appreciated (especially in cases where cleanup is necessary anyway).
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 70 guests