Class Hero
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.heroes.Hero
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone an entity, including its ID and location.com.hiddenswitch.spellsource.rpc.Spellsource.ZonesMessage.Zones[]Gets the zones where theCardDesc.getTrigger()andCardDesc.getTriggers()are active by default.intcom.hiddenswitch.spellsource.rpc.Spellsource.EntityTypeMessage.EntityTypeGets the type of entity this is.protected booleanhasNonZeroAttack(GameContext context) intmodifyArmor(int armor) Changes the amount of armor the hero has.voidsetHeroClass(String heroClass) Methods inherited from class net.demilich.metastone.game.entities.Actor
canAttackThisTurn, getArmor, getAttack, getBaseAttack, getBaseHp, getCardInventoryId, getCopy, getHp, getMaxHp, isDestroyed, isWounded, modifyAuraHpBonus, modifyHpBonus, refreshAttacksPerRound, setAttack, setBaseAttack, setBaseHp, setHp, setId, setMaxHp, setOwner, setRace, toStringMethods 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
-
Hero
-
-
Method Details
-
clone
Description copied from class:EntityClone 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. -
getEffectiveHp
public int getEffectiveHp() -
getEntityType
public com.hiddenswitch.spellsource.rpc.Spellsource.EntityTypeMessage.EntityType getEntityType()Description copied from class:EntityGets 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:
getEntityTypein classEntity- Returns:
- An
Spellsource.EntityTypeMessage.EntityType
-
getDefaultActiveTriggerZones
public com.hiddenswitch.spellsource.rpc.Spellsource.ZonesMessage.Zones[] getDefaultActiveTriggerZones()Description copied from class:ActorGets the zones where theCardDesc.getTrigger()andCardDesc.getTriggers()are active by default.- Specified by:
getDefaultActiveTriggerZonesin classActor- Returns:
-
hasNonZeroAttack
- Overrides:
hasNonZeroAttackin classActor
-
modifyArmor
public int modifyArmor(int armor) Changes the amount of armor the hero has.- Parameters:
armor- The requested change in armor.- Returns:
- The amount the armor changed. If damage is being dealt, then the armor will change
-Infinity < armor <= 0if it is possible.
-
setHeroClass
-
getHeroClass
- Overrides:
getHeroClassin classActor
-