56
56
return Item::getAttr(key);
59
59
void SurpriseItem::on_drop(Actor *a) {
61
61
performAction(true); // may kill the stone!
64
64
TokenList tl = getAttr("selection");
65
65
int idx = enigma::IntegerRand(1, tl.size()) - 1;
66
66
TokenList::iterator itr = tl.begin();
68
68
std::string name = (*itr).to_string();
69
69
if (name.find('=') == 0) {
70
70
if (lua::CallFunc(lua::LevelState(), "enigma.settile", name.substr(1), this)) {