Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
parsehelpers.h File Reference
#include <QString>
Include dependency graph for parsehelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool parseCipt (const QString &name, const QString &text)

Function Documentation

◆ parseCipt()

bool parseCipt ( const QString & name,
const QString & text )

Parses the card text to determine if the card should have the cipt tag

The parsing logic is able to handle the following cases:

  • "<name> enters tapped"
  • "<shortname> enters tapped", if the card name starts with the shortname
  • "This <type> enters tapped"
  • "..., it enters tapped"
  • Any naming scheme that appends a non-alphanumeric character plus extra text to the end of the name. (e.g. name is "Card Name_SET" or "Card Name (Set)" and text contains "Card Name enters tapped")

However, it will still miss on certain cases:

  • shortnames that aren't the at the beginning of the card name

Note that "...enters tapped unless..." returns false.

Parameters
nameThe name of the card
textThe oracle text of the card
Here is the caller graph for this function: