Skip to content

Commit

Permalink
Initial Push
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightArthurRen committed Nov 24, 2016
0 parents commit c4a41c3
Show file tree
Hide file tree
Showing 65 changed files with 3,883 additions and 0 deletions.
Empty file added README.md
Empty file.
Binary file added cc3k.pdf
Binary file not shown.
17 changes: 17 additions & 0 deletions cc3k/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CXX=g++
CXXFLAGS= -MMD -Wall

OBJECTS=main.o cell.o game.o controller.o view.o textdisplay.o gold.o dragonhoard.o potion.o character.o npc.o human.o dwarf.o elf.o orcs.o merchant.o dragon.o halfling.o status_effect.o atkboost.o atkwound.o defboost.o defwound.o pc.o drow.o goblin.o shade.o troll.o vampire.o generate.o posn.o

DEPENDS=${OBJECTS:.o=.d}

EXEC=cc3k

${EXEC}: ${OBJECTS}
${CXX} ${CXXFLAGS} ${OBJECTS} -o ${EXEC}

-include ${DEPENDS}

clean:
rm *.o *.d cc3k
.PHONY: clean
25 changes: 25 additions & 0 deletions cc3k/__layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
|-----------------------------------------------------------------------------|
| |
| |--------------------------| |-----------------------| |
| |..........................| |.......................| |
| |..........................+########+.......................|-------| |
| |..........................| # |...............................|--| |
| |..........................| # |..................................|--| |
| |----------+---------------| # |----+----------------|...............| |
| # ############# |...............| |
| # # |-----+------| |...............| |
| # # |............| |...............| |
| ################### |............| ######+...............| |
| # # |............| # |...............| |
| # # |-----+------| # |--------+------| |
| |---------+-----------| # # # # |
| |.....................| # # # |----+------| |
| |.....................| ######################## |...........| |
| |.....................| # # |...........| |
| |.....................| # |------+--------------------|...........| |
| |.....................| # |.......................................| |
| |.....................+##########+.......................................| |
| |.....................| |.......................................| |
| |---------------------| |---------------------------------------| |
| |
|-----------------------------------------------------------------------------|
16 changes: 16 additions & 0 deletions cc3k/atkboost.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// atkboost.cpp
// cc3k
//
// Created by Arthur Ren on 2015-07-16.
// Copyright (c) 2015 Tianyi Ben. All rights reserved.
//

#include "atkboost.h"


AtkBoost::AtkBoost(PC *pc, int amount): StatusEffect(pc, amount) {}

AtkBoost::~AtkBoost() {}

int AtkBoost::getAtk() { return pc->getAtk() + amount; }
21 changes: 21 additions & 0 deletions cc3k/atkboost.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// atkboost.h
// cc3k
//
// Created by Arthur Ren on 2015-07-16.
// Copyright (c) 2015 Tianyi Ben. All rights reserved.
//

#ifndef __cc3k__atkboost__
#define __cc3k__atkboost__

#include "status_effect.h"

class AtkBoost: public StatusEffect {
public:
AtkBoost(PC *pc, int amount);
~AtkBoost();
virtual int getAtk();
};

#endif /* defined(__cc3k__atkboost__) */
20 changes: 20 additions & 0 deletions cc3k/atkwound.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// atkwound.cpp
// cc3k
//
// Created by Arthur Ren on 2015-07-16.
// Copyright (c) 2015 Tianyi Ben. All rights reserved.
//

#include "atkwound.h"

AtkWound::AtkWound(PC *pc, int amount): StatusEffect(pc, amount) {}


AtkWound::~AtkWound() {}


int AtkWound::getAtk() {
int temp = pc->getAtk() - amount;
return temp >= 0 ? temp : 0;
} // getAtk
20 changes: 20 additions & 0 deletions cc3k/atkwound.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// atkwound.h
// cc3k
//
// Created by Arthur Ren on 2015-07-16.
// Copyright (c) 2015 Tianyi Ben. All rights reserved.
//

#ifndef __cc3k__atkwound__
#define __cc3k__atkwound__

#include "status_effect.h"

class AtkWound: public StatusEffect {
public:
AtkWound(PC *pc, int amount);
~AtkWound();
virtual int getAtk();
};
#endif /* defined(__cc3k__atkwound__) */
Loading

0 comments on commit c4a41c3

Please sign in to comment.