Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Wild defiance + Hexproof
Moderator: CCGHQ Admins
3 posts
• Page 1 of 1
Wild defiance + Hexproof
by pcastellazzi » 21 Sep 2012, 12:29
I coded wild defiance as follow:
- Code: Select all
<TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY">
<TRIGGER value="BECAME_TARGET" simple_qualifier="objectyoucontrol">
local target = TriggerObject()
local spell = SecondaryObject()
return (
target ~= nil
and target:GetCardType():Test(CARD_TYPE_CREATURE) ~= 0
and target:GetZone() == ZONE_IN_PLAY
and spell ~= nil
and (spell:GetCardType():Test(CARD_TYPE_INSTANT) ~= 0
or spell:GetCardType():Test(CARD_TYPE_SORCERY) ~= 0)
)
</TRIGGER>
<CONTINUOUS_ACTION>
local target = TriggerObject()
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add(3)
characteristics:Toughness_Add(3)
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</TRIGGERED_ABILITY>
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-

pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: Wild defiance + Hexproof
by RiiakShiNal » 21 Sep 2012, 12:52
Your problem may actually be that you did not include the proper layer for your CONTINUOUS_ACTION (which should be 7c). Because Dungrove Elder has an ability which sets it's power and toughness (which probably runs on layer 7a) it is more than likely canceling the effect of Wild Defiance (which is probably running on layer 0 because you did not set it even though it should be running on 7c). I think it unlikely that the problem is because of hexproof.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2189
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Wild defiance + Hexproff (fixed)
by pcastellazzi » 21 Sep 2012, 16:40
Good catch. Thank you very much.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-

pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 11 guests