Help implementing a custom card (non lethal DamageDoneOnce)
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			1 post
			 • Page 1 of 1
		
	
 Help implementing a custom card (non lethal DamageDoneOnce)
 Help implementing a custom card (non lethal DamageDoneOnce)
			 by judotrente » 04 Nov 2019, 03:52
by judotrente » 04 Nov 2019, 03:52 
Hello,
I'm new to the forum, I hope I'm posting in the right section. I'm looking for some help for implementing a custom card I've made (please see attachments) :
The enchantment reads : "Whenever a creature you control is dealt non lethal damage, create a 1/1 green Dryad creature token."
I have no trouble creating the token when a creature is dealt damage but I don't find any solution implementing the "non lethal" part... Mode$ DamageDoneOnce seems to be hardcoded, so impossible to tweak it. Is there a workaround to make it work only when the creature survives the damage ?
Here is my code so far :
blessing_of_valor.txt :
g_1_1_dryad.txt :
 
 
________________________________________________________________________________________________________________________________________________________
			
				
			
		I'm new to the forum, I hope I'm posting in the right section. I'm looking for some help for implementing a custom card I've made (please see attachments) :
The enchantment reads : "Whenever a creature you control is dealt non lethal damage, create a 1/1 green Dryad creature token."
I have no trouble creating the token when a creature is dealt damage but I don't find any solution implementing the "non lethal" part... Mode$ DamageDoneOnce seems to be hardcoded, so impossible to tweak it. Is there a workaround to make it work only when the creature survives the damage ?
Here is my code so far :
blessing_of_valor.txt :
- | Open
- Code: Select all
- Name:Blessing of Valor
 ManaCost:1 G W
 Types:Enchantment
 K:A deck can have any number of cards named CARDNAME.
 T:Mode$ DamageDoneOnce | ValidTarget$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Whenever a creature you control is dealt non lethal damage, create a 1/1 green Dryad token.
 SVar:TrigToken:DB$ Token | TokenOwner$ You | TokenScript$ g_1_1_dryad | LegacyImage$ g 1 1 dryad custom | TokenAmount$ 1
 Oracle:Whenever a creature you control is dealt non lethal damage, create a 1/1 green Dryad token.
 
g_1_1_dryad.txt :
- | Open
- Code: Select all
- Name:Dryad
 ManaCost:no cost
 Types:Creature Dryad
 Colors:green
 PT:1/1
 Oracle:
 
- | Open
- Code: Select all
- [metadata]
 Code=CUSTOM
 Date=2019-11-08
 Name=Custom set
 Code2=CUSTOM
 MciCode=custom
 Type=Other
 [cards]
 1 U Blessing of Valor
 
 
 ________________________________________________________________________________________________________________________________________________________
- 
				 
 judotrente
- Posts: 468
- Joined: 04 Nov 2019, 03:24
- Has thanked: 7 times
- Been thanked: 3 times
			1 post
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: Timothysow and 21 guests
