net.sf.magicproject.stack
Class AdditionalCost

java.lang.Object
  extended by net.sf.magicproject.stack.AdditionalCost

public class AdditionalCost
extends java.lang.Object

An additional cost definition : constraint and added actions.

Since:
0.80
Author:
Fabrice Daugan

Field Summary
 Test constraint
          The constraint to apply this additional cost
 MAction[] cost
          The additional cost
 
Constructor Summary
AdditionalCost(java.io.InputStream inputFile)
          Creates a new instance of this class
 
Method Summary
 java.lang.String toHtmlString(Ability ability, ContextEventListener context)
          Return the HTML code representing this additionnal cost.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

constraint

public final Test constraint
The constraint to apply this additional cost


cost

public final MAction[] cost
The additional cost

Constructor Detail

AdditionalCost

public AdditionalCost(java.io.InputStream inputFile)
               throws java.io.IOException
Creates a new instance of this class

Parameters:
inputFile - is the file containing this definition.
Throws:
java.io.IOException - if error occurred during the reading process from the specified input stream
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toHtmlString

public java.lang.String toHtmlString(Ability ability,
                                     ContextEventListener context)
Return the HTML code representing this additionnal cost. If the given ability is named, it's name will be returned. If not, if existing, the picture associated to this ability is returned. Otherwise, toHtmlString is called for each owned actions.

Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
context - the context needed by event activated
Returns:
the HTML code representing this additionnal cost.


Copyright © 2003-2007 Magic-Project. All Rights Reserved.