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:
@@ -2,7 +2,7 @@
|
||||
#include "../include/MTGDefinitions.h"
|
||||
#include "../include/Player.h"
|
||||
#include "../include/config.h"
|
||||
|
||||
#include "../include/WEvent.h"
|
||||
|
||||
|
||||
/* Creates a new phase ring with the default rules */
|
||||
@@ -32,8 +32,15 @@ Phase * PhaseRing::getCurrentPhase(){
|
||||
}
|
||||
|
||||
Phase * PhaseRing::forward(){
|
||||
Phase * cPhaseOld = *current;
|
||||
if (current != ring.end()) current++;
|
||||
if (current == ring.end()) current = ring.begin();
|
||||
|
||||
//Warn the layers about the phase Change
|
||||
WEvent * e = NEW WEventPhaseChange(cPhaseOld, *current);
|
||||
GameObserver::GetInstance()->receiveEvent(e);
|
||||
delete e;
|
||||
|
||||
return *current;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user