UPDATE YOUR rules FOLDER!!!
- This is some Work in progress to make Wagic less "game" dependent. This change especially is an attempt at moving away from some dangerous patents owned by some company. It introduces "modrules.xml", a global configuration file describing dynamic settings for any given Wagic mod. It is very basic for now, but allows to customize a bit. In particular, it allows to remove the concept of shop and deck editor from the game, dynamically generate the main menu, and represent card activation with a mask rather than a rotation. I have a sample in progress which I hope to submit in the days to come, a proof of concept (nothing fancy yet) for another type of game using these ideas, as well as a few other things I introduced recently. In the future, I am hoping to extend modrules.xml so that it entirely describes the rules of a given card game. the other files in rules.txt will describe "extensions" to the core rules, just like they do right now, so this new file does not make them obsolete. - Also fixed minor bugs I stumbled upon while developing
This commit is contained in:
@@ -43,6 +43,8 @@ public:
|
||||
static const float BigWidth;
|
||||
static const float BigHeight;
|
||||
|
||||
PIXEL_TYPE mMask;
|
||||
|
||||
MTGCardInstance* card;
|
||||
CardGui(MTGCardInstance* card, float x, float y);
|
||||
CardGui(MTGCardInstance* card, const Pos& ref);
|
||||
@@ -95,4 +97,33 @@ public:
|
||||
TransientCardView(MTGCardInstance* card, const Pos& ref);
|
||||
};
|
||||
|
||||
|
||||
class SimpleCardEffect
|
||||
{
|
||||
public:
|
||||
virtual void doEffect(Pos * card) = 0;
|
||||
virtual void undoEffect(Pos * card) = 0;
|
||||
};
|
||||
|
||||
class SimpleCardEffectRotate:public SimpleCardEffect
|
||||
{
|
||||
protected:
|
||||
float mRotation;
|
||||
public:
|
||||
SimpleCardEffectRotate(float rotation);
|
||||
void doEffect(Pos * card);
|
||||
void undoEffect(Pos * card);
|
||||
};
|
||||
|
||||
class SimpleCardEffectMask:public SimpleCardEffect
|
||||
{
|
||||
protected:
|
||||
PIXEL_TYPE mMask;
|
||||
public:
|
||||
SimpleCardEffectMask(PIXEL_TYPE mask);
|
||||
void doEffect(Pos * card);
|
||||
void undoEffect(Pos * card);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user