Files
yugioh-legacy-engine/core/group.h
T
donnyandClaude Fable 5.1 26f9baf9b4 core: import the rules core (ygopro-core 973672dc + fork patches)
The vendored ocgcore from the Unity repo (Tools/YGOLegacy/ocgcore at dev
HEAD). Upstream is nanahira/ygopro-core at 973672dc9ce7cb49f47173277ab1ad0e318b7593;
the seven files that differ from it carry the fork's core patches, already
applied: 0001 face-down Token setcode, 0004 effect damage step outside a
chain, 0008 Sandbox god mode, 0015 tag first seat holds the hand, 0022
attack preview, 0024 attack preview legality. Generated build/ output is
left out.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:16 -07:00

47 lines
819 B
C++

/*
* group.h
*
* Created on: 2010-5-6
* Author: Argon
*/
#ifndef GROUP_H_
#define GROUP_H_
#include "common.h"
#include "sort.h"
#include "metadata.h"
#include <set>
#include <list>
class card;
class duel;
using card_set = std::set<card*, card_sort>;
constexpr uint32_t GTYPE_DEFAULT = 0;
constexpr uint32_t GTYPE_READ_ONLY = 1;
constexpr uint32_t GTYPE_KEEP_ALIVE = 2;
class alignas(8) group {
public:
int32_t ref_handle{ 0 };
uint32_t is_readonly{ GTYPE_DEFAULT };
duel* pduel;
metadata meta;
card_set container;
card_set::iterator it;
bool is_iterator_dirty{ true };
bool has_card(card* c) {
return container.find(c) != container.end();
}
explicit group(duel* pd);
group(duel* pd, card* pcard);
group(duel* pd, const card_set& cset);
~group() = default;
};
#endif /* GROUP_H_ */