I'm starting to look at possible decks with RTR cards, now that I can have access to any picture thanks to the HQCG team.
Did anyone test the AI's reaction to the unleash mechanic? I made just a quick test duel, and the AI
always chose to add the +1/+1 counter. Maybe it was a coincidence.
EDIT: I answer by myself: the AI chooses to add the +1/+1 counter really often, but it can also choose not to add it, so the mechanic works perfectly.
A warning about one of the cards coded by sumomole:
Wild Beastmaster contains the "
Mutilate bug"... what I mean is that if
Wild Beastmaster changes his power after his ability resolved, the other creatures will be updated in real time, which is wrong. This is the correct code:
- Code: Select all
<TRIGGERED_ABILITY LKI_shield_effect_source="1" filter_zone="ZONE_IN_PLAY">
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<FILTER>
return OtherCreaturesInPlayYouControl()
</FILTER>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local source = EffectSource()
if source == nil then
source = Object()
end
EffectDC():Set_Int( 1, source:GetCurrentPower() )
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="7C">
if EffectDC() ~= nil and FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
local power = EffectDC():Get_Int(1)
if characteristics ~= nil then
characteristics:Power_Add( power )
characteristics:Toughness_Add( power )
end
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</TRIGGERED_ABILITY>
------------
EDIT 2: I just invented a super-performant TARGET_DETERMINATION for
Jarad, Golgari Lich Lord's "return" ability (
Sacrifice a
Swamp and a
Forest: Return Jarad from your graveyard to your hand). It's totally without "for" iterations. Unbelievable?

- Code: Select all
<TARGET_DETERMINATION>
local filter = Object():GetFilter()
filter:Clear()
filter:AddSubType( LAND_TYPE_SWAMP )
filter:SetController( EffectController() )
filter:SetZone( ZONE_IN_PLAY )
filter:NotTargetted()
local filter_s = filter:EvaluateObjects()
if filter_s > 0 then
local swamp = filter:GetNthEvaluatedObject(0)
filter:Clear()
filter:AddSubType( LAND_TYPE_FOREST )
filter:SetController( EffectController() )
filter:SetZone( ZONE_IN_PLAY )
filter:NotTargetted()
local filter_f = filter:EvaluateObjects()
if filter_f > 0 then
if (filter_f > 1 and filter_s > 1) or (filter_f ~= filter_s) or (filter:GetNthEvaluatedObject(0) ~= swamp) then
-- A. more than 1 forest and more than 1 swamp: I'm sure I have enough
-- B. different quantities of swamps and forests: that means at least 1 forest isn't a swamp or vice versa, so I have enough
-- C. only scenario still uncovered: exactly 1 swamp and exactly 1 forest: if they are different cards, I have enough
return 1
end
end
end
return 0
</TARGET_DETERMINATION>
Read the comments in the code and you'll notice that I covered all the possible scenarios without having to iterate through all the Swamps and/or through all the Forests. I enjoyed the challenge of inventing this code.
