20 package net.sf.gridarta.model.spells;
27 import org.jetbrains.annotations.NotNull;
74 return archetype.getArchetypeName();
83 final String archObjName = archetype.
getObjName();
84 final String archetypeName = archetype.
getArchetype().getArchetypeName();
85 return (archObjName.isEmpty() ? archetypeName : archObjName) +
" [" + archetypeName +
"]";
G createGameObject(@NotNull R archetype)
Creates a new GameObject from an Archetype.
final GameObjectFactory< G, A, R > gameObjectFactory
The GameObjectFactory for creating GameObjects.
String getObjName()
Returns the name of the object as shown to the player.
String getArchetypeName()
Return the archetype name of the spell object.
GameObjectSpell(@NotNull final R archetype, @NotNull final GameObjectFactory< G, A, R > gameObjectFactory)
Create a new instance.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
Abstract factory for creating GameObject instances.
GameObjects are the objects based on Archetypes found on maps.
Describes a numbered in-game spell.
G createGameObject()
Return a copy of the game object.
Describes an in-game spell.
R getArchetype()
Returns the Archetype this GameObject is based on.
String getName()
Return the spell name.
final R archetype
The game object.
static String getName(final BaseObject<?, ?, ?, ?> archetype)
Return the name to use for a given archetype.
Interface for MapArchObjects.