Problems with Bloodthirst
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
5 posts
• Page 1 of 1
Problems with Bloodthirst
by ArsenalNut » 27 Aug 2011, 18:15
I started looking at Bloodthirst to see why Bloodlord of Vaasgoth was not working as a script. I found a couple issues
1) Pump and Animate can add "Bloodthirst N" to a cards keyword list but it won't add the underlying triggers. The issue lies in the fact that CardFactoryUtil.parseKeywords() doesn't get called because the card is not copied again when the card moves to the battlefield. Any of the keywords handled by CardFactoryUtil.parseKeywords() will have the same problem if the keyword is added in one zone and the card moves to the battlefield.
2) According to Rule 702.52c "If an object has multiple instances of bloodthirst, each applies separately". The current implementation of bloodthirst doesn't account for multiple instances of bloodthirst on a card.
Issue #2 is fairly easy to fix.
For issue #1, I came up with a workable script for Bloodlord of Vaasgoth by adding count$OppDamageThisTurn (SVN Rev# 9967) so I could use animate to add a psuedo Bloodthirst trigger to vampires that were cast. It also adds Bloodthirst to the card's keyword list in case that is important.
Since Bloodlord of Vaasgoth is currently the only card that specifically adds Bloodthirst, is this an acceptable solution? If not which is the better way to fix it?
1) change when keywords get parsed
2) add code to pump, animate, and maybe effect that takes these keywords into account.
1) Pump and Animate can add "Bloodthirst N" to a cards keyword list but it won't add the underlying triggers. The issue lies in the fact that CardFactoryUtil.parseKeywords() doesn't get called because the card is not copied again when the card moves to the battlefield. Any of the keywords handled by CardFactoryUtil.parseKeywords() will have the same problem if the keyword is added in one zone and the card moves to the battlefield.
2) According to Rule 702.52c "If an object has multiple instances of bloodthirst, each applies separately". The current implementation of bloodthirst doesn't account for multiple instances of bloodthirst on a card.
Issue #2 is fairly easy to fix.
For issue #1, I came up with a workable script for Bloodlord of Vaasgoth by adding count$OppDamageThisTurn (SVN Rev# 9967) so I could use animate to add a psuedo Bloodthirst trigger to vampires that were cast. It also adds Bloodthirst to the card's keyword list in case that is important.
Since Bloodlord of Vaasgoth is currently the only card that specifically adds Bloodthirst, is this an acceptable solution? If not which is the better way to fix it?
1) change when keywords get parsed
2) add code to pump, animate, and maybe effect that takes these keywords into account.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Problems with Bloodthirst
by Hellfish » 27 Aug 2011, 18:40
Solution 1 has my vote. It could help other things that has problems with keywords only being parsed once, like Equip (for Puresteel Paladin, see the other new topic).
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Problems with Bloodthirst
by ArsenalNut » 27 Aug 2011, 19:58
Unfortunately, it wouldn't fix Equip since it is not handled by the same code as Bloodthirst. The modification would only effectHellfish wrote:Solution 1 has my vote. It could help other things that has problems with keywords only being parsed once, like Equip (for Puresteel Paladin, see the other new topic).
1) CARDNAME enters the battlefield tapped.
2) CARDNAME enters the battlefield tapped unless you control two or fewer other lands.
3) CARDNAME enters the battlefield tapped unless you control a
4) Sunburst
5) World
6) Morph
7) Unearth

9) Devour
10) Modular
11) etbCounter
12) Bloodthirst
13) Storm
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Problems with Bloodthirst
by friarsol » 27 Aug 2011, 20:04
There's no reason your same changes can't be used for CardFactoryUtil.postFactoryKeywords as well.
I can't remember why these two functions were split up, but perhaps we should combine them all to occurring Post Factory.
I can't remember why these two functions were split up, but perhaps we should combine them all to occurring Post Factory.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Problems with Bloodthirst
by Hellfish » 27 Aug 2011, 20:09
Oh,right. Now that I think about it, equip stuff is probably more helped by AF_Attach anyway.ArsenalNut wrote:Unfortunately, it wouldn't fix Equip since it is not handled by the same code as Bloodthirst. The modification would only effectHellfish wrote:Solution 1 has my vote. It could help other things that has problems with keywords only being parsed once, like Equip (for Puresteel Paladin, see the other new topic).
1) CARDNAME enters the battlefield tapped.
2) CARDNAME enters the battlefield tapped unless you control two or fewer other lands.
3) CARDNAME enters the battlefield tapped unless you control a
4) Sunburst
5) World
6) Morph
7) UnearthMadness
9) Devour
10) Modular
11) etbCounter
12) Bloodthirst
13) Storm

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 68 guests