New York’s attorney general sued Valve, accusing the video game company of running “loot box” features in Counter-Strike and other popular titles that, in the state’s view, amount to illegal gambling. In the lawsuit filed Wednesday in New York state court, Attorney General Letitia James said the games charge users for the chance to win rare items held in virtual containers and that the mechanics can resemble a slot machine in Counter-Strike.

James’ filing targets Valve over how loot boxes are offered in games including Counter-Strike 2, Team Fortress 2 and Dota 2. The complaint says the features are designed to pull users into opening the containers for the chance at valuable in-game prizes and that the appeal and the underlying structure align with gambling activity, even though many loot box items are described as cosmetic.

In a statement, James said Valve made “billions of dollars” by letting children and adults “illegally gamble” for the possibility of winning valuable virtual prizes. She characterized the features as addictive, harmful, and illegal, and her office said it could not reach Valve for comment by Wednesday.

The lawsuit said loot box items are generally cosmetic—such as hats for player characters or weapon skins—but that the items can still be sold online for significant sums. James’ office said some of the rarest items can sell for thousands of dollars and pointed to an AK-47 Counter-Strike skin that recently sold for more than $1 million.

James also asked the court for multiple remedies, including stopping the practice, restitution and damages to users, and a fine worth three times the amount of Valve’s profits from the loot box features. The complaint argues that research shows children introduced to gambling are four times more likely to develop a gambling problem later in life than children who are not exposed.

The suit further contends that loot boxes can cause real-world harm and says it argues the risk is amplified because the features are popular among children and adolescents. It describes loot boxes as luring younger users into opening containers based on the promise of expensive virtual items that convey status in the gaming world.

James’ filing also points to a secondary market, saying demand for loot box prizes has attracted thieves targeting third-party online marketplaces where the virtual items can be sold for cash. The complaint says Valve facilitates those markets and also operates its own Steam Community Market, where players can sell items and use proceeds to buy other video games, gaming hardware or additional virtual items.