Files
wagic/projects/mtg/include/TargetsList.h
omegablast2002@yahoo.com 0a357e7eb0 first part of a series of commits, this one adds "and((" support to the various card removel abilities, tweaks targetedplayer targetchooser, and adds the following number word variables...
counter{}
so you can get a count of a certain counter on a card
the next consist of parts using the same targetchooser method as type:
power:
toughness:
convertedcost:
followed by ---
highest:
lowest:
followed by targetchooser
blah:mybattlefield
so if i want highest converted cost of creatures i control..
convertedcost:highest:creature:mybattlefield

also added an internal ability to reuse and display flying text with a string passed to it.
2012-03-13 15:35:43 +00:00

51 lines
1.3 KiB
C++

#ifndef _TARGETSLIST_H_
#define _TARGETSLIST_H_
class Targetable;
class MTGCardInstance;
class Player;
class Damageable;
class Spell;
class Interruptible;
class Damage;
#include <vector>
using std::vector;
class TargetsList
{
protected:
size_t iterateTarget(Targetable * previous);
vector<Targetable*> targets;
public:
TargetsList();
TargetsList(Targetable * _targets[], int nbtargets);
int alreadyHasTarget(Targetable * target);
int removeTarget(Targetable * _card);
int toggleTarget(Targetable * _card);
size_t getNbTargets() {return targets.size();};
virtual int addTarget(Targetable * _target);
MTGCardInstance * getNextCardTarget(MTGCardInstance * previous = 0);
Player * getNextPlayerTarget(Player * previous = 0);
Damageable * getNextDamageableTarget(Damageable * previous = 0);
Interruptible * getNextInterruptible(Interruptible * previous, int type);
Spell * getNextSpellTarget(Spell * previous = 0);
Damage * getNextDamageTarget(Damage * previous = 0);
Targetable * getNextTarget(Targetable * previous = 0);
vector<Targetable*> getTargetsFrom()
{
return targets;
}
void setTargetsTo(vector<Targetable*>targetTo)
{
targets = targetTo;
}
void initTargets()
{
targets.clear();
}
;
};
#endif