OpStack.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef OPSTACK_HH_
00018 # define OPSTACK_HH_
00019
00020 # include "Constants.hh"
00021
00022 class SPlayer;
00023 class SRules;
00024
00034 class OpStack
00035 {
00036 public:
00037 OpStack(SRules* r);
00038 virtual ~OpStack();
00039
00040 bool isEmpty() const;
00041 SPlayer* getPlayer() const;
00042 enum eRoll getRollType() const;
00043
00045 void putArmourRoll(SPlayer* p, int av_mod = 0, int inj_mod = 0);
00046 void putBallBounce();
00047 void putBlockBothDownDefender(SPlayer* p);
00048 void putBlockBothDownAttacker(SPlayer* p);
00049 void putBlockDefenderStumble(SPlayer* p);
00050 void putBlockDiceChoice(SPlayer* p);
00051 void putBlockFollowChoice(SPlayer* p);
00052 void putBlockPushChoice(SPlayer* p);
00053 void putBlockRoll(SPlayer* p);
00054 void putCatchBallRoll(SPlayer* p, bool success);
00055 void putDodgeRoll(SPlayer* p, bool success);
00056 void putMove(SPlayer* p, Coordinates aim);
00057 void putPickUpRoll(SPlayer* p, bool success);
00058 void putPushResolution(SPlayer* p);
00059 void putStandUpRoll(SPlayer* p, bool success);
00060 void putTameRoll(SPlayer* p, bool success);
00061 void putThrowRoll(SPlayer* p, int success);
00062
00064 void process(bool reroll = false, int choice = -1);
00065
00066 private:
00067 enum eOperation {
00068 OP_BALL,
00069 OP_BLOCKBDD,
00070 OP_BLOCKBDA,
00071 OP_BLOCKDICE,
00072 OP_BLOCKFOLLOW,
00073 OP_BLOCKPUSH,
00074 OP_BLOCKSTUMBLE,
00075 OP_MOVE,
00076 OP_PUSH,
00077 OP_ROLL,
00078 };
00079 struct Operation {
00080 enum eOperation type;
00081 enum eRoll roll_type;
00082 SPlayer* player;
00083 int success;
00084 int modifier;
00085 int next_mod;
00086 Coordinates aim_coordinates;
00087
00088
00089
00090
00091
00092 };
00093 typedef std::vector<Operation> OperationList;
00094
00095 void put(Operation op);
00096
00097 SRules* r_;
00098 OperationList opv_;
00099 };
00100
00101 #endif