net.sf.magicproject.expression
Class BaseRegisterIntValue

java.lang.Object
  extended by net.sf.magicproject.expression.Expression
      extended by net.sf.magicproject.expression.RegisterAccess
          extended by net.sf.magicproject.expression.BaseRegisterIntValue

public class BaseRegisterIntValue
extends RegisterAccess

Return the register value of a component without considering the modifiers.

Since:
0.85
Author:
Fabrice Daugan

Constructor Summary
BaseRegisterIntValue(java.io.InputStream inputFile)
          Creates a new instance of BaseRegisterIntValue
Structure of InputStream : Data[size] super [RegisterAccess]
 
Method Summary
 int getPreemptionValue(Ability ability, Targetable tested)
          Return the integer value of this expression exactly as it will be when the ability will be executed.
 int getValue(Ability ability, Targetable tested, ContextEventListener context)
          Returns the integer value of this expression
 boolean isXvalue()
          Is this value is X value.
 
Methods inherited from class net.sf.magicproject.expression.RegisterAccess
canBePreempted, extractTriggeredEvents
 
Methods inherited from class net.sf.magicproject.expression.Expression
getConstraintExpression, getObject, getObjectClass, getPreemptionValue, isConstant
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRegisterIntValue

public BaseRegisterIntValue(java.io.InputStream inputFile)
                     throws java.io.IOException
Creates a new instance of BaseRegisterIntValue

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

isXvalue

public boolean isXvalue()
Description copied from class: RegisterAccess
Is this value is X value.

Overrides:
isXvalue in class RegisterAccess
Returns:
true if this value is X value.

getValue

public int getValue(Ability ability,
                    Targetable tested,
                    ContextEventListener context)
Description copied from class: Expression
Returns the integer value of this expression

Overrides:
getValue in class RegisterAccess
Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
tested - the tested card
context - is the context attached to this test.
Returns:
the integer value of this expression

getPreemptionValue

public int getPreemptionValue(Ability ability,
                              Targetable tested)
Description copied from class: RegisterAccess
Return the integer value of this expression exactly as it will be when the ability will be executed.

Overrides:
getPreemptionValue in class RegisterAccess
Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
tested - the tested card
Returns:
the integer value of this expression


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