1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef RY_BRICK_FAMILIES_H
20 #define RY_BRICK_FAMILIES_H
22 #include "nel/misc/types_nl.h"
23 #include "brick_types.h"
25 namespace BRICK_FAMILIES
33 BeginCombatRoot
= BeginCombat
,
34 BFPA
= BeginCombatRoot
,
38 //BeginCombatMandatory,
39 //EndCombatMandatory = ???,
43 BFOA
= BeginCombatOption
,
49 EndCombatOption
= BFOF
,
53 BFMA
= BeginCombatParameter
,
61 BFMRF
, // Range dmg Fire
62 BFMRT
, // Range dmg Poison
63 BFMRW
, // Range dmg Shockwave
64 BFMRE
, // Range dmg Electricity
88 // deprecated: only used in saibricks
144 EndCombatParameter
= BFMP
,
148 BFCA
= BeginCombatCredit
,
155 EndCombatCredit
= BFCG
,
156 EndCombat
= EndCombatCredit
,
162 BeginMagicRoot
= BeginMagic
,
163 BMPA
= BeginMagicRoot
,
168 BMDALEA
= BeginMagicMandatory
,
174 EndMagicMandatory
= BMSTEA
,
178 BMOF
= BeginMagicOption
,
183 EndMagicOption
= BMOV
,
187 BMTODMB
= BeginMagicParameter
,
217 EndMagicParameter
= BMSTMT
,
221 BMCA
= BeginMagicCredit
,
225 EndMagicCredit
= BMCR
,
226 EndMagic
= EndMagicCredit
,
232 BeginFaberRoot
= BeginFaber
,
233 BCPA
= BeginFaberRoot
,
238 BCCMEA
= BeginFaberMandatory
,
300 EndFaberMandatory
= BCOKART02
,
304 BCOA
= BeginFaberOption
,
404 EndFaberOption
= BCZJOD
,
408 BCFACA
= BeginFaberCredit
,
441 EndFaberCredit
= BCZTCA
,
444 BeginFaberRawMaterial
,
445 FARawMaterial
= BeginFaberRawMaterial
,
446 EndFaberRawMaterial
= FARawMaterial
,
449 FATool
= BeginFaberTool
,
450 EndFaberTool
= FATool
,
451 EndFaber
= EndFaberTool
,
453 // FORAGE PROSPECTION
454 // ******************
455 BeginForageProspection
,
456 BeginForageProspectionRoot
= BeginForageProspection
,
457 BHFPPA
= BeginForageProspectionRoot
,
460 EndForageProspectionRoot
= BHFGPA
,
462 BeginForageProspectionOption
,
463 BHFPPOA
= BeginForageProspectionOption
,
476 EndForageProspectionOption
= BHFPSOA
,
478 BeginForageProspectionParameter
,
479 BHFPMA
= BeginForageProspectionParameter
,
516 EndForageProspectionParameter
= BHFPMM
,
518 BeginForageProspectionCredit
,
519 BHFPCA
= BeginForageProspectionCredit
,
520 EndForageProspectionCredit
= BHFPCA
,
522 EndForageProspection
= EndForageProspectionCredit
,
526 BeginForageExtraction
,
527 BeginForageExtractionRoot
= BeginForageExtraction
,
528 BHFEPA
= BeginForageExtractionRoot
,
529 EndForageExtractionRoot
= BHFEPA
,
531 BeginForageExtractionOption
,
532 BHFEOA
= BeginForageExtractionOption
,
540 EndForageExtractionOption
= BHFEOH
,
542 BeginForageExtractionMandatory
,
543 BHFEEA
= BeginForageExtractionMandatory
,
546 EndForageExtractionMandatory
= BHFEEC
,
548 BeginForageExtractionParameter
,
549 BHFEMA
= BeginForageExtractionParameter
,
557 EndForageExtractionParameter
= BHFEMK
,
559 BeginForageExtractionCredit
,
560 BHFECA
= BeginForageExtractionCredit
,
561 EndForageExtractionCredit
= BHFECA
,
563 EndForageExtraction
= EndForageExtractionCredit
,
568 BeginHarvestRoot
= BeginHarvest
,
570 EndHarvestRoot
= RootHarvest
,
571 EndHarvest
= EndHarvestRoot
,
576 BTFOC
= BeginTraining
,
581 // special for carac buying
583 BPPC
= BeginCharacBuy
,
593 EndTraining
= EndCharacBuy
,
597 BPBCA
= BeginBonus
, // Craft: Durability Bonus
598 BPBHFEA
, // Harvest Forage Extraction: Time Bonus
599 BPBGLA
, // Generic Landmark: Extender Bonus
608 // SPECIAL FOR INTERFACE (no interaction)
611 BIF
= BeginInterface
, // Interface for Fight Action representation
612 BIG
, // Interface General bricks.
615 // FOR SPECIAL POWERS
619 BeginPowerRoot
= BeginSpecialPowers
,
620 BSXPA
= BeginSpecialPowers
, // root power/aura
621 EndPowerRoot
= BSXPA
,
625 BSXEA
= BeginPowerMandatory
, // power
627 BSCEA
, // consumable power
628 EndPowerMandatory
= BSCEA
,
632 BeginFightPowerParameter
= BeginPowerParameter
,
633 BSFMA
= BeginFightPowerParameter
, // taunt power
634 BSFMB
, // shielding power
635 BSFMC
, // stamina aura
636 BSFMD
, // protection aura
637 BSFME
, // umbrella aura
640 BSFMH
, // heal stamina
645 EndFightPowerParameter
= BSFML
,
648 BSXMB
, // invulnerability
655 BSGMB
, // enchant weapon
664 BeginMagicPowerParameter
,
665 BSMMA
= BeginMagicPowerParameter
, // sap aura
666 BSMMB
, // anti magic shield
669 EndMagicPowerParameter
= BSMMD
,
676 EndPowerParameter
= BSCMD
,
678 BeginMagicPowerCredit
,
679 BSXCA
= BeginMagicPowerCredit
, // recast time
680 EndMagicPowerCredit
= BSXCA
,
682 EndSpecialPowers
= EndMagicPowerCredit
,
687 BAPA
= BeginTimedActions
,
688 EndTimedActions
= BAPA
,
690 /* If you add a new brick Type, you should change
691 isRootFamily(), isMandatoryFamily(), isOptionFamily(), isCreditFamily()
694 BeginProcEnchantement
,
695 BEPA
= BeginProcEnchantement
,
696 EndProcEnchantement
= BEPA
,
702 // Yoyo: just for code below work (isRoot etc....). remove entries when true families described
705 BeginCombatMandatory
= AutoCodeCheck
,
706 EndCombatMandatory
= AutoCodeCheck
,
708 BeginFaberParameter
= AutoCodeCheck
,
709 EndFaberParameter
= AutoCodeCheck
,
711 BeginHarvestMandatory
= AutoCodeCheck
,
712 EndHarvestMandatory
= AutoCodeCheck
,
713 BeginHarvestOption
= AutoCodeCheck
,
714 EndHarvestOption
= AutoCodeCheck
,
715 BeginHarvestCredit
= AutoCodeCheck
,
716 EndHarvestCredit
= AutoCodeCheck
,
717 BeginHarvestParameter
= AutoCodeCheck
,
718 EndHarvestParameter
= AutoCodeCheck
,
720 BeginForageProspectionMandatory
= AutoCodeCheck
,
721 EndForageProspectionMandatory
= AutoCodeCheck
725 * get the right brick family from the input string
726 * \param str the input string
727 * \return the TBrickFamily associated to this string (Unknown if the string cannot be interpreted)
729 TBrickFamily
toSBrickFamily(const std::string
&str
);
732 * get the string associated to a brick family
733 * \param family the TBrickFamily to convert into a string
734 * \return the family as a string
736 const std::string
&toString(TBrickFamily family
);
739 * \return true if the family is a root one
741 inline bool isRootFamily(TBrickFamily family
)
743 return ( (family
>= BeginCombatRoot
&& family
<=EndCombatRoot
) ||
744 (family
>= BeginMagicRoot
&& family
<=EndMagicRoot
) ||
745 (family
>= BeginFaberRoot
&& family
<=EndFaberRoot
) ||
746 (family
>= BeginHarvestRoot
&& family
<=EndHarvestRoot
) ||
747 (family
>= BeginForageProspectionRoot
&& family
<=EndForageProspectionRoot
) ||
748 (family
>= BeginForageExtractionRoot
&& family
<=EndForageExtractionRoot
) ||
749 (family
>= BeginPowerRoot
&& family
<=EndPowerRoot
) ||
750 (family
>= BeginProcEnchantement
&& family
<=EndProcEnchantement
)
755 * \return true if the family is a mandatory one
757 inline bool isMandatoryFamily(TBrickFamily family
)
759 return ( (family
>= BeginCombatMandatory
&& family
<=EndCombatMandatory
) ||
760 (family
>= BeginMagicMandatory
&& family
<=EndMagicMandatory
) ||
761 (family
>= BeginFaberMandatory
&& family
<=EndFaberMandatory
) ||
762 (family
>= BeginHarvestMandatory
&& family
<=EndHarvestMandatory
) ||
763 (family
>= BeginForageProspectionMandatory
&& family
<=EndForageProspectionMandatory
) ||
764 (family
>= BeginForageExtractionMandatory
&& family
<=EndForageExtractionMandatory
) ||
765 (family
>= BeginPowerMandatory
&& family
<=EndPowerMandatory
)
770 * \return true if the family is a optional one
772 inline bool isOptionFamily(TBrickFamily family
)
774 return ( (family
>= BeginCombatOption
&& family
<=EndCombatOption
) ||
775 (family
>= BeginMagicOption
&& family
<=EndMagicOption
) ||
776 (family
>= BeginFaberOption
&& family
<=EndFaberOption
) ||
777 (family
>= BeginHarvestOption
&& family
<=EndHarvestOption
) ||
778 (family
>= BeginForageProspectionOption
&& family
<=EndForageProspectionOption
) ||
779 (family
>= BeginForageExtractionOption
&& family
<=EndForageExtractionOption
)
784 * \return true if the family is a cred one
786 inline bool isCreditFamily(TBrickFamily family
)
788 return ( (family
>= BeginCombatCredit
&& family
<=EndCombatCredit
) ||
789 (family
>= BeginMagicCredit
&& family
<=EndMagicCredit
) ||
790 (family
>= BeginFaberCredit
&& family
<=EndFaberCredit
) ||
791 (family
>= BeginHarvestCredit
&& family
<=EndHarvestCredit
) ||
792 (family
>= BeginForageProspectionCredit
&& family
<=EndForageProspectionCredit
) ||
793 (family
>= BeginForageExtractionCredit
&& family
<=EndForageExtractionCredit
) ||
794 (family
>= BeginMagicPowerCredit
&& family
<=EndMagicPowerCredit
)
799 * \return true if the family is a parameter one
801 inline bool isParameterFamily(TBrickFamily family
)
803 return ( (family
>= BeginCombatParameter
&& family
<=EndCombatParameter
) ||
804 (family
>= BeginMagicParameter
&& family
<=EndMagicParameter
) ||
805 (family
>= BeginFaberParameter
&& family
<=EndFaberParameter
) ||
806 (family
>= BeginHarvestParameter
&& family
<=EndHarvestParameter
) ||
807 (family
>= BeginForageProspectionParameter
&& family
<=EndForageProspectionParameter
) ||
808 (family
>= BeginForageExtractionParameter
&& family
<=EndForageExtractionParameter
) ||
809 (family
>= BeginPowerParameter
&& family
<=EndPowerParameter
)
814 * \return true if the family is a special charac buy family
816 inline bool isCharacBuyFamily(TBrickFamily family
)
818 return (family
>= BeginCharacBuy
&& family
<=EndCharacBuy
);
822 * get the brick type from the brick family
824 BRICK_TYPE::EBrickType
brickType( TBrickFamily family
);
829 #endif // RY_BRICK_FAMILIES_H
830 /* End of brick_families.h */