Top

Secret Chronicles of the Scripting API documentation

Class Berry

Parent: Powerup

The Berry.

Class Methods

new

new() → a_berry

Creates a new berry powerup with the default values.

Instance Methods

activate!

activate!()

Apply the item to Alex. Doing so will destroy the berry in any case, but note that applying it does not necessarily cause it to have an effect on Alex (use LevelPlayer#type= for that). Instead, it may be stored in the item box, or even just have no effect if that is already full.

glimming=

glimming=( bool ) → bool

Make this berry look mysterious by making it glimming. Note glimming is the default for newly created berrys.

Parameters

bool

Whether or not to glim.

glimming?

glimming?() → true or false

Is this berry glimming mysteriously?

type

type() → a_symbol

Returns the berry’s current type as a symbol See type= for a list of possible symbols returned by this method.

type=

type=( type ) → type

Specify the berry’s type.

Parameters

type

The berry’s new type. One of the following symbols:

red

The normal red berry

life

The green +1 life berry

poison

The green -1 life berry

blue

The blue ice-alex berry

ghost

The transparent ghost-alex berry