Erwan
- fixed Beacon of unrest bug - Fixed Kraken's eye bug
This commit is contained in:
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 981 B |
@@ -872,7 +872,7 @@ name=Kraken's Eye
|
|||||||
mana={2}
|
mana={2}
|
||||||
type=Artifact
|
type=Artifact
|
||||||
text=Whenever a player casts a blue spell, you may gain 1 life.
|
text=Whenever a player casts a blue spell, you may gain 1 life.
|
||||||
auto=@movedTo(*[blue]|stack): may life:1
|
auto=@movedTo(*[blue]|stack):may life:1
|
||||||
rarity=U
|
rarity=U
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ ascendant_evincar2.txt
|
|||||||
ascendant_evincar3.txt
|
ascendant_evincar3.txt
|
||||||
ashen_firebeast.txt
|
ashen_firebeast.txt
|
||||||
ashen_firebeast2.txt
|
ashen_firebeast2.txt
|
||||||
|
beacon_of_unrest.txt
|
||||||
#befoul.txt
|
#befoul.txt
|
||||||
blessed_wine.txt
|
blessed_wine.txt
|
||||||
#blinking_spirit.txt
|
#blinking_spirit.txt
|
||||||
@@ -100,6 +101,8 @@ jump.txt
|
|||||||
keldon_warlord.txt
|
keldon_warlord.txt
|
||||||
keldon_warlord2.txt
|
keldon_warlord2.txt
|
||||||
kird_ape.txt
|
kird_ape.txt
|
||||||
|
kraken_eye.txt
|
||||||
|
kraken_eye2.txt
|
||||||
kudzu.txt
|
kudzu.txt
|
||||||
kudzu2.txt
|
kudzu2.txt
|
||||||
lhurgoyf.txt
|
lhurgoyf.txt
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#Bug: Beacon of unrest goes to graveyard
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
hand:beacon of unrest
|
||||||
|
manapool:{3}{B}{B}
|
||||||
|
[PLAYER2]
|
||||||
|
graveyard:shivan dragon
|
||||||
|
[DO]
|
||||||
|
beacon of unrest
|
||||||
|
shivan dragon
|
||||||
|
[ASSERT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:shivan dragon
|
||||||
|
library:beacon of unrest
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#Bug:Kraken's eye does nothing
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:kraken's eye
|
||||||
|
hand:air elemental
|
||||||
|
manapool:{3}{U}{U}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
air elemental
|
||||||
|
choice 0
|
||||||
|
[ASSERT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:kraken's eye,air elemental
|
||||||
|
life:21
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#Kraken eye works ok twice in a turn ?
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:kraken's eye,island
|
||||||
|
hand:air elemental,unsummon
|
||||||
|
manapool:{3}{U}{U}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
air elemental
|
||||||
|
choice 0
|
||||||
|
next
|
||||||
|
#begin
|
||||||
|
next
|
||||||
|
#attack
|
||||||
|
next
|
||||||
|
#blockers
|
||||||
|
next
|
||||||
|
#dmage
|
||||||
|
next
|
||||||
|
#end
|
||||||
|
next
|
||||||
|
#secondmain
|
||||||
|
island
|
||||||
|
unsummon
|
||||||
|
air elemental
|
||||||
|
choice 0
|
||||||
|
[ASSERT]
|
||||||
|
SECONDMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:kraken's eye,island
|
||||||
|
hand:air elemental
|
||||||
|
graveyard:unsummon
|
||||||
|
life:22
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
@@ -63,7 +63,7 @@ class AACounter: public ActivatedAbility{
|
|||||||
int nb;
|
int nb;
|
||||||
int power;
|
int power;
|
||||||
int toughness;
|
int toughness;
|
||||||
AACounter(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness, int nb,ManaCost * cost=NULL, int doTap = 1):ActivatedAbility(id,_source,cost,0,doTap),power(_power),toughness(_toughness),nb(nb){
|
AACounter(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness, int nb,ManaCost * cost=NULL, int doTap = 0):ActivatedAbility(id,_source,cost,0,doTap),power(_power),toughness(_toughness),nb(nb){
|
||||||
target=_target;
|
target=_target;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ class AACounter: public ActivatedAbility{
|
|||||||
|
|
||||||
class AAFizzler:public ActivatedAbility{
|
class AAFizzler:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
AAFizzler(int _id, MTGCardInstance * card, Spell * _target, ManaCost * _cost = NULL, int _tap = 1):ActivatedAbility(_id, card,_cost,0,_tap){
|
AAFizzler(int _id, MTGCardInstance * card, Spell * _target, ManaCost * _cost = NULL, int _tap = 0):ActivatedAbility(_id, card,_cost,0,_tap){
|
||||||
target = _target;
|
target = _target;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,11 +129,10 @@ class MayAbility:public MTGAbility{
|
|||||||
public:
|
public:
|
||||||
int triggered;
|
int triggered;
|
||||||
MTGAbility * ability;
|
MTGAbility * ability;
|
||||||
int deleteAbility;
|
MTGAbility * mClone;
|
||||||
MayAbility(int _id, MTGAbility * _ability, MTGCardInstance * _source):MTGAbility(_id,_source),ability(_ability){
|
MayAbility(int _id, MTGAbility * _ability, MTGCardInstance * _source):MTGAbility(_id,_source),ability(_ability){
|
||||||
triggered = 0;
|
triggered = 0;
|
||||||
ability->forceDestroy = 1;
|
mClone = NULL;
|
||||||
deleteAbility = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update(float dt){
|
void Update(float dt){
|
||||||
@@ -150,7 +149,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int testDestroy(){
|
int testDestroy(){
|
||||||
if (triggered && !game->mLayers->actionLayer()->menuObject){
|
if (triggered && !game->mLayers->actionLayer()->menuObject && game->mLayers->actionLayer()->getIndexOf(mClone) ==-1){
|
||||||
OutputDebugString("Destroy!\n");
|
OutputDebugString("Destroy!\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -165,22 +164,14 @@ public:
|
|||||||
|
|
||||||
int reactToTargetClick(Targetable * object){
|
int reactToTargetClick(Targetable * object){
|
||||||
OutputDebugString("ReactToTargetClick!\n");
|
OutputDebugString("ReactToTargetClick!\n");
|
||||||
deleteAbility = 0;
|
mClone = ability->clone();
|
||||||
game->addObserver(ability);
|
mClone->addToGame();
|
||||||
return ability->reactToTargetClick(object);
|
mClone->forceDestroy = 1;
|
||||||
|
return mClone->reactToTargetClick(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
~MayAbility(){
|
~MayAbility(){
|
||||||
if (deleteAbility) SAFE_DELETE(ability);
|
if (!isClone) SAFE_DELETE(ability);
|
||||||
}
|
|
||||||
|
|
||||||
virtual ostream& toString(ostream& out) const
|
|
||||||
{
|
|
||||||
out << "MayAbility ::: triggered : " << triggered
|
|
||||||
<< " ; ability : " << ability
|
|
||||||
<< " ; deleteAbility : " << deleteAbility
|
|
||||||
<< " (";
|
|
||||||
return MTGAbility::toString(out) << ")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MayAbility * clone() const{
|
MayAbility * clone() const{
|
||||||
@@ -241,7 +232,7 @@ class GenericActivatedAbility:public ActivatedAbility{
|
|||||||
MTGAbility * ability;
|
MTGAbility * ability;
|
||||||
int limitPerTurn;
|
int limitPerTurn;
|
||||||
int counters;
|
int counters;
|
||||||
GenericActivatedAbility(int _id, MTGCardInstance * card, MTGAbility * a, ManaCost * _cost, int _tap = 1, int limit = 0):ActivatedAbility(_id, card,_cost,0,_tap),ability(a),limitPerTurn(limit){
|
GenericActivatedAbility(int _id, MTGCardInstance * card, MTGAbility * a, ManaCost * _cost, int _tap = 0, int limit = 0):ActivatedAbility(_id, card,_cost,0,_tap),ability(a),limitPerTurn(limit){
|
||||||
counters = 0;
|
counters = 0;
|
||||||
target = ability->target;
|
target = ability->target;
|
||||||
}
|
}
|
||||||
@@ -321,7 +312,7 @@ public:
|
|||||||
class AADrawer:public ActivatedAbility{
|
class AADrawer:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int nbcards;
|
int nbcards;
|
||||||
AADrawer(int _id, MTGCardInstance * card,ManaCost * _cost, int _nbcards = 1, int _tap = 1):ActivatedAbility(_id, card,_cost,0,_tap),nbcards(_nbcards){
|
AADrawer(int _id, MTGCardInstance * card,ManaCost * _cost, int _nbcards = 1, int _tap = 0):ActivatedAbility(_id, card,_cost,0,_tap),nbcards(_nbcards){
|
||||||
}
|
}
|
||||||
|
|
||||||
int resolve(){
|
int resolve(){
|
||||||
@@ -346,7 +337,7 @@ class AADrawer:public ActivatedAbility{
|
|||||||
class AALifer:public ActivatedAbility{
|
class AALifer:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int life;
|
int life;
|
||||||
AALifer(int _id, MTGCardInstance * card, MTGCardInstance * _target, int life, ManaCost * _cost = NULL, int _tap = 1):ActivatedAbility(_id, card,_cost,0,_tap),life(life){
|
AALifer(int _id, MTGCardInstance * card, MTGCardInstance * _target, int life, ManaCost * _cost = NULL, int _tap = 0):ActivatedAbility(_id, card,_cost,0,_tap),life(life){
|
||||||
target = _target;
|
target = _target;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1663,7 +1654,7 @@ AADamager(int _id, MTGCardInstance * _source, Damageable * _target, int _damage
|
|||||||
class TADamager:public TargetAbility{
|
class TADamager:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
int damage;
|
int damage;
|
||||||
TADamager(int id, MTGCardInstance * card, ManaCost * _cost, int _damage, TargetChooser * _tc = NULL, int _tap = 1):TargetAbility(id,card, _tc, _cost,0,_tap),damage(_damage){
|
TADamager(int id, MTGCardInstance * card, ManaCost * _cost, int _damage, TargetChooser * _tc = NULL, int _tap = 0):TargetAbility(id,card, _tc, _cost,0,_tap),damage(_damage){
|
||||||
if (!tc) tc = NEW DamageableTargetChooser(card);
|
if (!tc) tc = NEW DamageableTargetChooser(card);
|
||||||
ability = NEW AADamager(id,card,NULL,damage);
|
ability = NEW AADamager(id,card,NULL,damage);
|
||||||
}
|
}
|
||||||
@@ -3689,7 +3680,7 @@ ALavaborn * clone() const{
|
|||||||
class AADepleter:public ActivatedAbility{
|
class AADepleter:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int nbcards;
|
int nbcards;
|
||||||
AADepleter(int _id, MTGCardInstance * card, Player * _target, int nbcards = 1, ManaCost * _cost=NULL, int _tap = 1):ActivatedAbility(_id,card, _cost,0,_tap),nbcards(nbcards){
|
AADepleter(int _id, MTGCardInstance * card, Player * _target, int nbcards = 1, ManaCost * _cost=NULL, int _tap = 0):ActivatedAbility(_id,card, _cost,0,_tap),nbcards(nbcards){
|
||||||
target = _target;
|
target = _target;
|
||||||
}
|
}
|
||||||
int resolve(){
|
int resolve(){
|
||||||
@@ -3719,7 +3710,7 @@ class AADepleter:public ActivatedAbility{
|
|||||||
class AARandomDiscarder:public ActivatedAbility{
|
class AARandomDiscarder:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int nbcards;
|
int nbcards;
|
||||||
AARandomDiscarder(int _id, MTGCardInstance * card, Player * _target, int nbcards = 1, ManaCost * _cost=NULL, int _tap = 1):ActivatedAbility(_id,card, _cost,0,_tap),nbcards(nbcards){
|
AARandomDiscarder(int _id, MTGCardInstance * card, Player * _target, int nbcards = 1, ManaCost * _cost=NULL, int _tap = 0):ActivatedAbility(_id,card, _cost,0,_tap),nbcards(nbcards){
|
||||||
target = _target;
|
target = _target;
|
||||||
}
|
}
|
||||||
int resolve(){
|
int resolve(){
|
||||||
|
|||||||
@@ -106,7 +106,10 @@ int Spell::resolve(){
|
|||||||
while (source->next){
|
while (source->next){
|
||||||
source = source->next;
|
source = source->next;
|
||||||
}
|
}
|
||||||
source = source->controller()->game->putInPlay(source);
|
if (!source->hasType("instant") && !source->hasType("sorcery")){
|
||||||
|
source = source->controller()->game->putInPlay(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Play SFX
|
//Play SFX
|
||||||
if (GameOptions::GetInstance()->values[OPTIONS_SFXVOLUME].getIntValue() > 0){
|
if (GameOptions::GetInstance()->values[OPTIONS_SFXVOLUME].getIntValue() > 0){
|
||||||
|
|||||||
@@ -816,16 +816,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
MTGCardInstance * card = spell->source;
|
MTGCardInstance * card = spell->source;
|
||||||
|
|
||||||
|
|
||||||
if (card->hasType("instant") || card->hasType("sorcery")){
|
|
||||||
MTGPlayerCards * zones = card->controller()->game;
|
|
||||||
zones->putInGraveyard(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spell->cursor==1) card->target = spell->getNextCardTarget();
|
if (spell->cursor==1) card->target = spell->getNextCardTarget();
|
||||||
_id = magicText(_id, spell);
|
_id = magicText(_id, spell);
|
||||||
|
|
||||||
GameObserver * game = GameObserver::GetInstance();
|
GameObserver * game = GameObserver::GetInstance();
|
||||||
|
MTGPlayerCards * zones = card->controller()->game;
|
||||||
|
|
||||||
|
|
||||||
int id = card->getId();
|
int id = card->getId();
|
||||||
@@ -1697,33 +1692,17 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
case 130553:// Beacon of Immortality
|
case 130553:// Beacon of Immortality
|
||||||
{
|
{
|
||||||
int life;
|
Player * player = spell->getNextPlayerTarget();
|
||||||
Player * player = spell->getNextPlayerTarget();
|
player->life+=player->life;
|
||||||
MTGLibrary * library = card->controller()->game->library;
|
zones->putInZone(card,zones->stack,zones->library);
|
||||||
life = player->life;
|
zones->library->shuffle();
|
||||||
player->life+=life;
|
break;
|
||||||
MTGGameZone * zones[] = {card->controller()->game->inPlay,card->controller()->game->graveyard,card->controller()->game->hand};
|
|
||||||
for (int k = 0; k < 3; k++){
|
|
||||||
MTGGameZone * zone = zones[k];
|
|
||||||
if (zone->hasCard(card)){
|
|
||||||
card->controller()->game->putInZone(card,zone,library);
|
|
||||||
library->shuffle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 135262:// Beacon of Destruction & unrest
|
case 135262:// Beacon of Destruction & unrest
|
||||||
{
|
{
|
||||||
MTGLibrary * library = card->controller()->game->library;
|
zones->putInZone(card,zones->stack,zones->library);
|
||||||
MTGGameZone * zones[] = {card->controller()->game->inPlay,card->controller()->game->graveyard,card->controller()->game->hand};
|
zones->library->shuffle();
|
||||||
for (int k = 0; k < 3; k++){
|
break;
|
||||||
MTGGameZone * zone = zones[k];
|
|
||||||
if (zone->hasCard(card)){
|
|
||||||
card->controller()->game->putInZone(card,zone,library);
|
|
||||||
library->shuffle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 129750: //Sudden Impact
|
case 129750: //Sudden Impact
|
||||||
{
|
{
|
||||||
@@ -1897,6 +1876,12 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
game->addObserver(NEW AStrongLandLinkCreature(_id, card,"plains"));
|
game->addObserver(NEW AStrongLandLinkCreature(_id, card,"plains"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (card->hasType("instant") || card->hasType("sorcery")){
|
||||||
|
MTGPlayerCards * zones = card->controller()->game;
|
||||||
|
zones->putInZone(card,zones->stack,zones->graveyard);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MTGAbility::MTGAbility(int id, MTGCardInstance * card):ActionElement(id){
|
MTGAbility::MTGAbility(int id, MTGCardInstance * card):ActionElement(id){
|
||||||
@@ -2363,7 +2348,10 @@ void GenericTriggeredAbility::Update(float dt){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int GenericTriggeredAbility::resolve(){
|
int GenericTriggeredAbility::resolve(){
|
||||||
return ability->resolve();
|
if (ability->oneShot) return ability->resolve();
|
||||||
|
MTGAbility * clone = ability->clone();
|
||||||
|
clone->addToGame();
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GenericTriggeredAbility::testDestroy(){
|
int GenericTriggeredAbility::testDestroy(){
|
||||||
|
|||||||
Reference in New Issue
Block a user