Erwan
- fixed a bug (crash if a card that had an ability until end of turn would be put into the graveyard before the end of the turn) - Added a new game Mode : Random 1 or 2 color.
This commit is contained in:
@@ -661,7 +661,8 @@ class AInstantBasicAbilityModifierUntilEOT: public InstantAbility{
|
||||
}
|
||||
|
||||
int destroy(){
|
||||
((MTGCardInstance *)target)->basicAbilities[ability] = stateBeforeActivation;
|
||||
MTGCardInstance * _target = (MTGCardInstance *)target;
|
||||
if (_target) _target->basicAbilities[ability] = stateBeforeActivation;
|
||||
return 1;
|
||||
}
|
||||
virtual ostream& toString(ostream& out) const
|
||||
|
||||
@@ -25,6 +25,7 @@ private:
|
||||
int isDifficultyUnlocked();
|
||||
int isMomirUnlocked();
|
||||
int isEvilTwinUnlocked();
|
||||
int isRandomDeckUnlocked();
|
||||
public:
|
||||
int value;
|
||||
Player * p1, *p2;
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
|
||||
#define GAME_TYPE_CLASSIC 0
|
||||
#define GAME_TYPE_MOMIR 1
|
||||
#define GAME_TYPE_RANDOM1 2
|
||||
#define GAME_TYPE_RANDOM2 3
|
||||
|
||||
class MTGAllCards;
|
||||
class TexturesCache;
|
||||
|
||||
@@ -34,6 +34,7 @@ class GameStateDuel: public GameState, public JGuiListener
|
||||
|
||||
void loadPlayer(int playerId, int decknb = 0, int isAI = 0);
|
||||
void loadPlayerMomir(int playerId, int isAI);
|
||||
void loadPlayerRandom(int playerId, int isAI, int mode);
|
||||
|
||||
public:
|
||||
GameStateDuel(GameApp* parent);
|
||||
|
||||
@@ -60,7 +60,7 @@ class MTGAbility: public ActionElement{
|
||||
virtual int receiveEvent(WEvent * event){return 0;};
|
||||
virtual void Update(float dt){};
|
||||
virtual int fireAbility();
|
||||
virtual int stillInUse(MTGCardInstance * card){if (card==source) return 1; return 0;};
|
||||
virtual int stillInUse(MTGCardInstance * card);
|
||||
virtual int resolve(){return 0;};
|
||||
virtual MTGAbility* clone() const = 0;
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
|
||||
@@ -94,7 +94,7 @@ class MTGDeck{
|
||||
int totalCards();
|
||||
MTGDeck(TexturesCache * cache, MTGAllCards * _allcards);
|
||||
MTGDeck(const char * config_file, TexturesCache * cache, MTGAllCards * _allcards, int meta_only = 0);
|
||||
int addRandomCards(int howmany, int setId = -1, int rarity = -1, const char * subtype = NULL);
|
||||
int addRandomCards(int howmany, int setId = -1, int rarity = -1, const char * subtype = NULL, int * colors = NULL, int nbcolors = 0);
|
||||
int add(int cardid);
|
||||
int add(MTGDeck * deck); // adds the contents of "deck" into myself
|
||||
int remove(int cardid);
|
||||
|
||||
Reference in New Issue
Block a user