diff --git a/.travis.yml b/.travis.yml index f5400310c..164591210 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ script: "tools/travis-script.sh" after_success: - coveralls -b . -e JGE/src -e JGE/include -i projects/mtg/include -i projects/mtg/src --gcov-options '\-lp' -- python2 tools/upload-binaries.py -t $GITHUB_TOKEN -s $TRAVIS_COMMIT -l core.zip -r Wagic-core.zip -b $TRAVIS_BRANCH +- python2 tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l core.zip -r Wagic-core.zip -b $TRAVIS_BRANCH - python2 tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l projects/mtg/Android/bin/Wagic-debug.apk -r Wagic-android.apk -b $TRAVIS_BRANCH - python2 tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l projects/mtg/psprelease.zip -r Wagic-psp.zip -b $TRAVIS_BRANCH -- python2 tools/upload-binaries.py -t $GITHUB_TOKEN -s $TRAVIS_COMMIT -l qt-gui-build/linuxqtrelease.zip -r Wagic-linux-QT.zip -b $TRAVIS_BRANCH +- python2 tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l qt-gui-build/linuxqtrelease.zip -r Wagic-linux-QT.zip -b $TRAVIS_BRANCH diff --git a/projects/mtg/src/Rules.cpp b/projects/mtg/src/Rules.cpp index 9f53e1db6..73082e17b 100644 --- a/projects/mtg/src/Rules.cpp +++ b/projects/mtg/src/Rules.cpp @@ -418,33 +418,20 @@ Player * Rules::loadPlayerRandomFive(GameObserver* observer, int isAI) Player * Rules::loadPlayerRandomCommander(GameObserver* observer, int isAI) { -#if !defined (PSP) - std::unique_ptr cmdTempDeck(new MTGDeck(MTGCollection())); - std::unique_ptr tempDeck(new MTGDeck(MTGCollection())); -#else MTGDeck * cmdTempDeck = NEW MTGDeck(MTGCollection()); MTGDeck * tempDeck = NEW MTGDeck(MTGCollection()); -#endif tempDeck->meta_commander = true; string lands[] = { "", "forest", "island", "mountain", "swamp", "plains", "basic", "basic" }; cmdTempDeck->addRandomCards(1, 0, 0, -1, "legendary"); -#if !defined (PSP) - std::unique_ptr myCommandZone(new DeckDataWrapper(cmdTempDeck.get())); -#else DeckDataWrapper * myCommandZone = NEW DeckDataWrapper(cmdTempDeck); -#endif MTGCard * commander = myCommandZone->getCard(0, true); while(!commander->data->isCreature()) { cmdTempDeck->addRandomCards(1, 0, 0, -1, "legendary"); -#if !defined (PSP) - myCommandZone.reset(new DeckDataWrapper(cmdTempDeck.get())); -#else myCommandZone = NEW DeckDataWrapper(cmdTempDeck); -#endif commander = myCommandZone->getCard(0, true); } @@ -481,15 +468,6 @@ Player * Rules::loadPlayerRandomCommander(GameObserver* observer, int isAI) string deckFile = "random"; string deckFileSmall = "random"; -#if !defined (PSP) - std::unique_ptr player; - if (!isAI) // Human Player - player.reset(new HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck.release())); - else - player.reset(new AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck.release())); - - return player.release(); -#else Player *player = NULL; if (!isAI) // Human Player player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck); @@ -497,7 +475,6 @@ Player * Rules::loadPlayerRandomCommander(GameObserver* observer, int isAI) player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck); return player; -#endif } Player * Rules::loadPlayerHorde(GameObserver* observer, int isAI) diff --git a/tools/upload-binaries.py b/tools/upload-binaries.py index c90ed380b..a3d5f3c5a 100644 --- a/tools/upload-binaries.py +++ b/tools/upload-binaries.py @@ -43,7 +43,7 @@ def main(): asset_url = t.expand(name = options.remote) r = requests.post(asset_url, headers = headers, data = open(options.local, 'rb').read(),verify=False) s = 'File ' + options.local + ' has been uploaded as ' + options.remote + '.' - print(s) + print s else: parser.print_help() return