Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ImprovedSave.h

00001 /*
00002  * ImprovedSave.h -- class interface for Improved Save feat
00003  * Copyright (C) 2002  Eric Lemings <elemings@users.sourceforge.net>
00004  *
00005  * This software is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This software is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this software; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00018  * 02111-1307, USA
00019  *
00020  * RCS: $Id: ImprovedSave.h,v 1.2 2003/03/29 02:10:37 elemings Exp $
00021  */
00022 
00023 #ifdef __cplusplus
00024 
00025 #  ifndef OGS_FEATS_IMPROVED_SAVE_H
00026 #    define OGS_FEATS_IMPROVED_SAVE_H
00027 
00028 #    include <ogs/core/Feat.h>
00029 #    include <ogs/core/Modifier.h>
00030 #    include <ogs/feats/Namespace.h>
00031 
00032 OGS_BEGIN_FEATS_NAMESPACE
00033 
00039 class ImprovedSave: public ogs::core::Feat {
00040   public:
00042     enum Type {
00043 
00045       GREAT_FORTITUDE,
00046 
00048       IRON_WILL,
00049 
00051       LIGHTNING_REFLEXES,
00052     };
00053 
00054     static ImprovedSave* createGreatFortitude ();
00055     static ImprovedSave* createIronWill ();
00056     static ImprovedSave* createLightningReflexes ();
00057 
00058     bool attachObject (Object& object);
00059     bool detachObject ();
00060     ogs::core::Feat::Compatibility getCompatibility () const;
00061     ogs::core::Feat::Group getGroup () const;
00062 
00063     Type getType () const;
00064 
00065   private:
00066     Type _type;
00067     static ogs::core::Modifier _modifier;
00068 
00069     ImprovedSave (Type type);
00070 
00071     bool canAttach (const Object& object) const;
00072 };
00073 
00080 inline ogs::core::Feat::Compatibility
00081 ImprovedSave::getCompatibility () const {
00082   return (ogs::core::Feat::EXCLUSIVE);
00083 }
00084 
00091 inline ogs::core::Feat::Group
00092 ImprovedSave::getGroup () const {
00093   return (ogs::core::Feat::GENERAL);
00094 }
00095 
00101 inline ImprovedSave::Type
00102 ImprovedSave::getType () const {
00103   return (this->_type);
00104 }
00105 
00106 OGS_END_FEATS_NAMESPACE
00107 
00108 #  endif /* !defined OGS_FEATS_IMPROVED_SAVE_H */
00109 
00110 #endif /* defined __cplusplus */
00111 

Generated on Sun Apr 20 03:36:20 2003 for Open Gaming System (OGS) by doxygen1.3