Torque3D Documentation / _generateds / afxRPGMagicSpell.h

afxRPGMagicSpell.h

Engine/source/afx/rpg/afxRPGMagicSpell.h

More...

Classes:

Public Typedefs

afxRPGMagicSpell_TargetType 

Detailed Description

Public Typedefs

typedef afxRPGMagicSpellDefs::TargetType afxRPGMagicSpell_TargetType 

Public Functions

DefineEnumType(afxRPGMagicSpell_TargetType )

  1
  2
  3//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
  4// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
  5// Copyright (C) 2015 Faust Logic, Inc.
  6//
  7// Permission is hereby granted, free of charge, to any person obtaining a copy
  8// of this software and associated documentation files (the "Software"), to
  9// deal in the Software without restriction, including without limitation the
 10// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 11// sell copies of the Software, and to permit persons to whom the Software is
 12// furnished to do so, subject to the following conditions:
 13//
 14// The above copyright notice and this permission notice shall be included in
 15// all copies or substantial portions of the Software.
 16//
 17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 23// IN THE SOFTWARE.
 24//
 25//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
 26
 27#ifndef _AFX_RPG_MAGIC_SPELL_H_
 28#define _AFX_RPG_MAGIC_SPELL_H_
 29
 30//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
 31
 32#include "core/util/tVector.h"
 33#include "T3D/gameBase/gameBase.h"
 34#include "console/typeValidators.h"
 35
 36#include "afx/afxEffectDefs.h"
 37#include "afx/afxEffectWrapper.h"
 38#include "afx/afxMagicMissile.h"
 39
 40class afxMagicMissileData;
 41class afxEffectWrapperData;
 42class SceneObject;
 43
 44class afxRPGMagicSpellDefs
 45{
 46public:
 47  // Migrate this stuff to RPG Magic-System
 48  enum TargetType {
 49    TARGET_NOTHING,
 50    TARGET_SELF,
 51    TARGET_FRIEND,
 52    TARGET_ENEMY,
 53    TARGET_CORPSE,
 54    TARGET_FREE,
 55  };
 56
 57  enum {
 58    MAX_REAGENTS_PER_SPELL = 8,
 59  };
 60};
 61
 62typedef afxRPGMagicSpellDefs::TargetType afxRPGMagicSpell_TargetType;
 63DefineEnumType( afxRPGMagicSpell_TargetType );
 64
 65class afxRPGMagicSpellData : public GameBaseData, public afxRPGMagicSpellDefs
 66{
 67  typedef GameBaseData Parent;
 68
 69public:
 70  F32               casting_dur;
 71  StringTableEntry  spell_name;
 72  StringTableEntry  spell_desc;
 73  S32               spell_target;
 74  F32               spell_range;
 75  S32               mana_cost;
 76  U8                n_reagents;
 77  S8                reagent_cost[MAX_REAGENTS_PER_SPELL];
 78  StringTableEntry  reagent_name[MAX_REAGENTS_PER_SPELL];
 79  StringTableEntry  icon_name;
 80  StringTableEntry  source_pack;
 81  bool              is_placeholder;
 82  U8                free_target_style;
 83  bool              target_optional;
 84
 85private:
 86  char*             fmt_placeholder_desc(char* buffer, int len) const;
 87
 88public:
 89  /*C*/             afxRPGMagicSpellData();
 90
 91  char*             formatDesc(char* buffer, int len) const;
 92  bool              requiresTarget() { return (spell_target == TARGET_ENEMY || spell_target == TARGET_CORPSE || spell_target == TARGET_FRIEND); }
 93
 94  virtual bool      onAdd();
 95  virtual void      packData(BitStream*);
 96  virtual void      unpackData(BitStream*);
 97
 98  static void       initPersistFields();
 99
100  DECLARE_CONOBJECT(afxRPGMagicSpellData);
101  DECLARE_CATEGORY("AFX");
102};
103
104//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
105
106#endif // _AFX_RPG_MAGIC_SPELL_H_
107