本文整理汇总了C#中Attack.reset_dmg方法的典型用法代码示例。如果您正苦于以下问题:C# Attack.reset_dmg方法的具体用法?C# Attack.reset_dmg怎么用?C# Attack.reset_dmg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attack
的用法示例。
在下文中一共展示了Attack.reset_dmg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: handle_armor_buffs
public void handle_armor_buffs(Scroll.Status_Type fx_type, ref Attack atk)
{
int slash_resist = 0;
int crush_resist = 0;
int pierce_resist = 0;
int fire_resist = 0;
int acid_resist = 0;
int frost_resist = 0;
int elec_resist = 0;
switch (fx_type)
{
case Scroll.Status_Type.LesserMageArmor:
slash_resist = 3;
crush_resist = 2;
pierce_resist = 3;
fire_resist = 1;
frost_resist = 1;
acid_resist = 1;
elec_resist = 2;
break;
case Scroll.Status_Type.LesserSOF:
slash_resist = 1;
crush_resist = 1;
pierce_resist = 2;
fire_resist = 1;
frost_resist = 2;
acid_resist = 1;
elec_resist = 1;
break;
}
int atk_dmg = atk.get_damage_amt();
switch (atk.get_dmg_type())
{
case Attack.Damage.Acid:
atk.reset_dmg(atk_dmg - acid_resist);
break;
case Attack.Damage.Crushing:
atk.reset_dmg(atk_dmg - crush_resist);
break;
case Attack.Damage.Electric:
atk.reset_dmg(atk_dmg - elec_resist);
break;
case Attack.Damage.Fire:
atk.reset_dmg(atk_dmg - fire_resist);
break;
case Attack.Damage.Frost:
atk.reset_dmg(atk_dmg - frost_resist);
break;
case Attack.Damage.Piercing:
atk.reset_dmg(atk_dmg - pierce_resist);
break;
case Attack.Damage.Slashing:
atk.reset_dmg(atk_dmg - slash_resist);
break;
}
}