本文整理汇总了C++中Char::get_look方法的典型用法代码示例。如果您正苦于以下问题:C++ Char::get_look方法的具体用法?C++ Char::get_look怎么用?C++ Char::get_look使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Char
的用法示例。
在下文中一共展示了Char::get_look方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply_stats
void Skill::apply_stats(const Char& user, Attack& attack) const
{
attack.skill = skillid;
int32_t level = user.get_skilllevel(skillid);
const SkillData::Stats stats = SkillData::get(skillid).get_stats(level);
if (stats.fixdamage)
{
attack.fixdamage = stats.fixdamage;
attack.damagetype = Attack::DMG_FIXED;
}
else if (stats.matk)
{
attack.matk += stats.matk;
attack.damagetype = Attack::DMG_MAGIC;
}
else
{
attack.mindamage *= stats.damage;
attack.maxdamage *= stats.damage;
attack.damagetype = Attack::DMG_WEAPON;
}
attack.critical += stats.critical;
attack.ignoredef += stats.ignoredef;
attack.mobcount = stats.mobcount;
attack.hrange = stats.hrange;
switch (attack.type)
{
case Attack::RANGED:
attack.hitcount = stats.bulletcount;
break;
default:
attack.hitcount = stats.attackcount;
}
if (!stats.range.empty())
attack.range = stats.range;
if (projectile && !attack.bullet)
{
switch (skillid)
{
case SkillId::THREE_SNAILS:
switch (level)
{
case 1:
attack.bullet = 4000019;
break;
case 2:
attack.bullet = 4000000;
break;
case 3:
attack.bullet = 4000016;
break;
}
break;
default:
attack.bullet = skillid;
}
}
if (overregular)
{
attack.stance = user.get_look().get_stance();
if (attack.type == Attack::CLOSE && !projectile)
{
attack.range = user.get_afterimage().get_range();
}
}
}