It is currently 12 Nov 2025, 00:32
   
Text Size

A rule prevents Bitterheart Witch from being coded

Moderator: CCGHQ Admins

A rule prevents Bitterheart Witch from being coded

Postby thefiremind » 14 Aug 2012, 22:43

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. :(
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: A rule prevents Bitterheart Witch from being coded

Postby sadlyblue » 15 Aug 2012, 08:35

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.
sadlyblue
 
Posts: 175
Joined: 06 Feb 2012, 13:18
Has thanked: 18 times
Been thanked: 16 times

Re: A rule prevents Bitterheart Witch from being coded

Postby thefiremind » 15 Aug 2012, 09:37

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.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: A rule prevents Bitterheart Witch from being coded

Postby nabeshin » 13 Sep 2012, 22:07

"attached to target player", where is problem? use standard target definition, if someone protected then it will not be captivated.
User avatar
nabeshin
 
Posts: 207
Joined: 27 Jun 2011, 20:07
Has thanked: 5 times
Been thanked: 31 times

Re: A rule prevents Bitterheart Witch from being coded

Postby thefiremind » 14 Sep 2012, 08:30

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.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: A rule prevents Bitterheart Witch from being coded

Postby nabeshin » 15 Sep 2012, 18:30

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.
User avatar
nabeshin
 
Posts: 207
Joined: 27 Jun 2011, 20:07
Has thanked: 5 times
Been thanked: 31 times

Re: A rule prevents Bitterheart Witch from being coded

Postby thefiremind » 16 Sep 2012, 08:42

This is becoming a matter of personal interpretation, but I'm quite sure I interpreted the Gatherer ruling correctly:
Image
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: A rule prevents Bitterheart Witch from being coded

Postby nabeshin » 21 Sep 2012, 17:21

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)
User avatar
nabeshin
 
Posts: 207
Joined: 27 Jun 2011, 20:07
Has thanked: 5 times
Been thanked: 31 times

Re: A rule prevents Bitterheart Witch from being coded

Postby thefiremind » 21 Sep 2012, 18:13

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. :)
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: A rule prevents Bitterheart Witch from being coded

Postby nabeshin » 09 Oct 2012, 10:21

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.)
Attachments
print.rar
(943 Bytes) Downloaded 206 times
User avatar
nabeshin
 
Posts: 207
Joined: 27 Jun 2011, 20:07
Has thanked: 5 times
Been thanked: 31 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 3 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 3 guests

Login Form