getBulbType([number entity]) → integer type
Returns the type of the bulb entity, as one of the BULB_* constants (for example BULB_PUNY, BULB_FIRE, BULB_HEALER...).
If entity is not given, the type of the current entity is returned. The function returns -1 if the entity exists but is not a bulb, and null if no entity has that id.
Example:
var enemy = getNearestEnemy()
if (getBulbType(enemy) == BULB_FIRE) {
debug("A fire bulb!")
}
const enemy = Fight.getNearestEnemy()
// `type` only exists on a Bulb: check the entity kind first.
if (enemy instanceof Bulb && enemy.type === Bulb.Type.FIRE) {
Debug.log("A fire bulb!")
}
enemy = Fight.getNearestEnemy()
# `type` only exists on a Bulb: check the entity kind first.
if isinstance(enemy, Bulb) and enemy.type == Bulb.Type.FIRE:
Debug.log("A fire bulb!")
BULB_* constant), -1 if the entity is not a bulb, or null if the entity does not exist.Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.