Erwan
-removing useless code -fixed a few cards (incorrect set)
This commit is contained in:
@@ -303,6 +303,14 @@ auto=foreach(Zombie) -1/-1
|
|||||||
rarity=U
|
rarity=U
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
id=39503
|
||||||
|
name=Flooded Strand
|
||||||
|
type=Land
|
||||||
|
text={T}, Pay 1 life, Sacrifice Flooded Strand: Search your library for a Plains or Island card and put it into play. Then shuffle your library.
|
||||||
|
auto={T}{S}:moveTo(myinplay) target(plains,island|mylibrary) && life:-1
|
||||||
|
rarity=R
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
text={G}
|
text={G}
|
||||||
id=40106
|
id=40106
|
||||||
name=Forest
|
name=Forest
|
||||||
@@ -984,6 +992,14 @@ auto=foreach(Elf)life:1
|
|||||||
rarity=C
|
rarity=C
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
id=39507
|
||||||
|
name=Windswept Heath
|
||||||
|
type=Land
|
||||||
|
text={T}, Pay 1 life, Sacrifice Windswept Heath: Search your library for a Forest or Plains card and put it into play. Then shuffle your library.
|
||||||
|
auto={T}{S}:moveTo(myinplay) target(forest,plains) && life:-1
|
||||||
|
rarity=R
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
text={T}: Add {G} to your mana pool.
|
text={T}: Add {G} to your mana pool.
|
||||||
id=39828
|
id=39828
|
||||||
name=Wirewood Elf
|
name=Wirewood Elf
|
||||||
@@ -1014,3 +1030,12 @@ target=creature
|
|||||||
auto=foreach(Elf) 1/1
|
auto=foreach(Elf) 1/1
|
||||||
rarity=C
|
rarity=C
|
||||||
[/card]
|
[/card]
|
||||||
|
[card]
|
||||||
|
id=39506
|
||||||
|
name=Wooded Foothills
|
||||||
|
mana=
|
||||||
|
type=Land
|
||||||
|
text={T}, Pay 1 life, Sacrifice Wooded Foothills: Search your library for a Mountain or Forest card and put it into play. Then shuffle your library.
|
||||||
|
auto={T}{S}:moveTo(myinplay) target(mountain,forest|mylibrary) && life:-1
|
||||||
|
rarity=R
|
||||||
|
[/card]
|
||||||
@@ -295,14 +295,6 @@ type=Enchantment
|
|||||||
subtype=Aura
|
subtype=Aura
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
id=39503
|
|
||||||
name=Flooded Strand
|
|
||||||
type=Land
|
|
||||||
text={T}, Pay 1 life, Sacrifice Flooded Strand: Search your library for a Plains or Island card and put it into play. Then shuffle your library.
|
|
||||||
auto={T}{S}:moveTo(myinplay) target(plains,island|mylibrary) && life:-1
|
|
||||||
rarity=R
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
text=Draw a card for each Island you control.
|
text=Draw a card for each Island you control.
|
||||||
id=87978
|
id=87978
|
||||||
name=Flow of Ideas
|
name=Flow of Ideas
|
||||||
@@ -1059,20 +1051,3 @@ subtype=Wolf
|
|||||||
power=3
|
power=3
|
||||||
toughness=3
|
toughness=3
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
|
||||||
id=39507
|
|
||||||
name=Windswept Heath
|
|
||||||
type=Land
|
|
||||||
text={T}, Pay 1 life, Sacrifice Windswept Heath: Search your library for a Forest or Plains card and put it into play. Then shuffle your library.
|
|
||||||
auto={T}{S}:moveTo(myinplay) target(forest,plains) && life:-1
|
|
||||||
rarity=R
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
id=39506
|
|
||||||
name=Wooded Foothills
|
|
||||||
mana=
|
|
||||||
type=Land
|
|
||||||
text={T}, Pay 1 life, Sacrifice Wooded Foothills: Search your library for a Mountain or Forest card and put it into play. Then shuffle your library.
|
|
||||||
auto={T}{S}:moveTo(myinplay) target(mountain,forest|mylibrary) && life:-1
|
|
||||||
rarity=R
|
|
||||||
[/card]
|
|
||||||
@@ -15,7 +15,6 @@ class MTGGamePhase: public ActionElement {
|
|||||||
JLBFont * mFont;
|
JLBFont * mFont;
|
||||||
public:
|
public:
|
||||||
MTGGamePhase(int id);
|
MTGGamePhase(int id);
|
||||||
virtual void Render();
|
|
||||||
virtual void Update(float dt);
|
virtual void Update(float dt);
|
||||||
bool CheckUserInput(u32 key);
|
bool CheckUserInput(u32 key);
|
||||||
virtual MTGGamePhase * clone() const;
|
virtual MTGGamePhase * clone() const;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ class OptionItem:public JGuiObject{
|
|||||||
float x, y;
|
float x, y;
|
||||||
OptionItem(string _id, string _displayValue, int _maxValue = 1, int _increment = 1);
|
OptionItem(string _id, string _displayValue, int _maxValue = 1, int _increment = 1);
|
||||||
|
|
||||||
~OptionItem();
|
|
||||||
virtual void Render();
|
virtual void Render();
|
||||||
virtual void Update(float dt);
|
virtual void Update(float dt);
|
||||||
virtual void Entering();
|
virtual void Entering();
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class Player: public Damageable{
|
|||||||
JQuad * mAvatar;
|
JQuad * mAvatar;
|
||||||
int canPutLandsIntoPlay;
|
int canPutLandsIntoPlay;
|
||||||
MTGPlayerCards * game;
|
MTGPlayerCards * game;
|
||||||
int testLife();
|
|
||||||
int afterDamage();
|
int afterDamage();
|
||||||
Player(MTGPlayerCards * _deck, string deckFile, string deckFileSmall);
|
Player(MTGPlayerCards * _deck, string deckFile, string deckFileSmall);
|
||||||
virtual ~Player();
|
virtual ~Player();
|
||||||
|
|||||||
@@ -731,14 +731,12 @@ int AIPlayerBaka::Act(float dt){
|
|||||||
g->userRequestNextGamePhase();
|
g->userRequestNextGamePhase();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//if (!clickstream.empty()){
|
|
||||||
AIAction * action = clickstream.front();
|
AIAction * action = clickstream.front();
|
||||||
action->Act();
|
action->Act();
|
||||||
SAFE_DELETE(action);
|
SAFE_DELETE(action);
|
||||||
clickstream.pop();
|
clickstream.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (clickstream.empty()) computeActions();
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
#include "../include/DeckDataWrapper.h"
|
#include "../include/DeckDataWrapper.h"
|
||||||
|
|
||||||
static const char* GAME_VERSION = "WTH?! 0.7.1 - by WilLoW";
|
static const char* GAME_VERSION = "WTH?! 0.7.1 - by WilLoW";
|
||||||
#define ALPHA_WARNING 0
|
|
||||||
|
|
||||||
#define DEFAULT_ANGLE_MULTIPLIER 0.4
|
#define DEFAULT_ANGLE_MULTIPLIER 0.4
|
||||||
#define MAX_ANGLE_MULTIPLIER (3*M_PI)
|
#define MAX_ANGLE_MULTIPLIER (3*M_PI)
|
||||||
@@ -27,7 +26,6 @@ enum ENUM_MENU_STATE_MAJOR
|
|||||||
MENU_STATE_MAJOR_LOADING_MENU = 0x03,
|
MENU_STATE_MAJOR_LOADING_MENU = 0x03,
|
||||||
MENU_STATE_MAJOR_LOADING_CARDS = 0x04,
|
MENU_STATE_MAJOR_LOADING_CARDS = 0x04,
|
||||||
MENU_STATE_MAJOR_FIRST_TIME = 0x05,
|
MENU_STATE_MAJOR_FIRST_TIME = 0x05,
|
||||||
MENU_STATE_MAJOR_WARNING = 0x06,
|
|
||||||
MENU_STATE_MAJOR_DUEL = 0x07,
|
MENU_STATE_MAJOR_DUEL = 0x07,
|
||||||
|
|
||||||
MENU_STATE_MAJOR = 0xFF
|
MENU_STATE_MAJOR = 0xFF
|
||||||
@@ -81,8 +79,6 @@ GameStateMenu::~GameStateMenu() {}
|
|||||||
|
|
||||||
void GameStateMenu::Create()
|
void GameStateMenu::Create()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
mDip = NULL;
|
mDip = NULL;
|
||||||
mReadConf = 0;
|
mReadConf = 0;
|
||||||
mCurrentSetName[0] = 0;
|
mCurrentSetName[0] = 0;
|
||||||
@@ -100,10 +96,8 @@ void GameStateMenu::Create()
|
|||||||
mMovingW->SetHotSpot(72,16);
|
mMovingW->SetHotSpot(72,16);
|
||||||
//load all the icon images
|
//load all the icon images
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (int i=0;i<5;i++)
|
for (int i=0;i<5;i++){
|
||||||
{
|
for (int j=0;j<2;j++){
|
||||||
for (int j=0;j<2;j++)
|
|
||||||
{
|
|
||||||
mIcons[n] = NEW JQuad(mIconsTexture, 2 + i*36, 2 + j*36, 32, 32);
|
mIcons[n] = NEW JQuad(mIconsTexture, 2 + i*36, 2 + j*36, 32, 32);
|
||||||
mIcons[n]->SetHotSpot(16,16);
|
mIcons[n]->SetHotSpot(16,16);
|
||||||
n++;
|
n++;
|
||||||
@@ -111,9 +105,7 @@ void GameStateMenu::Create()
|
|||||||
}
|
}
|
||||||
|
|
||||||
JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT);
|
JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT);
|
||||||
//mFont->SetBase(0); // using 2nd font
|
|
||||||
mGuiController = NEW JGuiController(100, this);
|
mGuiController = NEW JGuiController(100, this);
|
||||||
//mGuiController->SetShadingBackground(10, 45, 80, 100, ARGB(255,0,0,0));
|
|
||||||
if (mGuiController)
|
if (mGuiController)
|
||||||
{
|
{
|
||||||
mGuiController->Add(NEW MenuItem(MENUITEM_PLAY, mFont, "Play", 80, 50 + SCREEN_HEIGHT/2, mIcons[8], mIcons[9],"graphics/particle1.psi",GameApp::CommonRes->GetQuad("particles"), true));
|
mGuiController->Add(NEW MenuItem(MENUITEM_PLAY, mFont, "Play", 80, 50 + SCREEN_HEIGHT/2, mIcons[8], mIcons[9],"graphics/particle1.psi",GameApp::CommonRes->GetQuad("particles"), true));
|
||||||
@@ -147,7 +139,6 @@ void GameStateMenu::Destroy()
|
|||||||
SAFE_DELETE(bgTexture);
|
SAFE_DELETE(bgTexture);
|
||||||
SAFE_DELETE(scroller);
|
SAFE_DELETE(scroller);
|
||||||
|
|
||||||
//SAFE_DELETE (bgMusic);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -289,7 +280,7 @@ void GameStateMenu::Update(float dt)
|
|||||||
std::ifstream file(RESPATH"/player/collection.dat");
|
std::ifstream file(RESPATH"/player/collection.dat");
|
||||||
if(file){
|
if(file){
|
||||||
file.close();
|
file.close();
|
||||||
currentState = MENU_STATE_MAJOR_WARNING | MENU_STATE_MINOR_NONE;
|
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_NONE;
|
||||||
}else{
|
}else{
|
||||||
currentState = MENU_STATE_MAJOR_FIRST_TIME | MENU_STATE_MINOR_NONE;
|
currentState = MENU_STATE_MAJOR_FIRST_TIME | MENU_STATE_MINOR_NONE;
|
||||||
}
|
}
|
||||||
@@ -311,14 +302,7 @@ void GameStateMenu::Update(float dt)
|
|||||||
}
|
}
|
||||||
createUsersFirstDeck(setId);
|
createUsersFirstDeck(setId);
|
||||||
}
|
}
|
||||||
currentState = MENU_STATE_MAJOR_WARNING | MENU_STATE_MINOR_NONE;
|
|
||||||
break;
|
|
||||||
case MENU_STATE_MAJOR_WARNING :
|
|
||||||
if (!ALPHA_WARNING){
|
|
||||||
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_NONE;
|
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_NONE;
|
||||||
}else{
|
|
||||||
if (mEngine->GetButtonClick(PSP_CTRL_CIRCLE)) currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_NONE;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_STATE_MAJOR_MAINMENU :
|
case MENU_STATE_MAJOR_MAINMENU :
|
||||||
if (!scrollerSet) fillScroller();
|
if (!scrollerSet) fillScroller();
|
||||||
@@ -487,21 +471,6 @@ void GameStateMenu::Render()
|
|||||||
if (subMenuController){
|
if (subMenuController){
|
||||||
subMenuController->Render();
|
subMenuController->Render();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((currentState & MENU_STATE_MAJOR) == MENU_STATE_MAJOR_WARNING){
|
|
||||||
renderer->FillRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT,ARGB(128,0,0,0));
|
|
||||||
|
|
||||||
mFont->DrawString("IMPORTANT NOTE" ,SCREEN_WIDTH/2,10,JGETEXT_CENTER);
|
|
||||||
mFont->DrawString("This is an alpha version with lots of bugs.",SCREEN_WIDTH/2,35,JGETEXT_CENTER);
|
|
||||||
mFont->DrawString("It WILL crash your psp" ,SCREEN_WIDTH/2,50,JGETEXT_CENTER);
|
|
||||||
mFont->DrawString("If you use it anyway, your feedback is welcome" ,SCREEN_WIDTH/2,65,JGETEXT_CENTER);
|
|
||||||
|
|
||||||
mFont->DrawString("This freeware game is NOT published or endorsed" ,SCREEN_WIDTH/2,110,JGETEXT_CENTER);
|
|
||||||
mFont->DrawString("by Wizard of the Coast, Inc." ,SCREEN_WIDTH/2,125,JGETEXT_CENTER);
|
|
||||||
mFont->DrawString("Infos & updates at http://wololo.net/wagic/" ,SCREEN_WIDTH/2,170,JGETEXT_CENTER);
|
|
||||||
mFont->DrawString("PRESS CIRCLE TO CONTINUE OR HOME TO QUIT" ,SCREEN_WIDTH/2,210,JGETEXT_CENTER);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2227,11 +2227,6 @@ ostream& TriggeredAbility::toString(ostream& out) const
|
|||||||
//
|
//
|
||||||
InstantAbility::InstantAbility(int _id, MTGCardInstance * source):MTGAbility(_id, source){
|
InstantAbility::InstantAbility(int _id, MTGCardInstance * source):MTGAbility(_id, source){
|
||||||
init = 0;
|
init = 0;
|
||||||
for (int i = 0; i < 2; i++){
|
|
||||||
if(game->players[i]->game->inPlay->hasCard(source)){
|
|
||||||
//game->players[i]->game->putInGraveyard(source);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstantAbility::Update(float dt){
|
void InstantAbility::Update(float dt){
|
||||||
@@ -2242,11 +2237,6 @@ void InstantAbility::Update(float dt){
|
|||||||
|
|
||||||
InstantAbility::InstantAbility(int _id, MTGCardInstance * source, Damageable * _target):MTGAbility(_id, source, _target){
|
InstantAbility::InstantAbility(int _id, MTGCardInstance * source, Damageable * _target):MTGAbility(_id, source, _target){
|
||||||
init = 0;
|
init = 0;
|
||||||
for (int i = 0; i < 2; i++){
|
|
||||||
if(game->players[i]->game->inPlay->hasCard(source)){
|
|
||||||
//game->players[i]->game->putInGraveyard(source);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,6 @@ MTGCardInstance * MTGCardInstance::changeController(Player * newController){
|
|||||||
Player * originalOwner = controller();
|
Player * originalOwner = controller();
|
||||||
if (originalOwner == newController) return 0;
|
if (originalOwner == newController) return 0;
|
||||||
MTGCardInstance * copy = originalOwner->game->putInZone(this, originalOwner->game->inPlay, newController->game->inPlay);
|
MTGCardInstance * copy = originalOwner->game->putInZone(this, originalOwner->game->inPlay, newController->game->inPlay);
|
||||||
//summoningSickness = 1;
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ MTGGamePhase::MTGGamePhase(int id):ActionElement(id){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MTGGamePhase::Render(){
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MTGGamePhase::Update(float dt){
|
void MTGGamePhase::Update(float dt){
|
||||||
|
|
||||||
int newState = GameObserver::GetInstance()->getCurrentGamePhase();
|
int newState = GameObserver::GetInstance()->getCurrentGamePhase();
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ int ManaCost::pay(ManaCost * _cost){
|
|||||||
//TODO return 0 if can't afford the cost!
|
//TODO return 0 if can't afford the cost!
|
||||||
}
|
}
|
||||||
|
|
||||||
//return 1 if _cost can be paid with current data
|
//return 1 if _cost can be paid with current data, 0 otherwise
|
||||||
int ManaCost::canAfford(ManaCost * _cost){
|
int ManaCost::canAfford(ManaCost * _cost){
|
||||||
ManaCost * diff = Diff(_cost);
|
ManaCost * diff = Diff(_cost);
|
||||||
int positive = diff->isPositive();
|
int positive = diff->isPositive();
|
||||||
@@ -340,11 +340,6 @@ ManaCost * ManaCost::Diff(ManaCost * _cost){
|
|||||||
//Colorless mana, special case
|
//Colorless mana, special case
|
||||||
int colorless_idx = Constants::MTG_COLOR_ARTIFACT * 2 + 1;
|
int colorless_idx = Constants::MTG_COLOR_ARTIFACT * 2 + 1;
|
||||||
if (diff[colorless_idx] < 0){
|
if (diff[colorless_idx] < 0){
|
||||||
#if defined (WIN32) || defined (LINUX)
|
|
||||||
//char buf[4096], *p = buf;
|
|
||||||
//sprintf(buf, "--Diff color TEST %i : %i\n", i, cost[i]);
|
|
||||||
OutputDebugString("Colorless mana not enough\n");
|
|
||||||
#endif
|
|
||||||
for (int i=0; i < Constants::MTG_NB_COLORS; i++){
|
for (int i=0; i < Constants::MTG_NB_COLORS; i++){
|
||||||
if (diff[i*2 + 1] > 0){
|
if (diff[i*2 + 1] > 0){
|
||||||
if (diff[i*2 + 1] + diff[colorless_idx] > 0){
|
if (diff[i*2 + 1] + diff[colorless_idx] > 0){
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ OptionItem::OptionItem(string _id, string _displayValue, int _maxValue, int _inc
|
|||||||
y = 0;
|
y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionItem::~OptionItem(){
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void OptionItem::setData(){
|
void OptionItem::setData(){
|
||||||
GameOptions::GetInstance()->values[id] = GameOption(value);
|
GameOptions::GetInstance()->values[id] = GameOption(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,21 +67,8 @@ ManaCost * Player::getManaPool(){
|
|||||||
return manaPool;
|
return manaPool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Player::testLife(){
|
|
||||||
if (life <=0){
|
|
||||||
#if defined (WIN32) || defined (LINUX)
|
|
||||||
//char buf[4096], *p = buf;
|
|
||||||
//sprintf(buf, "--Diff color TEST %i : %i\n", i, cost[i]);
|
|
||||||
OutputDebugString("GAME OVER\n");
|
|
||||||
#endif
|
|
||||||
//return GameObserver::GetInstance()->endOfGame();
|
|
||||||
}
|
|
||||||
return life;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Player::afterDamage(){
|
int Player::afterDamage(){
|
||||||
return testLife();
|
return life;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Cleanup phase at the end of a turn
|
//Cleanup phase at the end of a turn
|
||||||
|
|||||||
Reference in New Issue
Block a user