Class Weapon
java.lang.Object
net.demilich.metastone.game.logic.CustomCloneable
net.demilich.metastone.game.entities.Entity
net.demilich.metastone.game.entities.Actor
net.demilich.metastone.game.entities.weapons.Weapon
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Entity>
,HasCard
- See Also:
-
Field Summary
Fields inherited from class net.demilich.metastone.game.entities.Entity
attributes, effectSource, entityLocation, name, NO_OWNER, sourceCard
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone an entity, including its ID and location.int
int
com.hiddenswitch.spellsource.rpc.Spellsource.ZonesMessage.Zones[]
Gets the zones where theCardDesc.getTrigger()
andCardDesc.getTriggers()
are active by default.int
com.hiddenswitch.spellsource.rpc.Spellsource.EntityTypeMessage.EntityType
Gets the type of entity this is.int
getHp()
The current number of hitpoints this actor has.int
int
boolean
isActive()
boolean
isBroken()
boolean
Indicates whether or not the actor is mortally wounded.void
onEquip
(GameContext context, Player player) void
onUnequip
(GameContext context, Player player) void
setActive
(boolean active) void
setOnEquip
(SpellDesc onEquip) void
setOnUnequip
(SpellDesc onUnequip) Methods inherited from class net.demilich.metastone.game.entities.Actor
canAttackThisTurn, getArmor, getBaseAttack, getBaseHp, getCardInventoryId, getCopy, getHeroClass, getMaxHp, hasNonZeroAttack, isWounded, modifyAuraHpBonus, modifyHpBonus, refreshAttacksPerRound, setAttack, setBaseAttack, setBaseHp, setHp, setId, setMaxHp, setOwner, setRace, toString
Methods inherited from class net.demilich.metastone.game.entities.Entity
compareTo, diedOnBattlefield, evaluateDescriptions, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getCopySource, getDescription, getDescription, getDynamicDescription, getEffectSource, getEntityLocation, getGameTriggers, getId, getIndex, getMaxNumberOfAttacks, getName, getOwner, getRace, getReference, getSourceCard, getUserId, getZone, hasAttribute, hasPersistentEffects, isInPlay, isRemovedPeacefully, modifyAttribute, moveOrAddTo, moveOrAddTo, resetEntityLocations, setAttribute, setAttribute, setAttribute, setDescription, setEffectSource, setEntityLocation, setName, setSourceCard, setUserId, transformResolved, transformResolved
-
Constructor Details
-
Weapon
-
-
Method Details
-
clone
Description copied from class:Entity
Clone an entity, including its ID and location.Use this method for emulating an "immutable" view on an entity. This kind of cloning is not suitable for most gameplay situations, because using the clone will cause two entities with identical IDs and locations to exist. Instead, a subclass will provide a
getCopy()
method that is more helpful for gameplay. -
getHp
public int getHp()Description copied from class:Actor
The current number of hitpoints this actor has. -
getAttack
public int getAttack() -
getBaseDurability
public int getBaseDurability() -
getDurability
public int getDurability() -
getEntityType
public com.hiddenswitch.spellsource.rpc.Spellsource.EntityTypeMessage.EntityType getEntityType()Description copied from class:Entity
Gets the type of entity this is. These will very nearly match up with the classes, but are primarily used for filters that e.g. draw a Spell or destroy all Secrets.- Specified by:
getEntityType
in classEntity
- Returns:
- An
Spellsource.EntityTypeMessage.EntityType
-
getMaxDurability
public int getMaxDurability() -
getWeaponDamage
public int getWeaponDamage() -
isActive
public boolean isActive() -
isBroken
public boolean isBroken() -
isDestroyed
public boolean isDestroyed()Description copied from class:Actor
Indicates whether or not the actor is mortally wounded.A mortally wounded actor hasn't necessarily been taken off the board and put into the
Spellsource.ZonesMessage.Zones.GRAVEYARD
yet. This is useful for preventing effects from impacting already dead minions before aGameLogic.endOfSequence()
has been called.- Overrides:
isDestroyed
in classActor
- Returns:
true
if the minion's health is less than 1 or if the minion has theAttribute.DESTROYED
attribute.- See Also:
-
getDefaultActiveTriggerZones
public com.hiddenswitch.spellsource.rpc.Spellsource.ZonesMessage.Zones[] getDefaultActiveTriggerZones()Description copied from class:Actor
Gets the zones where theCardDesc.getTrigger()
andCardDesc.getTriggers()
are active by default.- Specified by:
getDefaultActiveTriggerZones
in classActor
- Returns:
-
onEquip
-
onUnequip
-
setActive
public void setActive(boolean active) -
setOnEquip
-
setOnUnequip
-