Top

Secret Chronicles of the Scripting API documentation

Class Jewel

Parent: MovingSprite

Jewels.

Note that this class describes the jewels you can also directly place via the level editor’s "special" category, i.e. the jewels don’t move. You can employ one of the subclasses to get a different behaviour.

Events

Activate

This event is fired when the player collects the jewel. Do not change the player’s jewel amount inside an event handler for this event, this will cause undefined behaviour.

Class Methods

new

new() → a_jewel

Creates a new instance of this class with the default values as per TSC’s internal code.

Instance Methods

activate

activate()

Apply the jewel to the player.

gold_color

gold_color() → a_symbol

Returns the jewel’s current color. See #gold_color= for a list of possible return values.

gold_color=

gold_color=( sym ) → sym

Set the jewel’s color.

Parameters

sym

The new jewel color. One of the symbols :red or :yellow.