Erwan
-fix issue 275
This commit is contained in:
@@ -338,6 +338,7 @@ righteous_cause.txt
|
|||||||
rockslide_elemental.txt
|
rockslide_elemental.txt
|
||||||
rootwalla.txt
|
rootwalla.txt
|
||||||
royal_assassin.txt
|
royal_assassin.txt
|
||||||
|
sacred_foundry_i275.txt
|
||||||
safehold_duo.txt
|
safehold_duo.txt
|
||||||
scourge_of_kher_ridges.txt
|
scourge_of_kher_ridges.txt
|
||||||
scourge_of_kher_ridges2.txt
|
scourge_of_kher_ridges2.txt
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ class AAFizzler:public ActivatedAbility{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//MayAbility: May do something when comes into play (should be extended)
|
//MayAbility: May do ...
|
||||||
class MayAbility:public MTGAbility{
|
class MayAbility:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int triggered;
|
int triggered;
|
||||||
@@ -297,19 +297,15 @@ public:
|
|||||||
if (!triggered) return 0;
|
if (!triggered) return 0;
|
||||||
if (game->mLayers->actionLayer()->menuObject) return 0;
|
if (game->mLayers->actionLayer()->menuObject) return 0;
|
||||||
if (game->mLayers->actionLayer()->getIndexOf(mClone) !=-1) return 0;
|
if (game->mLayers->actionLayer()->getIndexOf(mClone) !=-1) return 0;
|
||||||
//if (game->mLayers->actionLayer()->getIndexOf(this) !=-1) return 0;
|
|
||||||
OutputDebugString("Destroy!\n");
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int isReactingToTargetClick(Targetable * card){
|
int isReactingToTargetClick(Targetable * card){
|
||||||
OutputDebugString("IsReacting ???\n");
|
|
||||||
if (card == source) return 1;
|
if (card == source) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int reactToTargetClick(Targetable * object){
|
int reactToTargetClick(Targetable * object){
|
||||||
OutputDebugString("ReactToTargetClick!\n");
|
|
||||||
mClone = ability->clone();
|
mClone = ability->clone();
|
||||||
mClone->addToGame();
|
mClone->addToGame();
|
||||||
mClone->forceDestroy = 1;
|
mClone->forceDestroy = 1;
|
||||||
|
|||||||
@@ -245,11 +245,7 @@ void ActionLayer::doReactTo(int menuIndex){
|
|||||||
char buf[4096];
|
char buf[4096];
|
||||||
sprintf(buf, "ACTIONLAYER doReact To %i\n",controlid);
|
sprintf(buf, "ACTIONLAYER doReact To %i\n",controlid);
|
||||||
OutputDebugString(buf);
|
OutputDebugString(buf);
|
||||||
if (controlid != -1){
|
ButtonPressed(0,controlid);
|
||||||
ActionElement * currentAction = (ActionElement *)mObjects[controlid];
|
|
||||||
currentAction->reactToTargetClick(menuObject);
|
|
||||||
}
|
|
||||||
menuObject = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,6 +253,8 @@ void ActionLayer::ButtonPressed(int controllerid, int controlid){
|
|||||||
if (controlid != -1){
|
if (controlid != -1){
|
||||||
ActionElement * currentAction = (ActionElement *)mObjects[controlid];
|
ActionElement * currentAction = (ActionElement *)mObjects[controlid];
|
||||||
currentAction->reactToTargetClick(menuObject);
|
currentAction->reactToTargetClick(menuObject);
|
||||||
|
}else{
|
||||||
|
GameObserver::GetInstance()->mLayers->stackLayer()->endOfInterruption();
|
||||||
}
|
}
|
||||||
menuObject = 0;
|
menuObject = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -34,26 +34,25 @@ void GuiAvatar::Render()
|
|||||||
|
|
||||||
r->FillRect(actX+2, actY+2, Width * actZ, Height *actZ, ARGB((int)(actA / 2), 0, 0, 0));
|
r->FillRect(actX+2, actY+2, Width * actZ, Height *actZ, ARGB((int)(actA / 2), 0, 0, 0));
|
||||||
|
|
||||||
|
float x0 = actX;
|
||||||
|
float y0 = actY;
|
||||||
|
|
||||||
JQuad * quad = player->mAvatar;
|
JQuad * quad = player->mAvatar;
|
||||||
if (quad)
|
if (quad)
|
||||||
{
|
{
|
||||||
|
if (corner == BOTTOM_RIGHT){
|
||||||
|
x0 -= quad->mWidth * actZ;
|
||||||
|
y0 -= quad->mHeight * actZ;
|
||||||
|
}
|
||||||
switch (corner)
|
switch (corner)
|
||||||
{
|
{
|
||||||
case TOP_LEFT : quad->SetHotSpot(0, 0); break;
|
case TOP_LEFT : quad->SetHotSpot(0, 0); break;
|
||||||
case BOTTOM_RIGHT : quad->SetHotSpot(35, 50); break;
|
case BOTTOM_RIGHT : quad->SetHotSpot(35, 50); break;
|
||||||
}
|
}
|
||||||
quad->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed));
|
quad->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed));
|
||||||
r->RenderQuad(quad, actX, actY, actT, actZ, actZ);
|
r->RenderQuad(quad, actX, actY, actT, actZ, actZ);
|
||||||
if (mHasFocus){
|
if (mHasFocus){
|
||||||
switch (corner)
|
r->FillRect(x0,x0,quad->mWidth * actZ,quad->mHeight * actZ, ARGB(abs(128 - wave),255,255,255));
|
||||||
{
|
|
||||||
case TOP_LEFT :
|
|
||||||
r->FillRect(actX,actY,quad->mWidth * actZ,quad->mHeight * actZ, ARGB(abs(128 - wave),255,255,255));
|
|
||||||
break;
|
|
||||||
case BOTTOM_RIGHT :
|
|
||||||
r->FillRect(actX - quad->mWidth * actZ,actY - quad->mHeight * actZ,quad->mWidth * actZ,quad->mHeight * actZ, ARGB(abs(128 - wave),255,255,255));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,12 +61,15 @@ void GuiAvatar::Render()
|
|||||||
if (avatarRed > 255)
|
if (avatarRed > 255)
|
||||||
avatarRed = 255;
|
avatarRed = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (game->currentPlayer == player)
|
if (game->currentPlayer == player)
|
||||||
r->DrawRect(actX-1, actY-1, 37 * actZ, 52*actZ, ARGB((int)actA, 0, 255, 0));
|
r->DrawRect(x0-1, y0-1, 36 * actZ, 51*actZ, ARGB((int)actA, 0, 255, 0));
|
||||||
else if (game->currentActionPlayer == player)
|
else if (game->currentActionPlayer == player)
|
||||||
r->DrawRect(actX, actY, 35 *actZ, 50 * actZ, ARGB((int)actA, 0, 0, 255));
|
r->DrawRect(x0, y0, 34 *actZ, 49 * actZ, ARGB((int)actA, 0, 0, 255));
|
||||||
if (game->isInterrupting == player)
|
if (game->isInterrupting == player)
|
||||||
r->DrawRect(actX, actY, 35 * actZ, 50*actZ, ARGB((int)actA, 255, 0, 0));
|
r->DrawRect(x0, y0, 34 * actZ, 49*actZ, ARGB((int)actA, 255, 0, 0));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user