Mimic

Elements can copy another element's rules (and actions) with the mimic keyword.

element Snow {
    colour "white"
    change W () => new Water()
    maybe(1/100) @ => W
    mimic(Sand)
}

This snow element melts 1% of the time. The rest of the time, it behaves like Sand.

Last updated