J :
* Remove useless whitespace & carriage returns, reindent.
This commit is contained in:
+110
-111
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#ifndef _CARDS_H_
|
#ifndef _CARDS_H_
|
||||||
#define _CARDS_H_
|
#define _CARDS_H_
|
||||||
|
|
||||||
@@ -18,14 +17,14 @@
|
|||||||
using std::map;
|
using std::map;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Generic classes
|
Generic classes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//Drawer, allows to draw a card for a cost:
|
//Drawer, allows to draw a card for a cost:
|
||||||
|
|
||||||
class ADrawer:public ActivatedAbility{
|
class ADrawer:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int nbcards;
|
int nbcards;
|
||||||
ADrawer(int _id, MTGCardInstance * card,ManaCost * _cost, int _nbcards = 1, int _tap = 1):ActivatedAbility(_id, card,_cost,0,_tap),nbcards(_nbcards){
|
ADrawer(int _id, MTGCardInstance * card,ManaCost * _cost, int _nbcards = 1, int _tap = 1):ActivatedAbility(_id, card,_cost,0,_tap),nbcards(_nbcards){
|
||||||
}
|
}
|
||||||
@@ -45,7 +44,7 @@ public:
|
|||||||
|
|
||||||
//Destroyer. TargetAbility
|
//Destroyer. TargetAbility
|
||||||
class ADestroyer:public TargetAbility{
|
class ADestroyer:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
int bury;
|
int bury;
|
||||||
ADestroyer(int _id, MTGCardInstance * _source, TargetChooser * _tc = NULL, int _bury = 0):TargetAbility(_id,_source, tc),bury(_bury){
|
ADestroyer(int _id, MTGCardInstance * _source, TargetChooser * _tc = NULL, int _bury = 0):TargetAbility(_id,_source, tc),bury(_bury){
|
||||||
if (!tc) tc = NEW CreatureTargetChooser();
|
if (!tc) tc = NEW CreatureTargetChooser();
|
||||||
@@ -72,7 +71,7 @@ public:
|
|||||||
|
|
||||||
//Destroyer. TargetAbility
|
//Destroyer. TargetAbility
|
||||||
class ABurier:public ADestroyer{
|
class ABurier:public ADestroyer{
|
||||||
public:
|
public:
|
||||||
ABurier(int _id, MTGCardInstance * _source, TargetChooser * _tc = NULL):ADestroyer(_id,_source, tc,1){
|
ABurier(int _id, MTGCardInstance * _source, TargetChooser * _tc = NULL):ADestroyer(_id,_source, tc,1){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,13 +82,13 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/*Changes one of the basic abilities of target
|
/*Changes one of the basic abilities of target
|
||||||
source : spell
|
source : spell
|
||||||
target : spell target (creature)
|
target : spell target (creature)
|
||||||
modifier : 1 to add the ability, 0 to remove it
|
modifier : 1 to add the ability, 0 to remove it
|
||||||
_ability : Id of the ability, as described in mtgdefinitions
|
_ability : Id of the ability, as described in mtgdefinitions
|
||||||
*/
|
*/
|
||||||
class ABasicAbilityModifier:public MTGAbility{
|
class ABasicAbilityModifier:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int modifier;
|
int modifier;
|
||||||
int ability;
|
int ability;
|
||||||
int value_before_modification;
|
int value_before_modification;
|
||||||
@@ -157,7 +156,7 @@ class ABasicAbilityModifierUntilEOT:public TargetAbility{
|
|||||||
|
|
||||||
/*Instants that modifies a basic ability until end of turn */
|
/*Instants that modifies a basic ability until end of turn */
|
||||||
class AInstantBasicAbilityModifierUntilEOT: public InstantAbility{
|
class AInstantBasicAbilityModifierUntilEOT: public InstantAbility{
|
||||||
public:
|
public:
|
||||||
int stateBeforeActivation;
|
int stateBeforeActivation;
|
||||||
int ability;
|
int ability;
|
||||||
AInstantBasicAbilityModifierUntilEOT(int _id, MTGCardInstance * _source, MTGCardInstance * _target, int _ability, int value):InstantAbility(_id, _source, _target),ability(_ability){
|
AInstantBasicAbilityModifierUntilEOT(int _id, MTGCardInstance * _source, MTGCardInstance * _target, int _ability, int value):InstantAbility(_id, _source, _target),ability(_ability){
|
||||||
@@ -174,7 +173,7 @@ public:
|
|||||||
|
|
||||||
//Alteration of Ability until of turn (Aura)
|
//Alteration of Ability until of turn (Aura)
|
||||||
class ABasicAbilityAuraModifierUntilEOT: public ActivatedAbility{
|
class ABasicAbilityAuraModifierUntilEOT: public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int stateBeforeActivation;
|
int stateBeforeActivation;
|
||||||
int ability;
|
int ability;
|
||||||
int value;
|
int value;
|
||||||
@@ -208,7 +207,7 @@ public:
|
|||||||
|
|
||||||
/*Gives life each time a spell matching CardDescriptor's criteria are match . Optionnal manacost*/
|
/*Gives life each time a spell matching CardDescriptor's criteria are match . Optionnal manacost*/
|
||||||
class ASpellCastLife:public MTGAbility{
|
class ASpellCastLife:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
CardDescriptor trigger;
|
CardDescriptor trigger;
|
||||||
ManaCost * cost;
|
ManaCost * cost;
|
||||||
int life;
|
int life;
|
||||||
@@ -248,7 +247,7 @@ public:
|
|||||||
|
|
||||||
//Allows to untap at any moment for an amount of mana
|
//Allows to untap at any moment for an amount of mana
|
||||||
class AUnBlocker:public MTGAbility{
|
class AUnBlocker:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
ManaCost * cost;
|
ManaCost * cost;
|
||||||
AUnBlocker(int id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost):MTGAbility(id, _source, _target), cost(_cost){
|
AUnBlocker(int id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost):MTGAbility(id, _source, _target), cost(_cost){
|
||||||
}
|
}
|
||||||
@@ -273,7 +272,7 @@ public:
|
|||||||
|
|
||||||
//Allows to untap target card once per turn for a manaCost
|
//Allows to untap target card once per turn for a manaCost
|
||||||
class AUntaperOnceDuringTurn:public AUnBlocker{
|
class AUntaperOnceDuringTurn:public AUnBlocker{
|
||||||
public:
|
public:
|
||||||
int untappedThisTurn;
|
int untappedThisTurn;
|
||||||
int onlyPlayerTurn;
|
int onlyPlayerTurn;
|
||||||
AUntaperOnceDuringTurn(int id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost, int _onlyPlayerTurn = 1):AUnBlocker(id, _source, _target, _cost){
|
AUntaperOnceDuringTurn(int id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost, int _onlyPlayerTurn = 1):AUnBlocker(id, _source, _target, _cost){
|
||||||
@@ -300,7 +299,7 @@ public:
|
|||||||
|
|
||||||
//Alteration of Power and Toughness (enchantments)
|
//Alteration of Power and Toughness (enchantments)
|
||||||
class APowerToughnessModifier: public MTGAbility{
|
class APowerToughnessModifier: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
APowerToughnessModifier(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness):MTGAbility(id,_source,_target),power(_power),toughness(_toughness){
|
APowerToughnessModifier(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness):MTGAbility(id,_source,_target),power(_power),toughness(_toughness){
|
||||||
_target->power += power;
|
_target->power += power;
|
||||||
@@ -316,7 +315,7 @@ public:
|
|||||||
|
|
||||||
// Permanent life alteration evry turn of the target's controller. Useful only for unstable mutation currently
|
// Permanent life alteration evry turn of the target's controller. Useful only for unstable mutation currently
|
||||||
class APowerToughnessModifierRegularCounter:public MTGAbility{
|
class APowerToughnessModifierRegularCounter:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
int phase;
|
int phase;
|
||||||
APowerToughnessModifierRegularCounter(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _phase, int _power, int _toughness):MTGAbility(id,_source,_target),power(_power),toughness(_toughness), phase(_phase){
|
APowerToughnessModifierRegularCounter(int id, MTGCardInstance * _source, MTGCardInstance * _target, int _phase, int _power, int _toughness):MTGAbility(id,_source,_target),power(_power),toughness(_toughness), phase(_phase){
|
||||||
@@ -335,7 +334,7 @@ public:
|
|||||||
//Alteration of Power and Toughness until end of turn (TargetAbility)
|
//Alteration of Power and Toughness until end of turn (TargetAbility)
|
||||||
// Gives +n/+m until end of turn to any card that's a target
|
// Gives +n/+m until end of turn to any card that's a target
|
||||||
class ATargetterPowerToughnessModifierUntilEOT: public TargetAbility{
|
class ATargetterPowerToughnessModifierUntilEOT: public TargetAbility{
|
||||||
public:
|
public:
|
||||||
MTGCardInstance * mTargets[50];
|
MTGCardInstance * mTargets[50];
|
||||||
int nbTargets;
|
int nbTargets;
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
@@ -378,7 +377,7 @@ public:
|
|||||||
|
|
||||||
//Alteration of Power and Toughness until end of turn (Aura)
|
//Alteration of Power and Toughness until end of turn (Aura)
|
||||||
class APowerToughnessModifierUntilEndOfTurn: public MTGAbility{
|
class APowerToughnessModifierUntilEndOfTurn: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
int counters;
|
int counters;
|
||||||
int maxcounters;
|
int maxcounters;
|
||||||
@@ -419,7 +418,7 @@ public:
|
|||||||
|
|
||||||
//Alteration of Power and toughness until end of turn (instant)
|
//Alteration of Power and toughness until end of turn (instant)
|
||||||
class AInstantPowerToughnessModifierUntilEOT: public InstantAbility{
|
class AInstantPowerToughnessModifierUntilEOT: public InstantAbility{
|
||||||
public:
|
public:
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
AInstantPowerToughnessModifierUntilEOT(int _id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness): InstantAbility(_id, _source, _target), power(_power), toughness(_toughness){
|
AInstantPowerToughnessModifierUntilEOT(int _id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness): InstantAbility(_id, _source, _target), power(_power), toughness(_toughness){
|
||||||
}
|
}
|
||||||
@@ -439,7 +438,7 @@ public:
|
|||||||
};
|
};
|
||||||
//Untap Blockers with simple Mana Mechanism
|
//Untap Blockers with simple Mana Mechanism
|
||||||
class AUntapManaBlocker: public Blocker{
|
class AUntapManaBlocker: public Blocker{
|
||||||
public:
|
public:
|
||||||
AUntapManaBlocker(int id, MTGCardInstance * card, ManaCost * _cost):Blocker(id, card, _cost){
|
AUntapManaBlocker(int id, MTGCardInstance * card, ManaCost * _cost):Blocker(id, card, _cost){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,7 +449,7 @@ public:
|
|||||||
/* Spell Counters (Enchantment) for a mana cost */
|
/* Spell Counters (Enchantment) for a mana cost */
|
||||||
//LifeForce
|
//LifeForce
|
||||||
class ASpellCounterEnchantment:public TargetAbility{
|
class ASpellCounterEnchantment:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ASpellCounterEnchantment(int _id, MTGCardInstance * _source, ManaCost * _cost,int color = -1, int _tap = 0):TargetAbility(_id,_source,NEW SpellTargetChooser(_source,color),_cost,0,_tap){
|
ASpellCounterEnchantment(int _id, MTGCardInstance * _source, ManaCost * _cost,int color = -1, int _tap = 0):TargetAbility(_id,_source,NEW SpellTargetChooser(_source,color),_cost,0,_tap){
|
||||||
}
|
}
|
||||||
@@ -472,14 +471,14 @@ public:
|
|||||||
other solutions need to be provided for abilities that add mana (ex: mana flare)
|
other solutions need to be provided for abilities that add mana (ex: mana flare)
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
Currently the mana is added to the pool AFTER the animation
|
Currently the mana is added to the pool AFTER the animation
|
||||||
This is VERY BAD, since we don't have any control on the duration of the animation. This can lead to bugs with
|
This is VERY BAD, since we don't have any control on the duration of the animation. This can lead to bugs with
|
||||||
the AI, who is expecting to have the mana in its manapool right after clicking the land card !!!
|
the AI, who is expecting to have the mana in its manapool right after clicking the land card !!!
|
||||||
The sum of "dt" has to be 0.25 for the mana to be in the manapool currently
|
The sum of "dt" has to be 0.25 for the mana to be in the manapool currently
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AManaProducer: public MTGAbility{
|
class AManaProducer: public MTGAbility{
|
||||||
protected:
|
protected:
|
||||||
ManaCost * cost;
|
ManaCost * cost;
|
||||||
ManaCost * output;
|
ManaCost * output;
|
||||||
string menutext;
|
string menutext;
|
||||||
@@ -488,7 +487,7 @@ protected:
|
|||||||
Player * controller;
|
Player * controller;
|
||||||
|
|
||||||
hgeParticleSystem * mParticleSys;
|
hgeParticleSystem * mParticleSys;
|
||||||
public:
|
public:
|
||||||
AManaProducer(int id, MTGCardInstance * card, ManaCost * _output, ManaCost * _cost = NULL ):MTGAbility(id, card){
|
AManaProducer(int id, MTGCardInstance * card, ManaCost * _output, ManaCost * _cost = NULL ):MTGAbility(id, card){
|
||||||
LOG("==Creating ManaProducer Object");
|
LOG("==Creating ManaProducer Object");
|
||||||
cost = _cost;
|
cost = _cost;
|
||||||
@@ -629,7 +628,7 @@ public:
|
|||||||
|
|
||||||
/* Lifelink Ability */
|
/* Lifelink Ability */
|
||||||
class ALifeLink:public MTGAbility{
|
class ALifeLink:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int nbdamagesthisturn;
|
int nbdamagesthisturn;
|
||||||
Damage * lastDamage;
|
Damage * lastDamage;
|
||||||
ALifeLink(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
ALifeLink(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
@@ -660,7 +659,7 @@ public:
|
|||||||
|
|
||||||
//Circle of Protections
|
//Circle of Protections
|
||||||
class ACircleOfProtection: public TargetAbility{
|
class ACircleOfProtection: public TargetAbility{
|
||||||
public:
|
public:
|
||||||
ACircleOfProtection(int _id, MTGCardInstance * source, int _color):TargetAbility(_id,source,NEW DamageTargetChooser(source,_color),NEW ManaCost(),0,0){
|
ACircleOfProtection(int _id, MTGCardInstance * source, int _color):TargetAbility(_id,source,NEW DamageTargetChooser(source,_color),NEW ManaCost(),0,0){
|
||||||
cost->add(MTG_COLOR_ARTIFACT,1);
|
cost->add(MTG_COLOR_ARTIFACT,1);
|
||||||
}
|
}
|
||||||
@@ -675,7 +674,7 @@ public:
|
|||||||
|
|
||||||
//Basic regeneration mechanism for a Mana cost
|
//Basic regeneration mechanism for a Mana cost
|
||||||
class AStandardRegenerate:public ActivatedAbility{
|
class AStandardRegenerate:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
AStandardRegenerate(int _id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost):ActivatedAbility(_id,_source,_cost,0,0){
|
AStandardRegenerate(int _id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost):ActivatedAbility(_id,_source,_cost,0,0){
|
||||||
target = _target;
|
target = _target;
|
||||||
}
|
}
|
||||||
@@ -704,7 +703,7 @@ public:
|
|||||||
|
|
||||||
/*Gives protection to a target */
|
/*Gives protection to a target */
|
||||||
class AProtectionFrom:public MTGAbility{
|
class AProtectionFrom:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
CardDescriptor * cd;
|
CardDescriptor * cd;
|
||||||
void initProtection(){
|
void initProtection(){
|
||||||
((MTGCardInstance *)target)->addProtection(cd);
|
((MTGCardInstance *)target)->addProtection(cd);
|
||||||
@@ -728,7 +727,7 @@ public:
|
|||||||
|
|
||||||
//Aura Enchantments that provide controller of target life or damages at a given phase of their turn
|
//Aura Enchantments that provide controller of target life or damages at a given phase of their turn
|
||||||
class ARegularLifeModifierAura:public MTGAbility{
|
class ARegularLifeModifierAura:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int life;
|
int life;
|
||||||
int phase;
|
int phase;
|
||||||
int onlyIfTargetTapped;
|
int onlyIfTargetTapped;
|
||||||
@@ -751,7 +750,7 @@ public:
|
|||||||
|
|
||||||
//ExaltedAbility (Shards of Alara)
|
//ExaltedAbility (Shards of Alara)
|
||||||
class AExalted:public ListMaintainerAbility{
|
class AExalted:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
MTGCardInstance * luckyWinner;
|
MTGCardInstance * luckyWinner;
|
||||||
AExalted(int _id, MTGCardInstance * _source, int _power = 1, int _toughness = 1):ListMaintainerAbility(_id, _source),power(_power),toughness(_toughness){
|
AExalted(int _id, MTGCardInstance * _source, int _power = 1, int _toughness = 1):ListMaintainerAbility(_id, _source),power(_power),toughness(_toughness){
|
||||||
@@ -793,7 +792,7 @@ public:
|
|||||||
|
|
||||||
//ExaltedAbility for basic abilities (Shards of Alara)
|
//ExaltedAbility for basic abilities (Shards of Alara)
|
||||||
class AExaltedAbility:public ListMaintainerAbility{
|
class AExaltedAbility:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int ability;
|
int ability;
|
||||||
MTGCardInstance * luckyWinner;
|
MTGCardInstance * luckyWinner;
|
||||||
AExaltedAbility(int _id, MTGCardInstance * _source, int _ability):ListMaintainerAbility(_id, _source),ability(_ability){
|
AExaltedAbility(int _id, MTGCardInstance * _source, int _ability):ListMaintainerAbility(_id, _source),ability(_ability){
|
||||||
@@ -830,7 +829,7 @@ public:
|
|||||||
|
|
||||||
//Converts lands to creatures (Kormus bell, Living lands)
|
//Converts lands to creatures (Kormus bell, Living lands)
|
||||||
class AConvertLandToCreatures:public ListMaintainerAbility{
|
class AConvertLandToCreatures:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int type;
|
int type;
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
AConvertLandToCreatures(int _id, MTGCardInstance * _source, const char * _type, int _power = 1, int _toughness = 1):ListMaintainerAbility(_id, _source),power(_power),toughness(_toughness){
|
AConvertLandToCreatures(int _id, MTGCardInstance * _source, const char * _type, int _power = 1, int _toughness = 1):ListMaintainerAbility(_id, _source),power(_power),toughness(_toughness){
|
||||||
@@ -859,7 +858,7 @@ public:
|
|||||||
|
|
||||||
//Lords (Merfolk lord...) give power and toughness to OTHER creatures of their type, they can give them special abilities, regeneration
|
//Lords (Merfolk lord...) give power and toughness to OTHER creatures of their type, they can give them special abilities, regeneration
|
||||||
class ALord:public ListMaintainerAbility{
|
class ALord:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
string type;
|
string type;
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
int ability;
|
int ability;
|
||||||
@@ -907,7 +906,7 @@ public:
|
|||||||
|
|
||||||
//Lords (Merfolk lord...) give power and toughness to OTHER creatures of a given color, they can give them special abilities, regeneration
|
//Lords (Merfolk lord...) give power and toughness to OTHER creatures of a given color, they can give them special abilities, regeneration
|
||||||
class AColorLord:public ListMaintainerAbility{
|
class AColorLord:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int color;
|
int color;
|
||||||
int notcolor;
|
int notcolor;
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
@@ -962,7 +961,7 @@ public:
|
|||||||
|
|
||||||
/* Standard Damager, can choose a NEW target each time the price is paid */
|
/* Standard Damager, can choose a NEW target each time the price is paid */
|
||||||
class ADamager:public TargetAbility{
|
class ADamager:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
int damage;
|
int damage;
|
||||||
ADamager(int id, MTGCardInstance * card, ManaCost * _cost, int _damage, TargetChooser * _tc = NULL, int _tap = 1):TargetAbility(id,card, _tc, _cost,0,_tap),damage(_damage){
|
ADamager(int id, MTGCardInstance * card, ManaCost * _cost, int _damage, TargetChooser * _tc = NULL, int _tap = 1):TargetAbility(id,card, _tc, _cost,0,_tap),damage(_damage){
|
||||||
if (!tc) tc = NEW DamageableTargetChooser(card);
|
if (!tc) tc = NEW DamageableTargetChooser(card);
|
||||||
@@ -982,7 +981,7 @@ public:
|
|||||||
|
|
||||||
/* Can tap a target for a cost */
|
/* Can tap a target for a cost */
|
||||||
class ATapper:public TargetAbility{
|
class ATapper:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
int damage;
|
int damage;
|
||||||
ATapper(int id, MTGCardInstance * card, ManaCost * _cost, TargetChooser * _chooser):TargetAbility(id,card, _chooser, _cost){
|
ATapper(int id, MTGCardInstance * card, ManaCost * _cost, TargetChooser * _chooser):TargetAbility(id,card, _chooser, _cost){
|
||||||
}
|
}
|
||||||
@@ -1003,7 +1002,7 @@ public:
|
|||||||
|
|
||||||
//Ability to untap a target
|
//Ability to untap a target
|
||||||
class AUntaper:public TargetAbility{
|
class AUntaper:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
AUntaper(int _id, MTGCardInstance * card, ManaCost * _manacost, TargetChooser * _tc):TargetAbility(_id,card,_tc,_manacost){
|
AUntaper(int _id, MTGCardInstance * card, ManaCost * _manacost, TargetChooser * _tc):TargetAbility(_id,card,_tc,_manacost){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1025,7 +1024,7 @@ public:
|
|||||||
// Add life of gives damage if a given zone has more or less than [condition] cards at the beginning of [phase]
|
// Add life of gives damage if a given zone has more or less than [condition] cards at the beginning of [phase]
|
||||||
//Ex : the rack, ivory tower...
|
//Ex : the rack, ivory tower...
|
||||||
class ALifeZoneLink:public MTGAbility{
|
class ALifeZoneLink:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int phase;
|
int phase;
|
||||||
int condition;
|
int condition;
|
||||||
int life;
|
int life;
|
||||||
@@ -1067,7 +1066,7 @@ public:
|
|||||||
//Creatures that cannot attack if opponent has not a given type of land, and die if controller has not this type of land
|
//Creatures that cannot attack if opponent has not a given type of land, and die if controller has not this type of land
|
||||||
//Ex : pirate ship...
|
//Ex : pirate ship...
|
||||||
class AStrongLandLinkCreature: public MTGAbility{
|
class AStrongLandLinkCreature: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
char land[20];
|
char land[20];
|
||||||
AStrongLandLinkCreature(int _id, MTGCardInstance * _source, const char * _land):MTGAbility(_id, _source){
|
AStrongLandLinkCreature(int _id, MTGCardInstance * _source, const char * _land):MTGAbility(_id, _source){
|
||||||
sprintf(land,"%s",_land);
|
sprintf(land,"%s",_land);
|
||||||
@@ -1090,7 +1089,7 @@ public:
|
|||||||
|
|
||||||
//Steal control of a target
|
//Steal control of a target
|
||||||
class AControlStealAura: public MTGAbility{
|
class AControlStealAura: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
Player * originalController;
|
Player * originalController;
|
||||||
AControlStealAura(int _id , MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source, _target){
|
AControlStealAura(int _id , MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source, _target){
|
||||||
originalController = _target->controller();
|
originalController = _target->controller();
|
||||||
@@ -1112,7 +1111,7 @@ public:
|
|||||||
|
|
||||||
//Same as StealControl Aura ???? Obsolete ?
|
//Same as StealControl Aura ???? Obsolete ?
|
||||||
class ATakeControlAura:public MTGAbility{
|
class ATakeControlAura:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
Player * previousController;
|
Player * previousController;
|
||||||
ATakeControlAura(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source,_target){
|
ATakeControlAura(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source,_target){
|
||||||
previousController = _target->controller();
|
previousController = _target->controller();
|
||||||
@@ -1133,7 +1132,7 @@ public:
|
|||||||
//Creatures that kill their blockers
|
//Creatures that kill their blockers
|
||||||
//Ex : Cockatrice
|
//Ex : Cockatrice
|
||||||
class AOldSchoolDeathtouch:public MTGAbility{
|
class AOldSchoolDeathtouch:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
MTGCardInstance * opponents[20];
|
MTGCardInstance * opponents[20];
|
||||||
int nbOpponents;
|
int nbOpponents;
|
||||||
AOldSchoolDeathtouch(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AOldSchoolDeathtouch(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
@@ -1170,7 +1169,7 @@ public:
|
|||||||
|
|
||||||
//Converts a card to a creature (Aura)
|
//Converts a card to a creature (Aura)
|
||||||
class AConvertToCreatureAura:public MTGAbility{
|
class AConvertToCreatureAura:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
AConvertToCreatureAura(int _id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness):MTGAbility(_id, _source, _target){
|
AConvertToCreatureAura(int _id, MTGCardInstance * _source, MTGCardInstance * _target, int _power, int _toughness):MTGAbility(_id, _source, _target){
|
||||||
_target->setSubtype("creature");
|
_target->setSubtype("creature");
|
||||||
_target->power = _power;
|
_target->power = _power;
|
||||||
@@ -1188,7 +1187,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Specific Classes
|
Specific Classes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 1092 Specific to Aladdin's Lamp
|
// 1092 Specific to Aladdin's Lamp
|
||||||
@@ -1253,7 +1252,7 @@ class AAladdinsLamp: public TargetAbility{
|
|||||||
|
|
||||||
//Ankh of Mishra
|
//Ankh of Mishra
|
||||||
class AAnkhOfMishra: public MTGAbility{
|
class AAnkhOfMishra: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int playerLands[2];
|
int playerLands[2];
|
||||||
AAnkhOfMishra(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
AAnkhOfMishra(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
||||||
for (int i=0; i< 2; i++){
|
for (int i=0; i< 2; i++){
|
||||||
@@ -1276,7 +1275,7 @@ public:
|
|||||||
|
|
||||||
// Armageddon Clock
|
// Armageddon Clock
|
||||||
class AArmageddonClock:public MTGAbility{
|
class AArmageddonClock:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int counters;
|
int counters;
|
||||||
ManaCost cost;
|
ManaCost cost;
|
||||||
AArmageddonClock(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
AArmageddonClock(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
||||||
@@ -1315,7 +1314,7 @@ public:
|
|||||||
|
|
||||||
//Black Vise
|
//Black Vise
|
||||||
class ABlackVise: public MTGAbility{
|
class ABlackVise: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int nbcards;
|
int nbcards;
|
||||||
ABlackVise(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
ABlackVise(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
||||||
nbcards = game->opponent()->game->hand->nb_cards;
|
nbcards = game->opponent()->game->hand->nb_cards;
|
||||||
@@ -1334,7 +1333,7 @@ public:
|
|||||||
|
|
||||||
//Channel
|
//Channel
|
||||||
class AChannel:public ActivatedAbility{
|
class AChannel:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
AChannel(int _id, MTGCardInstance * card):ActivatedAbility(_id, card,0,0,0){
|
AChannel(int _id, MTGCardInstance * card):ActivatedAbility(_id, card,0,0,0){
|
||||||
}
|
}
|
||||||
@@ -1363,7 +1362,7 @@ public:
|
|||||||
|
|
||||||
// Clockwork Beast
|
// Clockwork Beast
|
||||||
class AClockworkBeast:public MTGAbility{
|
class AClockworkBeast:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int counters;
|
int counters;
|
||||||
ManaCost cost;
|
ManaCost cost;
|
||||||
AClockworkBeast(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
AClockworkBeast(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
||||||
@@ -1402,7 +1401,7 @@ public:
|
|||||||
|
|
||||||
//1102: Conservator
|
//1102: Conservator
|
||||||
class AConservator: public MTGAbility{
|
class AConservator: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int canprevent;
|
int canprevent;
|
||||||
ManaCost cost;
|
ManaCost cost;
|
||||||
AConservator(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AConservator(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
@@ -1470,7 +1469,7 @@ public:
|
|||||||
|
|
||||||
//Creature bond
|
//Creature bond
|
||||||
class ACreatureBond:public TriggeredAbility{
|
class ACreatureBond:public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
int resolved;
|
int resolved;
|
||||||
ACreatureBond(int _id, MTGCardInstance * _source, MTGCardInstance * _target):TriggeredAbility(_id,_source,_target){
|
ACreatureBond(int _id, MTGCardInstance * _source, MTGCardInstance * _target):TriggeredAbility(_id,_source,_target){
|
||||||
resolved = 1;
|
resolved = 1;
|
||||||
@@ -1503,7 +1502,7 @@ public:
|
|||||||
|
|
||||||
//1105: Dingus Egg
|
//1105: Dingus Egg
|
||||||
class ADingusEgg: public MTGAbility{
|
class ADingusEgg: public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int playerLands[2];
|
int playerLands[2];
|
||||||
ADingusEgg(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
ADingusEgg(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
||||||
for (int i=0; i< 2; i++){
|
for (int i=0; i< 2; i++){
|
||||||
@@ -1526,7 +1525,7 @@ public:
|
|||||||
|
|
||||||
//1106 DisruptingScepter
|
//1106 DisruptingScepter
|
||||||
class ADisruptingScepter:public TargetAbility{
|
class ADisruptingScepter:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
ADisruptingScepter(int id, MTGCardInstance * _source):TargetAbility(id,_source){
|
ADisruptingScepter(int id, MTGCardInstance * _source):TargetAbility(id,_source){
|
||||||
MTGGameZone * zones[] = {GameObserver::GetInstance()->opponent()->game->hand};
|
MTGGameZone * zones[] = {GameObserver::GetInstance()->opponent()->game->hand};
|
||||||
tc = NEW TargetZoneChooser(zones,1,_source);
|
tc = NEW TargetZoneChooser(zones,1,_source);
|
||||||
@@ -1558,7 +1557,7 @@ public:
|
|||||||
|
|
||||||
//1108 Ebony Horse
|
//1108 Ebony Horse
|
||||||
class AEbonyHorse:public TargetAbility{
|
class AEbonyHorse:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
AEbonyHorse(int _id, MTGCardInstance * _source):TargetAbility(_id,_source, NEW CreatureTargetChooser()){
|
AEbonyHorse(int _id, MTGCardInstance * _source):TargetAbility(_id,_source, NEW CreatureTargetChooser()){
|
||||||
int _cost[] = {MTG_COLOR_ARTIFACT, 2};
|
int _cost[] = {MTG_COLOR_ARTIFACT, 2};
|
||||||
@@ -1574,7 +1573,7 @@ public:
|
|||||||
|
|
||||||
//1345 Farmstead
|
//1345 Farmstead
|
||||||
class AFarmstead:public ActivatedAbility{
|
class AFarmstead:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
AFarmstead(int _id, MTGCardInstance * source, MTGCardInstance * _target):ActivatedAbility(_id, source,0,1,0){
|
AFarmstead(int _id, MTGCardInstance * source, MTGCardInstance * _target):ActivatedAbility(_id, source,0,1,0){
|
||||||
int _cost[] = {MTG_COLOR_WHITE, 2};
|
int _cost[] = {MTG_COLOR_WHITE, 2};
|
||||||
cost = NEW ManaCost(_cost,1);
|
cost = NEW ManaCost(_cost,1);
|
||||||
@@ -1596,7 +1595,7 @@ public:
|
|||||||
|
|
||||||
//1110 Glasses of Urza
|
//1110 Glasses of Urza
|
||||||
class AGlassesOfUrza:public MTGAbility{
|
class AGlassesOfUrza:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
CardDisplay * display;
|
CardDisplay * display;
|
||||||
AGlassesOfUrza(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AGlassesOfUrza(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
display = NEW CardDisplay(0, game,SCREEN_WIDTH/2, SCREEN_HEIGHT/2,NULL);
|
display = NEW CardDisplay(0, game,SCREEN_WIDTH/2, SCREEN_HEIGHT/2,NULL);
|
||||||
@@ -1644,7 +1643,7 @@ public:
|
|||||||
|
|
||||||
//1112 Howling Mine
|
//1112 Howling Mine
|
||||||
class AHowlingMine:public MTGAbility{
|
class AHowlingMine:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
AHowlingMine(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){}
|
AHowlingMine(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){}
|
||||||
|
|
||||||
void Update(float dt){
|
void Update(float dt){
|
||||||
@@ -1656,7 +1655,7 @@ public:
|
|||||||
|
|
||||||
//1119 Jayemdae Tome
|
//1119 Jayemdae Tome
|
||||||
class AJayemdaeTome:public ActivatedAbility{
|
class AJayemdaeTome:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
AJayemdaeTome(int _id, MTGCardInstance * card):ActivatedAbility(_id, card){
|
AJayemdaeTome(int _id, MTGCardInstance * card):ActivatedAbility(_id, card){
|
||||||
int _cost[] = {MTG_COLOR_ARTIFACT, 4};
|
int _cost[] = {MTG_COLOR_ARTIFACT, 4};
|
||||||
cost = NEW ManaCost(_cost,1);
|
cost = NEW ManaCost(_cost,1);
|
||||||
@@ -1671,7 +1670,7 @@ public:
|
|||||||
|
|
||||||
//Living Artifact
|
//Living Artifact
|
||||||
class ALivingArtifact:public MTGAbility{
|
class ALivingArtifact:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int usedThisTurn;
|
int usedThisTurn;
|
||||||
int counters;
|
int counters;
|
||||||
Damage * latest;
|
Damage * latest;
|
||||||
@@ -1711,7 +1710,7 @@ public:
|
|||||||
|
|
||||||
//Lord of the Pit
|
//Lord of the Pit
|
||||||
class ALordOfThePit: public TargetAbility{
|
class ALordOfThePit: public TargetAbility{
|
||||||
public:
|
public:
|
||||||
int paidThisTurn;
|
int paidThisTurn;
|
||||||
ALordOfThePit(int _id, MTGCardInstance * source):TargetAbility(_id, source, NEW CreatureTargetChooser(),0,1,0){
|
ALordOfThePit(int _id, MTGCardInstance * source):TargetAbility(_id, source, NEW CreatureTargetChooser(),0,1,0){
|
||||||
paidThisTurn = 1;
|
paidThisTurn = 1;
|
||||||
@@ -1746,7 +1745,7 @@ public:
|
|||||||
};
|
};
|
||||||
//1143 Animate Dead
|
//1143 Animate Dead
|
||||||
class AAnimateDead:public MTGAbility{
|
class AAnimateDead:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
AAnimateDead(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source, _target){
|
AAnimateDead(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source, _target){
|
||||||
MTGCardInstance * card = _target;
|
MTGCardInstance * card = _target;
|
||||||
card->power--;
|
card->power--;
|
||||||
@@ -1769,7 +1768,7 @@ public:
|
|||||||
|
|
||||||
//1144 Bad Moon, 1341 Crusade
|
//1144 Bad Moon, 1341 Crusade
|
||||||
class ABadMoon:public ListMaintainerAbility{
|
class ABadMoon:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int color;
|
int color;
|
||||||
ABadMoon(int _id, MTGCardInstance * _source, int _color = MTG_COLOR_BLACK):ListMaintainerAbility(_id, _source),color(_color){
|
ABadMoon(int _id, MTGCardInstance * _source, int _color = MTG_COLOR_BLACK):ListMaintainerAbility(_id, _source),color(_color){
|
||||||
}
|
}
|
||||||
@@ -1796,7 +1795,7 @@ public:
|
|||||||
|
|
||||||
//1159 Erg Raiders
|
//1159 Erg Raiders
|
||||||
class AErgRaiders:public MTGAbility{
|
class AErgRaiders:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int init;
|
int init;
|
||||||
int dealDamage;
|
int dealDamage;
|
||||||
AErgRaiders(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AErgRaiders(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
@@ -1825,7 +1824,7 @@ public:
|
|||||||
|
|
||||||
//Fastbond
|
//Fastbond
|
||||||
class AFastbond:public TriggeredAbility{
|
class AFastbond:public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
int alreadyPlayedALand;
|
int alreadyPlayedALand;
|
||||||
AFastbond(int _id, MTGCardInstance * card):TriggeredAbility(_id, card){
|
AFastbond(int _id, MTGCardInstance * card):TriggeredAbility(_id, card){
|
||||||
alreadyPlayedALand = 0;
|
alreadyPlayedALand = 0;
|
||||||
@@ -1857,7 +1856,7 @@ public:
|
|||||||
|
|
||||||
//1165 Hypnotic Specter
|
//1165 Hypnotic Specter
|
||||||
class AHypnoticSpecter:public MTGAbility{
|
class AHypnoticSpecter:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int nbdamagesthisturn[2];
|
int nbdamagesthisturn[2];
|
||||||
AHypnoticSpecter(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AHypnoticSpecter(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
currentPhase = -1;
|
currentPhase = -1;
|
||||||
@@ -1904,7 +1903,7 @@ public:
|
|||||||
|
|
||||||
//1117 Jandor's Ring
|
//1117 Jandor's Ring
|
||||||
class AJandorsRing:public ActivatedAbility{
|
class AJandorsRing:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
AJandorsRing(int _id, MTGCardInstance * _source):ActivatedAbility(_id,_source, NEW ManaCost()){
|
AJandorsRing(int _id, MTGCardInstance * _source):ActivatedAbility(_id,_source, NEW ManaCost()){
|
||||||
cost->add(MTG_COLOR_ARTIFACT, 2);
|
cost->add(MTG_COLOR_ARTIFACT, 2);
|
||||||
}
|
}
|
||||||
@@ -1926,7 +1925,7 @@ public:
|
|||||||
//Kudzu.
|
//Kudzu.
|
||||||
//What happens when there are no targets ???
|
//What happens when there are no targets ???
|
||||||
class AKudzu: public TargetAbility{
|
class AKudzu: public TargetAbility{
|
||||||
public:
|
public:
|
||||||
int previouslyTapped;
|
int previouslyTapped;
|
||||||
AKudzu(int _id, MTGCardInstance * card, MTGCardInstance * _target):TargetAbility(_id,card, NEW TypeTargetChooser("land",card)){
|
AKudzu(int _id, MTGCardInstance * card, MTGCardInstance * _target):TargetAbility(_id,card, NEW TypeTargetChooser("land",card)){
|
||||||
tc->toggleTarget(_target);
|
tc->toggleTarget(_target);
|
||||||
@@ -1962,7 +1961,7 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
int reactToClick(MTGCardInstance * card){
|
int reactToClick(MTGCardInstance * card){
|
||||||
if (!waitingForAnswer) {
|
if (!waitingForAnswer) {
|
||||||
}else{
|
}else{
|
||||||
@@ -2003,7 +2002,7 @@ public:
|
|||||||
|
|
||||||
//Millstone
|
//Millstone
|
||||||
class AMillstone:public TargetAbility{
|
class AMillstone:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
AMillstone(int _id, MTGCardInstance * card):TargetAbility(_id,card, NEW PlayerTargetChooser(), NEW ManaCost()){
|
AMillstone(int _id, MTGCardInstance * card):TargetAbility(_id,card, NEW PlayerTargetChooser(), NEW ManaCost()){
|
||||||
cost->add(MTG_COLOR_ARTIFACT, 2);
|
cost->add(MTG_COLOR_ARTIFACT, 2);
|
||||||
}
|
}
|
||||||
@@ -2023,7 +2022,7 @@ public:
|
|||||||
|
|
||||||
//1170: Nightmare
|
//1170: Nightmare
|
||||||
class ANightmare:public ListMaintainerAbility{
|
class ANightmare:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
ANightmare(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
ANightmare(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2050,7 +2049,7 @@ public:
|
|||||||
|
|
||||||
//1172 Pestilence
|
//1172 Pestilence
|
||||||
class APestilence: public ActivatedAbility{
|
class APestilence: public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
APestilence(int _id, MTGCardInstance * card):ActivatedAbility(_id, card, NEW ManaCost(), 0,0){
|
APestilence(int _id, MTGCardInstance * card):ActivatedAbility(_id, card, NEW ManaCost(), 0,0){
|
||||||
cost->add(MTG_COLOR_BLACK, 1);
|
cost->add(MTG_COLOR_BLACK, 1);
|
||||||
}
|
}
|
||||||
@@ -2078,7 +2077,7 @@ public:
|
|||||||
|
|
||||||
//Plague Rats and similar. Power and toughness equal to number of cards that share a name
|
//Plague Rats and similar. Power and toughness equal to number of cards that share a name
|
||||||
class APlagueRats:public ListMaintainerAbility{
|
class APlagueRats:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
string name;
|
string name;
|
||||||
APlagueRats(int _id, MTGCardInstance * _source, const char * _name):ListMaintainerAbility(_id,_source){
|
APlagueRats(int _id, MTGCardInstance * _source, const char * _name):ListMaintainerAbility(_id,_source){
|
||||||
name = _name;
|
name = _name;
|
||||||
@@ -2109,7 +2108,7 @@ public:
|
|||||||
|
|
||||||
//Power Leak
|
//Power Leak
|
||||||
class APowerLeak:public TriggeredAbility{
|
class APowerLeak:public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
int damagesToDealThisTurn;
|
int damagesToDealThisTurn;
|
||||||
ManaCost cost;
|
ManaCost cost;
|
||||||
APowerLeak(int _id, MTGCardInstance * _source, MTGCardInstance * _target):TriggeredAbility(_id, _source, _target){
|
APowerLeak(int _id, MTGCardInstance * _source, MTGCardInstance * _target):TriggeredAbility(_id, _source, _target){
|
||||||
@@ -2156,7 +2155,7 @@ public:
|
|||||||
|
|
||||||
//Power Surge
|
//Power Surge
|
||||||
class APowerSurge:public TriggeredAbility{
|
class APowerSurge:public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
int totalLands;
|
int totalLands;
|
||||||
APowerSurge(int _id, MTGCardInstance * _source):TriggeredAbility(_id,_source){
|
APowerSurge(int _id, MTGCardInstance * _source):TriggeredAbility(_id,_source){
|
||||||
totalLands = 0;
|
totalLands = 0;
|
||||||
@@ -2189,7 +2188,7 @@ public:
|
|||||||
|
|
||||||
//1175 Royal Assassin
|
//1175 Royal Assassin
|
||||||
class ARoyalAssassin:public TargetAbility{
|
class ARoyalAssassin:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ARoyalAssassin(int _id, MTGCardInstance * _source):TargetAbility(_id,_source, NEW CreatureTargetChooser()){
|
ARoyalAssassin(int _id, MTGCardInstance * _source):TargetAbility(_id,_source, NEW CreatureTargetChooser()){
|
||||||
}
|
}
|
||||||
@@ -2208,7 +2207,7 @@ public:
|
|||||||
|
|
||||||
//1176 Sacrifice
|
//1176 Sacrifice
|
||||||
class ASacrifice:public InstantAbility{
|
class ASacrifice:public InstantAbility{
|
||||||
public:
|
public:
|
||||||
ASacrifice(int _id, MTGCardInstance * _source, MTGCardInstance * _target):InstantAbility(_id, _source){
|
ASacrifice(int _id, MTGCardInstance * _source, MTGCardInstance * _target):InstantAbility(_id, _source){
|
||||||
target = _target;
|
target = _target;
|
||||||
}
|
}
|
||||||
@@ -2227,7 +2226,7 @@ public:
|
|||||||
|
|
||||||
//1178 Scavenging Ghoul
|
//1178 Scavenging Ghoul
|
||||||
class AScavengingGhoul:public MTGAbility{
|
class AScavengingGhoul:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int counters;
|
int counters;
|
||||||
AScavengingGhoul(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source, _target){
|
AScavengingGhoul(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source, _target){
|
||||||
counters = 0;
|
counters = 0;
|
||||||
@@ -2256,7 +2255,7 @@ public:
|
|||||||
|
|
||||||
//1218 Psychic Venom
|
//1218 Psychic Venom
|
||||||
class APsychicVenom:public MTGAbility{
|
class APsychicVenom:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int tapped;
|
int tapped;
|
||||||
APsychicVenom(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source,_target){
|
APsychicVenom(int _id, MTGCardInstance * _source, MTGCardInstance * _target):MTGAbility(_id, _source,_target){
|
||||||
tapped = _target->tapped;
|
tapped = _target->tapped;
|
||||||
@@ -2275,7 +2274,7 @@ public:
|
|||||||
|
|
||||||
//1221 Serendib Efreet
|
//1221 Serendib Efreet
|
||||||
class ASerendibEfreet:public MTGAbility{
|
class ASerendibEfreet:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
ASerendibEfreet(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
ASerendibEfreet(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2289,7 +2288,7 @@ public:
|
|||||||
|
|
||||||
//1235 Aspect of Wolf
|
//1235 Aspect of Wolf
|
||||||
class AAspectOfWolf:public ListMaintainerAbility{
|
class AAspectOfWolf:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int color;
|
int color;
|
||||||
AAspectOfWolf(int _id, MTGCardInstance * _source, MTGCardInstance * _target):ListMaintainerAbility(_id, _source, _target){
|
AAspectOfWolf(int _id, MTGCardInstance * _source, MTGCardInstance * _target):ListMaintainerAbility(_id, _source, _target){
|
||||||
}
|
}
|
||||||
@@ -2326,7 +2325,7 @@ public:
|
|||||||
|
|
||||||
//1276 Wanderlust, 1148 Cursed Lands
|
//1276 Wanderlust, 1148 Cursed Lands
|
||||||
class AWanderlust:public TriggeredAbility{
|
class AWanderlust:public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
AWanderlust(int _id, MTGCardInstance * _source, MTGCardInstance * _target):TriggeredAbility(_id,_source, _target){}
|
AWanderlust(int _id, MTGCardInstance * _source, MTGCardInstance * _target):TriggeredAbility(_id,_source, _target){}
|
||||||
|
|
||||||
int trigger(){
|
int trigger(){
|
||||||
@@ -2344,7 +2343,7 @@ public:
|
|||||||
|
|
||||||
//1280 Atog
|
//1280 Atog
|
||||||
class AAtog:public TargetAbility{
|
class AAtog:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
Player * currentController;
|
Player * currentController;
|
||||||
int counters;
|
int counters;
|
||||||
AAtog(int _id, MTGCardInstance * _source):TargetAbility(_id, _source,NULL, NULL, 0,0){
|
AAtog(int _id, MTGCardInstance * _source):TargetAbility(_id, _source,NULL, NULL, 0,0){
|
||||||
@@ -2386,7 +2385,7 @@ public:
|
|||||||
|
|
||||||
//1284 Dragon Whelp
|
//1284 Dragon Whelp
|
||||||
class ADragonWhelp: public APowerToughnessModifierUntilEndOfTurn{
|
class ADragonWhelp: public APowerToughnessModifierUntilEndOfTurn{
|
||||||
public:
|
public:
|
||||||
ADragonWhelp(int id, MTGCardInstance * card):APowerToughnessModifierUntilEndOfTurn(id, card, card, 1, 0, NEW ManaCost()){
|
ADragonWhelp(int id, MTGCardInstance * card):APowerToughnessModifierUntilEndOfTurn(id, card, card, 1, 0, NEW ManaCost()){
|
||||||
cost->add(MTG_COLOR_RED, 1);
|
cost->add(MTG_COLOR_RED, 1);
|
||||||
}
|
}
|
||||||
@@ -2402,7 +2401,7 @@ public:
|
|||||||
|
|
||||||
//1288 EarthBind
|
//1288 EarthBind
|
||||||
class AEarthbind:public ABasicAbilityModifier{
|
class AEarthbind:public ABasicAbilityModifier{
|
||||||
public:
|
public:
|
||||||
AEarthbind(int _id, MTGCardInstance * _source, MTGCardInstance * _target):ABasicAbilityModifier(_id,_source,_target,FLYING,0){
|
AEarthbind(int _id, MTGCardInstance * _source, MTGCardInstance * _target):ABasicAbilityModifier(_id,_source,_target,FLYING,0){
|
||||||
if (value_before_modification) game->mLayers->stackLayer()->addDamage(source,target,2);
|
if (value_before_modification) game->mLayers->stackLayer()->addDamage(source,target,2);
|
||||||
}
|
}
|
||||||
@@ -2410,7 +2409,7 @@ public:
|
|||||||
|
|
||||||
//1291 Fireball
|
//1291 Fireball
|
||||||
class AFireball:public InstantAbility{
|
class AFireball:public InstantAbility{
|
||||||
public:
|
public:
|
||||||
AFireball(int _id, MTGCardInstance * card, Spell * spell, int x):InstantAbility(_id, card){
|
AFireball(int _id, MTGCardInstance * card, Spell * spell, int x):InstantAbility(_id, card){
|
||||||
int nbtargets = spell->cursor;
|
int nbtargets = spell->cursor;
|
||||||
int totaldamage = x+1-nbtargets;
|
int totaldamage = x+1-nbtargets;
|
||||||
@@ -2425,7 +2424,7 @@ public:
|
|||||||
|
|
||||||
//1245 ForceOfNature
|
//1245 ForceOfNature
|
||||||
class AForceOfNature:public ActivatedAbility{
|
class AForceOfNature:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int dealDamageThisTurn;
|
int dealDamageThisTurn;
|
||||||
AForceOfNature(int _id, MTGCardInstance * card):ActivatedAbility(_id,card, NEW ManaCost(),1,0){
|
AForceOfNature(int _id, MTGCardInstance * card):ActivatedAbility(_id,card, NEW ManaCost(),1,0){
|
||||||
dealDamageThisTurn = 0;
|
dealDamageThisTurn = 0;
|
||||||
@@ -2455,7 +2454,7 @@ public:
|
|||||||
|
|
||||||
//1301 KeldonWarlord
|
//1301 KeldonWarlord
|
||||||
class AKeldonWarlord:public ListMaintainerAbility{
|
class AKeldonWarlord:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
AKeldonWarlord(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
AKeldonWarlord(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2480,7 +2479,7 @@ public:
|
|||||||
|
|
||||||
//1302 : Kird Ape
|
//1302 : Kird Ape
|
||||||
class AKirdApe:public MTGAbility{
|
class AKirdApe:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int init;
|
int init;
|
||||||
AKirdApe(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AKirdApe(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
init = 0;
|
init = 0;
|
||||||
@@ -2505,7 +2504,7 @@ public:
|
|||||||
|
|
||||||
//1309 Orcish Artilery
|
//1309 Orcish Artilery
|
||||||
class AOrcishArtillery: public ADamager{
|
class AOrcishArtillery: public ADamager{
|
||||||
public:
|
public:
|
||||||
AOrcishArtillery(int _id,MTGCardInstance * card): ADamager(_id, card, NEW ManaCost(), 2){
|
AOrcishArtillery(int _id,MTGCardInstance * card): ADamager(_id, card, NEW ManaCost(), 2){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2519,7 +2518,7 @@ public:
|
|||||||
|
|
||||||
//1310 Orcish Oriflame
|
//1310 Orcish Oriflame
|
||||||
class AOrcishOriflame:public ListMaintainerAbility{
|
class AOrcishOriflame:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int color;
|
int color;
|
||||||
AOrcishOriflame(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
AOrcishOriflame(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
||||||
}
|
}
|
||||||
@@ -2543,7 +2542,7 @@ public:
|
|||||||
|
|
||||||
//1334 Castle
|
//1334 Castle
|
||||||
class ACastle:public ListMaintainerAbility{
|
class ACastle:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
ACastle(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
ACastle(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2566,7 +2565,7 @@ public:
|
|||||||
|
|
||||||
//1351 Island Sanctuary
|
//1351 Island Sanctuary
|
||||||
class AIslandSanctuary:public MTGAbility{
|
class AIslandSanctuary:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int initThisTurn;
|
int initThisTurn;
|
||||||
AIslandSanctuary(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AIslandSanctuary(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
initThisTurn = 0;
|
initThisTurn = 0;
|
||||||
@@ -2603,7 +2602,7 @@ public:
|
|||||||
|
|
||||||
//1352 Karma
|
//1352 Karma
|
||||||
class AKarma: public TriggeredAbility{
|
class AKarma: public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
AKarma(int _id, MTGCardInstance * _source):TriggeredAbility(_id, _source){
|
AKarma(int _id, MTGCardInstance * _source):TriggeredAbility(_id, _source){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2625,7 +2624,7 @@ public:
|
|||||||
|
|
||||||
//1355 Norther Paladin
|
//1355 Norther Paladin
|
||||||
class ANorthernPaladin:public TargetAbility{
|
class ANorthernPaladin:public TargetAbility{
|
||||||
public:
|
public:
|
||||||
ANorthernPaladin(int _id, MTGCardInstance * card):TargetAbility(_id, card){
|
ANorthernPaladin(int _id, MTGCardInstance * card):TargetAbility(_id, card){
|
||||||
int _cost[] = {MTG_COLOR_WHITE, 2};
|
int _cost[] = {MTG_COLOR_WHITE, 2};
|
||||||
cost = NEW ManaCost(_cost,1);
|
cost = NEW ManaCost(_cost,1);
|
||||||
@@ -2646,7 +2645,7 @@ public:
|
|||||||
|
|
||||||
//Sedge Troll
|
//Sedge Troll
|
||||||
class ASedgeTroll:public MTGAbility{
|
class ASedgeTroll:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int init;
|
int init;
|
||||||
ASedgeTroll(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
ASedgeTroll(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
init = 0;
|
init = 0;
|
||||||
@@ -2671,7 +2670,7 @@ public:
|
|||||||
|
|
||||||
//Soul Net
|
//Soul Net
|
||||||
class ASoulNet:public ActivatedAbility{
|
class ASoulNet:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
PutInGraveyard * latest;
|
PutInGraveyard * latest;
|
||||||
PutInGraveyard * newDead;
|
PutInGraveyard * newDead;
|
||||||
ASoulNet(int _id, MTGCardInstance * card):ActivatedAbility(_id, card,0,0,0){
|
ASoulNet(int _id, MTGCardInstance * card):ActivatedAbility(_id, card,0,0,0){
|
||||||
@@ -2697,7 +2696,7 @@ public:
|
|||||||
|
|
||||||
//Stasis
|
//Stasis
|
||||||
class AStasis:public ActivatedAbility{
|
class AStasis:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
int paidThisTurn;
|
int paidThisTurn;
|
||||||
AStasis(int _id, MTGCardInstance * card):ActivatedAbility(_id,card, NEW ManaCost(),1,0){
|
AStasis(int _id, MTGCardInstance * card):ActivatedAbility(_id,card, NEW ManaCost(),1,0){
|
||||||
paidThisTurn = 1;
|
paidThisTurn = 1;
|
||||||
@@ -2745,7 +2744,7 @@ public:
|
|||||||
//--------------Addon Abra------------------
|
//--------------Addon Abra------------------
|
||||||
//ShieldOfTheAge
|
//ShieldOfTheAge
|
||||||
class AShieldOfTheAge: public TargetAbility{
|
class AShieldOfTheAge: public TargetAbility{
|
||||||
public:
|
public:
|
||||||
AShieldOfTheAge(int _id, MTGCardInstance * card):TargetAbility(_id,card,NEW DamageTargetChooser(card,_id),NEW ManaCost(),0,0){
|
AShieldOfTheAge(int _id, MTGCardInstance * card):TargetAbility(_id,card,NEW DamageTargetChooser(card,_id),NEW ManaCost(),0,0){
|
||||||
cost->add(MTG_COLOR_ARTIFACT,2);
|
cost->add(MTG_COLOR_ARTIFACT,2);
|
||||||
}
|
}
|
||||||
@@ -2760,7 +2759,7 @@ public:
|
|||||||
|
|
||||||
// People of the Woods
|
// People of the Woods
|
||||||
class APeopleOfTheWoods:public ListMaintainerAbility{
|
class APeopleOfTheWoods:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
APeopleOfTheWoods(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
APeopleOfTheWoods(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2783,7 +2782,7 @@ public:
|
|||||||
|
|
||||||
//Abomination Kill blocking creature if white or green
|
//Abomination Kill blocking creature if white or green
|
||||||
class AAbomination :public MTGAbility{
|
class AAbomination :public MTGAbility{
|
||||||
public:
|
public:
|
||||||
MTGCardInstance * opponents[20];
|
MTGCardInstance * opponents[20];
|
||||||
int nbOpponents;
|
int nbOpponents;
|
||||||
AAbomination (int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
AAbomination (int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
||||||
@@ -2819,7 +2818,7 @@ public:
|
|||||||
|
|
||||||
// GiveLifeForTappedType
|
// GiveLifeForTappedType
|
||||||
class AGiveLifeForTappedType:public MTGAbility{
|
class AGiveLifeForTappedType:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
char type[20];
|
char type[20];
|
||||||
int nbtypestapped;
|
int nbtypestapped;
|
||||||
|
|
||||||
@@ -2850,7 +2849,7 @@ public:
|
|||||||
|
|
||||||
//Minion of Leshrac
|
//Minion of Leshrac
|
||||||
class AMinionofLeshrac: public TargetAbility{
|
class AMinionofLeshrac: public TargetAbility{
|
||||||
public:
|
public:
|
||||||
int paidThisTurn;
|
int paidThisTurn;
|
||||||
AMinionofLeshrac(int _id, MTGCardInstance * source):TargetAbility(_id, source, NEW CreatureTargetChooser(),0,1,0){
|
AMinionofLeshrac(int _id, MTGCardInstance * source):TargetAbility(_id, source, NEW CreatureTargetChooser(),0,1,0){
|
||||||
paidThisTurn = 1;
|
paidThisTurn = 1;
|
||||||
@@ -2887,7 +2886,7 @@ public:
|
|||||||
|
|
||||||
//2703 Lost Order of Jarkeld
|
//2703 Lost Order of Jarkeld
|
||||||
class ALostOrderofJarkeld:public ListMaintainerAbility{
|
class ALostOrderofJarkeld:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
ALostOrderofJarkeld(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
ALostOrderofJarkeld(int _id, MTGCardInstance * _source):ListMaintainerAbility(_id, _source){
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2914,7 +2913,7 @@ public:
|
|||||||
|
|
||||||
//CreaturePowerToughnessModifierForAllTypeControlled
|
//CreaturePowerToughnessModifierForAllTypeControlled
|
||||||
class ACreaturePowerToughnessModifierForAllTypeControlled:public ListMaintainerAbility{
|
class ACreaturePowerToughnessModifierForAllTypeControlled:public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
char type[20];
|
char type[20];
|
||||||
ACreaturePowerToughnessModifierForAllTypeControlled(int _id, MTGCardInstance * _source, const char * _type):ListMaintainerAbility(_id, _source){
|
ACreaturePowerToughnessModifierForAllTypeControlled(int _id, MTGCardInstance * _source, const char * _type):ListMaintainerAbility(_id, _source){
|
||||||
}
|
}
|
||||||
@@ -2941,7 +2940,7 @@ public:
|
|||||||
//GenericKirdApe
|
//GenericKirdApe
|
||||||
//Erwan 2008/11/15 : this cannot work as type is never initialized...
|
//Erwan 2008/11/15 : this cannot work as type is never initialized...
|
||||||
class AGenericKirdApe:public MTGAbility{
|
class AGenericKirdApe:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int init;
|
int init;
|
||||||
char type [20];
|
char type [20];
|
||||||
int power;
|
int power;
|
||||||
@@ -2970,7 +2969,7 @@ public:
|
|||||||
|
|
||||||
//Rampage ability Tentative 2
|
//Rampage ability Tentative 2
|
||||||
class ARampageAbility:public MTGAbility{
|
class ARampageAbility:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int nbOpponents;
|
int nbOpponents;
|
||||||
int PowerModifier;
|
int PowerModifier;
|
||||||
int ToughnessModifier;
|
int ToughnessModifier;
|
||||||
@@ -2996,7 +2995,7 @@ public:
|
|||||||
|
|
||||||
//Rampage ability Tentative 1 - Did not work as expected
|
//Rampage ability Tentative 1 - Did not work as expected
|
||||||
class A1RampageAbility:public MTGAbility{
|
class A1RampageAbility:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
MTGCardInstance * opponents[20];
|
MTGCardInstance * opponents[20];
|
||||||
int nbOpponents;
|
int nbOpponents;
|
||||||
int PowerModifier;
|
int PowerModifier;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using std::map;
|
|||||||
|
|
||||||
|
|
||||||
//Two stupid variables used to give a hint to the AI:
|
//Two stupid variables used to give a hint to the AI:
|
||||||
// Should I cast a spell on an ennemy or friendly unit ?
|
// Should I cast a spell on an enemy or friendly unit ?
|
||||||
#define BAKA_EFFECT_GOOD 10
|
#define BAKA_EFFECT_GOOD 10
|
||||||
#define BAKA_EFFECT_BAD 11
|
#define BAKA_EFFECT_BAD 11
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ class TriggeredAbility:public MTGAbility{
|
|||||||
|
|
||||||
|
|
||||||
class ActivatedAbility:public MTGAbility{
|
class ActivatedAbility:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
ManaCost * cost;
|
ManaCost * cost;
|
||||||
int playerturnonly;
|
int playerturnonly;
|
||||||
int needsTapping;
|
int needsTapping;
|
||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class TargetAbility:public ActivatedAbility{
|
class TargetAbility:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
TargetAbility(int id, MTGCardInstance * card, TargetChooser * _tc,ManaCost * _cost = NULL, int _playerturnonly = 0,int tap = 1);
|
TargetAbility(int id, MTGCardInstance * card, TargetChooser * _tc,ManaCost * _cost = NULL, int _playerturnonly = 0,int tap = 1);
|
||||||
TargetAbility(int id, MTGCardInstance * card,ManaCost * _cost = NULL, int _playerturnonly = 0,int tap = 1);
|
TargetAbility(int id, MTGCardInstance * card,ManaCost * _cost = NULL, int _playerturnonly = 0,int tap = 1);
|
||||||
virtual void Update(float dt);
|
virtual void Update(float dt);
|
||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class InstantAbility:public MTGAbility{
|
class InstantAbility:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
int init;
|
int init;
|
||||||
virtual void Update(float dt);
|
virtual void Update(float dt);
|
||||||
virtual int testDestroy();
|
virtual int testDestroy();
|
||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
|
|
||||||
/* State based effects. This class works ONLY for InPlay and needs to be extended for other areas of the game !!! */
|
/* State based effects. This class works ONLY for InPlay and needs to be extended for other areas of the game !!! */
|
||||||
class ListMaintainerAbility:public MTGAbility{
|
class ListMaintainerAbility:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
map<MTGCardInstance *,bool> cards;
|
map<MTGCardInstance *,bool> cards;
|
||||||
ListMaintainerAbility(int _id):MTGAbility(_id,NULL){};
|
ListMaintainerAbility(int _id):MTGAbility(_id,NULL){};
|
||||||
ListMaintainerAbility(int _id, MTGCardInstance *_source):MTGAbility(_id, _source){};
|
ListMaintainerAbility(int _id, MTGCardInstance *_source):MTGAbility(_id, _source){};
|
||||||
@@ -119,14 +119,14 @@ class MTGAbilityBasicFeatures{
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Trigger:public MTGAbilityBasicFeatures{
|
class Trigger:public MTGAbilityBasicFeatures{
|
||||||
public:
|
public:
|
||||||
virtual int trigger()=0;
|
virtual int trigger()=0;
|
||||||
virtual int testDestroy(){return 0;};
|
virtual int testDestroy(){return 0;};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class TriggerAtPhase:public Trigger{
|
class TriggerAtPhase:public Trigger{
|
||||||
public:
|
public:
|
||||||
int currentPhase, newPhase;
|
int currentPhase, newPhase;
|
||||||
int phaseId;
|
int phaseId;
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class TriggerNextPhase:public TriggerAtPhase{
|
class TriggerNextPhase:public TriggerAtPhase{
|
||||||
public:
|
public:
|
||||||
int destroyActivated;
|
int destroyActivated;
|
||||||
TriggerNextPhase(int _phaseId);
|
TriggerNextPhase(int _phaseId);
|
||||||
|
|
||||||
@@ -145,12 +145,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class TriggeredEvent:public MTGAbilityBasicFeatures{
|
class TriggeredEvent:public MTGAbilityBasicFeatures{
|
||||||
public:
|
public:
|
||||||
virtual int resolve()=0;
|
virtual int resolve()=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DrawEvent:public TriggeredEvent{
|
class DrawEvent:public TriggeredEvent{
|
||||||
public:
|
public:
|
||||||
Player * player;
|
Player * player;
|
||||||
int nbcards;
|
int nbcards;
|
||||||
DrawEvent(Player * _player, int _nbcards);
|
DrawEvent(Player * _player, int _nbcards);
|
||||||
@@ -158,18 +158,18 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class BuryEvent: public TriggeredEvent{
|
class BuryEvent: public TriggeredEvent{
|
||||||
public:
|
public:
|
||||||
int resolve();
|
int resolve();
|
||||||
};
|
};
|
||||||
|
|
||||||
class DestroyCondition:public MTGAbilityBasicFeatures{
|
class DestroyCondition:public MTGAbilityBasicFeatures{
|
||||||
public:
|
public:
|
||||||
virtual int testDestroy();
|
virtual int testDestroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class GenericTriggeredAbility:public TriggeredAbility{
|
class GenericTriggeredAbility:public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
Trigger * t;
|
Trigger * t;
|
||||||
TriggeredEvent * te;
|
TriggeredEvent * te;
|
||||||
DestroyCondition * dc;
|
DestroyCondition * dc;
|
||||||
@@ -182,7 +182,7 @@ public:
|
|||||||
|
|
||||||
/* Ability Factory */
|
/* Ability Factory */
|
||||||
class AbilityFactory{
|
class AbilityFactory{
|
||||||
private:
|
private:
|
||||||
int destroyAllInPlay(TargetChooser * tc, int bury = 0);
|
int destroyAllInPlay(TargetChooser * tc, int bury = 0);
|
||||||
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
|
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
|
||||||
Trigger * parseTrigger(string magicText);
|
Trigger * parseTrigger(string magicText);
|
||||||
|
|||||||
Reference in New Issue
Block a user