Game_object *owner = obj->get_outermost(); if (!npc_in_party(owner)) { obj->remove_this(1); Usecode_value party = get_party(); int cnt = party.get_array_size(); int i; for (i = 0; i < cnt; i++) { Game_object *npc = get_item(party.get_elem(i)); if (npc && npc->add(obj)) break; } if (i == cnt) gwin->get_main_actor()->add(obj, 1); } Tile_coord t = vs->get_pos(); if (t.tx > 0 || t.ty > 0) gwin->teleport_party(t);
Actor *npc = (Actor *) *it; if (!npc->is_monster() && npc != gwin->get_main_actor() && npc->get_party_id() <= 0) npc->set_opponent(gwin->get_main_actor());
USECODE_INTRINSIC(recall_virtue_stone){	Game_object *obj = get_item(parms[0]);	Virtue_stone_object *vs = dynamic_cast<Virtue_stone_object *> (obj);	if (vs)		{					// Pick it up if necessary.		Game_object *owner = obj->get_outermost();		if (!npc_in_party(owner))			{		// Go through whole party.			obj->remove_this(1);			Usecode_value party = get_party();			int cnt = party.get_array_size();			int i;			for (i = 0; i < cnt; i++)				{				Game_object *npc = get_item(party.get_elem(i));				if (npc && npc->add(obj))					break;				}			if (i == cnt)	// Failed?  Force it on Avatar.				gwin->get_main_actor()->add(obj, 1);			}		Tile_coord t = vs->get_pos();		if (t.tx > 0 || t.ty > 0)			gwin->teleport_party(t);		}	return no_ret;}