Re: Card Creation Request Thread
Can I get some help with Court Hussar second ability? Where it must be sacrificed unless you paid
.
.High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=64&t=4557
.You can find Court Hussar in my mod.NEMESiS wrote:Can I get some help with Court Hussar second ability? Where it must be sacrificed unless you paid.
<CONTINUOUS_ACTION>
local attach_filter = Object():AttachmentFilter_Get()
attach_filter:Clear()
attach_filter:AddCardType( CARD_TYPE_LAND )
attach_filter:AddExtra( FILTER_EXTRA_FLIP_CARD_TYPES )
</CONTINUOUS_ACTION> <SPELL_ABILITY attach_filter="1" filter_zone="ZONE_IN_PLAY">
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_LAND )
filter:AddExtra( FILTER_EXTRA_FLIP_CARD_TYPES )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "<Some CARD_QUERY>", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_card = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_card ~= nil then
Object():Enchant( target_card )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>I'd suggest to use CARD_QUERY_CHOOSE_PERMANENT_TO_ENCHANT, already used on Indestructibility. The fact that it must be nonland... well, the card says that, it should be enough.RiiakShiNal wrote:for Soul Tithe, you may need to make your own which would mean creating a TEXT_PERMANENT entry for it as well.
Actually, all "dies" triggers use ZONECHANGE_BEGIN, this allows them to check for the condition of the card before the zone change (very useful for undying, persist, modular, etc. which were much harder to code in DotP2012 without ZONECHANGE_BEGIN). As I have been able to experiment while coding other cards, the resolution of both kinds of triggers happens when the zone change has already ended. The substitutions of zone changes are made with ZONECHANGE_CONSIDERED triggers which, as the name suggests, are evaluated even before the ZONECHANGE_BEGIN, so no problems there.RiiakShiNal wrote:As for Flagstones of Trokair the only problem I'm seeing is that the Trigger should be ZONECHANGE_END instead of ZONECHANGE_BEGIN since it should activate once it goes to the graveyard instead of before it goes to the graveyard. This could be important if a card would change the target location such as having the card be exiled instead of going to the graveyard.
Not "all" "dies" triggers use ZONECHANGE_BEGIN, for example: Bloodchief Ascension, Dread, Hostility, Purity, Serra Avatar, and Vulturous Zombie (all official cards, though they also say "from anywhere" not just "from the battlefield") all use ZONECHANGE_END for triggering on their move to the graveyard. So maybe there is a difference between the two triggers for some cases. Then again it could just be another example of WotC doing misleading things.thefiremind wrote:Actually, all "dies" triggers use ZONECHANGE_BEGIN, this allows them to check for the condition of the card before the zone change (very useful for undying, persist, modular, etc. which were much harder to code in DotP2012 without ZONECHANGE_BEGIN). As I have been able to experiment while coding other cards, the resolution of both kinds of triggers happens when the zone change has already ended. The substitutions of zone changes are made with ZONECHANGE_CONSIDERED triggers which, as the name suggests, are evaluated even before the ZONECHANGE_BEGIN, so no problems there.
so "dies" (or "is put into a graveyard from the battlefield" for noncreature permanents) triggers from the battlefield, while "is put into a graveyard from anywhere" triggers from the graveyard. I just learned something.Although this ability triggers when the Incarnation is put into a graveyard from the battlefield, it doesn't *specifically* trigger on leaving the battlefield, so it doesn't behave like other leaves-the-battlefield abilities. The ability will trigger from the graveyard.