Page 1 of 1

A rule prevents Bitterheart Witch from being coded

PostPosted: 14 Aug 2012, 22:43
by thefiremind
I was about to code Bitterheart Witch, then the ruling on Gatherer stopped me:
"The Curse must be legally able to enchant the player. For example, if the player has protection from red, you couldn't put a red Curse onto the battlefield this way."
There's no CanAttachTo for players, so how could this be achieved? I thought about crazy things like making all players except the chosen one untargettable by the chosen curse, and then put it into play with PseudoPlaySpell... but it's still not correct because I shouldn't even be allowed to choose a curse that I can't put on the chosen player.

I'm hoping that someone comes up with a brilliant idea, but I think it will be hard. :(

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 15 Aug 2012, 08:35
by sadlyblue
I don't think it will be possible to coded it correctly.
The only card i could find that gives players protection from a color was Seht's Tiger. And you could try to code it and them try to see how it works.

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 15 Aug 2012, 09:37
by thefiremind
sadlyblue wrote:I don't think it will be possible to coded it correctly.
The only card i could find that gives players protection from a color was Seht's Tiger. And you could try to code it and them try to see how it works.
There's also Faith's Shield, which is already in the game (even if only in a challenge). Anyway I'll make my curse deck even without Bitterheart Witch.

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 13 Sep 2012, 22:07
by nabeshin
"attached to target player", where is problem? use standard target definition, if someone protected then it will not be captivated.

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 14 Sep 2012, 08:30
by thefiremind
nabeshin wrote:"attached to target player", where is problem? use standard target definition, if someone protected then it will not be captivated.
But you shouldn't even be able to select a Curse if you can't attach it to target player, according to Gatherer. That's the problem.

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 15 Sep 2012, 18:30
by nabeshin
thefiremind wrote:
nabeshin wrote:"attached to target player", where is problem? use standard target definition, if someone protected then it will not be captivated.
But you shouldn't even be able to select a Curse if you can't attach it to target player, according to Gatherer. That's the problem.
"you may search your library for a Curse card" - , you find a curse, select curse, and then - if no legal target - do nothing.

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 16 Sep 2012, 08:42
by thefiremind
This is becoming a matter of personal interpretation, but I'm quite sure I interpreted the Gatherer ruling correctly:
Image

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 21 Sep 2012, 17:21
by nabeshin
we won't break a rule, we will simply check existence of the suitable target for every curse in library, and then show only legal one.(use for this LoadTargetDefinition and TestFilter)

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 21 Sep 2012, 18:13
by thefiremind
nabeshin wrote:we won't break a rule, we will simply check existence of the suitable target for every curse in library, and then show only legal one.(use for this LoadTargetDefinition and TestFilter)
This would be a great idea, but can we really load a target definition from another object by using LoadTargetDefinition? The IDs aren't unique inside the whole card, but only inside each ability (for example, a card with 2 abilities can have id="0" in both abilities), so if you call LoadTargetDefinition from another object, how can the game understand which ability you are referring to?

If you have a working example, please share: I'm sure that it would be very useful also for other cards and other modders. :)

Re: A rule prevents Bitterheart Witch from being coded

PostPosted: 09 Oct 2012, 10:21
by nabeshin
atm all curses don't have additional req. for cast, can we check current prot. for plr?
maybe:
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
filter:SetZone( ZONE_IN_PLAY )
target_player:TestFilter(filter,EffectController())

+ add to this obj ENCHANTMENT_TYPE_CURSE, and swap color to curse color .( omg, awesome code detected... )

PS work suxx anyway, but if u need new print plugin for tinymce, take this... (open edited content in new window, w/o all other shit, and print. coded by I.)