当前位置: 首页>>代码示例>>C++>>正文


C++ Obj_Character::GetBaseAttackMagic方法代码示例

本文整理汇总了C++中Obj_Character::GetBaseAttackMagic方法的典型用法代码示例。如果您正苦于以下问题:C++ Obj_Character::GetBaseAttackMagic方法的具体用法?C++ Obj_Character::GetBaseAttackMagic怎么用?C++ Obj_Character::GetBaseAttackMagic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Obj_Character的用法示例。


在下文中一共展示了Obj_Character::GetBaseAttackMagic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetRefixRate

 BOOL StdImpact056_T::GetIntAttrRefix(OWN_IMPACT & rImp, Obj_Character& rMe, CharIntAttrRefixs_T::Index_T nIdx, INT & rIntAttrRefix) const
 {
     __ENTER_FUNCTION
     INT nRefixRate = GetRefixRate(rImp);
     nRefixRate += 100;
     INT nValue = 0;
     switch (nIdx)
     {
         case CharIntAttrRefixs_T::REFIX_HIT:
             {
                 if(0!=GetHitRefix(rImp))
                 {
                     nValue = Float2Int((GetHitRefix(rImp)*nRefixRate)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_MISS:
             {
                 if(0!=GetMissRefix(rImp))
                 {
                     nValue = Float2Int((GetMissRefix(rImp)*nRefixRate)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_CRITICAL:
             {
                 if(0!=GetCriticalRefix(rImp))
                 {
                     nValue = Float2Int((GetCriticalRefix(rImp)*nRefixRate)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;                
         //Attacks
         case CharIntAttrRefixs_T::REFIX_ATTACK_PHY:
             {
                 if(0!=GetAttackPhysicsRefix(rImp))
                 {
                     nValue = Float2Int((GetAttackPhysicsRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseAttackPhysics()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_ATTACK_MAGIC:
             {
                 if(0!=GetAttackMagicRefix(rImp))
                 {
                     nValue = Float2Int((GetAttackMagicRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseAttackMagic()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         //Defences
         case CharIntAttrRefixs_T::REFIX_DEFENCE_PHY:
             {
                 if(0!=GetDefencePhysicsRefix(rImp))
                 {
                     nValue = Float2Int((GetDefencePhysicsRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseDefencePhysics()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_DEFENCE_MAGIC:
             {
                 if(0!=GetDefenceMagicRefix(rImp))
                 {
                     nValue = Float2Int((GetDefenceMagicRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseDefenceMagic()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         // Maxes
         case CharIntAttrRefixs_T::REFIX_MAX_HP:
             {
                 if(0!=GetMaxHpRefix(rImp))
                 {
                     nValue = Float2Int((GetMaxHpRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseMaxHP()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         default:
             break;
     }
     __LEAVE_FUNCTION
//.........这里部分代码省略.........
开发者ID:gangzi4494,项目名称:web-pap,代码行数:101,代码来源:StdImpact056.cpp

示例2: GetRefixRate

        BOOL StdImpact012_T::GetIntAttrRefix(OWN_IMPACT & rImp, Obj_Character& rMe, CharIntAttrRefixs_T::Index_T nIdx, INT & rIntAttrRefix) const
        {
            __ENTER_FUNCTION
            INT nRefixRate = GetRefixRate(rImp);
            nRefixRate += 100;
            INT nValue = 0;
            switch (nIdx)
            {
                //Attacks
                case CharIntAttrRefixs_T::REFIX_ATTACK_PHY:
                    {
                        if(0!=GetAttackPhysicsRefix(rImp))
                        {
                            nValue = Float2Int((GetAttackPhysicsRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseAttackPhysics()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;
                case CharIntAttrRefixs_T::REFIX_ATTACK_MAGIC:
                    {
                        if(0!=GetAttackMagicRefix(rImp))
                        {
                            nValue = Float2Int((GetAttackMagicRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseAttackMagic()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;
                case CharIntAttrRefixs_T::REFIX_ATTACK_COLD:
                    {
                        if(0!=GetAttackColdRefix(rImp))
                        {
                            nValue = Float2Int((GetAttackColdRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseAttackCold()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;
                case CharIntAttrRefixs_T::REFIX_ATTACK_FIRE:
                    {
                        if(0!=GetAttackFireRefix(rImp))
                        {
                            nValue = Float2Int((GetAttackFireRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseAttackFire()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;
                case CharIntAttrRefixs_T::REFIX_ATTACK_LIGHT:
                    {
                        if(0!=GetAttackLightRefix(rImp))
                        {
                            nValue = Float2Int((GetAttackLightRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseAttackLight()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;
                case CharIntAttrRefixs_T::REFIX_ATTACK_POISON:
                    {
                        if(0!=GetAttackPoisonRefix(rImp))
                        {
                            nValue = Float2Int((GetAttackPoisonRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseAttackPoison()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;

                //Defences
                case CharIntAttrRefixs_T::REFIX_DEFENCE_PHY:
                    {
                        if(0!=GetDefencePhysicsRefix(rImp))
                        {
                            nValue = Float2Int((GetDefencePhysicsRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseDefencePhysics()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;
                case CharIntAttrRefixs_T::REFIX_DEFENCE_MAGIC:
                    {
                        if(0!=GetDefenceMagicRefix(rImp))
                        {
                            nValue = Float2Int((GetDefenceMagicRefix(rImp)*nRefixRate)/100.0f);
                            nValue = Float2Int((rMe.GetBaseDefenceMagic()*nValue)/100.0f);
                            rIntAttrRefix += nValue;
                            return TRUE;
                        }
                    }
                    break;
                case CharIntAttrRefixs_T::REFIX_RESIST_COLD:
//.........这里部分代码省略.........
开发者ID:gangzi4494,项目名称:web-pap,代码行数:101,代码来源:StdImpact012.cpp


注:本文中的Obj_Character::GetBaseAttackMagic方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。