net.sf.magicproject.event
Class ModifiedRegisterRange

java.lang.Object
  extended by net.sf.magicproject.event.MEventListener
      extended by net.sf.magicproject.event.TriggeredEvent
          extended by net.sf.magicproject.event.ModifiedRegister
              extended by net.sf.magicproject.event.ModifiedRegisterRange
All Implemented Interfaces:
RegisterableEvent

public class ModifiedRegisterRange
extends ModifiedRegister

Since:
0.86
Author:
Fabrice Daugan

Field Summary
 
Fields inherited from class net.sf.magicproject.event.ModifiedRegister
EVENT
 
Fields inherited from class net.sf.magicproject.event.TriggeredEvent
replacement
 
Fields inherited from class net.sf.magicproject.event.MEventListener
CAN_I_CAST_ABILITIES, card, REPLACEMENT_ABILITIES, test, TRIGGRED_ABILITIES
 
Constructor Summary
ModifiedRegisterRange(int idZone, Test sourceTest, Test testModified, MCard card, Operation op, Register register, Expression inf, Expression sup)
          Creates a new instance of MEventModifiedRegisterRange specifying all attributes of this class.
 
Method Summary
 MEventListener clone(MCard card)
          Return a copy of this with the specified owner
 boolean isMatching(Ability ability, Targetable modified, MCard source, Operation op, int register, int index)
          Tell if the current event matches with this event.
 
Methods inherited from class net.sf.magicproject.event.ModifiedRegister
dispatchEvent, getIdEvent, tryAction
 
Methods inherited from class net.sf.magicproject.event.TriggeredEvent
isActivated, isTriggered, registerToManager, removeFromManager, toHtmlString
 
Methods inherited from class net.sf.magicproject.event.MEventListener
appendOr, getIdPlace, isWellPlaced, isWellPlaced, reCheck, reCheck, reset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifiedRegisterRange

public ModifiedRegisterRange(int idZone,
                             Test sourceTest,
                             Test testModified,
                             MCard card,
                             Operation op,
                             Register register,
                             Expression inf,
                             Expression sup)
Creates a new instance of MEventModifiedRegisterRange specifying all attributes of this class. All parameters are copied, not cloned. So this new object shares the card and the specified codes

Parameters:
idZone - the place constraint to activate this event
sourceTest - the test applied on card modifying the card.
testModified - the test applied on the modified component.
card - is the card owning this card
op - the looked for operation. Any or specific operation instance.
register - the modified register
inf - the inferior range looked for this event
sup - the superior range looked for this event
Method Detail

clone

public MEventListener clone(MCard card)
Description copied from class: MEventListener
Return a copy of this with the specified owner

Overrides:
clone in class ModifiedRegister
Parameters:
card - is the card of the ability of this event
Returns:
copy of this event

isMatching

public boolean isMatching(Ability ability,
                          Targetable modified,
                          MCard source,
                          Operation op,
                          int register,
                          int index)
Description copied from class: ModifiedRegister
Tell if the current event matches with this event. If there is an additional code to check, it'would be checked if the main event matches with the main event

Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
modified - the component containing the modified register. May be null if the container was not a card.
source - the card modifying the requested register.
op - the looked for operation triggering this event
register - the modified register
index - the modified register's index
Returns:
true if the current event match with this event


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