Costs: GainLife updated syntax
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			2 posts
			 • Page 1 of 1
		
	
Costs: GainLife updated syntax
 by Max mtg » 22 Jan 2013, 07:04
by Max mtg » 22 Jan 2013, 07:04 
Hi, I've commited r19122 which among other things replaces cost syntaxes "OthersEachGainLife" and "OppGainLife" with a more unversal model:
Selector gets passed to the method isValid() of each player in game (use same syntax as for target selection here, eg: Player.Other). Matching players are considered valid targets.
M - number of players to apply cost to. Can be either a number or asterisk (*) meaning ALL players matching the selector. If omitted, M defaults to 1.
			
				- Code: Select all
- GainLife<N/Selector/M>
Selector gets passed to the method isValid() of each player in game (use same syntax as for target selection here, eg: Player.Other). Matching players are considered valid targets.
M - number of players to apply cost to. Can be either a number or asterisk (*) meaning ALL players matching the selector. If omitted, M defaults to 1.
Last edited by Max mtg on 22 Jan 2013, 07:07, edited 1 time in total.
					
				
			Single class for single responsibility.
		- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Costs: GainLife updated syntax
 by Max mtg » 22 Jan 2013, 07:07
by Max mtg » 22 Jan 2013, 07:07 
The known cards taking advantage of this are:
/trunk/res/cardsfolder/i/invigorate.txt
/trunk/res/cardsfolder/r/reverent_silence.txt
/trunk/res/cardsfolder/r/roar_of_jukai.txt
/trunk/res/cardsfolder/s/skyshroud_cutter.txt
			/trunk/res/cardsfolder/i/invigorate.txt
/trunk/res/cardsfolder/r/reverent_silence.txt
/trunk/res/cardsfolder/r/roar_of_jukai.txt
/trunk/res/cardsfolder/s/skyshroud_cutter.txt
Single class for single responsibility.
		- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
			2 posts
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: No registered users and 24 guests
