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 SummaryFields inherited from class net.demilich.metastone.game.entities.Entityattributes, effectSource, entityLocation, name, NO_OWNER, sourceCard
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.ActorcanAttackThisTurn, 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.EntitycompareTo, 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- 
cloneDescription 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.
- 
getEffectiveHppublic int getEffectiveHp()
- 
getEntityTypepublic 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 class- Entity
- Returns:
- An Spellsource.EntityTypeMessage.EntityType
 
- 
getDefaultActiveTriggerZonespublic 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 class- Actor
- Returns:
 
- 
hasNonZeroAttack- Overrides:
- hasNonZeroAttackin class- Actor
 
- 
modifyArmorpublic 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 class- Actor
 
 
-