It is currently 11 Sep 2025, 11:24
   
Text Size

Costs: GainLife updated syntax

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Costs: GainLife updated syntax

Postby 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:
Code: Select all
GainLife<N/Selector/M>
N - number of lives to gain
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

Postby 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
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 34 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 34 users online :: 0 registered, 0 hidden and 34 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 34 guests

Login Form