1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010-2020 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
,
313 EndFaberMandatory
= BCOGENT02
,
317 BCOA
= BeginFaberOption
,
417 EndFaberOption
= BCZJOD
,
421 BCFACA
= BeginFaberCredit
,
454 EndFaberCredit
= BCZTCA
,
457 BeginFaberRawMaterial
,
458 FARawMaterial
= BeginFaberRawMaterial
,
459 EndFaberRawMaterial
= FARawMaterial
,
462 FATool
= BeginFaberTool
,
463 EndFaberTool
= FATool
,
464 EndFaber
= EndFaberTool
,
466 // FORAGE PROSPECTION
467 // ******************
468 BeginForageProspection
,
469 BeginForageProspectionRoot
= BeginForageProspection
,
470 BHFPPA
= BeginForageProspectionRoot
,
473 EndForageProspectionRoot
= BHFGPA
,
475 BeginForageProspectionOption
,
476 BHFPPOA
= BeginForageProspectionOption
,
489 EndForageProspectionOption
= BHFPSOA
,
491 BeginForageProspectionParameter
,
492 BHFPMA
= BeginForageProspectionParameter
,
529 EndForageProspectionParameter
= BHFPMM
,
531 BeginForageProspectionCredit
,
532 BHFPCA
= BeginForageProspectionCredit
,
533 EndForageProspectionCredit
= BHFPCA
,
535 EndForageProspection
= EndForageProspectionCredit
,
539 BeginForageExtraction
,
540 BeginForageExtractionRoot
= BeginForageExtraction
,
541 BHFEPA
= BeginForageExtractionRoot
,
542 EndForageExtractionRoot
= BHFEPA
,
544 BeginForageExtractionOption
,
545 BHFEOA
= BeginForageExtractionOption
,
553 EndForageExtractionOption
= BHFEOH
,
555 BeginForageExtractionMandatory
,
556 BHFEEA
= BeginForageExtractionMandatory
,
559 EndForageExtractionMandatory
= BHFEEC
,
561 BeginForageExtractionParameter
,
562 BHFEMA
= BeginForageExtractionParameter
,
570 EndForageExtractionParameter
= BHFEMK
,
572 BeginForageExtractionCredit
,
573 BHFECA
= BeginForageExtractionCredit
,
574 EndForageExtractionCredit
= BHFECA
,
576 EndForageExtraction
= EndForageExtractionCredit
,
581 BeginHarvestRoot
= BeginHarvest
,
583 EndHarvestRoot
= RootHarvest
,
584 EndHarvest
= EndHarvestRoot
,
589 BTFOC
= BeginTraining
,
594 // special for carac buying
596 BPPC
= BeginCharacBuy
,
606 EndTraining
= EndCharacBuy
,
610 BPBCA
= BeginBonus
, // Craft: Durability Bonus
611 BPBHFEA
, // Harvest Forage Extraction: Time Bonus
612 BPBGLA
, // Generic Landmark: Extender Bonus
621 // SPECIAL FOR INTERFACE (no interaction)
624 BIF
= BeginInterface
, // Interface for Fight Action representation
625 BIG
, // Interface General bricks.
628 // FOR SPECIAL POWERS
632 BeginPowerRoot
= BeginSpecialPowers
,
633 BSXPA
= BeginSpecialPowers
, // root power/aura
634 EndPowerRoot
= BSXPA
,
638 BSXEA
= BeginPowerMandatory
, // power
640 BSCEA
, // consumable power
641 EndPowerMandatory
= BSCEA
,
645 BeginFightPowerParameter
= BeginPowerParameter
,
646 BSFMA
= BeginFightPowerParameter
, // taunt power
647 BSFMB
, // shielding power
648 BSFMC
, // stamina aura
649 BSFMD
, // protection aura
650 BSFME
, // umbrella aura
653 BSFMH
, // heal stamina
658 EndFightPowerParameter
= BSFML
,
661 BSXMB
, // invulnerability
668 BSGMB
, // enchant weapon
677 BeginMagicPowerParameter
,
678 BSMMA
= BeginMagicPowerParameter
, // sap aura
679 BSMMB
, // anti magic shield
682 EndMagicPowerParameter
= BSMMD
,
689 EndPowerParameter
= BSCMD
,
692 BSGMCB
, // boost allegories
694 BeginMagicPowerCredit
,
695 BSXCA
= BeginMagicPowerCredit
, // recast time
696 EndMagicPowerCredit
= BSXCA
,
698 EndSpecialPowers
= EndMagicPowerCredit
,
703 BAPA
= BeginTimedActions
,
704 EndTimedActions
= BAPA
,
706 /* If you add a new brick Type, you should change
707 isRootFamily(), isMandatoryFamily(), isOptionFamily(), isCreditFamily()
710 BeginProcEnchantement
,
711 BEPA
= BeginProcEnchantement
,
712 EndProcEnchantement
= BEPA
,
718 // Yoyo: just for code below work (isRoot etc....). remove entries when true families described
721 BeginCombatMandatory
= AutoCodeCheck
,
722 EndCombatMandatory
= AutoCodeCheck
,
724 BeginFaberParameter
= AutoCodeCheck
,
725 EndFaberParameter
= AutoCodeCheck
,
727 BeginHarvestMandatory
= AutoCodeCheck
,
728 EndHarvestMandatory
= AutoCodeCheck
,
729 BeginHarvestOption
= AutoCodeCheck
,
730 EndHarvestOption
= AutoCodeCheck
,
731 BeginHarvestCredit
= AutoCodeCheck
,
732 EndHarvestCredit
= AutoCodeCheck
,
733 BeginHarvestParameter
= AutoCodeCheck
,
734 EndHarvestParameter
= AutoCodeCheck
,
736 BeginForageProspectionMandatory
= AutoCodeCheck
,
737 EndForageProspectionMandatory
= AutoCodeCheck
741 * get the right brick family from the input string
742 * \param str the input string
743 * \return the TBrickFamily associated to this string (Unknown if the string cannot be interpreted)
745 TBrickFamily
toSBrickFamily(const std::string
&str
);
748 * get the string associated to a brick family
749 * \param family the TBrickFamily to convert into a string
750 * \return the family as a string
752 const std::string
&toString(TBrickFamily family
);
755 * \return true if the family is a root one
757 inline bool isRootFamily(TBrickFamily family
)
759 return ( (family
>= BeginCombatRoot
&& family
<=EndCombatRoot
) ||
760 (family
>= BeginMagicRoot
&& family
<=EndMagicRoot
) ||
761 (family
>= BeginFaberRoot
&& family
<=EndFaberRoot
) ||
762 (family
>= BeginHarvestRoot
&& family
<=EndHarvestRoot
) ||
763 (family
>= BeginForageProspectionRoot
&& family
<=EndForageProspectionRoot
) ||
764 (family
>= BeginForageExtractionRoot
&& family
<=EndForageExtractionRoot
) ||
765 (family
>= BeginPowerRoot
&& family
<=EndPowerRoot
) ||
766 (family
>= BeginProcEnchantement
&& family
<=EndProcEnchantement
)
771 * \return true if the family is a mandatory one
773 inline bool isMandatoryFamily(TBrickFamily family
)
775 return ( (family
>= BeginCombatMandatory
&& family
<=EndCombatMandatory
) ||
776 (family
>= BeginMagicMandatory
&& family
<=EndMagicMandatory
) ||
777 (family
>= BeginFaberMandatory
&& family
<=EndFaberMandatory
) ||
778 (family
>= BeginHarvestMandatory
&& family
<=EndHarvestMandatory
) ||
779 (family
>= BeginForageProspectionMandatory
&& family
<=EndForageProspectionMandatory
) ||
780 (family
>= BeginForageExtractionMandatory
&& family
<=EndForageExtractionMandatory
) ||
781 (family
>= BeginPowerMandatory
&& family
<=EndPowerMandatory
)
786 * \return true if the family is a optional one
788 inline bool isOptionFamily(TBrickFamily family
)
790 return ( (family
>= BeginCombatOption
&& family
<=EndCombatOption
) ||
791 (family
>= BeginMagicOption
&& family
<=EndMagicOption
) ||
792 (family
>= BeginFaberOption
&& family
<=EndFaberOption
) ||
793 (family
>= BeginHarvestOption
&& family
<=EndHarvestOption
) ||
794 (family
>= BeginForageProspectionOption
&& family
<=EndForageProspectionOption
) ||
795 (family
>= BeginForageExtractionOption
&& family
<=EndForageExtractionOption
)
800 * \return true if the family is a cred one
802 inline bool isCreditFamily(TBrickFamily family
)
804 return ( (family
>= BeginCombatCredit
&& family
<=EndCombatCredit
) ||
805 (family
>= BeginMagicCredit
&& family
<=EndMagicCredit
) ||
806 (family
>= BeginFaberCredit
&& family
<=EndFaberCredit
) ||
807 (family
>= BeginHarvestCredit
&& family
<=EndHarvestCredit
) ||
808 (family
>= BeginForageProspectionCredit
&& family
<=EndForageProspectionCredit
) ||
809 (family
>= BeginForageExtractionCredit
&& family
<=EndForageExtractionCredit
) ||
810 (family
>= BeginMagicPowerCredit
&& family
<=EndMagicPowerCredit
)
815 * \return true if the family is a parameter one
817 inline bool isParameterFamily(TBrickFamily family
)
819 return ( (family
>= BeginCombatParameter
&& family
<=EndCombatParameter
) ||
820 (family
>= BeginMagicParameter
&& family
<=EndMagicParameter
) ||
821 (family
>= BeginFaberParameter
&& family
<=EndFaberParameter
) ||
822 (family
>= BeginHarvestParameter
&& family
<=EndHarvestParameter
) ||
823 (family
>= BeginForageProspectionParameter
&& family
<=EndForageProspectionParameter
) ||
824 (family
>= BeginForageExtractionParameter
&& family
<=EndForageExtractionParameter
) ||
825 (family
>= BeginPowerParameter
&& family
<=EndPowerParameter
)
830 * \return true if the family is a special charac buy family
832 inline bool isCharacBuyFamily(TBrickFamily family
)
834 return (family
>= BeginCharacBuy
&& family
<=EndCharacBuy
);
838 * get the brick type from the brick family
840 BRICK_TYPE::EBrickType
brickType( TBrickFamily family
);
845 #endif // RY_BRICK_FAMILIES_H
846 /* End of brick_families.h */