-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81fa8c7
commit 0b31bf6
Showing
66 changed files
with
2,845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "GiantStre.h" | ||
#include <iostream> | ||
using namespace std; | ||
|
||
GiantStre::GiantStre(Player *owner): Enchantment{ "Giant Strength", "Enchantment", "", 1, owner, 2, 2 } {} | ||
|
||
GiantStre::~GiantStre(){} | ||
|
||
void GiantStre::activate(shared_ptr<Card> c) { | ||
cout<< "activating Giant Strength" << endl; | ||
int points = c->getAttack() + 2; | ||
c->setAttack(points); | ||
points = c->getDefence() + 2; | ||
c->setDefence(points); | ||
} | ||
void GiantStre::deactivate(shared_ptr<Card> c) { | ||
cout << "deactivate Giant strength" << endl; | ||
int points = c->getAttack() - 2; | ||
c->setAttack(points); | ||
points = c->getDefence() - 2; | ||
c->setDefence(points); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef MAGFAT_H | ||
#define MAGFAT_H | ||
#include "enchantment.h" | ||
|
||
class GiantStre :public Enchantment { | ||
public: | ||
GiantStre(Player *owner); | ||
~GiantStre(); | ||
void activate(std::shared_ptr<Card> c) override; | ||
void deactivate(std::shared_ptr<Card> c) override; | ||
}; | ||
#endif // !MAGFAT_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "MagicFati.h" | ||
using namespace std; | ||
|
||
MagicFati::MagicFati(Player *owner): Enchantment{ "Magic Fatigue", "Enchantment", "Enchanted minion's activated ability costs 2 more", 0, owner, 0, 0 } {} | ||
|
||
MagicFati::~MagicFati(){} | ||
|
||
void MagicFati::activate(shared_ptr<Card> c){ | ||
int cost = c->getAbCost() + 2; | ||
c->setAbCost(cost); | ||
} | ||
|
||
void MagicFati::deactivate(shared_ptr<Card> c) { | ||
int cost = c->getAbCost() - 2; | ||
c->setAbCost(cost); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef MAGICFATI_H | ||
#define MAGICFATI_H | ||
#include "enchantment.h" | ||
|
||
class MagicFati :public Enchantment { | ||
public: | ||
MagicFati(Player *owner); | ||
~MagicFati(); | ||
void activate(std::shared_ptr<Card> c) override; | ||
void deactivate(std::shared_ptr<Card> c) override; | ||
}; | ||
#endif // !MAGICFATI_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CXX = g++-5 | ||
CXXFLAGS = -std=c++14 -Werror=vla | ||
EXEC = sorcery | ||
OBJECTS = ascii_graphics.o board.o card.o deck.o main.o minion.o player.o ritual.o spell.o enchantment.o textdisplay.o airelem.o apprentice.o auraofpower.o banish.o blizzard.o bonegolem.o darkritual.o disenchant.o earthelem.o enrage.o fireelem.o GiantStre.o haste.o MagicFati.o massum.o novice.o potionsell.o raisedead.o recharge.o Silence.o standstill.o unsummon.o | ||
DEPENDS = ${OBJECTS.o: .d} | ||
|
||
${EXEC}: ${OBJECTS} | ||
${CXX} ${CXXFLAGS} ${OBJECTS} -o ${EXEC} | ||
-include ${DEPENDS} | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm ${OBJECTS} ${EXEC} ${DEPENDS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "Silence.h" | ||
#include <iostream> | ||
using namespace std; | ||
|
||
Silence::Silence(Player *owner): Enchantment{ "Silence", "Enchantment", "Enchanted minion cannot use abilities", 1, owner, 0, 0 } {} | ||
|
||
Silence::~Silence() {} | ||
|
||
void Silence::activate(shared_ptr<Card> c) { | ||
cout<<"using silence"<<endl; | ||
c->silence(); | ||
} | ||
|
||
void Silence::deactivate(shared_ptr<Card> c) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef SILENCE_H | ||
#define SILENCE_H | ||
#include "enchantment.h" | ||
|
||
class Silence :public Enchantment { | ||
public: | ||
Silence(Player *owner); | ||
~Silence(); | ||
void activate(std::shared_ptr<Card> c) override; | ||
void deactivate(std::shared_ptr<Card> c) override; | ||
}; | ||
#endif // !SILENCE_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "airelem.h" | ||
#include <iostream> | ||
using namespace std; | ||
|
||
AirElem:: AirElem(Player *owner): | ||
Minion{"Air Elemental","Minion","",0,owner,1,1,0}{} | ||
|
||
AirElem::~AirElem(){} | ||
|
||
void AirElem::activate(){} | ||
|
||
void AirElem::activate(shared_ptr<Card> target){} | ||
|
||
void AirElem::notify(const string event){} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef AIRELEM_H | ||
#define AIRELEM_H | ||
#include "player.h" | ||
#include "card.h" | ||
#include "minion.h" | ||
#include <string> | ||
|
||
class AirElem : public Minion { | ||
public: | ||
AirElem(Player *owner); | ||
~AirElem(); | ||
void activate() override; | ||
void activate(std::shared_ptr<Card>) override; | ||
void notify(const std::string event) override; | ||
}; | ||
|
||
|
||
|
||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "apprentice.h" | ||
#include "airelem.h" | ||
#include <iostream> | ||
using namespace std; | ||
|
||
AppSum:: AppSum(Player *owner): | ||
Minion{"Apprentice Summoner","Minion","Summon a 1/1 air elemental",1,owner,1,1,1}{} | ||
|
||
AppSum::~AppSum(){} | ||
|
||
void AppSum::activate(){ | ||
if (actionpts <= 0) return; | ||
--actionpts; | ||
if (owner->getMagic() >= abCost && !isSilence && owner->getMinion().size()<5){ | ||
owner->getMinion().push_back(make_shared<AirElem>(owner)); | ||
owner->subMagic(abCost); | ||
} | ||
} | ||
|
||
void AppSum::activate(shared_ptr<Card> target){} | ||
|
||
void AppSum::notify(const string event){} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef APPRENTICE_H | ||
#define APPRENTICE_H | ||
#include "player.h" | ||
#include "card.h" | ||
#include "minion.h" | ||
|
||
class AppSum : public Minion { | ||
public: | ||
AppSum(Player *owner); | ||
~AppSum(); | ||
void activate() override; | ||
void activate(std::shared_ptr<Card>) override; | ||
void notify(const std::string event) override; | ||
}; | ||
|
||
|
||
#endif | ||
|
Oops, something went wrong.